[vfio-users] Failed to mmap 0000:01:00.0 BAR 3. Performance may be slow

Konrad Eisele eiselekd at gmail.com
Mon Aug 20 15:41:57 UTC 2018


How can I dump the rom image?
I used
$cd /sys/devices/pci0000:00/0000:00:02.0/0000:01:00.0
$echo 1>rom
$cat rom > /mnt/nvidia_bios.rom

to use it in qemu:
"-device
vfio-pci,host=01:00.0,multifunction=on,romfile=/mnt/nvidia_bios.rom"

However when using rom-parser it shows "Error, ran off the end"

Valid ROM signature found @0h, PCIR offset 190h
       PCIR: type 0 (x86 PC-AT), vendor: 10de, device: 128b, class: 030000
       PCIR: revision 0, vendor revision: 1
Error, ran off the end

This is a dump of the graphics card that was put under vfio_pci inside
initramfs.
Maybe I need to capture from a boot where the noveau driver is active?
There are also some more factors that might need to be in place:
- I'm booting the host in legacy mode.
- I'm booting the win10 guest in uefi ovmf mode.
Does this matter? Is there a rom difference weather you start via
uefi/legacy and
does the win10 startup depend on the right rom (uefi/legacy)? Not really
familiar
where the rom comes from and what it does / what the romfile option in qemu
does...

When using two graphics cards then the passthrough as secondary card works.
Should
I dump the rom when having the passthrough active in a two cards setup?
// Greetings Konrad







2018-08-20 17:03 GMT+02:00 Alex Williamson <alex.williamson at redhat.com>:

> On Sun, 19 Aug 2018 22:57:44 +0200
> Konrad Eisele <eiselekd at gmail.com> wrote:
>
> > I try to passthrough the primary graphic card (GForce 710b
> > at slot 0000:01:0.0) to a win kvm guest. The host runs
> > headless. I have blacklisted the nvidia drivers and bound
> > the drivers to vfio-pci on startup. However when starting qemu
> > I currently get the error:
> >
> > (qemu) qemu-system-x86_64: -device vfio-pci,host=01:00.0,
> multifunction=on:
> > Failed to mmap 0000:01:00.0 BAR 3. Performance
> > may be slow
> >
> > It seems that efifb is jumping in and allocating some region:
> >
> > $cat /proc/iomem
> > ...
> > 0000000-00000000 : PCI Bus 0000:00
> >  00000000-00000000 : PCI Bus 0000:01
> >    00000000-00000000 : 0000:01:00.0
> >      00000000-00000000 : vfio-pci
> >    00000000-00000000 : 0000:01:00.0
> >      00000000-00000000 : efifb
> >  00000000-00000000 : PCI Bus 0000:03
> >    00000000-00000000 : 0000:03:00.0
> > ...
> >
> > So I added efifb:off to grub's kernel cmdline
> >
> > cat /proc/cmdline:
> > .... video=vesafb:off,efifb:off
> >
> > However that doesnt seem to help. Does anybody know howto
> > prevent the above error?
> > What more do I have to do to passthrough the primary graphics card to a
> > guest
> > running on a headless server? Any tips?
>
> This is generally why it's not recommended, iterate through what's
> using resources on the card until you've exhausted and disabled all
> possible console drivers for your device.  You'll likely also need to
> use a dumped ROM image for the card since the ROM for the primary
> graphics is read from the shadow ROM space where it can be updated in
> place by the execution of the ROM.  Thanks,
>
> Alex
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/vfio-users/attachments/20180820/775fbf27/attachment.htm>


More information about the vfio-users mailing list