Skip to content

Add USB passthrough - #937

Draft
sax wants to merge 1 commit into
apple:mainfrom
sax:sax/usb-passthrough
Draft

sax wants to merge 1 commit into
apple:mainfrom
sax:sax/usb-passthrough

Conversation

@sax

@sax sax commented Sep 24, 2026 •

Copy link
Copy Markdown

Guest kernel config (kernel/config-arm64)

USBPassthrough gives the VM an emulated XHCI controller, which Linux can't see without these options:

  • CONFIG_USB_SUPPORT, CONFIG_USB - USB core
  • CONFIG_USB_PCI - Finds USB host controllers on the PCI bus
  • CONFIG_USB_XHCI_HCD - XHCI (USB 3) host controller driver
  • CONFIG_USB_XHCI_PCI - Binds the xHCI driver to PCI xHCI controllers
  • CONFIG_USB_ACM - CDC-ACM class driver (/dev/ttyACM*)

USBPassthrough gives the VM an emulated xHCI controller, which Virtualization.framework exposes as a PCI device. The guest needs the USB core (CONFIG_USB_SUPPORT, CONFIG_USB), PCI discovery of USB controllers (CONFIG_USB_PCI), and the xHCI driver with its PCI binding (CONFIG_USB_XHCI_HCD, CONFIG_USB_XHCI_PCI) to find it and show passed-through devices under /dev/bus/usb. CONFIG_USB_ACM isn't needed for passthrough. It adds serial access to CDC-ACM devices such as official Arduino boards. Other device classes stay disabled in these changes to keep the kernel small(er)

Entitlements

USB passthrough requires the com.apple.developer.accessory-access.usb entitlement. There is no one place in this repo to document entitlements, but this in included in inline doc comments.

@sax
sax force-pushed the sax/usb-passthrough branch 4 times, most recently from 702c3e9 to 429a1c5 Compare September 24, 2026 19:42
@sax
sax force-pushed the sax/usb-passthrough branch from 429a1c5 to 1f034e5 Compare September 24, 2026 19:48

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant