render / rpms / libvirt

Forked from rpms/libvirt 9 months ago
Clone
51d9a2
From 2d16cb96407ed22af46b892e3319f04ac61924ed Mon Sep 17 00:00:00 2001
51d9a2
Message-Id: <2d16cb96407ed22af46b892e3319f04ac61924ed@dist-git>
51d9a2
From: Erik Skultety <eskultet@redhat.com>
51d9a2
Date: Thu, 19 Jul 2018 15:04:02 +0200
51d9a2
Subject: [PATCH] conf: Introduce new <hostdev> attribute 'display'
51d9a2
MIME-Version: 1.0
51d9a2
Content-Type: text/plain; charset=UTF-8
51d9a2
Content-Transfer-Encoding: 8bit
51d9a2
51d9a2
QEMU 2.12 introduced a new type of display for mediated devices using
51d9a2
vfio-pci backend which allows a mediated device to be used as a VGA
51d9a2
compatible device as an alternative to an emulated video device. QEMU
51d9a2
exposes this feature via a vfio device property 'display' with supported
51d9a2
values 'on/off/auto' (libvirt will default to 'off').
51d9a2
51d9a2
This patch adds the necessary bits to domain config handling in order to
51d9a2
expose this feature. Since there's no convenient way for libvirt to come
51d9a2
up with usable defaults for the display setting, simply because libvirt
51d9a2
is not able to figure out which of the display implementations - dma-buf
51d9a2
which requires OpenGL support vs vfio regions which doesn't need OpenGL
51d9a2
(works with OpenGL enabled too) - the underlying mdev uses.
51d9a2
51d9a2
Reviewed-by: Ján Tomko <jtomko@redhat.com>
51d9a2
Signed-off-by: Erik Skultety <eskultet@redhat.com>
51d9a2
(cherry picked from commit d54e45b6edd7623e488a19e30bc4148a21fa8b03)
51d9a2
51d9a2
https://bugzilla.redhat.com/show_bug.cgi?id=1475770
51d9a2
Signed-off-by: Erik Skultety <eskultet@redhat.com>
51d9a2
Reviewed-by: Ján Tomko <jtomko@redhat.com>
51d9a2
---
51d9a2
 docs/formatdomain.html.in                     | 20 +++-
51d9a2
 docs/schemas/domaincommon.rng                 |  5 +
51d9a2
 src/conf/domain_conf.c                        | 19 +++-
51d9a2
 src/conf/domain_conf.h                        |  1 +
51d9a2
 src/qemu/qemu_domain.c                        | 98 ++++++++++++++++++-
51d9a2
 .../qemuxml2argvdata/hostdev-mdev-display.xml | 39 ++++++++
51d9a2
 .../hostdev-mdev-display.xml                  | 47 +++++++++
51d9a2
 tests/qemuxml2xmltest.c                       |  1 +
51d9a2
 8 files changed, 222 insertions(+), 8 deletions(-)
51d9a2
 create mode 100644 tests/qemuxml2argvdata/hostdev-mdev-display.xml
51d9a2
 create mode 100644 tests/qemuxml2xmloutdata/hostdev-mdev-display.xml
51d9a2
51d9a2
diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
51d9a2
index 9dd22554ad..3554c3dc30 100644
51d9a2
--- a/docs/formatdomain.html.in
51d9a2
+++ b/docs/formatdomain.html.in
51d9a2
@@ -4510,9 +4510,23 @@
51d9a2
           guest. Currently, model='vfio-pci' and
51d9a2
           model='vfio-ccw' (Since 4.4.0)
51d9a2
           is supported. Refer MDEV to create
51d9a2
-          a mediated device on the host. There are also some implications on the
51d9a2
-          usage of guest's address type depending on the model
51d9a2
-          attribute, see the address element below.
51d9a2
+          a mediated device on the host.
51d9a2
+          Since 4.6.0 (QEMU 2.12) an optional
51d9a2
+          display attribute may be used to enable or disable
51d9a2
+          support for an accelerated remote desktop backed by a mediated
51d9a2
+          device (such as NVIDIA vGPU or Intel GVT-g) as an alternative to
51d9a2
+          emulated video devices. This attribute
51d9a2
+          is limited to model='vfio-pci' only. Supported values
51d9a2
+          are either on or off (default is 'off').
51d9a2
+          It is required to use a
51d9a2
+          graphical framebuffer in order to
51d9a2
+          use this attribute, currently only supported with VNC, Spice and
51d9a2
+          egl-headless graphics devices.
51d9a2
+          

51d9a2
+            Note: There are also some implications on the usage of guest's
51d9a2
+            address type depending on the model attribute,
51d9a2
+            see the address element below.
51d9a2
+          

51d9a2
           
51d9a2
         
51d9a2
         

51d9a2
diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng
51d9a2
index 157726752c..be8430ab22 100644
51d9a2
--- a/docs/schemas/domaincommon.rng
51d9a2
+++ b/docs/schemas/domaincommon.rng
51d9a2
@@ -4579,6 +4579,11 @@
51d9a2
         <value>vfio-ccw</value>
51d9a2
       </choice>
51d9a2
     </attribute>
51d9a2
+    <optional>
51d9a2
+      <attribute name="display">
51d9a2
+        <ref name="virOnOff"/>
51d9a2
+      </attribute>
51d9a2
+    </optional>
51d9a2
     <element name="source">
51d9a2
       <ref name="mdevaddress"/>
51d9a2
     </element>
51d9a2
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
51d9a2
index 72086f9e86..830c298158 100644
51d9a2
--- a/src/conf/domain_conf.c
51d9a2
+++ b/src/conf/domain_conf.c
51d9a2
@@ -7656,6 +7656,7 @@ virDomainHostdevDefParseXMLSubsys(xmlNodePtr node,
51d9a2
     char *rawio = NULL;
51d9a2
     char *backendStr = NULL;
51d9a2
     char *model = NULL;
51d9a2
+    char *display = NULL;
51d9a2
     int backend;
51d9a2
     int ret = -1;
51d9a2
     virDomainHostdevSubsysPCIPtr pcisrc = &def->source.subsys.u.pci;
51d9a2
@@ -7675,6 +7676,7 @@ virDomainHostdevDefParseXMLSubsys(xmlNodePtr node,
51d9a2
     sgio = virXMLPropString(node, "sgio");
51d9a2
     rawio = virXMLPropString(node, "rawio");
51d9a2
     model = virXMLPropString(node, "model");
51d9a2
+    display = virXMLPropString(node, "display");
51d9a2
 
51d9a2
     /* @type is passed in from the caller rather than read from the
51d9a2
      * xml document, because it is specified in different places for
51d9a2
@@ -7762,6 +7764,15 @@ virDomainHostdevDefParseXMLSubsys(xmlNodePtr node,
51d9a2
                            model);
51d9a2
             goto cleanup;
51d9a2
         }
51d9a2
+
51d9a2
+        if (display &&
51d9a2
+            (mdevsrc->display = virTristateSwitchTypeFromString(display)) <= 0) {
51d9a2
+            virReportError(VIR_ERR_XML_ERROR,
51d9a2
+                           _("unknown value '%s' for <hostdev> attribute "
51d9a2
+                             "'display'"),
51d9a2
+                           display);
51d9a2
+            goto cleanup;
51d9a2
+        }
51d9a2
     }
51d9a2
 
51d9a2
     switch (def->source.subsys.type) {
51d9a2
@@ -7815,6 +7826,7 @@ virDomainHostdevDefParseXMLSubsys(xmlNodePtr node,
51d9a2
     VIR_FREE(rawio);
51d9a2
     VIR_FREE(backendStr);
51d9a2
     VIR_FREE(model);
51d9a2
+    VIR_FREE(display);
51d9a2
     return ret;
51d9a2
 }
51d9a2
 
51d9a2
@@ -26568,9 +26580,14 @@ virDomainHostdevDefFormat(virBufferPtr buf,
51d9a2
                               virTristateBoolTypeToString(scsisrc->rawio));
51d9a2
         }
51d9a2
 
51d9a2
-        if (def->source.subsys.type == VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_MDEV)
51d9a2
+        if (def->source.subsys.type == VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_MDEV) {
51d9a2
             virBufferAsprintf(buf, " model='%s'",
51d9a2
                               virMediatedDeviceModelTypeToString(mdevsrc->model));
51d9a2
+            if (mdevsrc->display != VIR_TRISTATE_SWITCH_ABSENT)
51d9a2
+                virBufferAsprintf(buf, " display='%s'",
51d9a2
+                                  virTristateSwitchTypeToString(mdevsrc->display));
51d9a2
+        }
51d9a2
+
51d9a2
     }
51d9a2
     virBufferAddLit(buf, ">\n");
51d9a2
     virBufferAdjustIndent(buf, 2);
51d9a2
diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
51d9a2
index 3deda1d978..8ca9558ceb 100644
51d9a2
--- a/src/conf/domain_conf.h
51d9a2
+++ b/src/conf/domain_conf.h
51d9a2
@@ -382,6 +382,7 @@ typedef struct _virDomainHostdevSubsysMediatedDev virDomainHostdevSubsysMediated
51d9a2
 typedef virDomainHostdevSubsysMediatedDev *virDomainHostdevSubsysMediatedDevPtr;
51d9a2
 struct _virDomainHostdevSubsysMediatedDev {
51d9a2
     int model;                          /* enum virMediatedDeviceModelType */
51d9a2
+    int display; /* virTristateSwitch */
51d9a2
     char uuidstr[VIR_UUID_STRING_BUFLEN];   /* mediated device's uuid string */
51d9a2
 };
51d9a2
 
51d9a2
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
51d9a2
index 9498594857..5337f1ce55 100644
51d9a2
--- a/src/qemu/qemu_domain.c
51d9a2
+++ b/src/qemu/qemu_domain.c
51d9a2
@@ -4451,9 +4451,48 @@ qemuDomainDeviceDefValidateNetwork(const virDomainNetDef *net)
51d9a2
 
51d9a2
 
51d9a2
 static int
51d9a2
-qemuDomainDeviceDefValidateHostdev(const virDomainHostdevDef *hostdev,
51d9a2
-                                   const virDomainDef *def)
51d9a2
+qemuDomainMdevDefValidate(const virDomainHostdevSubsysMediatedDev *mdevsrc,
51d9a2
+                          const virDomainDef *def,
51d9a2
+                          virQEMUCapsPtr qemuCaps)
51d9a2
 {
51d9a2
+    if (mdevsrc->display == VIR_TRISTATE_SWITCH_ABSENT)
51d9a2
+        return 0;
51d9a2
+
51d9a2
+    if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_VFIO_PCI_DISPLAY)) {
51d9a2
+        virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
51d9a2
+                       _("display property of device vfio-pci is "
51d9a2
+                         "not supported by this version of QEMU"));
51d9a2
+        return -1;
51d9a2
+    }
51d9a2
+
51d9a2
+    if (mdevsrc->model != VIR_MDEV_MODEL_TYPE_VFIO_PCI) {
51d9a2
+        virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
51d9a2
+                       _("<hostdev> attribute 'display' is only supported"
51d9a2
+                         " with model='vfio-pci'"));
51d9a2
+
51d9a2
+        return -1;
51d9a2
+    }
51d9a2
+
51d9a2
+    if (mdevsrc->display == VIR_TRISTATE_SWITCH_ON) {
51d9a2
+        if (def->ngraphics == 0) {
51d9a2
+            virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
51d9a2
+                           _("graphics device is needed for attribute value "
51d9a2
+                             "'display=on' in <hostdev>"));
51d9a2
+            return -1;
51d9a2
+        }
51d9a2
+    }
51d9a2
+
51d9a2
+    return 0;
51d9a2
+}
51d9a2
+
51d9a2
+
51d9a2
+static int
51d9a2
+qemuDomainDeviceDefValidateHostdev(const virDomainHostdevDef *hostdev,
51d9a2
+                                   const virDomainDef *def,
51d9a2
+                                   virQEMUCapsPtr qemuCaps)
51d9a2
+{
51d9a2
+    const virDomainHostdevSubsysMediatedDev *mdevsrc;
51d9a2
+
51d9a2
     /* forbid capabilities mode hostdev in this kind of hypervisor */
51d9a2
     if (hostdev->mode == VIR_DOMAIN_HOSTDEV_MODE_CAPABILITIES) {
51d9a2
         virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
51d9a2
@@ -4463,6 +4502,24 @@ qemuDomainDeviceDefValidateHostdev(const virDomainHostdevDef *hostdev,
51d9a2
         return -1;
51d9a2
     }
51d9a2
 
51d9a2
+    if (hostdev->mode == VIR_DOMAIN_HOSTDEV_MODE_SUBSYS) {
51d9a2
+        switch ((virDomainHostdevSubsysType) hostdev->source.subsys.type) {
51d9a2
+        case VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_USB:
51d9a2
+        case VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_PCI:
51d9a2
+        case VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_SCSI:
51d9a2
+        case VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_SCSI_HOST:
51d9a2
+            break;
51d9a2
+        case VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_MDEV:
51d9a2
+            mdevsrc = &hostdev->source.subsys.u.mdev;
51d9a2
+            return qemuDomainMdevDefValidate(mdevsrc, def, qemuCaps);
51d9a2
+        case VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_LAST:
51d9a2
+        default:
51d9a2
+            virReportEnumRangeError(virDomainHostdevSubsysType,
51d9a2
+                                    hostdev->source.subsys.type);
51d9a2
+            return -1;
51d9a2
+        }
51d9a2
+    }
51d9a2
+
51d9a2
     return 0;
51d9a2
 }
51d9a2
 
51d9a2
@@ -5595,7 +5652,8 @@ qemuDomainDeviceDefValidate(const virDomainDeviceDef *dev,
51d9a2
         break;
51d9a2
 
51d9a2
     case VIR_DOMAIN_DEVICE_HOSTDEV:
51d9a2
-        ret = qemuDomainDeviceDefValidateHostdev(dev->data.hostdev, def);
51d9a2
+        ret = qemuDomainDeviceDefValidateHostdev(dev->data.hostdev, def,
51d9a2
+                                                 qemuCaps);
51d9a2
         break;
51d9a2
 
51d9a2
     case VIR_DOMAIN_DEVICE_VIDEO:
51d9a2
@@ -6205,6 +6263,35 @@ qemuDomainVsockDefPostParse(virDomainVsockDefPtr vsock)
51d9a2
 }
51d9a2
 
51d9a2
 
51d9a2
+static int
51d9a2
+qemuDomainHostdevDefMdevPostParse(virDomainHostdevSubsysMediatedDevPtr mdevsrc,
51d9a2
+                                  virQEMUCapsPtr qemuCaps)
51d9a2
+{
51d9a2
+    /* QEMU 2.12 added support for vfio-pci display type, we default to
51d9a2
+     * 'display=off' to stay safe from future changes */
51d9a2
+    if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_VFIO_PCI_DISPLAY) &&
51d9a2
+        mdevsrc->display == VIR_TRISTATE_SWITCH_ABSENT)
51d9a2
+        mdevsrc->display = VIR_TRISTATE_SWITCH_OFF;
51d9a2
+
51d9a2
+    return 0;
51d9a2
+}
51d9a2
+
51d9a2
+
51d9a2
+static int
51d9a2
+qemuDomainHostdevDefPostParse(virDomainHostdevDefPtr hostdev,
51d9a2
+                              virQEMUCapsPtr qemuCaps)
51d9a2
+{
51d9a2
+    virDomainHostdevSubsysPtr subsys = &hostdev->source.subsys;
51d9a2
+
51d9a2
+    if (hostdev->mode == VIR_DOMAIN_HOSTDEV_MODE_SUBSYS &&
51d9a2
+        hostdev->source.subsys.type == VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_MDEV &&
51d9a2
+        qemuDomainHostdevDefMdevPostParse(&subsys->u.mdev, qemuCaps) < 0)
51d9a2
+        return -1;
51d9a2
+
51d9a2
+    return 0;
51d9a2
+}
51d9a2
+
51d9a2
+
51d9a2
 static int
51d9a2
 qemuDomainDeviceDefPostParse(virDomainDeviceDefPtr dev,
51d9a2
                              const virDomainDef *def,
51d9a2
@@ -6255,11 +6342,14 @@ qemuDomainDeviceDefPostParse(virDomainDeviceDefPtr dev,
51d9a2
         ret = qemuDomainVsockDefPostParse(dev->data.vsock);
51d9a2
         break;
51d9a2
 
51d9a2
+    case VIR_DOMAIN_DEVICE_HOSTDEV:
51d9a2
+        ret = qemuDomainHostdevDefPostParse(dev->data.hostdev, qemuCaps);
51d9a2
+        break;
51d9a2
+
51d9a2
     case VIR_DOMAIN_DEVICE_LEASE:
51d9a2
     case VIR_DOMAIN_DEVICE_FS:
51d9a2
     case VIR_DOMAIN_DEVICE_INPUT:
51d9a2
     case VIR_DOMAIN_DEVICE_SOUND:
51d9a2
-    case VIR_DOMAIN_DEVICE_HOSTDEV:
51d9a2
     case VIR_DOMAIN_DEVICE_WATCHDOG:
51d9a2
     case VIR_DOMAIN_DEVICE_GRAPHICS:
51d9a2
     case VIR_DOMAIN_DEVICE_HUB:
51d9a2
diff --git a/tests/qemuxml2argvdata/hostdev-mdev-display.xml b/tests/qemuxml2argvdata/hostdev-mdev-display.xml
51d9a2
new file mode 100644
51d9a2
index 0000000000..f37e08e1b9
51d9a2
--- /dev/null
51d9a2
+++ b/tests/qemuxml2argvdata/hostdev-mdev-display.xml
51d9a2
@@ -0,0 +1,39 @@
51d9a2
+<domain type='qemu'>
51d9a2
+  <name>QEMUGuest2</name>
51d9a2
+  <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
51d9a2
+  <memory unit='KiB'>219136</memory>
51d9a2
+  <currentMemory unit='KiB'>219136</currentMemory>
51d9a2
+  <vcpu placement='static'>1</vcpu>
51d9a2
+  <os>
51d9a2
+    <type arch='i686' machine='pc'>hvm</type>
51d9a2
+    <boot dev='hd'/>
51d9a2
+  </os>
51d9a2
+  <clock offset='utc'/>
51d9a2
+  <on_poweroff>destroy</on_poweroff>
51d9a2
+  <on_reboot>restart</on_reboot>
51d9a2
+  <on_crash>destroy</on_crash>
51d9a2
+  <devices>
51d9a2
+    <emulator>/usr/bin/qemu-system-i686</emulator>
51d9a2
+    <disk type='block' device='disk'>
51d9a2
+      <driver name='qemu' type='raw'/>
51d9a2
+      <source dev='/dev/HostVG/QEMUGuest2'/>
51d9a2
+      <target dev='hda' bus='ide'/>
51d9a2
+      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
51d9a2
+    </disk>
51d9a2
+    <controller type='usb' index='0'>
51d9a2
+    </controller>
51d9a2
+    <controller type='pci' index='0' model='pci-root'/>
51d9a2
+    <controller type='ide' index='0'>
51d9a2
+    </controller>
51d9a2
+    <graphics type='vnc'/>
51d9a2
+    <hostdev mode='subsystem' type='mdev' model='vfio-pci' display='on'>
51d9a2
+      <source>
51d9a2
+        <address uuid='53764d0e-85a0-42b4-af5c-2046b460b1dc'/>
51d9a2
+      </source>
51d9a2
+    </hostdev>
51d9a2
+    <video>
51d9a2
+      <model type='qxl' heads='1'/>
51d9a2
+    </video>
51d9a2
+    <memballoon model='none'/>
51d9a2
+  </devices>
51d9a2
+</domain>
51d9a2
diff --git a/tests/qemuxml2xmloutdata/hostdev-mdev-display.xml b/tests/qemuxml2xmloutdata/hostdev-mdev-display.xml
51d9a2
new file mode 100644
51d9a2
index 0000000000..94c11b1199
51d9a2
--- /dev/null
51d9a2
+++ b/tests/qemuxml2xmloutdata/hostdev-mdev-display.xml
51d9a2
@@ -0,0 +1,47 @@
51d9a2
+<domain type='qemu'>
51d9a2
+  <name>QEMUGuest2</name>
51d9a2
+  <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
51d9a2
+  <memory unit='KiB'>219136</memory>
51d9a2
+  <currentMemory unit='KiB'>219136</currentMemory>
51d9a2
+  <vcpu placement='static'>1</vcpu>
51d9a2
+  <os>
51d9a2
+    <type arch='i686' machine='pc'>hvm</type>
51d9a2
+    <boot dev='hd'/>
51d9a2
+  </os>
51d9a2
+  <clock offset='utc'/>
51d9a2
+  <on_poweroff>destroy</on_poweroff>
51d9a2
+  <on_reboot>restart</on_reboot>
51d9a2
+  <on_crash>destroy</on_crash>
51d9a2
+  <devices>
51d9a2
+    <emulator>/usr/bin/qemu-system-i686</emulator>
51d9a2
+    <disk type='block' device='disk'>
51d9a2
+      <driver name='qemu' type='raw'/>
51d9a2
+      <source dev='/dev/HostVG/QEMUGuest2'/>
51d9a2
+      <target dev='hda' bus='ide'/>
51d9a2
+      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
51d9a2
+    </disk>
51d9a2
+    <controller type='usb' index='0'>
51d9a2
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
51d9a2
+    </controller>
51d9a2
+    <controller type='pci' index='0' model='pci-root'/>
51d9a2
+    <controller type='ide' index='0'>
51d9a2
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
51d9a2
+    </controller>
51d9a2
+    <input type='mouse' bus='ps2'/>
51d9a2
+    <input type='keyboard' bus='ps2'/>
51d9a2
+    <graphics type='vnc' port='-1' autoport='yes'>
51d9a2
+      <listen type='address'/>
51d9a2
+    </graphics>
51d9a2
+    <video>
51d9a2
+      <model type='qxl' ram='65536' vram='65536' vgamem='16384' heads='1' primary='yes'/>
51d9a2
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
51d9a2
+    </video>
51d9a2
+    <hostdev mode='subsystem' type='mdev' managed='no' model='vfio-pci' display='on'>
51d9a2
+      <source>
51d9a2
+        <address uuid='53764d0e-85a0-42b4-af5c-2046b460b1dc'/>
51d9a2
+      </source>
51d9a2
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
51d9a2
+    </hostdev>
51d9a2
+    <memballoon model='none'/>
51d9a2
+  </devices>
51d9a2
+</domain>
51d9a2
diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c
51d9a2
index fa57221d62..e418e67f6c 100644
51d9a2
--- a/tests/qemuxml2xmltest.c
51d9a2
+++ b/tests/qemuxml2xmltest.c
51d9a2
@@ -479,6 +479,7 @@ mymain(void)
51d9a2
     DO_TEST("hostdev-pci-address", NONE);
51d9a2
     DO_TEST("hostdev-vfio", NONE);
51d9a2
     DO_TEST("hostdev-mdev-precreated", NONE);
51d9a2
+    DO_TEST("hostdev-mdev-display", QEMU_CAPS_VFIO_PCI_DISPLAY);
51d9a2
     DO_TEST("pci-rom", NONE);
51d9a2
     DO_TEST("pci-rom-disabled", NONE);
51d9a2
     DO_TEST("pci-rom-disabled-invalid", NONE);
51d9a2
-- 
51d9a2
2.18.0
51d9a2