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

Blank Field ihatethisfield at gmail.com
Wed Sep 23 10:04:25 UTC 2015


CSM includes VGA, so you only need it if you want just UEFI for the UEFI.
Pure EFI with windows 7 works with the QXL device as noted in the
whitepaper.
On Sep 23, 2015 12:56 PM, "Okky Hendriansyah" <okky at nostratech.com> wrote:

> So we need a CSM-enabled OVMF builds? My Windows 10 guest script refered
> to that whitepaper, using pure OVMF build, never tried on Windows 7 though.
> Just noticed about this CSM-enabled builds, worth to try. Thanks for
> pointing this.
>
> --
> *Okky Hendriansyah*
>
> On September 23, 2015 at 16:49:11, Blank Field (ihatethisfield at gmail.com)
> wrote:
>
> You can run win7 with ovmf, but you need to follow the whitepaper
> instructions.
> On Sep 23, 2015 11:37 AM, "Okky Hendriansyah" <okky at nostratech.com> wrote:
>
>> Good to hear that. Keep in mind that by enabling the Intel VGA
>> Arbitration on the kernel, you lose the DRI capabities (3D acceleration,
>> etc.) on the host graphics card (Intel HD).
>>
>> If you don't want that, the only way is to pass the GPU without VGA
>> (legacy-free) mode, thus by using a modern OS like Windows 8 onwards that
>> supports UEFI (via OVMF). Using the legacy-free mode we don't need to patch
>> the kernel and we don't lose the DRI capabilities of the host (Intel HD
>> only). Oh yeah, we also need the GPU to support UEFI.
>>
>> Alex details this on his blog
>>
>> http://vfio.blogspot.co.id/2014/08/whats-deal-with-vga-arbitration.html?m=1
>>
>> Best regards,
>> Okky Hendriansyah
>>
>> > On Sep 23, 2015, at 14:13, Francisco Menendez <aterfelis at gmail.com>
>> wrote:
>> >
>> > 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
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/vfio-users/attachments/20150923/4b5415fe/attachment.htm>


More information about the vfio-users mailing list