[There were a bunch of bounces from gmail accounts for this message, so
let me add some comments in hopes that whatever the issue was has been
resolved and more folks will see this thread.]

On Tue, 15 Dec 2020 00:08:27 +0100
boit sanssoif <boit.sanss...@gmail.com> wrote:

> Hi,
> 
> I'm trying to configure kvm to single passthrough IGD (i5-7200U with HD620)
> in legacy mode on a headless laptop.
> I extracted the vbios.rom and checked device ID (5916) and checksum with
> rom-parser tools
> 
> intel i915 modules are blacklisted and vfio options are setted like that :
> options vfio-pci ids=8086:5916 disable_vga=1


Note that you're intentionally disabling VGA support here while
docs/igd-assign.txt says:

    * vfio VGA support very likely needs to be enabled in the host kernel

The reservation in making this an absolute directive is that a register
bit in IGD can indicate that VGA is disabled on the device, in which
case we don't require VGA support.  If you're seeing the below error
message, then VGA is not disabled on the IGD device and the vfio-pci
VGA support which is being disabled by these module options is required.

> I tried to fulfill all the conditions of the igd-assign.txt legacy mode
> from the qemu project but I still failing to success, monitor stays black
> with no output.
> 
> using qemu with pc-i440fx-5.1 :
> 
> qemu-system-x86_64                                      \
> -machine pc                                                 \
> -cpu host,kvm=off -smp cores=2,threads=1 -enable-kvm            \
> -boot d -cdrom /tmp/debian-10.6.0-amd64-netinst.iso       \
> -m 4G                                       \
> -vga none -nographic                    \
> -nodefaults \
> -device
> vfio-pci-igd-lpc-bridge,id=vfio-pci-igd-lpc-bridge0,bus=pci.0,addr=1f.0 \
> -device
> vfio-pci,host=00:02.0,x-igd-gms=2,id=hostdev0,bus=pci.0,addr=0x2,x-igd-opregion=on,romfile=/tmp/vbios_8086_5916.rom
> 
> 
> here are the errors that I cannot fix :
> 
> qemu-system-x86_64: -device
> vfio-pci,host=00:02.0,x-igd-gms=6,id=hostdev0,bus=pci.0,addr=0x2,x-igd-opregion=on,romfile=/home/user/vbios_8086_5916_origin.rom:
> vfio 0000:00:02.0: failed getting region info for VGA region index 8:
> Invalid argument
> => is VGA region 8 valid ?  


This is directly caused by the disable_vga=1 module option.

> qemu-system-x86_64: -device
> vfio-pci,host=00:02.0,x-igd-gms=6,id=hostdev0,bus=pci.0,addr=0x2,x-igd-opregion=on,romfile=/home/user/vbios_8086_5916_origin.rom:
> IGD device 0000:00:02.0 failed to enable VGA access, legacy mode disabled


And as a result we've dropped out of legacy mode setup.

> And syslog shows errors  :
> vfio-pci 0000:00:02.0: Invalid PCI ROM header signature: expecting 0xaa55,
> got 0xffff
> resource sanity check: requesting [mem 0x000c0000-0x000dffff], which spans
> more than PCI Bus 0000:00 [mem 0x000c0000-0x000c3fff window]
> caller pci_map_rom+0x7c/0x1d0 mapping multiple BARs

The kernel tries to map the ROM to determine whether it's really there
as part of the standard device initialization, regardless of whether
QEMU is using a romfile option.  I assume that's what's happening here.

> What am I doing wrong ? single gpu passthrough from a headless laptop seems
> to be possible.

Remove the disable_vga=1 option and see where/if it fails next.  Thanks,

Alex

_______________________________________________
vfio-users mailing list
vfio-users@redhat.com
https://www.redhat.com/mailman/listinfo/vfio-users

Reply via email to