Passing-through a PCI device with a large BAR (for instance, a GPU) fails when the 0xfff... probe address is assigned to the BAR: bhyve exists with an assertion failed such as Assertion failed: (error == 0), function modify_bar_registration, file /usr/src/usr.sbin/bhyve/pci_emul.c, line 501. During boot the system assigns the BAR a temporary address such that addr + size = 0xffffffff. It immediately restores the previous address. This is not a problem for most PCI devices. However, when passing through a GPU, the temporary memory region is large enough to occupy space already taken by the high performance time counter. This causes the assertion to fail at run time. I propose that when a probing address such as this is assigned to the BAR, we do not attempt to intercept it at all. My proposal is here: https://reviews.freebsd.org/D29698
Fixed by updating uefi-edk2-bhyve from 0.2_1,1 to g20210214,2