Date: Mon, 02 Nov 2020 11:57:16 +0000 From: Robert Crowston <crowston@protonmail.com> To: bugzilla-noreply@freebsd.org, virtualization@FreeBSD.org Subject: Re: [Bug 250802] bhyve exited with status 134 when GPU PCI passthrough Message-ID: <kzW1R1IDNfW_g2m5hUZJrfeGmSonOwEM55_QX21X7YeEP2z2arg1r35PFBfeTxbAYL1_uk4Iu82HnIHfaSQqWyjf5urIWJzEm-ADjXeuzuU=@protonmail.com> In-Reply-To: <bug-250802-27103@https.bugs.freebsd.org/bugzilla/> References: <bug-250802-27103@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
Are you on AMD? Placing the PCI bars above 4 GB causes the processor to exit back to the vmm instead of handling the passthrough in the vm. But the vmm does not expect to handle memory passthrough, only i/o, tripping this assertion. There is a hardcoded max bar size where we decide whether to allocate the bar above or below the 4 GB mark. You can raise this limit and it may fix this error. This allows the GPU to work in Linux. However the GPU will not start in Windows, probably because we do not implement the ROM bar yet. — RHC. On Mon, Nov 2, 2020 at 09:10, <bugzilla-noreply@freebsd.org> wrote: > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=250802 > > Bug ID: 250802 > Summary: bhyve exited with status 134 when GPU PCI passthrough > Product: Base System > Version: 12.2-STABLE > Hardware: amd64 > OS: Any > Status: New > Severity: Affects Only Me > Priority: --- > Component: bhyve > Assignee: virtualization@FreeBSD.org > Reporter: mr.xanto@gmail.com > > Try to pass through GPU to a Windows 10 guest. > > /boot/loader.conf: > vmm_load="YES" > pptdevs="1/0/0 1/0/1" > > # pciconf -lv > ppt0@pci0:1:0:0: class=0x030000 card=0x38991642 chip=0x0a6310de rev=0xa2 > hdr=0x00 > vendor = 'NVIDIA Corporation' > device = 'GT218 [GeForce 310]' > class = display > subclass = VGA > ppt1@pci0:1:0:1: class=0x040300 card=0x38991642 chip=0x0be310de rev=0xa1 > hdr=0x00 > vendor = 'NVIDIA Corporation' > device = 'High Definition Audio Controller' > class = multimedia > subclass = HDA > > bhyve options: > [bhyve options: -c 1 -m 3G -Hwl > bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI.fd -U > 00dad61d-0d2e-11eb-936d-70f3951447ea -S] > [bhyve devices: -s 0,hostbridge -s 31,lpc -s > 4:0,ahci,hd:/mnt/Data/vm/win10/disk0.img -s > 5:0,virtio-net,tap0,mac=58:9c:fc:01:00:a8 -s 6:0,passthru,1/0/0 -s > 6:1,passthru,1/0/1 -s 7:0,xhci,tablet] > [bhyve console: -l com1,stdio] > [bhyve iso device: -s 3:0,ahci-cd,/mnt/Data/vm/.config/null.iso] > > Windows guest see NVidia GPU, try to install driver, and after reboot bhyve > stop working with error: > > bhyve exited with status 134 > Unhandled ps2 keyboard command 0x02 > Unhandled ps2 keyboard command 0x02 > Assertion failed: (pi->pi_bar[baridx].type == PCIBAR_IO), function > passthru_write, file /usr/src/usr.sbin/bhyve/pci_passthru.c, line 916. > > # uname -v > FreeBSD 12.2-STABLE r366667 GENERIC > > -- > You are receiving this mail because: > You are the assignee for the bug. > _______________________________________________ > freebsd-virtualization@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization > To unsubscribe, send any mail to "freebsd-virtualization-unsubscribe@freebsd.org"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?kzW1R1IDNfW_g2m5hUZJrfeGmSonOwEM55_QX21X7YeEP2z2arg1r35PFBfeTxbAYL1_uk4Iu82HnIHfaSQqWyjf5urIWJzEm-ADjXeuzuU=>
