Description of problem:
Fails to start guest with Intel vGPU device
Version-Release number of selected component:
Steps to Reproduce:
1. Prepare a guest with Intel vGPU device:
# virsh dumpxml 1|grep hostdev -a3
<hostdev mode='subsystem' type='mdev' managed='no' model='vfio-pci'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
2. # virsh start 1
error: Failed to start domain 1
error: internal error: qemu unexpectedly closed the monitor: 2018-05-28T05:31:03.382527Z qemu-kvm: -device vfio-pci,id=hostdev0,sysfsdev=/sys/bus/mdev/devices/7bb8579b-55ca-4f4d-b70f-498a583c1e6e,bus=pci.0,addr=0x3: vfio error: 7bb8579b-55ca-4f4d-b70f-498a583c1e6e: vfio-display-dmabuf: opengl not available
Guest fails to start
Guest starts successfully
qemu-kvm-rhev-2.10.0-21.el7_5.2.x86_64 works well
QEMU's vfio-pci device defaults to display=auto, so any host kernel where the mdev device exposes a display will now require QEMU to support a display configuration consistent with that display. This can be avoided adding a display=off parameter to the device, but I think we've broken backwards compatibility by making the default 'auto'. What host kernel is being used that has GVT-g with display support?
I tried kernel-3.10.0-862.el7.x86_64 and kernel-3.10.0-894.el7.x86_64, both can reproduce
Posted a QEMU patch:
I don't see how to resolve this other than turning the display default to "off", posted upstream, we'll see what fallout this causes and how libvirt will handle it if the default changes. This doesn't seem to be simply a GVT-g bug though, it's a design problem, so re-assigning to me.
Hi Fangge, would you be able to test that the issue is resolved with this test build?
(In reply to Alex Williamson from comment #6)
> Hi Fangge, would you be able to test that the issue is resolved with this
> test build?
I tried with the test build, it works well
Thanks for testing!
Fix included in qemu-kvm-rhev-2.12.0-7.el7
Verify this issue against qemu-kvm-rhev-2.12.0-13.el7.x86_64:
# /usr/libexec/qemu-kvm -device vfio-pci,sysfsdev=/sys/bus/mdev/devices/89d223b5-8e86-4682-b703-acf28f1fece8
VNC server running on ::1:5900
Mark as verified per comment 12
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.