[vfio-users] GPU passthrough with Intel KVMGT, Nvidia card gets subsystem id 00000000 when passed through

Jack Coulter jscinoz at jscinoz.so
Sun Feb 12 06:45:40 UTC 2017


Hi again,

Not sure if it's considered poor etiquette on this list to reply to such
an old thread, but I figured this was worth sharing.

With some help from u/Magikazam over on thread [1] r/VFIO (on Reddit), I
found a Windows program that's capable of extracting the GPU ROM from
the system UEFI firmware. You can have a look at the full thread for
more context, but in short, you can use the "Universal BIOS Backup
Toolkit" [2] to obtain a copy of the GPU ROM - you'll find it under the
"Option ROM" tab in that program.

I haven't yet had a chance to try passing this through with GVT, as I've
got higher priorities at the moment, so I figured I'd wait for GVT to
hit mainline (it's been merged in kernel 4.10 which should be released
imminently). Nonetheless, hopefully this information should be enough
for you to get a bit further along with your own efforts. That said, the
aforementioned person from the Reddit thread, who's trying to do the
same thing as you, was still running into the invalid subsystem ID
issue, even with the correct GPU ROM, but perhaps things may be better
with mainline GVT.


Kind regards,
Jack


[1]
https://www.reddit.com/r/VFIO/comments/5fx8jq/gpu_passthrough_incorrect_subsystem_in_windows/
[2]
https://forums.mydigitallife.info/threads/9856-Universal-BIOS-Backup-Toolkit

On 12/07/16 16:45, Jack Coulter wrote:
> Hi János,
>
> Unfortunately I'm not sure what the next step would be at this point.
> I suspect the VBIOS dump you got from Nouveau may not be correct, but
> this is little more than a guess. Given that the VBIOS is part of the
> main BIOS, you may need to extract it in some alternate way, however I
> can't say I know how to go about doing this. Hopefully someone else on
> the list will be able to provide a more useful response.
>
>
> Kind regards,
> Jack
>
> On 12/07/16 10:47, János Horváth wrote:
>> Hi Jack,
>>
>> Thanks for your reply.
>>
>> I have a native Windows 8.1 64bit system in dual boot currently, so I
>> didn't need the bootable USB trick.
>> The problem is that I have already tried dumping the VBIOS with GPU-Z
>> and it has failed. Apparently this GTX860M Maxwell GPU is somewhat
>> different and GPU-Z can't save the VBIOS. I have also read that the
>> VBIOS in this case is not in the card itself, rather it is included
>> in the main BIOS of the laptop.
>>
>> Regards,
>> János
>>
>> On Tue, Jul 12, 2016 at 2:40 AM Jack Coulter <jscinoz at jscinoz.so> wrote:
>>
>>     Hi János,
>>
>>     I had problems myself when trying to extract a card's firmware via
>>     Nouveau - the resulting VBIOS images gave me the same issue in
>>     the VM -
>>     a subsystem ID of all zeros. On a hunch, I made a bootable
>>     Windows USB
>>     and dumped the VBIOS with GPU-Z - this resulting binary then
>>     worked with
>>     VFIO. You could give this a try and see if it resolves your
>>     issue. You
>>     can use rufus (https://github.com/pbatard/rufus) to create a live
>>     Windows environment ("Windows to Go" is the option you're after).
>>
>>     Curious to hear how this goes, as I've recently acquired an Optimus
>>     system myself and have been wondering if KVMGT + VFIO would finally
>>     allow for Optimus to work in a VM.
>>
>>
>>     Kind regards,
>>     Jack
>>
>>     On 11/07/16 06:26, János Horváth wrote:
>>     > Hi all,
>>     >
>>     > I'm trying to get native Windows gaming performance while running
>>     > Linux on my Optimus laptop (Lenovo Y50).
>>     > Hardware:
>>     > CPU: Intel Core i7-4710HQ
>>     > RAM: 16GB DDR3 1600MHz
>>     > GPU: Nvidia GeForce GTX860M & Intel HD 4600
>>     > It supports IOMMU and all the requirements for the pci passthrough.
>>     >
>>     > I have found a project by Intel, KVMGT
>>     >
>>     (https://01.org/igvt-g/blogs/wangbo85/2016/intel-gvt-g-kvmgt-public-release-q12016)
>>     > which lets me share the Intel Integrated Graphics (HD 4600) between
>>     > the host and the guest, so I thought that I could replicate the
>>     > Optimus feature inside the VM, while the host would be running
>>     on the
>>     > Intel HD 4600. I installed Intel's test release to the laptop
>>     (Ubuntu
>>     > 14.04 64bit with kernel 4.3.0 patched with support for KVMGT, and a
>>     > patched QEMU and SeaBios) and created a Windows 8.1 64bit VM.
>>     > It works great, the VM recognizes the Intel HD 4600 and I am
>>     able to
>>     > choose which machine's (host or guest) screen to show on my
>>     display.
>>     > (By the way this (Intel's) solution is by far the best for this
>>     > purpose as I am able to switch between which OS to show on the
>>     > displays not having to only rely on which monitor is plugged to
>>     which
>>     > output)
>>     > The problem is (as expected) with the Nvidia GTX860M. I am able to
>>     > pass through the device, but in Windows Device Manager, it
>>     shows the
>>     > vendor and device ID correctly, but the subsystem shows as
>>     00000000,
>>     > so I am of course unable to install any driver.
>>     > I have tried to use the vBIOS of the Nvidia card with the romfile
>>     > option of QEMU, but it does not help (I extracted the vBIOS,
>>     which is
>>     > not UEFI capable btw, with nouveau driver from a live system).
>>     >
>>     > Here is the command I use to start QEMU:
>>     > sudo /usr/bin/qemu-system-x86_64 -m 2048 -smp 2 -M pc -name kvmgt
>>     > -drive
>>     >
>>     file=/media/hjanos/Hjanos2TB/VM/GPU/GPU-intel.img,format=raw,index=0,media=disk
>>     > -cdrom
>>     >
>>     /media/hjanos/Hjanos2TB/ISO/en_windows_8.1_with_update_x64_dvd_4065090.iso
>>     > -bios /usr/bin/bios.bin -enable-kvm -vgt -vga vgt -display sdl
>>     > -machine kernel_irqchip=on -vgt_high_gm_sz 384 -vgt_low_gm_sz 128
>>     >  -vgt_fence_sz 4 -cpu
>>     >
>>     host,kvm=off,hv_time,hv_relaxed,hv_vapic,hv_spinlocks=0x1fff,hv_vendor_id=Nvidia43FIX
>>     > -usb -usbdevice tablet -net nic -net
>>     tap,script=/home/hjanos/qemu-ifup
>>     > -net user,smb=/home/hjanos -device
>>     >
>>     vfio-pci,host=01:00.0,romfile=/media/hjanos/Hjanos2TB/VM/GPU/vbios.rom
>>     >
>>     > I need help to figure out why does the subsystem id gets changed to
>>     > 00000000 when I pass through the Nvidia card, as I beleive that
>>     makes
>>     > the driver unable to install. (it is not code 43 as usual,
>>     rather it
>>     > is code 28)
>>     >
>>     > Please let me know if you need any additional details.
>>     >
>>     > Thanks,
>>     > Janos
>>     >
>>     >
>>     > _______________________________________________
>>     > vfio-users mailing list
>>     > vfio-users at redhat.com <mailto:vfio-users at redhat.com>
>>     > https://www.redhat.com/mailman/listinfo/vfio-users
>>
>>
>>     _______________________________________________
>>     vfio-users mailing list
>>     vfio-users at redhat.com <mailto:vfio-users at redhat.com>
>>     https://www.redhat.com/mailman/listinfo/vfio-users
>>
>
>
>
> _______________________________________________
> vfio-users mailing list
> vfio-users at redhat.com
> https://www.redhat.com/mailman/listinfo/vfio-users



-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/vfio-users/attachments/20170212/c2e116e4/attachment.sig>


More information about the vfio-users mailing list