[vfio-users] [FEEDBACK NEEDED] Additionnal tips to include in the Arch wiki article

Zaki Saad zaki0saad at gmail.com
Sat May 21 15:39:30 UTC 2016


Actually, this is my line for GPU passthrough:

-device
vfio-pci,host=01:00.0,romfile=/mnt/VM/vfio/XFX.R9390.8192.150603.rom,multifunction=on
\

As you can see, I have supplied my own ROM file in the way Nicolas has
described. Without this, I get the "Invalid ROM contents" error you
described.

See if you can find your ROM file here: https://www.techpowerup.com/vgabios/
Otherwise, you should be able to dump your ROM somehow; I have never tried.

On Sat, May 21, 2016 at 6:27 AM Alex Williamson <alex.l.williamson at gmail.com>
wrote:

> On Fri, May 20, 2016 at 11:38 AM, Nicolas Roy-Renaud <
> nicolas.roy-renaud.1 at ens.etsmtl.ca> wrote:
>
>> Did you have any issues with efifb or some other driver grabbing the gard
>> before vfio-pci? What are your IOMMU groups like, which chard is your
>> boot_vga, what script or method do you use to get vfio-pci to bind with
>> your card, what's your kernel command line and what modules are included in
>> your initramfs?
>>
>> I've struggled with getting my primary GPU to work correctly for a
>> passthrough like this, and I ended up switching it up with the secondary
>> because I simply couldn't get it to work properly (I'd keep getting
>> something about "Invalid ROM contents") and I couldn't see my boot logs
>> until the host driver finished loading. It's really inconvenient now
>> becuase my motherboard is designed so that having a full-size GPU in the
>> second PCIe slot blocks 4 SATA ports out of 6, so I need to have L-shaped
>> cables in a bunch of places to make everything work properly.
>>
>
> The boot VGA ROM is handled differently from other PCI ROMs in Linux, when
> you read it you're actually reading a shadow copy of it placed at 0xc0000,
> which has its roots back in the original IBM PC history.  Execution of the
> VGA ROM is allowed to modify this copy of the ROM image in memory.  Thus
> you're really not getting a pristine copy of the device ROM and it can
> often lead to these invalid ROM contents messages.  I wish we provided raw
> access to the PCI option ROM in these cases as well.  For now, if you do
> have these sorts of invalid ROM messages, I would suggest that you at least
> boot with the card as secondary, dump the ROM, then use that collected
> image with the romfile= option rather than use the shadow copy.  I had to
> add some code to vfio to fix device IDs and checksums for IGD assignment
> because of this, I don't know if there's any standard fixup we can do for
> other vendors.  Thanks,
>
> Alex
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/vfio-users/attachments/20160521/1eb318d2/attachment.htm>


More information about the vfio-users mailing list