xen Xen Dom0/DomU on FreeBSD 13.2-RELEASE

Recently installed FB 13.2 on an Intel Nuc10i5.
Despite all the warnings not to expect UEFI boot to work, I found evidence of some recent work which lead me to expect it to work. It works.

Next, I installed FB 13.2 as a guest, in HVM mode. I am running swaywm in dom0. Love it!

I am now trying to attach my YubiKey USB dongle to the domU. It is resisting. I note that there is a spiffy new way to handle USB assignment. New as in less than 15 years old.

I also note that there was a summer of 2013 code project to add the requisite modules to FreeBSD.
Additionally, there is some recent chatter in some debian support group regarding the maintainer of qemu having dropped support unintentionally for this in HVM domU's.

Question:
  1. is anyone else running FreeBSD domU with working hot-plug support for USB?
  2. did the 2013 SummerCode produce results which are now in the source tree?
  3. am I just being bitten by the qemu issue?
  4. does xen have a future in FreeBSD? Specifically for dom0?
Code:
builder = "hvm"
name = "freebsd"
memory = 4096
vcpus = 8
vif = [ 'mac=00:16:3E:74:34:32,bridge=bridge0' ]
disk = [
'/dev/zvol/zroot/xendisk0,raw,hda,rw',
  ]
vnc = 1
vnclisten = "0.0.0.0"
serial = "pty"
#usb=1
#usbdevice = "tablet"
#usbversion=3
usbctrl=['type=qusb,version=2,ports=4', 'type=qusb,version=1, ports=4', ]
#usbdev=['hostbus=2, hostaddr=1, controller=0,port=1', ]
Code:
nuc10% sudo xl create freebsd.cfg
Parsing config from freebsd.cfg
nuc10% sudo usbconfig -d 0.6
ugen0.6: <Yubico Yubikey 4 OTP+U2F+CCID> at usbus0, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON (30mA)
nuc10% sudo xl usb-list freebsd
Devid  Type         BE  state usb-ver ports
0      qusb         0   1     2       4
  Port 1:
  Port 2:
  Port 3:
  Port 4:
Devid  Type         BE  state usb-ver ports
1      qusb         0   1     1       4
  Port 1:
  Port 2:
  Port 3:
  Port 4:
nuc10% sudo xl usbdev-attach freebsd hostbus=0 hostaddr=6 controller=0 port=1
libxl: error: libxl_usb.c:1732:libxl__device_usbdev_add: Domain 10:USB device is not assignable.
libxl: error: libxl_device.c:1469:device_addrm_aocomplete: unable to add device
libxl_device_usbdev_add failed.
nuc10% sudo xl usbctrl-attach freebsd type=qusb version=2 ports=8
nuc10% sudo xl usb-list freebsd
Devid  Type         BE  state usb-ver ports
0      qusb         0   1     2       4
  Port 1:
  Port 2:
  Port 3:
  Port 4:
Devid  Type         BE  state usb-ver ports
1      qusb         0   1     1       4
  Port 1:
  Port 2:
  Port 3:
  Port 4:
Devid  Type         BE  state usb-ver ports
2      qusb         0   1     2       8
  Port 1:
  Port 2:
  Port 3:
  Port 4:
  Port 5:
  Port 6:
  Port 7:
  Port 8:
nuc10% sudo xl usbdev-attach freebsd hostbus=0 hostaddr=6 controller=2 port=1
libxl: error: libxl_usb.c:1732:libxl__device_usbdev_add: Domain 10:USB device is not assignable.
libxl: error: libxl_device.c:1469:device_addrm_aocomplete: unable to add device
libxl_device_usbdev_add failed.
nuc10% sudo xl usbdev-attach freebsd hostbus=0 hostaddr=6
libxl: error: libxl_usb.c:1732:libxl__device_usbdev_add: Domain 10:USB device is not assignable.
libxl: error: libxl_device.c:1469:device_addrm_aocomplete: unable to add device
libxl_device_usbdev_add failed.
 
I'm running FreeBSD 13.1 on Intel Xeon E-2234 as Dom0. And two 13.2 DomU guests. Both Dom0 and DomUs are in PVH mode.
I didn't have time and courage to upgrade Dom0 to 13.2 so far and I don't use USB on DomU side so I don't have experience with it.
As I know PVH dom0 is in experimental phase, but I have had no issues so far (for 1 year usage).
The only thing what is not too convenient the upgrade of DomU because it uses the kernel outside from DomU. During upgrade I have to copy the kernel from DomU to Dom0 before the DomU reboots.
 
Sadly, I gave up trying to get the USB to work, and went back to the dark side.
It was fun, running FreeBSD again, for a few days, but it was not to be.
 
Back
Top