[vfio-users] Question about integrated GPU passthrough and initialization

Micah Morton mortonm at chromium.org
Tue May 28 20:43:37 UTC 2019


Hey Alex,

I'm seeing the firmware get a hold of the VBT
(https://github.com/coreboot/coreboot/blob/master/src/drivers/intel/gma/opregion.c#L253)
and write the location of the OpRegion to the ASLS PCI register
(https://github.com/coreboot/coreboot/blob/master/src/drivers/intel/gma/opregion.c#L88).
To sanity check, I booted and Chrome OS firmware put the OpRegion at
0x7aa9b520 (I can do `mem rm 0x7aa9b520 16` in the host and see it
print out "IntelGraphicsMem"). So like you said, OpRegion is
definitely there and used in the host.

This line (https://github.com/coreboot/coreboot/blob/master/src/drivers/intel/gma/opregion.c#L312)
seems to imply that the VBT is being included in the OpRegion, so not
sure whats going wrong. I am right in the middle of debugging this so
I'll follow up on here if I have further specific questions.

Thanks!

On Tue, May 28, 2019 at 1:23 PM Alex Williamson
<alex.williamson at redhat.com> wrote:
>
> On Tue, 28 May 2019 09:35:16 -0700
> Micah Morton <mortonm at chromium.org> wrote:
>
> > Ah ok thanks!
> >
> > The qemu command line i was using is here: `qemu-system-x86_64
> > -chardev stdio,id=seabios -device
> > isa-debugcon,iobase=0x402,chardev=seabios -m 2G -smp 2 -M pc -vga none
> > -usbdevice tablet -cpu host,-invpcid,-tsc-deadline,check -drive
> > 'file=/path/to/image.bin,index=0,media=disk,cache=unsafe,format=raw'
> > -enable-kvm -device
> > vfio-pci,x-igd-opregion=on,host=00:02.0,id=hostdev0,bus=pci.0,addr=0x2,rombar=0
> > -device 'virtio-net,netdev=eth0' -netdev
> > 'user,id=eth0,net=10.0.2.0/27,hostfwd=tcp:127.0.0.1:9222-:22'`
> >
> > It didn't work, but now at least I know why:
> > [    0.316117] i915 0000:00:02.0: No more image in the PCI ROM
> > [    0.316261] [drm] Failed to find VBIOS tables (VBT)
> >
> > If I can expose the VBT to the VM maybe it will work :)
>
> Hmm, looking at i915 it seems it didn't find this VBT thing in the
> OpRegion so tried to look at the ROM, which comments indicate would
> only be the VBT location on an older device.  QEMU should fail if
> x-igd-opregion=on is specified but the host kernel didn't provide an
> OpRegion at all, so we've at least done some minimal sanity checking at
> the host kernel before exposing it, but maybe the OpRegion is missing
> some things on this chrome device vs a standard pc?  Maybe Chrome OS
> uses a modified i915 driver that doesn't depend on it so the firmware
> guys stripped it?  You could write a minimal vfio driver to dump
> the opregion data if you want to parse it by hand.  Thanks,
>
> Alex




More information about the vfio-users mailing list