Date: Tue, 16 Aug 2022 03:02:49 +0000 From: bugzilla-noreply@freebsd.org To: virtualization@FreeBSD.org Subject: [Bug 265869] mmio_rb_lookup finds wrong entry, triggering assertion Message-ID: <bug-265869-27103@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D265869 Bug ID: 265869 Summary: mmio_rb_lookup finds wrong entry, triggering assertion Product: Base System Version: CURRENT Hardware: amd64 OS: Any Status: New Severity: Affects Only Me Priority: --- Component: bhyve Assignee: virtualization@FreeBSD.org Reporter: harris.snyder@gmail.com Hi all. While trying to pass a USB controller through to a VM via PCI passthrough, I hit an assertion in unregister_mem (usr.sbin/bhyve/mem.c): assert(mr->name =3D=3D memp->name); I hooked the process up to a debugger and printed out the two names, and discovered that indeed:=20 mr->name =3D "passthru-pci-22" memp->name =3D "virtio-net-pci-2" so clearly mmio_rb_lookup is returning the wrong memory range. I'm not very knowledgeable about the internals of bhyve, and I don't yet ha= ve any further insight into why this might be occurring, but even if this was caused by user error, it is triggering an assertion and thus I feel is worth treating as a bug.=20 Here's my bhyve command: bhyve -AHP -S -w -c sockets=3D1,cores=3D8 -m 16G \ -s 0,amd_hostbridge \ -s 31,lpc \ -s 2,virtio-net,tap1,mac=3D00:A0:98:41:AC:CB \ -s 3,virtio-net,tap12,mac=3D00:A0:98:88:6F:09,mtu=3D9000 \ -s 13,ahci-hd,/dev/zvol/fast/vols/winvm1 \ -s 7,virtio-rnd \ -s 9,xhci,tablet \ -s 22,passthru,35/0/3 \ -l bootrom,/root/BHYVE_BHF_CODE.fd \ windowsvm And here's the pciconf entry for the device I'm trying to pass through: ppt0@pci0:35:0:3: class=3D0x0c0330 rev=3D0x00 hdr=3D0x00 vendor=3D0x1= 022 device=3D0x148c subvendor=3D0x15d9 subdevice=3D0x145c vendor =3D 'Advanced Micro Devices, Inc. [AMD]' device =3D 'Starship USB 3.0 Host Controller' class =3D serial bus subclass =3D USB --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-265869-27103>