IOMMU isolated network support #47

Manually merged
ryan merged 15 commits from iommu-net into main 2025-05-01 20:46:10 +00:00
Owner

Features

  • Tethering from mobile device
    • iOS is more complex, but tested
  • PCI ethernet passthrough
    • Any ethernet devices are automatically passed to netvm
  • Push/pull files from netvm
  • Attach USB devices to netvm
    • for tethering, or anything else

Usage

netvm

	Control network vm headlessly via QMP protocol

	Usage:
	  netvm start
	      Start headless network vm in the background
	  netvm stop
	      Stop headless network vm
	  netvm shell
	      Start interactive network vm in the foreground
      netvm attach <usb-id>
          Forward a USB device from the host to the netvm Guest
	  netvm status
	      Get hostname and uptime from running network vm
      	  netvm attach <vendorid:deviceid>
	      Hot-plug a USB device to network VM
	  netvm push <local-path> <remote-path>
	      Push a local file to the network VM
	  netvm pull <remote-path> <local-path>
	      Pull a file from the network VM
	  netvm run "<command>"
	      Run a command in network vm and get stdout

Example

Download new airgap.iso from within netvm:

netvm start
netvm attach xxx:xxx
netvm run nohup usbmuxd
netvm run nohup dhcpcd
netvm run wget http://216.176.190.42/airgap.iso
netvm run sha256sum airgap.iso

Known issues

  • MVP implementation of netvm frontend is in shell and bad at unicode handling atm
  • Socket flushing is currently slow due to the "0xFF" flush bit not working as documented
  • Looking to address both of the above issues in a straight port to rust as a fast follow
  • Attaching network devices is still manual. Will be addressed by udev rules after more testing
### Features - Tethering from mobile device - iOS is more complex, but tested - PCI ethernet passthrough - Any ethernet devices are automatically passed to netvm - Push/pull files from netvm - Attach USB devices to netvm - for tethering, or anything else ### Usage ``` netvm Control network vm headlessly via QMP protocol Usage: netvm start Start headless network vm in the background netvm stop Stop headless network vm netvm shell Start interactive network vm in the foreground netvm attach <usb-id> Forward a USB device from the host to the netvm Guest netvm status Get hostname and uptime from running network vm netvm attach <vendorid:deviceid> Hot-plug a USB device to network VM netvm push <local-path> <remote-path> Push a local file to the network VM netvm pull <remote-path> <local-path> Pull a file from the network VM netvm run "<command>" Run a command in network vm and get stdout ``` ## Example Download new airgap.iso from within netvm: ``` netvm start netvm attach xxx:xxx netvm run nohup usbmuxd netvm run nohup dhcpcd netvm run wget http://216.176.190.42/airgap.iso netvm run sha256sum airgap.iso ``` ### Known issues - MVP implementation of netvm frontend is in shell and bad at unicode handling atm - Socket flushing is currently slow due to the "0xFF" flush bit not working as documented - Looking to address both of the above issues in a straight port to rust as a fast follow - Attaching network devices is still manual. Will be addressed by udev rules after more testing
lrvick added 12 commits 2025-05-01 16:50:04 +00:00
lrvick changed title from iommu-net to IOMMU isolated network support 2025-05-01 17:10:24 +00:00
anton added 1 commit 2025-05-01 17:52:02 +00:00
lrvick added 1 commit 2025-05-01 20:21:36 +00:00
anton added 1 commit 2025-05-01 20:42:00 +00:00
ryan manually merged commit 133a7c9b5b into main 2025-05-01 20:46:10 +00:00
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: public/airgap#47
No description provided.