On Wed, Jul 18, 2018 at 05:06:28PM +0200, Ján Tomko wrote:
On Wed, Jul 18, 2018 at 02:31:44PM +0200, Erik Skultety wrote:
> QEMU 2.12 introduced a new type of display for mediated devices using
> vfio-pci backend which allows a mediated device to be used as a VGA
> compatible device as an alternative to an emulated video device. QEMU
> exposes this feature via a vfio device property 'display' with supported
> values 'on/off/auto' (libvirt will default to 'off').
>
> This patch adds the necessary bits to domain config handling in order to
> expose this feature. Since there's no convenient way for libvirt to come
> up with usable defaults for the display setting, simply because libvirt
> is not able to figure out which of the display implementations - dma-buf
> which requires OpenGL support vs vfio regions which doesn't need OpenGL
> (works with OpenGL enabled too) - the underlying mdev uses.
>
> Signed-off-by: Erik Skultety <eskultet(a)redhat.com>
> Reviewed-by: Ján Tomko <jtomko(a)redhat.com>
> ---
> docs/formatdomain.html.in | 20 ++++-
> docs/schemas/domaincommon.rng | 5 ++
> src/conf/domain_conf.c | 19 ++++-
> src/conf/domain_conf.h | 1 +
> src/qemu/qemu_domain.c | 94 ++++++++++++++++++++++-
> tests/qemuxml2argvdata/hostdev-mdev-display.xml | 39 ++++++++++
> tests/qemuxml2xmloutdata/hostdev-mdev-display.xml | 47 ++++++++++++
> tests/qemuxml2xmltest.c | 1 +
> 8 files changed, 220 insertions(+), 6 deletions(-)
> create mode 100644 tests/qemuxml2argvdata/hostdev-mdev-display.xml
> create mode 100644 tests/qemuxml2xmloutdata/hostdev-mdev-display.xml
>
> @@ -6286,6 +6373,9 @@ qemuDomainDeviceDefPostParse(virDomainDeviceDefPtr dev,
> case VIR_DOMAIN_DEVICE_INPUT:
> case VIR_DOMAIN_DEVICE_SOUND:
> case VIR_DOMAIN_DEVICE_HOSTDEV:
> + ret = qemuDomainHostdevDefPostParse(dev->data.hostdev, qemuCaps);
> + break;
This should only be called for VIR_DOMAIN_DEVICE_HOSTDEV, not the other
device types listed above.
Doh! Thank you for pointing that out :), that would have ended interestingly.
Erik