[vfio-users] KVM + QEMU + GPU passthrough (Windows7 Guest)

Francisco Menendez aterfelis at gmail.com
Wed Sep 23 07:13:30 UTC 2015


Okky.

The arbitration patch did it! Also, by your suggestion, I went back to
Seabios instead of OVFM.
Thanks a lot! This was driving me crazy for the past week!

Kind regards.

-Francisco

On Wed, Sep 23, 2015 at 1:45 PM, Okky Hendriansyah <okky at nostratech.com> wrote:
> Hmm, I once successful passing through to a Windows 7 guest but with using
> VGA mode, thus I used the Seabios instead of OVMF, install linux-vfio from
> AUR to have the kernel patched with necessary Intel VGA Arbitration patches,
> and enable the i915.enable_hd_vgaarb=1 kernel parameter.
>
> Here’s my script when I use Windows 7:
> http://pastebin.com/5U2VjuEy
>
> --
> Okky Hendriansyah
>
> On September 23, 2015 at 11:30:47, Francisco Menendez (aterfelis at gmail.com)
> wrote:
>
> Hello, Okky.
> Thanks for your reply.
>
> I removed the x-vga=on option but there isn't any discernible change.
> Boots normally, but only displays up until "Starting Windows"
>
> On Wed, Sep 23, 2015 at 1:10 PM, Okky Hendriansyah <okky at nostratech.com>
> wrote:
>> Hi Francisco,
>>
>> It seems that you passthrough in VGA mode (x-vga=on) but you are using
>> OVMF
>> also. Have you tried omiting the x-vga=on switch?
>>
>> Best regards,
>> --
>> Okky Hendriansyah
>>
>> On September 23, 2015 at 11:05:44, Francisco Menendez
>> (aterfelis at gmail.com)
>> wrote:
>>
>> I'm having a bit of an odd issue and would greatly appreciate it if
>> someone has any clue as of what might be happening.
>>
>> The system:
>> * Intel CPU with VTx and VTd enabled in BIOS
>> * NVidia GTX 980 - isolated (vfio), to be used by the guest
>> * Intel graphics for the host (Arch Linux x64)
>>
>> What I've done:
>>
>> * Added "iommu_intel=on" to the kernel boot command line
>> * Blacklisted the nouveau driver
>> * Added the vfio-pci driver and assigned the necessary ids (GPU +
>> attached HDMI sound)
>> * Confirmed IOMMU groups ( /sys/kernel/iommu_groups/ -type l output is OK)
>> * Confirmed vfio-pci capture with dmesg
>>
>> What happens:
>>
>> After booting windows, I get the GPU displaying the "Starting Windows"
>> splash screen, with animation and everything. Thus far, I think the
>> GPU passthrough is successful. However, after that, the screen gets
>> stuck there while the system keeps booting. I even hear the windows
>> chime as it starts, but the screen is still showing "Starting Windows"
>>
>> If I use emulated VGA, the NVidia card shows "Code 12", but I hear
>> this is expected if the emulated VGA is turned on.
>>
>> The above is also reproducible with the windows installer ( The GPU
>> output displays: "Windows is loading files" -> "Starting windows" ->
>> no more screen updates )
>>
>> QEMU commandline:
>>
>> --------------
>> qemu-system-x86_64 \
>> -name windows7 \
>> -cpu host,kvm=off \
>> -smp 8,sockets=1,cores=4,threads=2 \
>> -enable-kvm \
>> -machine type=pc,accel=kvm,iommu=on \
>> -m 16G -mem-prealloc -balloon none \
>> -rtc clock=host,base=utc \
>> -soundhw hda \
>> -device
>> ioh3420,bus=pci.0,addr=1c.0,multifunction=on,port=1,chassis=1,id=root.1
>> \
>> -device
>> vfio-pci,host=01:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on
>> \
>> -device vfio-pci,host=01:00.1,bus=root.1,addr=00.1 \
>> -drive
>>
>> if=pflash,format=raw,readonly,file=/usr/share/edk2.git/ovmf-x64/OVMF_CODE-pure-efi.fd
>> \
>> -drive
>>
>> if=pflash,format=raw,file=/usr/share/edk2.git/ovmf-x64/OVMF_VARS-pure-efi.fd
>> \
>> -drive file=win7.img,if=ide,format=raw,media=disk \
>> -monitor stdio \
>> -device piix3-usb-uhci -device usb-tablet \
>> -vga none -serial null -parallel null -nodefaults -nodefconfig
>> ----------------
>>
>> Let me know if you need any other information about the setup.
>> Thank you in advance!
>>
>> _______________________________________________
>> vfio-users mailing list
>> vfio-users at redhat.com
>> https://www.redhat.com/mailman/listinfo/vfio-users




More information about the vfio-users mailing list