Open markshank opened 1 year ago
We do not enable CONFIG_DRM_I915_GVT right now, not sure if anyone ever attempted (even if that would be good to have this working).
OK, thank you. That explains all the error messages. It was truly acting like it had the physical device.
Describe the bug Intel GVT-g virtual machine guest with FreeBSD-14.0-CURRENT fails
FreeBSD version mds@freebsd14:~ $ uname -a FreeBSD freebsd14 14.0-CURRENT FreeBSD 14.0-CURRENT #0 main-n256882-8f733dabcc3: Fri Jul 22 08:31:37 UTC 2022 root@releng1.nyi.freebsd.org:/usr/obj/usr/src/amd64.amd64/sys/GENERIC amd64 mds@freebsd14:~ $
PCI Info
pciconf -lv
mds@freebsd14:~ $ pciconf -vl hostb0@pci0:0:0:0: class=0x060000 rev=0x00 hdr=0x00 vendor=0x8086 device=0x29c0 subvendor=0x1af4 subdevice=0x1100 vendor = 'Intel Corporation' device = '82G33/G31/P35/P31 Express DRAM Controller' class = bridge subclass = HOST-PCI pcib1@pci0:0:2:0: class=0x060400 rev=0x00 hdr=0x01 vendor=0x1b36 device=0x000c subvendor=0x1b36 subdevice=0x0000 vendor = 'Red Hat, Inc.' device = 'QEMU PCIe Root port' class = bridge subclass = PCI-PCI pcib2@pci0:0:2:1: class=0x060400 rev=0x00 hdr=0x01 vendor=0x1b36 device=0x000c subvendor=0x1b36 subdevice=0x0000 vendor = 'Red Hat, Inc.' device = 'QEMU PCIe Root port' class = bridge subclass = PCI-PCI pcib3@pci0:0:2:2: class=0x060400 rev=0x00 hdr=0x01 vendor=0x1b36 device=0x000c subvendor=0x1b36 subdevice=0x0000 vendor = 'Red Hat, Inc.' device = 'QEMU PCIe Root port' class = bridge subclass = PCI-PCI pcib4@pci0:0:2:3: class=0x060400 rev=0x00 hdr=0x01 vendor=0x1b36 device=0x000c subvendor=0x1b36 subdevice=0x0000 vendor = 'Red Hat, Inc.' device = 'QEMU PCIe Root port' class = bridge subclass = PCI-PCI pcib5@pci0:0:2:4: class=0x060400 rev=0x00 hdr=0x01 vendor=0x1b36 device=0x000c subvendor=0x1b36 subdevice=0x0000 vendor = 'Red Hat, Inc.' device = 'QEMU PCIe Root port' class = bridge subclass = PCI-PCI pcib6@pci0:0:2:5: class=0x060400 rev=0x00 hdr=0x01 vendor=0x1b36 device=0x000c subvendor=0x1b36 subdevice=0x0000 vendor = 'Red Hat, Inc.' device = 'QEMU PCIe Root port' class = bridge subclass = PCI-PCI pcib7@pci0:0:2:6: class=0x060400 rev=0x00 hdr=0x01 vendor=0x1b36 device=0x000c subvendor=0x1b36 subdevice=0x0000 vendor = 'Red Hat, Inc.' device = 'QEMU PCIe Root port' class = bridge subclass = PCI-PCI pcib8@pci0:0:2:7: class=0x060400 rev=0x00 hdr=0x01 vendor=0x1b36 device=0x000c subvendor=0x1b36 subdevice=0x0000 vendor = 'Red Hat, Inc.' device = 'QEMU PCIe Root port' class = bridge subclass = PCI-PCI pcib9@pci0:0:3:0: class=0x060400 rev=0x00 hdr=0x01 vendor=0x1b36 device=0x000c subvendor=0x1b36 subdevice=0x0000 vendor = 'Red Hat, Inc.' device = 'QEMU PCIe Root port' class = bridge subclass = PCI-PCI pcib10@pci0:0:3:1: class=0x060400 rev=0x00 hdr=0x01 vendor=0x1b36 device=0x000c subvendor=0x1b36 subdevice=0x0000 vendor = 'Red Hat, Inc.' device = 'QEMU PCIe Root port' class = bridge subclass = PCI-PCI pcib11@pci0:0:3:2: class=0x060400 rev=0x00 hdr=0x01 vendor=0x1b36 device=0x000c subvendor=0x1b36 subdevice=0x0000 vendor = 'Red Hat, Inc.' device = 'QEMU PCIe Root port' class = bridge subclass = PCI-PCI pcib12@pci0:0:3:3: class=0x060400 rev=0x00 hdr=0x01 vendor=0x1b36 device=0x000c subvendor=0x1b36 subdevice=0x0000 vendor = 'Red Hat, Inc.' device = 'QEMU PCIe Root port' class = bridge subclass = PCI-PCI pcib13@pci0:0:3:4: class=0x060400 rev=0x00 hdr=0x01 vendor=0x1b36 device=0x000c subvendor=0x1b36 subdevice=0x0000 vendor = 'Red Hat, Inc.' device = 'QEMU PCIe Root port' class = bridge subclass = PCI-PCI pcib14@pci0:0:3:5: class=0x060400 rev=0x00 hdr=0x01 vendor=0x1b36 device=0x000c subvendor=0x1b36 subdevice=0x0000 vendor = 'Red Hat, Inc.' device = 'QEMU PCIe Root port' class = bridge subclass = PCI-PCI hdac0@pci0:0:27:0: class=0x040300 rev=0x03 hdr=0x00 vendor=0x8086 device=0x293e subvendor=0x1af4 subdevice=0x1100 vendor = 'Intel Corporation' device = '82801I (ICH9 Family) HD Audio Controller' class = multimedia subclass = HDA isab0@pci0:0:31:0: class=0x060100 rev=0x02 hdr=0x00 vendor=0x8086 device=0x2918 subvendor=0x1af4 subdevice=0x1100 vendor = 'Intel Corporation' device = '82801IB (ICH9) LPC Interface Controller' class = bridge subclass = PCI-ISA ahci0@pci0:0:31:2: class=0x010601 rev=0x02 hdr=0x00 vendor=0x8086 device=0x2922 subvendor=0x1af4 subdevice=0x1100 vendor = 'Intel Corporation' device = '82801IR/IO/IH (ICH9R/DO/DH) 6 port SATA Controller [AHCI mode]' class = mass storage subclass = SATA ichsmb0@pci0:0:31:3: class=0x0c0500 rev=0x02 hdr=0x00 vendor=0x8086 device=0x2930 subvendor=0x1af4 subdevice=0x1100 vendor = 'Intel Corporation' device = '82801I (ICH9 Family) SMBus Controller' class = serial bus subclass = SMBus virtio_pci0@pci0:1:0:0: class=0x020000 rev=0x01 hdr=0x00 vendor=0x1af4 device=0x1041 subvendor=0x1af4 subdevice=0x1100 vendor = 'Red Hat, Inc.' device = 'Virtio network device' class = network subclass = ethernet xhci0@pci0:2:0:0: class=0x0c0330 rev=0x01 hdr=0x00 vendor=0x1b36 device=0x000d subvendor=0x1af4 subdevice=0x1100 vendor = 'Red Hat, Inc.' device = 'QEMU XHCI Host Controller' class = serial bus subclass = USB virtio_pci1@pci0:3:0:0: class=0x078000 rev=0x01 hdr=0x00 vendor=0x1af4 device=0x1043 subvendor=0x1af4 subdevice=0x1100 vendor = 'Red Hat, Inc.' device = 'Virtio console' class = simple comms virtio_pci2@pci0:4:0:0: class=0x010000 rev=0x01 hdr=0x00 vendor=0x1af4 device=0x1042 subvendor=0x1af4 subdevice=0x1100 vendor = 'Red Hat, Inc.' device = 'Virtio block device' class = mass storage subclass = SCSI virtio_pci3@pci0:5:0:0: class=0x00ff00 rev=0x01 hdr=0x00 vendor=0x1af4 device=0x1045 subvendor=0x1af4 subdevice=0x1100 vendor = 'Red Hat, Inc.' device = 'Virtio memory balloon' class = old vgapci0@pci0:6:0:0: class=0x030000 rev=0x04 hdr=0x00 vendor=0x8086 device=0x5912 subvendor=0x1028 subdevice=0x07a3 vendor = 'Intel Corporation' device = 'HD Graphics 630' class = display subclass = VGA mds@freebsd14:~ $DRM KMOD version mds@freebsd14:~ $ pkg query -x '%n %v' 'drm.*kmod' drm-510-kmod 5.10.113_1 drm-kmod 20220501 mds@freebsd14:~ $
To Reproduce Created a libvirt virtual machine on an ubuntu-22.04-desktop-amd64 host following this tutorial: https://blog.tmm.cx/2020/05/15/passing-an-intel-gpu-to-a-linux-kvm-virtual-machine/
With the exception that it was UEFI instead of SeaBIOS by using the workaround described here: https://wiki.archlinux.org/title/Intel_GVT-g#Using_DMA-BUF_with_UEFI/OVMF
Tested it with ubuntu-22.04-desktop-amd64.iso Live CD to verify that it worked.
Installed FreeBSD-14.0-CURRENT-amd64-20220722-8f733dabcc3-256882-disc1.iso guest on same virtual machine.
Installed a desktop environment following these instructions: https://freebsdfoundation.org/freebsd-project/resources/installing-a-desktop-environment-on-freebsd/
startx does not display desktop. It shows a black screen with white block cursor in upper left corner.
Screenshots
Additional context
dmesg | grep drm
mds@freebsd14:~ $ dmesg | grep drm drmn0:cat Xorg.0.log
root@freebsd14:/var/log # cat Xorg.0.log [ 4349.263] [X.Org](http://x.org/) X Server 1.20.14 X Protocol Version 11, Revision 0 [ 4349.263] Build Operating System: FreeBSD 14.0-CURRENT amd64 [ 4349.263] Current Operating System: FreeBSD freebsd14 14.0-CURRENT FreeBSD 14.0-CURRENT #0 main-n256882-8f733dabcc3: Fri Jul 22 08:31:37 UTC 2022 [root@releng1.nyi.freebsd.org](mailto:root@releng1.nyi.freebsd.org):/usr/obj/usr/src/amd64.amd64/sys/GENERIC amd64 [ 4349.263] Build Date: 26 July 2022 09:04:55AM [ 4349.263] [ 4349.263] Current version of pixman: 0.40.0 [ 4349.263] Before reporting problems, check http://wiki.x.org/ to make sure that you have the latest version. [ 4349.263] Markers: (--) probed, (**) from config file, (==) default setting, (++) from command line, (!!) notice, (II) informational, (WW) warning, (EE) error, (NI) not implemented, (??) unknown. [ 4349.263] (==) Log file: "/var/log/Xorg.0.log", Time: Thu Jul 28 09:45:52 2022 [ 4349.263] (==) Using system config directory "/usr/local/share/X11/xorg.conf.d" [ 4349.263] (==) No Layout section. Using the first Screen section. [ 4349.263] (==) No screen section available. Using defaults. [ 4349.263] (**) |-->Screen "Default Screen Section" (0) [ 4349.263] (**) | |-->Monitor "