[vfio-users] How to return Intel IGD back to host after used by kvm instance with vfio driver

Acewind acewind at gmail.com
Thu Apr 4 10:36:55 UTC 2019


I passed a Intel Corporation HD Graphics 620 graphic card to kvm instance
on my i3-7130U host of Ubuntu 18.04 with kernel version 4.15.0
qemu args:
-device vfio-pci,host=00:02.0,id=hostdev0,bus=pci.0,addr=0x2
-set device.hostdev0.x-igd-opregion=on
-set device.hostdev0.x-igd-gms=1
-bios /usr/share/seabios/bios.bin
-chardev file,id=seabios,path=/tmp/bios.log

After vm shutdown, the screen is black, I want to use it on host:

echo 1 > /sys/bus/pci/devices/0000:00:02.0/remove
echo 1 > /sys/bus/pci/rescan
now lspci -vs 0000:00:02.0
00:02.0 VGA compatible controller: Intel Corporation HD Graphics 620 (rev
02) (prog-if 00 [VGA controller])
    Subsystem: Intel Corporation HD Graphics 620
    Flags: fast devsel, IRQ 11
    Memory at d1000000 (64-bit, non-prefetchable) [disabled] [size=16M]
    Memory at c0000000 (64-bit, prefetchable) [disabled] [size=256M]
    I/O ports at 1000 [disabled] [size=64]
    Capabilities: [40] Vendor Specific Information: Len=0c <?>
    Capabilities: [70] Express Root Complex Integrated Endpoint, MSI 00
    Capabilities: [ac] MSI: Enable- Count=1/1 Maskable- 64bit-
    Capabilities: [d0] Power Management version 2
    Capabilities: [100] Process Address Space ID (PASID)
    Capabilities: [200] Address Translation Service (ATS)
    Capabilities: [300] Page Request Interface (PRI)
    Kernel modules: i915

And I rmmod vfio/i915 and modprobe -r i915, but the screen is still black
and silent. What should I do to make use of the IGD graphic card without
host reboot again?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/vfio-users/attachments/20190404/8019f079/attachment.htm>


More information about the vfio-users mailing list