[vfio-users] VM doesn't boot if I use GPU passthrough

Ruben Felgenhauer 4felgenh at informatik.uni-hamburg.de
Sat Jan 30 10:10:39 UTC 2016


Hi,

I tried your method and it definitely did something.

When attaching the device as is, virsh tells me:
error: internal error: Attempted double use of PCI slot 0000:00:02.0 
(may need "multifunction='on'" for device on function 0)
If I remove the second <address ... /> tag completely, virsh attaches 
the device successfully.
Windows tells me, that the GPU has an error code 14 (that's new) and 
that I shall restart.
After the restart, the GPU gives me Code 43 again.

Best regards,
Ruben

Am 29.01.2016 um 01:56 schrieb Nicolas Roy-Renaud:
> Ok, try to remove your passthrough from your guest configuration 
> (either using virsh of virt manager). That is : remove the actual gpu 
> (PCI:1:0.0) but keep the associated sound card (PCI:1:0.1) in there so 
> virsh knows it needs to bind with this VFIO group.
> From there, create a file (let's say ./GPU_DEVICE.xml) containing just 
> the following :
>
>     1.
>         <hostdevmode='subsystem'type='pci'managed='yes'>
>     2.
>         <source>
>     3.
>         <addressdomain='0x0000'bus='0x01'slot='0x00'function='0x0'/>
>     4.
>         </source>
>     5.
>         <addresstype='pci'domain='0x0000'bus='0x00'slot='0x02'function='0x0'/>
>     6.
>         </hostdev>
>
>
> You'll be able to use this file to tell libvirt to append your GPU to 
> guest's config at runtime, which somehow gets around the invalid ROM 
> issue. Just run something like this :
> virsh start Win10Full && sleep 60 && virsh attach-device --live --file ./GPU_DEVICE.xml
> If I guessed right, windows should detect a new GPU and get the 
> drivers in place once virsh is done mounting it. If that does work, 
> you'll gave to run this same command every time you start your VM too, 
> or at least until that specific bug is fixed. Hopefully that should 
> get you some results so you can work your way from there.
>
> On 2016-01-28 17:03, Ryan Flagler wrote:
>> I was going to recommend you use UEFI, which is why I was asking. 
>> I've personally had better luck getting things to pass through properly.
>>
>> Is your VM down when you try to cat the rom? The GPU needs to be 
>> unused by anything.
>>
> I had the exact same symptoms on my Asus Strix 970, looks like a 
> recurring issue with Asus cards. This happenned both when trying to 
> start a VM with a managed passthrough and when attempting to dump the 
> ROM from sysfs. I figured it's probably an issue with vfio-pci itself, 
> and I still haven't fixed it wet, but the solution I posted above is 
> my current workaround.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/vfio-users/attachments/20160130/6b13a727/attachment.htm>


More information about the vfio-users mailing list