[vfio-users] Passthrough Primary GPU
Hi, I'm currently having issues passing one of two discrete gpus to a Windows guest (I have no iGPU). I'm not sure exactly where the issue lies, but I believe it has to do with the fact that the motherboard uses the gpu I want to passthrough as its output gpu during BIOS/UEFI boot. There is no option to switch the default gpu in its settings. I have disabled the framebuffer of the gpu I want to passthrough (a gtx 1070) by using these kernel parameters: video=efifb:off,vesafb:off There is now only /dev/fb0, my secondary gpu, running with nouveau. There are no longer two framebuffers. X is also setup to run on the secondary gpu (a gtx 660) and is working perfectly. The Windows 10 guest is passed an SSD, as opposed to an image file, so I can also boot off the SSD directly by changing the boot order of my machine. When booting from the Windows 10 SSD directly, everything works smoothly, the gtx 1070 and all. I can startup Windows 10 as a guest and connect to it over vnc. However, when looking in device manager, I get error 43 for the gtx 1070. (Before I start the guest, the monitor is on with a black screen. When I start the guest, the monitor enters power saving mode. vfio-pci must have been giving it a signal before I started the guest, which is interesting.) In dmesg, I noticed these odd messages: [ 46.241022] pmd_set_huge: Cannot satisfy [mem 0xb000-0xb020] with a huge-page mapping due to MTRR override. [ 55.165255] vfio-pci :01:00.0: Invalid PCI ROM header signature: expecting 0xaa55, got 0x [ 55.165287] vfio-pci :01:00.0: Invalid PCI ROM header signature: expecting 0xaa55, got 0x Google tells me that the "pmd_set_huge" message is more of a warning than a serious issue, but the message doesn't occur when I start the Windows guest without the 1070 passed through. (Both configurations use 2 hugepages of size 1GB). The vfio-pci messages I assume are because of the fact that the uefi has booted using the 1070. I think that is the root of the issue but I am not really sure... Here is my configuration for libvirt: http://pastebin.com/raw/PFmQSy6N As you can see, the hidden state is on and there is a vendor id. (As a side note, I had no content in the hyperv tags to begin with, unlike other users it seems, but I haven't looked into this very much. If these tags would help increase the performance of the guest, please let me know which ones I should add.) Looking at the QEMU logs, I also get this suspicious message: Domain id=1 is tainted: host-cpu I'm not quite sure what to make of it... I noticed an email chain in the archives from about a month ago about passing through the primary gpu, but I couldn't replicate their steps sucessfully. I'm new to this stuff, and so any help is appreciated! Thanks, Asher ___ vfio-users mailing list vfio-users@redhat.com https://www.redhat.com/mailman/listinfo/vfio-users
Re: [vfio-users] IGD Skylake rom?
On Sat, Sep 10, 2016 at 10:33 AM, José Ramón Muñoz Pekkarinen < koali...@gmail.com> wrote: > On Saturday 10 September 2016 17:02:44 José Ramón Muñoz Pekkarinen wrote: > > Yep, there is no other graphic card on this machine, might this be a > > problem of efi fb or sime fb jumping on the igd? > > > > Thanks! > > > > José. > > > > On 10 Sep 2016 18:52, "Alex Williamson"> wrote: > > > On Sat, Sep 10, 2016 at 9:51 AM, José Ramón Muñoz Pekkarinen < > > > > > > koali...@gmail.com> wrote: > > >> Hi Alex, > > >> > > >> Sorry to say I'm using 4.7.2, so that might not be the problem, any > other > > >> idea? > > > > > > Is IGD the host boot graphics? It needs to be. > > > Some output for perusal: > > qemu call: > > qemu-system-x86_64 -enable-kvm -vga none -cpu host -smp > 3,cores=3,threads=1 \ > -m 7G -mem-path /mnt/hugepages \ > -device vfio-pci,host=00:02.0,addr=02.0 \ > -netdev user,id=user.0,smb=/home/pekkari/share -device > e1000,netdev=user.0 \ > -device ich9-usb-uhci3,id=uhci -device usb-ehci,id=ehci -device > nec- > usb-xhci,id=xhci \ > -object input-linux,id=kbd,evdev=/dev/ > input/by-path/platform-i8042- > serio-0-event-kbd,grab_all=on \ > -object input-linux,id=mouse,evdev=/dev/input/by-path/platform- > i8042- > serio-2-event-mouse \ > -drive file=win7.img,format=raw,cache=none,aio=native,if=virtio > > output: > > qemu-system-x86_64: -device vfio-pci,host=00:02.0,addr=02.0: Failed to > mmap > :00:02.0 BAR 2. Performance may be slow > This means there's another (non-pci) driver claiming resources from the device, that's going to be a problem. If you prevent i915 from binding to igd then you also need to prevent the other framebuffers from getting resources. Use video=efifb:off,vesafb:off to disable both efi and non-efi framebuffer drivers. > qemu-system-x86_64: -device vfio-pci,host=00:02.0,addr=02.0: IGD device > :00:02.0 has no ROM, legacy mode disabled > Hopefully the above will fix this. > Could not initialize SDL(No available video device) - exiting > You need a -nographic option to avoid this. ___ vfio-users mailing list vfio-users@redhat.com https://www.redhat.com/mailman/listinfo/vfio-users
Re: [vfio-users] IGD Skylake rom?
On Saturday 10 September 2016 17:02:44 José Ramón Muñoz Pekkarinen wrote: > Yep, there is no other graphic card on this machine, might this be a > problem of efi fb or sime fb jumping on the igd? > > Thanks! > > José. > > On 10 Sep 2016 18:52, "Alex Williamson"wrote: > > On Sat, Sep 10, 2016 at 9:51 AM, José Ramón Muñoz Pekkarinen < > > > > koali...@gmail.com> wrote: > >> Hi Alex, > >> > >> Sorry to say I'm using 4.7.2, so that might not be the problem, any other > >> idea? > > > > Is IGD the host boot graphics? It needs to be. Some output for perusal: qemu call: qemu-system-x86_64 -enable-kvm -vga none -cpu host -smp 3,cores=3,threads=1 \ -m 7G -mem-path /mnt/hugepages \ -device vfio-pci,host=00:02.0,addr=02.0 \ -netdev user,id=user.0,smb=/home/pekkari/share -device e1000,netdev=user.0 \ -device ich9-usb-uhci3,id=uhci -device usb-ehci,id=ehci -device nec- usb-xhci,id=xhci \ -object input-linux,id=kbd,evdev=/dev/input/by-path/platform-i8042- serio-0-event-kbd,grab_all=on \ -object input-linux,id=mouse,evdev=/dev/input/by-path/platform-i8042- serio-2-event-mouse \ -drive file=win7.img,format=raw,cache=none,aio=native,if=virtio output: qemu-system-x86_64: -device vfio-pci,host=00:02.0,addr=02.0: Failed to mmap :00:02.0 BAR 2. Performance may be slow qemu-system-x86_64: -device vfio-pci,host=00:02.0,addr=02.0: IGD device :00:02.0 has no ROM, legacy mode disabled Could not initialize SDL(No available video device) - exiting lspci -k: 00:02.0 VGA compatible controller: Intel Corporation Sky Lake Integrated Graphics (rev 07) Subsystem: CLEVO/KAPOK Computer Sky Lake Integrated Graphics Kernel driver in use: vfio-pci Kernel modules: i915 uname -a: Linux ant 4.7.2 #1 SMP Fri Sep 2 08:54:30 BST 2016 x86_64 Intel(R) Core(TM) i7-6500U CPU @ 2.50GHz GenuineIntel GNU/Linux GRUB_CMDLINE_LINUX: GRUB_CMDLINE_LINUX="dolvm crypt_root=/dev/sda3 real_root=/dev/ant/root resume=/dev/ant/swap default_hugepagesz=1GB hugepagesz=1GB hugepages=8 vfio- pci.ids=8086:1916" dmesg | grep -e DMAR -e IOMMU [0.00] ACPI: DMAR 0x87B81888 A8 (v01 INTEL SKL 0001 INTL 0001) [0.037092] DMAR: Host address width 39 [0.037094] DMAR: DRHD base: 0x00fed9 flags: 0x0 [0.037101] DMAR: dmar0: reg_base_addr fed9 ver 1:0 cap 1cc40660462 ecap 7e3ff0505e [0.037105] DMAR: DRHD base: 0x00fed91000 flags: 0x1 [0.037109] DMAR: dmar1: reg_base_addr fed91000 ver 1:0 cap d2008c40660462 ecap f050da [0.037112] DMAR: RMRR base: 0x00874ff000 end: 0x008751efff [0.037115] DMAR: RMRR base: 0x008880 end: 0x008aff [0.037117] DMAR-IR: IOAPIC id 2 under DRHD base 0xfed91000 IOMMU 1 [0.037120] DMAR-IR: HPET id 0 under DRHD base 0xfed91000 [0.038634] DMAR-IR: Enabled IRQ remapping in xapic mode [1.968949] DMAR: No ATSR found [1.969158] DMAR: dmar0: Using Queued invalidation [1.969165] DMAR: dmar1: Using Queued invalidation [1.969287] DMAR: Setting RMRR: [
Re: [vfio-users] IGD Skylake rom?
On Sat, Sep 10, 2016 at 7:53 AM, José Ramón Muñoz Pekkarinen < koali...@gmail.com> wrote: > > > Hi, > > > > I got qemu-2.7 last weekend, and I wanted to try the IGD passthorugh in my > laptop. Unfortunately it seems my vgadoesn't use any rom, so I wonder if > someone could provide any for the same cpu/vga, and inject it to the qemu > command line. Model is the following: > Sounds like you just don't have a new enough host kernel. If you need the ROM (ie. "legacy mode"), you need a v4.6 or newer kernel. ___ vfio-users mailing list vfio-users@redhat.com https://www.redhat.com/mailman/listinfo/vfio-users