Skip to content

Conversation

aokblast
Copy link

This setting is for adoption for the new single usb device passthru feature in bhyve.

Current, it works by add the following lines in your vm configuration:
xhci_passthru1="vid.pid"
xhci_passthru2="vid.pid"
xhci_passthru3="vid.pid"
Where vid is the vendor id hex value and pid is the product id hex value.

You can at most have 8 devices (plus xhci_mouse).

@aokblast
Copy link
Author

Corresponding patch: https://reviews.freebsd.org/D52166

@michael-o
Copy link
Contributor

Why is it limited to eight and how to identify if you have the same device twice, e.g. USB stick?

@aokblast
Copy link
Author

aokblast commented Aug 29, 2025

8 is hardcoded from the bhyve. This number is hard-coded to bhyve so that bhyve pre-alloc port resource. Of course, we can increase the number if we want. Not too much overhead on this.
For multiple same devices, It will recognize the first one appears in the usbconfig. Of course we can provide such like hub.port pair to support multiple same device. But the hotplug will be unavailable since they may have different hub.port pair when plug-in again. Also, hub.port pair would be difficult to configure since it change everytime and of course we don't want the config file change everytime.

@michael-o
Copy link
Contributor

Is there a way to detect whether the current system supports this at all like done in #37?

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.

2 participants