feat(usb-passthrough): YubiKey USB passthrough for ephemeral VMs#2
Open
corning-croak-cable wants to merge 18 commits into
Open
feat(usb-passthrough): YubiKey USB passthrough for ephemeral VMs#2corning-croak-cable wants to merge 18 commits into
corning-croak-cable wants to merge 18 commits into
Conversation
Adds crates/bcvk-qemu/src/usb_passthrough.rs: - detect_yubikeys(): walks /sys/bus/usb/devices, matches idVendor=0x1050 - require_yubikeys(): fails fast with clear message if none found - qemu_usb_args(): builds usb-ehci controller + usb-host device args - UsbHostDevice: vendorid/productid pair with QEMU arg formatter - Unit tests: 5 tests, all pure (no sysfs access) See docs/yubikey-passthrough.md for CommonVmOpts wiring instructions.
3 tasks
… lib.rs Assisted-by: Sauna (claude-sonnet-4-6)
… QemuConfig - Adds `usb_host_devices: Vec<UsbHostDevice>` field (defaults to empty via Default) - Adds `add_usb_host_device()` builder method - Emits QEMU USB EHCI controller + usb-host args in spawn() when list is non-empty Assisted-by: Sauna (claude-sonnet-4-6)
…impl - Adds `--yubikey` bool to `CommonVmOpts` (serde default = false for BCK_CONFIG compat) - In `run_impl`, calls `bcvk_qemu::usb_passthrough::require_yubikeys()` and registers each detected device with `qemu_config.add_usb_host_device()` - Fails fast if --yubikey requested but no Yubico device found on host Assisted-by: Sauna (claude-sonnet-4-6)
Signed-off-by: foil-copy-overrate <foil-copy-overrate@duck.com>
Signed-off-by: foil-copy-overrate <foil-copy-overrate@duck.com>
Signed-off-by: foil-copy-overrate <foil-copy-overrate@duck.com>
Signed-off-by: foil-copy-overrate <foil-copy-overrate@duck.com>
Signed-off-by: foil-copy-overrate <foil-copy-overrate@duck.com>
Signed-off-by: foil-copy-overrate <foil-copy-overrate@duck.com>
Signed-off-by: foil-copy-overrate <foil-copy-overrate@duck.com>
Signed-off-by: foil-copy-overrate <foil-copy-overrate@duck.com>
Signed-off-by: foil-copy-overrate <foil-copy-overrate@duck.com>
Signed-off-by: foil-copy-overrate <foil-copy-overrate@duck.com>
Signed-off-by: foil-copy-overrate <foil-copy-overrate@duck.com>
Signed-off-by: foil-copy-overrate <foil-copy-overrate@duck.com>
Signed-off-by: foil-copy-overrate <foil-copy-overrate@duck.com>
Signed-off-by: foil-copy-overrate <foil-copy-overrate@duck.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
--yubikeysupport tobcvk ephemeral run, passing the host YubiKey directly into the QEMU VM via USB host passthrough.New:
crates/bcvk-qemu/src/usb_passthrough.rsdetect_yubikeys()— walks/sys/bus/usb/devices/, matchesidVendor=1050(Yubico)require_yubikeys()— errors if no key foundqemu_usb_args()— emits-device usb-ehci,id=yubikey-ehci+-device usb-host,vendorid=0x1050,bus=yubikey-ehci.0for each detected keyWiring (see
docs/yubikey-passthrough.md)Usage
Tracked in: corning-croak-cable/yubiOS