This goes into the "reset bug" and its many facets. Afaik this work is not yet finished, it certainly wasn't when this video was published. Is this now completed? Can you please link to info on this, e.g. the relevant commits or changelog item?
I'm not going to watch a 35 minute video, create a bug report if you can reproduce it.View: https://youtu.be/gKdotOoxcGQ?si=eEuP-kDpk4C6nW5f
This goes into the "reset bug" and its many facets. Afaik this work is not yet finished, it certainly wasn't when this video was published. Is this now completed? Can you please link to info on this, e.g. the relevant commits or changelog item?
I can now confirm that on 15.0p3 this is still an issue.I'm not going to watch a 35 minute video, create a bug report if you can reproduce it.
uname -ar
\
FreeBSD beastie 15.0-RELEASE-p5 FreeBSD 15.0-RELEASE-p5 GENERIC amd64
#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
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
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
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
#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"
git checkout -f origin/phab/corvink/15.0/nvidia-wip
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.
That's not how it's done, you cant just build bhyve like that, do a buildworld and buildkernel if you have no idea what you're doing. Don't overcomplicate things yet.Okay here we go ... [doesn't follow instructions for how to compile freebsd]
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
It is not really a bug, it is more like a lack of feature in GPU card. Most consumer GPUs do not support Function Level Reset (FLR) properly or do not support it at all. Sometimes it is possible to reset those cards using various hacks.I can confirm the bug, too (15.0p5). Have you already opened a report in bugzilla?
You sound like an idiot.... And a script kiddie.Works fine for me, but continuously refusing to provide a bug report or steps for reproduction for your issue is rather annoying...
That's not how it's done, you cant just build bhyve like that, do a buildworld and buildkernel if you have no idea what you're doing. Don't overcomplicate things yet.
vm poweroff win11gamesvm my system has Kernel Panic and restarts. I was testing a little bit more by installing fresh Windows 11 but it makes no difference. When I have disabled in /boot/loader.conf T1000 I have managed to start VM, get freeze and kill VM with no Kernel Panic. I have updated FreeBSD 15.0 to 15.0-RELEASE-p9
pciconf -lv
ppt0@pci0:130:0:0: class=0x030000 rev=0xa1 hdr=0x00 vendor=0x10de device=0x2d05 subvendor=0x1458 subdevice=0x41a1
vendor = 'NVIDIA Corporation'
device = 'GB206 [GeForce RTX 5060]'
class = display
subclass = VGA
ppt1@pci0:130:0:1: class=0x040300 rev=0xa1 hdr=0x00 vendor=0x10de device=0x22eb subvendor=0x10de subdevice=0x0000
vendor = 'NVIDIA Corporation'
class = multimedia
subclass = HDA
loader="uefi"
graphics="yes"
graphics_res="1920x1080"
xhci_mouse="yes"
cpu=8
cpu_sockets=1
cpu_cores=4
cpu_threads=2
memory=16G
# put up to 8 disks on a single ahci controller.
# without this, adding a disk pushes the following network devices onto higher slot numbers,
# which causes windows to see them as a new interface
ahci_device_limit="8"
# ideally this should be changed to virtio-net and drivers installed in the guest
# e1000 works out-of-the-box
network0_type="virtio-net"
#network0_type="e1000"
network0_device="tap7"
network0_switch="public"
disk0_type="nvme"
disk0_name="disk0.img"
#disk1_type="nvme"
#disk1_name="gamedrive.img"
# Passthrough
#passthru0="129/0/0=3:0"
#passthru1="129/0/1=3:1"
#RTX 5060
passthru0="130/0/0=3:0"
passthru1="130/0/1=3:1"
# windows expects the host to expose localtime by default, not UTC
utctime="no"
uuid="21280ac9-3329-11ef-bb25-ecf4bbe5c838"
network0_mac="58:9c:fc:03:0b:77"
debug="yes"
AirostGood evening everyone,
I wonder if anybody can advise me what to do. I used to run FreeBSD 14.X version with 2x GPUs in my Dell PowerEdge R730xd - one was RTX 3090 and the other one Nvidia Quadro T1000 8GB Low Profile. Both video cards worked fine in Virtual Machines (RTX 3090 in Windows 10, T1000 in Windows 11). Because I did have to trim radiator to fit RTX3090 I decided to remove it from the server and fit it in my desktop PC. I have updated FreeBSD to 15.0-p4. I have fitted new radiator and I bought RTX 5060 so I can use it for moonlight/sunshine with AV1 however when I started VM it was freezing during boot loading when the circle is spinning in Windows. I did have to kill the VM. As soon as I use command
vm poweroff win11gamesvmmy system has Kernel Panic and restarts. I was testing a little bit more by installing fresh Windows 11 but it makes no difference. When I have disabled in /boot/loader.conf T1000 I have managed to start VM, get freeze and kill VM with no Kernel Panic. I have updated FreeBSD 15.0 to 15.0-RELEASE-p9
I have pulled out RTX 5060 and tested in my desktop PC - works fine, even under some stress from Cyberpunk 2077. Any tricks and tips how I can successfully pass-through both GPUs to VMs? I can't even find any information on Kernel Panic in dmesg to paste it here to give some clue. I wonder if anybody managed to use RTX 5060 in VM?
pciconf -lv
ppt0@pci0:130:0:0: class=0x030000 rev=0xa1 hdr=0x00 vendor=0x10de device=0x2d05 subvendor=0x1458 subdevice=0x41a1
vendor = 'NVIDIA Corporation'
device = 'GB206 [GeForce RTX 5060]'
class = display
subclass = VGA
ppt1@pci0:130:0:1: class=0x040300 rev=0xa1 hdr=0x00 vendor=0x10de device=0x22eb subvendor=0x10de subdevice=0x0000
vendor = 'NVIDIA Corporation'
class = multimedia
subclass = HDA
Code:loader="uefi" graphics="yes" graphics_res="1920x1080" xhci_mouse="yes" cpu=8 cpu_sockets=1 cpu_cores=4 cpu_threads=2 memory=16G # put up to 8 disks on a single ahci controller. # without this, adding a disk pushes the following network devices onto higher slot numbers, # which causes windows to see them as a new interface ahci_device_limit="8" # ideally this should be changed to virtio-net and drivers installed in the guest # e1000 works out-of-the-box network0_type="virtio-net" #network0_type="e1000" network0_device="tap7" network0_switch="public" disk0_type="nvme" disk0_name="disk0.img" #disk1_type="nvme" #disk1_name="gamedrive.img" # Passthrough #passthru0="129/0/0=3:0" #passthru1="129/0/1=3:1" #RTX 5060 passthru0="130/0/0=3:0" passthru1="130/0/1=3:1" # windows expects the host to expose localtime by default, not UTC utctime="no" uuid="21280ac9-3329-11ef-bb25-ecf4bbe5c838" network0_mac="58:9c:fc:03:0b:77" debug="yes"
Please advise, if there are any patches available or I should take another step please let me know.
Thanks,
Seb
[LIST]
[*]-s 7:0,passthru,4/0/0 -s 7:1,passthru,4/0/1 -s 7:2,passthru,4/0/
[*]-s 3:0,passthru,6/5/0 -s 8:0,passthru,6/5/1
[/LIST]
#Bhyve Passthrough
pptdevs="8/0/0 8/0/1 8/0/2 8/0/3"
May 23 08:59:56 mclose kernel: NMI ISA 38, EISA 0
savecore 3821 - - reboot after panic: APEI Fatal Hardware Error!
May 23 08:59:56 mclose savecore[3821]: reboot after panic: APEI Fatal Hardware Error!
savecore 3821 - - writing core to /var/crash/vmcore.8
Writing crash summary to /var/crash/core.txt.8.
kgdb /boot/kernel/kernel /var/crash/vmcore.8 Sat May 23 08:05:59 BST 2026
tap3: promiscuous mode enabled
tap3: link state changed to UP
tap4: promiscuous mode enabled
tap4: link state changed to UP
tap5: promiscuous mode enabled
tap5: link state changed to UP
tap6: promiscuous mode enabled
tap6: link state changed to UP
tap8: promiscuous mode enabled
tap8: link state changed to UP
May 23 08:18:13 mclose su[5838]: airost to root on /dev/pts/0
May 23 08:24:26 mclose sshd-session[6031]: error: Fssh_kex_exchange_identification: read: Connection reset by peer
tap2: promiscuous mode enabled
tap7: promiscuous mode enabled
tap2: link state changed to UP
tap7: link state changed to UP
tap7: link state changed to DOWN
tap7: link state changed to UP
tap2: link state changed to DOWN
NMI ISA 38, EISA 0
panic: APEI Fatal Hardware Error!
cpuid = 22
time = 1779523022
KDB: stack backtrace:
Uptime: 51m41s
Dumping 5821 out of 130934 MB:..1%..11%..21%..31%..41%..51%..61%..71%..81%..91%
------------------------------------------------------------------------
kernel config
options CONFIG_AUTOGENERATED
ident LDRIVE15
machine amd64
cpu HAMMER
makeoptions WITH_CTF=1
makeoptions DEBUG=-g
options ALTQ_NOPCC
options ALTQ_PRIQ
options ALTQ_HFSC
options ALTQ_RIO
options ALTQ_RED
options ALTQ_CBQ
options ALTQ
options IICHID_SAMPLING
options HID_DEBUG
options EVDEV_SUPPORT
options XENHVM
options USB_DEBUG
options SC_PIXEL_MODE
options PPS_SYNC
options COMPAT_LINUXKPI
options PCI_IOV
options PCI_HP
options IOMMU
options SMP
options NETGDB
options NETDUMP
options DEBUGNET
options ZSTDIO
options GZIO
options EKCD
options KDB_TRACE
options KDB
options RCTL
options RACCT_DEFAULT_TO_DISABLED
options RACCT
options INCLUDE_CONFIG_FILE
options DDB_CTF
options KDTRACE_HOOKS
options KDTRACE_FRAME
options MAC
options CAPABILITIES
options CAPABILITY_MODE
options AUDIT
options HWPMC_HOOKS
options KBD_INSTALL_CDEV
options PRINTF_BUFR_SIZE=128
options _KPOSIX_PRIORITY_SCHEDULING
options SYSVSEM
options SYSVMSG
options SYSVSHM
options STACK
options KTRACE
options SCSI_DELAY=5000
options COMPAT_FREEBSD14
options COMPAT_FREEBSD13
options COMPAT_FREEBSD12
options COMPAT_FREEBSD11
options COMPAT_FREEBSD10
options COMPAT_FREEBSD9
options COMPAT_FREEBSD7
options COMPAT_FREEBSD6
options COMPAT_FREEBSD5
options COMPAT_FREEBSD4
options COMPAT_FREEBSD32
options EFIRT
options GEOM_LABEL
options GEOM_RAID
options TMPFS
options PSEUDOFS
options PROCFS
options CD9660
options MSDOSFS
options NFS_ROOT
options NFSLOCKD
options NFSD
options NFSCL
options MD_ROOT
options QUOTA
options UFS_GJOURNAL
options UFS_DIRHASH
options UFS_ACL
options SOFTUPDATES
options FFS
options KERN_TLS
options SCTP_SUPPORT
options TCP_RFC7413
options TCP_HHOOK
options TCP_BLACKBOX
options TCP_OFFLOAD
options FIB_ALGO
options ROUTE_MPATH
options IPSEC_OFFLOAD
options IPSEC_SUPPORT
options INET6
options INET
options VIMAGE
options EXTERR_STRINGS
options PREEMPTION
options NUMA
options SCHED_ULE
options NETLINK
options CC_CUBIC
options GEOM_PART_GPT
options GEOM_PART_MBR
options GEOM_PART_EBR
options GEOM_PART_BSD
options EARLY_AP_STARTUP
device isa
device mem
device io
device uart_ns8250
device cpufreq
device acpi
device smbios
device pci
device fdc
device ahci
device ata
device mvs
device siis
device ahc
device ahd
device hptiop
device isp
device mpt
device mps
device mpr
device mpi3mr
device sym
device isci
device ocs_fc
device pvscsi
device scbus
device ch
device da
device sa
device cd
device pass
device ses
device arcmsr
device ciss
device ips
device smartpqi
device tws
device aac
device aacp
device aacraid
device ida
device mfi
device mlx
device mrsas
device nvme
device nvd
device ufshci
device vmd
device atkbdc
device atkbd
device psm
device kbdmux
device vga
device splash
device sc
device vt
device vt_vga
device vt_efifb
device vt_vbefb
device agp
device cbb
device cardbus
device uart
device ppc
device ppbus
device lpt
device ppi
device puc
device iflib
device igc
device ix
device ixv
device ixl
device mlx5
device mlxfw
device mlx5en
device miibus
device crypto
device aesni
device loop
device padlock_rng
device rdrand_rng
device ether
device vlan
device tuntap
device md
device gif
device firmware
device xz
device bpf
device uhci
device ohci
device ehci
device xhci
device usb
device usbhid
device hkbd
device ukbd
device umass
device sound
device snd_cmi
device snd_csa
device snd_emu10kx
device snd_es137x
device snd_hda
device snd_ich
device snd_via8233
device mmc
device mmcsd
device sdhci
device virtio
device virtio_pci
device vtnet
device virtio_blk
device virtio_scsi
device virtio_balloon
device kvm_clock
device hyperv
device xenefi
device xenpci
device xentimer
device netmap
device evdev
device uinput
device hid
device hidbus
device efidev
device efirtc
device pf
device pflog
device pfsync
------------------------------------------------------------------------
ddb capture buffer
ddb: ddb_capture: kvm_nlist
[root@mclose /var/crash]# kgdb /boot/kernel/kernel /var/crash/vmcore.8
GNU gdb (GDB) 15.1 [GDB v15.1 for FreeBSD]
Copyright (C) 2024 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-portbld-freebsd15.0".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /boot/kernel/kernel...
Reading symbols from /usr/lib/debug//boot/kernel/kernel.debug...
Unread portion of the kernel message buffer:
<6>tap2: link state changed to DOWN
<2>NMI ISA 38, EISA 0
panic: APEI Fatal Hardware Error!
cpuid = 22
time = 1779523022
KDB: stack backtrace:
Uptime: 51m41s
Dumping 5821 out of 130934 MB:..1%..11%..21%..31%..41%..51%..61%..71%..81%..91%
Reading symbols from /boot/kernel/coretemp.ko...
Reading symbols from /usr/lib/debug//boot/kernel/coretemp.ko.debug...
Reading symbols from /boot/kernel/if_bridge.ko...
Reading symbols from /usr/lib/debug//boot/kernel/if_bridge.ko.debug...
Reading symbols from /boot/kernel/bridgestp.ko...
Reading symbols from /usr/lib/debug//boot/kernel/bridgestp.ko.debug...
Reading symbols from /boot/kernel/zfs.ko...
Reading symbols from /usr/lib/debug//boot/kernel/zfs.ko.debug...
Reading symbols from /boot/kernel/nmdm.ko...
Reading symbols from /usr/lib/debug//boot/kernel/nmdm.ko.debug...
Reading symbols from /boot/kernel/vmm.ko...
Reading symbols from /usr/lib/debug//boot/kernel/vmm.ko.debug...
Reading symbols from /boot/kernel/cryptodev.ko...
Reading symbols from /usr/lib/debug//boot/kernel/cryptodev.ko.debug...
Reading symbols from /boot/kernel/acpi_wmi.ko...
Reading symbols from /usr/lib/debug//boot/kernel/acpi_wmi.ko.debug...
Reading symbols from /boot/kernel/hcons.ko...
Reading symbols from /usr/lib/debug//boot/kernel/hcons.ko.debug...
Reading symbols from /boot/kernel/hidmap.ko...
Reading symbols from /usr/lib/debug//boot/kernel/hidmap.ko.debug...
Reading symbols from /boot/kernel/hsctrl.ko...
Reading symbols from /usr/lib/debug//boot/kernel/hsctrl.ko.debug...
Reading symbols from /boot/kernel/if_em.ko...
Reading symbols from /usr/lib/debug//boot/kernel/if_em.ko.debug...
Reading symbols from /boot/kernel/ioat.ko...
Reading symbols from /usr/lib/debug//boot/kernel/ioat.ko.debug...
Reading symbols from /boot/kernel/mlx4.ko...
Reading symbols from /usr/lib/debug//boot/kernel/mlx4.ko.debug...
Reading symbols from /boot/kernel/ctl.ko...
Reading symbols from /usr/lib/debug//boot/kernel/ctl.ko.debug...
Reading symbols from /boot/kernel/cfiscsi.ko...
Reading symbols from /usr/lib/debug//boot/kernel/cfiscsi.ko.debug...
Reading symbols from /boot/kernel/iscsi.ko...
Reading symbols from /usr/lib/debug//boot/kernel/iscsi.ko.debug...
Reading symbols from /boot/kernel/mac_ntpd.ko...
Reading symbols from /usr/lib/debug//boot/kernel/mac_ntpd.ko.debug...
Reading symbols from /boot/kernel/fdescfs.ko...
Reading symbols from /usr/lib/debug//boot/kernel/fdescfs.ko.debug...
__curthread () at /usr/src/sys/amd64/include/pcpu_aux.h:57
57 __asm("movq %%gs:%c1,%0" : "=r" (td)
[root@mclose /var/crash]# cat info.8
Dump header from device: /dev/nda0p3
Architecture: amd64
Architecture Version: 2
Dump Length: 6104694784
Blocksize: 512
Compression: none
Dumptime: 2026-05-23 08:57:02 +0100
Hostname: mclose.co.uk
Magic: FreeBSD Kernel Dump
Version String: FreeBSD 15.0-RELEASE-p9 LDRIVE15
Panic String: APEI Fatal Hardware Error!
Dump Parity: 2604355142
Bounds: 8
Dump Status: good