bhyve Current state of bhyve Nvidia passthrough?

I'm not going to watch a 35 minute video, create a bug report if you can reproduce it.
I can now confirm that on 15.0p3 this is still an issue.

Rebooting the VM will still make the passed through GPU not work within the guest. This "reset bug" is real and still exists. I will add it to bugzilla.

But you spread misinformation while accusing others of the same, which is *more* than unnecessary.
 
Okay here we go ...

Code:
uname -ar
\
FreeBSD white_beastie 15.0-RELEASE-p5 FreeBSD 15.0-RELEASE-p5 GENERIC amd64


Code:
#cd /usr/
#rm -rf /usr/src
#git clone https://github.com/beckhoff/freebsd-src /usr/src
cd /usr/src
#git checkout -f origin/phab/corvink/14.2/nvidia-wip
git checkout -f origin/phab/corvink/15.0/nvidia-wip
cd /usr/src/usr.sbin/bhyve
sudo make && make install
\
...
Error

/usr/src/usr.sbin/bhyve/bootrom.c:123:33: error: use of undeclared identifier 'VM_BOOTROM'

  123 |         romptr = vm_create_devmem(ctx, VM_BOOTROM, "bootrom", BOOTROM_SIZE);

      |                                        ^

/usr/src/usr.sbin/bhyve/bootrom.c:177:31: error: use of undeclared identifier 'VM_BOOTROM'

  177 |         if (vm_mmap_memseg(ctx, gpa, VM_BOOTROM, segoff, len, prot) != 0) {

      |                                      ^

2 errors generated.

*** Error code 1


Stop.

make: stopped making "all" in /usr/src/usr.sbin/bhyve

I want to play decent latest title was doing a CachyOS passthrough to play video games


Code:
pciconf -l | grep ppt
ppt0@pci0:8:0:0:        class=0x030000 rev=0xa1 hdr=0x00 vendor=0x10de device=0x1e87 subvendor=0x3842 subdevice=0x2183
ppt1@pci0:8:0:1:        class=0x040300 rev=0xa1 hdr=0x00 vendor=0x10de device=0x10f8 subvendor=0x3842 subdevice=0x2183
ppt2@pci0:8:0:2:        class=0x0c0330 rev=0xa1 hdr=0x00 vendor=0x10de device=0x1ad8 subvendor=0x3842 subdevice=0x2183
ppt3@pci0:8:0:3:        class=0x0c8000 rev=0xa1 hdr=0x00 vendor=0x10de device=0x1ad9 subvendor=0x3842 subdevice=0x2183

When using CBSD not reading all of the PPT


Code:
cbsd bhyve-ppt mode=list
\

Configured PCI Passthru devices (4):

 PCI     DRIVER    DEVICE                                  CLASS         SUBCLASS    VM    VENDOR
8/0/3    ppt       (1) TU104 USB Type-C UCSI Controller    serial bus    USB         -     NVIDIA Corporation

I also tried doing it via -S option and launching bhyve it won't launch error is below
Code:
cmd: env LIB9P_LOGGING=/usr/jails/jails-system/cachyos_linux/cbsd_lib9p.log /usr/bin/nice -n 1 /usr/sbin/bhyve -w -H -S
-A -c cpus=8,sockets=8,cores=1,threads=1 -m 8589934592 -H -A -S -u -w -U dd1c24ca-2c4c-11f1-8a0c-7085c25db4b0 -s 0,hostb
ridge   -s 4,virtio-blk,/usr/jails/vm/cachyos_linux/dsk1.vhd,sectorsize=512/4096    -s 5,virtio-net,tap3,mtu=1500,mac=00
:a0:98:c2:1f:00  -s 6,virtio-rnd -s 10:0,passthru,8/0/0 -s 10:1,passthru,8/0/1 -s 10:2,passthru,8/0/2 -s 10:3,passthru,8
/0/3 -s 7,fbuf,tcp=127.0.0.1:5902,w=1920,h=1080 -s 30,xhci,tablet  -s 31,lpc -l bootrom,/usr/local/cbsd/upgrade/patch/ef
i.fd,/usr/jails/jails-system/cachyos_linux/BHYVE_UEFI_VARS.fd,fwcfg=qemu -l com1,stdio     cachyos_linux      
-----                                                                                                          
bhyve: PCI device at 8/0/0 is not using the ppt(4) driver                                                      
Device emulation initialization error: Device busy                                                            
fbuf frame buffer base: 0x2279fe400000 [sz 33554432]                                                          
Sleep 1 seconds...                                                                                            
Erase is delete.                                                                                              
119: not found                                                                                                
Warning: unable to determine bhyve pid for: cachyos_linux
bstop done in 1 seconds


Any assistance or Patch... Any potential changes to edit directly I am willing to do... Because at this point I only have what Dual Boot into a Linux in one of my other SSD?

And loader.conf


Code:
#BHYVE setting needed for the cbsd bconstruct-tui
vmm_load="YES"
##Passthough
nmdm_load="YES"
#Bhyve Passthrough
pptdevs="8/0/0 8/0/1 8/0/2 8/0/3"
hw.vmm.amdvi.enable="1"
# Force the IOMMU to be more permissive with BAR mapping
hw.vmm.iommu.enable="1"
hw.vmm.iommu.relaxed_mapping="1"
# Disable the host's EFI framebuffer from "holding" the GPU memory
hw.vga.textmode="1"
machdep.disable_mtrr_setup="1"
# Specific for NVIDIA TU104 on FreeBSD 15
hw.pci.honor_msi_blacklist="0"


============================================================================================

PROBLEM was the IOMMU of the motherboard.....

Code:
git checkout -f origin/phab/corvink/15.0/nvidia-wip

I can confirm without Corvin patches (due to error compiling above) on 15p5 GPU Pass through work as expected was able to pass GPU to Distro CachyOS for gaming
 
Back
Top