Page MenuHomeFreeBSD
Feed Search

Sep 3 2025

aokblast added a comment to D52166: bhyve: implement single USB device passthrough support.

Hello, could you please set the xhci_debug=1 and usb_passthru_debug=1 in bhyve and send me the report? The report maybe very long I think.

Quick question. How can I go about setting those options and generating the report using vm-bhyve? I already patched it using the diff from your github PR.

Hello, sorry it is from the code directly since it works like the normal DPRINTF. xhci_debug is in pci_xhci.c. usb_passthru_debug is in usb_passthru.c

Gotcha, thanks for clarifying: Here is the report (3911 lines): https://gist.github.com/kenrap/ecfc003562bd8717900a46de4903d7bf

Sep 3 2025, 4:07 PM
aokblast added a comment to D52166: bhyve: implement single USB device passthrough support.

Thanks @obiwac!

Sep 3 2025, 4:07 PM
aokblast updated the diff for D52166: bhyve: implement single USB device passthrough support.

Fixes from comment

Sep 3 2025, 4:06 PM
aokblast added a comment to D52166: bhyve: implement single USB device passthrough support.

Hello, could you please set the xhci_debug=1 and usb_passthru_debug=1 in bhyve and send me the report? The report maybe very long I think.

Quick question. How can I go about setting those options and generating the report using vm-bhyve? I already patched it using the diff from your github PR.

Sep 3 2025, 1:31 PM
aokblast added a comment to D52166: bhyve: implement single USB device passthrough support.

Hello, could you please try again. I forget to adopt multiple configurations.

With your latest changes, it does prevent bhyve from crashing. Appreciate it!

So, now it seems to create an additional 22 second stall at boot compared to without passing through the ssd with usb adapter.

When fully booted, it seems like it doesn't recognize it as if it weren't passthru'd.

Sep 3 2025, 7:34 AM

Sep 2 2025

aokblast requested review of D52347: usb: support usb 3.1 (SuperSpeedPlus) and usb 3.2 (SuperSpeedPlus_x2) addressing and display for xhci..
Sep 2 2025, 6:44 PM

Sep 1 2025

aokblast updated the diff for D52321: usb: Add support for SSPlus isochronous companion descriptor.

Follow xHCI document

Sep 1 2025, 4:50 PM
aokblast added reviewers for D52321: usb: Add support for SSPlus isochronous companion descriptor: USB, markj, lwhsu.
Sep 1 2025, 3:59 PM
aokblast requested review of D52321: usb: Add support for SSPlus isochronous companion descriptor.
Sep 1 2025, 3:58 PM

Aug 31 2025

aokblast added inline comments to D52166: bhyve: implement single USB device passthrough support.
Aug 31 2025, 5:32 PM
aokblast updated the diff for D52166: bhyve: implement single USB device passthrough support.

Set PCD to report port status change

Aug 31 2025, 5:30 PM
aokblast updated the diff for D52166: bhyve: implement single USB device passthrough support.

Set PCD for FreeBSD

Aug 31 2025, 5:29 PM
aokblast added a comment to D52166: bhyve: implement single USB device passthrough support.

Hello, could you please try again. I forget to adopt multiple configurations.

Aug 31 2025, 11:51 AM
aokblast updated the diff for D52244: usb: preserve error when doing request.

Minor updates

Aug 31 2025, 11:50 AM
aokblast updated the diff for D52166: bhyve: implement single USB device passthrough support.

Honor different configuration.

Aug 31 2025, 11:49 AM

Aug 30 2025

aokblast added a comment to D52166: bhyve: implement single USB device passthrough support.

For some reason when passing through an SSD with a sata-to-usb3 adapter, it causes bhyve to crash when the Linux kernel is starting to boot.

However, regular usb3 mass storage works fine and is recognized.

Aug 30 2025, 2:34 PM

Aug 29 2025

aokblast updated the summary of D52244: usb: preserve error when doing request.
Aug 29 2025, 5:31 PM
aokblast added a reviewer for D52244: usb: preserve error when doing request: USB.
Aug 29 2025, 5:25 PM
aokblast requested review of D52244: usb: preserve error when doing request.
Aug 29 2025, 5:25 PM
aokblast added a comment to D52166: bhyve: implement single USB device passthrough support.

I have tested on Windows and works fine. An interesting thing is that when I plug in a Linux Live CD. The UEFI shell recognize it and want me to install Linux:).

Aug 29 2025, 3:49 PM
aokblast updated the test plan for D52166: bhyve: implement single USB device passthrough support.
Aug 29 2025, 3:48 PM
aokblast updated the diff for D52166: bhyve: implement single USB device passthrough support.

Fix windows related bug.

Aug 29 2025, 3:47 PM
aokblast added a comment to D51759: libusb: implement zlp flag in libusb transfer.

This implemented is problematic since the correct way is to append a zero size TRB in TD instead of creating new TD. However, I think I am unable to make it work before 15.0 release. Therefore, I will modify it to at least we won't break any ABI for 15 if we want to merge later.

Aug 29 2025, 6:38 AM

Aug 28 2025

aokblast updated the test plan for D52166: bhyve: implement single USB device passthrough support.
Aug 28 2025, 3:06 PM
aokblast updated the test plan for D52166: bhyve: implement single USB device passthrough support.
Aug 28 2025, 3:05 PM
aokblast updated the test plan for D52166: bhyve: implement single USB device passthrough support.
Aug 28 2025, 3:05 PM
aokblast updated the diff for D51735: bhyve: introduce cancel interface for usb device.

No clear in reset

Aug 28 2025, 2:51 PM
aokblast updated the diff for D52166: bhyve: implement single USB device passthrough support.

Add total number of xfer to xhci

Aug 28 2025, 2:50 PM
aokblast updated the diff for D52166: bhyve: implement single USB device passthrough support.

Fix various locking problem

Aug 28 2025, 6:31 AM
aokblast updated the diff for D51735: bhyve: introduce cancel interface for usb device.

Destroy mutex

Aug 28 2025, 6:30 AM

Aug 27 2025

aokblast updated the diff for D52166: bhyve: implement single USB device passthrough support.

Rename upassthru -> usb_passthru

Aug 27 2025, 6:29 PM
aokblast updated the diff for D51735: bhyve: introduce cancel interface for usb device.

Use (void)

Aug 27 2025, 6:25 PM
aokblast updated the diff for D51735: bhyve: introduce cancel interface for usb device.

Formatting

Aug 27 2025, 4:03 PM
aokblast updated the diff for D51735: bhyve: introduce cancel interface for usb device.

Use int

Aug 27 2025, 4:01 PM
aokblast added inline comments to D52166: bhyve: implement single USB device passthrough support.
Aug 27 2025, 3:36 PM
aokblast updated the diff for D52166: bhyve: implement single USB device passthrough support.

Minor fixes

Aug 27 2025, 3:35 PM
aokblast added inline comments to D51735: bhyve: introduce cancel interface for usb device.
Aug 27 2025, 3:34 PM
aokblast added inline comments to D51735: bhyve: introduce cancel interface for usb device.
Aug 27 2025, 3:34 PM
aokblast updated the diff for D51735: bhyve: introduce cancel interface for usb device.

Add missing ue_cancel

Aug 27 2025, 3:31 PM
aokblast updated the diff for D51735: bhyve: introduce cancel interface for usb device.

Minor fixes

Aug 27 2025, 1:32 PM
aokblast updated the diff for D52122: usb: implement attach kernel driver.

Minor fixes

Aug 27 2025, 1:23 PM
aokblast added a comment to D47930: contrib/libxo: fix API header files inclusions in C++ source files.

Why do you need this on xo_buf.h, an internal file?

In the FWIW department: It always seems odd that C++ needs decoration in non-C++ files, rather that have this knowledge in compiler command line arguments (e.g. "--c-include /usr/include").

Thanks,
Phil

Aug 27 2025, 12:49 PM

Aug 26 2025

aokblast added a comment to D52166: bhyve: implement single USB device passthrough support.

Also, thanks for helping me test it!

Aug 26 2025, 5:48 PM
aokblast added a comment to D52166: bhyve: implement single USB device passthrough support.
In D52166#1191842, @bz wrote:

I have to second the *wow* given I have started this myself not knowing you are working on it.

I'll be happy to contribute the code for ugen selector as I have multiple v/d duplicates on laptops. doesn't need libusb changes, just a bit more parsing and looping (assuming my code fits in yours).
ugen matching isn't ideal either as you unplug/plug things and the bus.addr change and you have to update the config file... If you meant adding ugen checks on top of v/d then...

I think some of the fixes should be factored out upfront and commit separately.

I'll definitively test this by the end of the week with smart cards, some licensing dongle (very weird thing), and some wifi dongles.

Aug 26 2025, 5:48 PM
aokblast updated the test plan for D52166: bhyve: implement single USB device passthrough support.
Aug 26 2025, 5:30 PM
aokblast added a comment to D52166: bhyve: implement single USB device passthrough support.

Wow this is exciting! How do we use this? Can we put it in the manual?

Aug 26 2025, 5:23 PM
aokblast updated the diff for D52166: bhyve: implement single USB device passthrough support.

Reorder include

Aug 26 2025, 4:20 PM
aokblast updated the diff for D52166: bhyve: implement single USB device passthrough support.

FOrmatting

Aug 26 2025, 4:18 PM
aokblast updated the test plan for D52166: bhyve: implement single USB device passthrough support.
Aug 26 2025, 4:06 PM
aokblast added inline comments to D52122: usb: implement attach kernel driver.
Aug 26 2025, 4:03 PM
aokblast requested review of D52166: bhyve: implement single USB device passthrough support.
Aug 26 2025, 3:59 PM
aokblast committed rG50efb5789d32: i6300esbwd: Note update in RELNOTES.
Aug 26 2025, 4:54 AM
aokblast closed D52152: i6300esbwd: Note update in RELNOTES.
Aug 26 2025, 4:53 AM

Aug 25 2025

aokblast updated the diff for D52152: i6300esbwd: Note update in RELNOTES.

Format fixes

Aug 25 2025, 5:02 PM
aokblast added reviewers for D52152: i6300esbwd: Note update in RELNOTES: lwhsu, markj.
Aug 25 2025, 4:19 PM
aokblast requested review of D52152: i6300esbwd: Note update in RELNOTES.
Aug 25 2025, 4:18 PM
aokblast committed rG2b74ff5fceb6: ichwd: introduce i6300esbwd watch dog driver.
Aug 25 2025, 3:46 PM
aokblast closed D52049: ichwd: introduce i6300esb watch dog driver.
Aug 25 2025, 3:46 PM
aokblast added inline comments to D51588: amdgpio: Mask and service interrupts.
Aug 25 2025, 3:40 PM
aokblast added inline comments to D51589: amdgpio: Suspend routine.
Aug 25 2025, 3:37 PM
aokblast accepted D51588: amdgpio: Mask and service interrupts.
Aug 25 2025, 3:17 PM
aokblast updated the diff for D52049: ichwd: introduce i6300esb watch dog driver.

Remove useless constant

Aug 25 2025, 2:17 PM
aokblast added a comment to D52049: ichwd: introduce i6300esb watch dog driver.

I think it's ok, thank you.

One thing I am not sure about: should we just compile the new driver into ichwd.ko rather than create a new kernel module? I do not think it is a major issue, but personally I would probably just fold this into ichwd.ko to keep the diff smaller. I leave it up to you.

I never do that before. Can I define two modules inside a ko? I know that the kernel module is done through special ELF section and will be handled by kernel loader. I don't know if the linker works on combining these two into a single section.

Yes! It is a bit confusing, but there are two distinct concepts, linker files (i.e., ELF files which the kernel can load, so a .ko file) and modules (typically drivers). A linker file can contain multiple modules. kldstat -v will list the modules in each linker file, e.g.,:

4    1 0xffffffff8227d000   380300 vmm.ko (/boot/kernel.GENERIC-NODEBUG/vmm.ko)
       Contains modules:                                                                                                                                      
                Id Name                                                                                                                                       
                 6 acpi/ivhd                                                                                                                                  
                 5 pci/amdviiommu   
                 4 pci/ppt                                                                                                                                    
                 3 vmm                                                                                                                                        
5    1 0xffffffff825fe000   61fa88 zfs.ko (/boot/kernel.GENERIC-NODEBUG/zfs.ko)                                                                               
       Contains modules:                                                                                                                                      
                Id Name                                                                                                                                       
                 7 zfsctrl                                                                                                                                    
                 9 zfs                                                                                                                                        
                10 zfs_zvol
                 8 zfs_vdev

Confusingly, to most people "kernel module" means "linker file." Usually the distinction is not important, and usually a linker file contains only one module.

Aug 25 2025, 2:14 PM
aokblast updated the diff for D52049: ichwd: introduce i6300esb watch dog driver.

Merge driver to ichwd

Aug 25 2025, 2:13 PM
aokblast added a comment to D52049: ichwd: introduce i6300esb watch dog driver.

I think it's ok, thank you.

One thing I am not sure about: should we just compile the new driver into ichwd.ko rather than create a new kernel module? I do not think it is a major issue, but personally I would probably just fold this into ichwd.ko to keep the diff smaller. I leave it up to you.

Aug 25 2025, 1:46 PM
aokblast updated the diff for D52049: ichwd: introduce i6300esb watch dog driver.

Add manual

Aug 25 2025, 1:42 PM
aokblast updated the diff for D52049: ichwd: introduce i6300esb watch dog driver.

Add missing x86 file

Aug 25 2025, 1:33 PM
aokblast updated the diff for D52049: ichwd: introduce i6300esb watch dog driver.

rename i6300esb -> i6300esbwd

Aug 25 2025, 1:31 PM
aokblast accepted D52147: usb: hub: uhub_root_intr() mark function arguments as __unused.

LGTM. Thanks!

Aug 25 2025, 8:11 AM

Aug 23 2025

aokblast added inline comments to D51589: amdgpio: Suspend routine.
Aug 23 2025, 9:53 AM
aokblast added inline comments to D51588: amdgpio: Mask and service interrupts.
Aug 23 2025, 9:51 AM
aokblast accepted D47930: contrib/libxo: fix API header files inclusions in C++ source files.
Aug 23 2025, 9:09 AM
aokblast updated the diff for D50958: libusb: add parser for interface association descriptor.

Minor fixes

Aug 23 2025, 8:08 AM
aokblast updated the diff for D52122: usb: implement attach kernel driver.

Minor fixes and add usbcnfig document

Aug 23 2025, 7:55 AM
aokblast updated the test plan for D52122: usb: implement attach kernel driver.
Aug 23 2025, 7:42 AM
aokblast closed D52135: hkbd: fix compliation error for GENERIC build.
Aug 23 2025, 7:38 AM
aokblast committed rG6ea7e1f92882: hkbd: fix compliation error for GENERIC.
Aug 23 2025, 7:38 AM
aokblast retitled D52135: hkbd: fix compliation error for GENERIC build from hkbd: fix compliation error other than amd64
Aug 23 2025, 7:21 AM
aokblast added reviewers for D52135: hkbd: fix compliation error for GENERIC build: lwhsu, markj.
Aug 23 2025, 5:38 AM
aokblast requested review of D52135: hkbd: fix compliation error for GENERIC build.
Aug 23 2025, 5:37 AM
aokblast committed rG8a847947153e: sys/modules: fix standalone build for multiple modules.
Aug 23 2025, 5:00 AM
aokblast closed D52062: sys/modules: fix standalone build for multiple build.
Aug 23 2025, 5:00 AM
aokblast committed rG1685192ea1fa: hkbd: remove erorr detection in KDSKBSTATE ioctl.
Aug 23 2025, 4:52 AM
aokblast closed D52101: hkbd: remove erorr detection in KDSKBSTATE ioctl.
Aug 23 2025, 4:52 AM

Aug 22 2025

aokblast added inline comments to D52101: hkbd: remove erorr detection in KDSKBSTATE ioctl.
Aug 22 2025, 3:10 PM
aokblast updated the diff for D52122: usb: implement attach kernel driver.

Fix style nit

Aug 22 2025, 3:10 PM
aokblast updated the diff for D52101: hkbd: remove erorr detection in KDSKBSTATE ioctl.

Elaborate comments

Aug 22 2025, 3:05 PM
aokblast updated the diff for D52049: ichwd: introduce i6300esb watch dog driver.

Remove useless sysctl

Aug 22 2025, 2:57 PM
aokblast added reviewers for D52122: usb: implement attach kernel driver: lwhsu, markj.
Aug 22 2025, 2:44 PM
aokblast requested review of D52122: usb: implement attach kernel driver.
Aug 22 2025, 2:43 PM
aokblast added inline comments to D52049: ichwd: introduce i6300esb watch dog driver.
Aug 22 2025, 1:39 PM
aokblast accepted D52104: Status/2025Q2/kw-hackathon.adoc: Add report.

Other looks good. Thanks!

Aug 22 2025, 11:47 AM
aokblast added a comment to D52101: hkbd: remove erorr detection in KDSKBSTATE ioctl.

I mentioned perhaps making hkbd_no_leds a normal sysctl is that it can be used as a workaround for people in ticket 288968.

I locate the problem inside qemu and do some modification then it works. I will submit a patch to qemu later.

That's great. I feel then we have one more reason to have that sysctl to let people to workaround it before qemu having a new release and being deployed to the production environments.

Wouldn't it means I need to create another patch for that? Why not just use the fix in here?

In most of case we want to avoid ignoring the return error entirely, as this implicitly hides the error in other places, which might cause other issues in the future.

Hmm, I am on the fence now, indeed it's also not good to ask people to manually set a workaround, even it's just a simple sysctl.

I guess I should accept this, as we can fix qemu but probably harder for Parallel.

After all, can we add some DPRINTF() in KDSKBSTATE or hkbd_set_leds() or KDSETLED to indicate that an error occurs?

Aug 22 2025, 3:39 AM
aokblast updated the diff for D52101: hkbd: remove erorr detection in KDSKBSTATE ioctl.

Minor fixes

Aug 22 2025, 3:35 AM

Aug 21 2025

aokblast added a comment to D52101: hkbd: remove erorr detection in KDSKBSTATE ioctl.

I mentioned perhaps making hkbd_no_leds a normal sysctl is that it can be used as a workaround for people in ticket 288968.

I locate the problem inside qemu and do some modification then it works. I will submit a patch to qemu later.

That's great. I feel then we have one more reason to have that sysctl to let people to workaround it before qemu having a new release and being deployed to the production environments.

Aug 21 2025, 7:01 PM
aokblast added a comment to D52101: hkbd: remove erorr detection in KDSKBSTATE ioctl.

The previous comment is incorrect. I check the HID document. HID has a usage page to locate the LED stuff. And FreeBSD kernel does check if such usage page exists. The problem maybe comes from qemu.

Ok, yes, I was wondering why the /* figure out leds on keyboard */ part in`hkbd_parse_hid() doesn't work. If it works then hkbd_set_leds()` should work as our expectation.

I mentioned perhaps making hkbd_no_leds a normal sysctl is that it can be used as a workaround for people in ticket 288968.

Aug 21 2025, 6:49 PM
aokblast added a comment to D52101: hkbd: remove erorr detection in KDSKBSTATE ioctl.

The previous comment is incorrect. I check the HID document. HID has a usage page to locate the LED stuff. And FreeBSD kernel does check if such usage page exists. The problem maybe comes from qemu.

Aug 21 2025, 6:15 PM
aokblast updated the diff for D52101: hkbd: remove erorr detection in KDSKBSTATE ioctl.

Fix in caller instead of fixing in callee

Aug 21 2025, 6:07 PM
aokblast added a comment to D52101: hkbd: remove erorr detection in KDSKBSTATE ioctl.
Aug 21 2025, 6:06 PM
aokblast added a reviewer for D52101: hkbd: remove erorr detection in KDSKBSTATE ioctl: wulf.
Aug 21 2025, 5:47 PM