QEMU 2.12 introduced a new vfio-pci device option 'display=on/off/auto'.
Initially, libvirt is only going to support values on/off only, as we
don't want to predict what the intended usage of the mediated device
will be and most importantly, what kind of vfio display implementation
to use - dmabuf vs vfio region mapping as there's no convenient way for
us to find out what implementation the device's underlying driver
supports.
Signed-off-by: Erik Skultety <eskultet(a)redhat.com>
---
src/qemu/qemu_capabilities.c | 2 ++
src/qemu/qemu_capabilities.h | 1 +
tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml | 1 +
tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml | 1 +
tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml | 1 +
tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml | 1 +
tests/qemucapabilitiesdata/caps_3.0.0.ppc64.xml | 1 +
7 files changed, 8 insertions(+)
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index 37c8fbe3d3..b9cdee4ed8 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -501,6 +501,7 @@ VIR_ENUM_IMPL(virQEMUCaps, QEMU_CAPS_LAST,
/* 310 */
"sev-guest",
"machine.pseries.cap-hpt-max-page-size",
+ "vfio-pci.display",
);
@@ -1194,6 +1195,7 @@ static struct virQEMUCapsStringFlags
virQEMUCapsDevicePropsPCIAssign[] = {
static struct virQEMUCapsStringFlags virQEMUCapsDevicePropsVfioPCI[] = {
{ "bootindex", QEMU_CAPS_VFIO_PCI_BOOTINDEX },
+ { "display", QEMU_CAPS_VFIO_PCI_DISPLAY },
};
static struct virQEMUCapsStringFlags virQEMUCapsDevicePropsSCSIDisk[] = {
diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h
index df9bf49abb..aeaed2343e 100644
--- a/src/qemu/qemu_capabilities.h
+++ b/src/qemu/qemu_capabilities.h
@@ -485,6 +485,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for syntax-check
*/
/* 310 */
QEMU_CAPS_SEV_GUEST, /* -object sev-guest,... */
QEMU_CAPS_MACHINE_PSERIES_CAP_HPT_MAX_PAGE_SIZE, /* -machine
pseries.cap-hpt-max-page-size */
+ QEMU_CAPS_VFIO_PCI_DISPLAY, /* -device vfio-pci.display */
QEMU_CAPS_LAST /* this must always be the last item */
} virQEMUCapsFlags;
diff --git a/tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml
b/tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml
index ecc029f403..021db06b8e 100644
--- a/tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml
+++ b/tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml
@@ -169,6 +169,7 @@
<flag name='vhost-vsock'/>
<flag name='chardev-fd-pass'/>
<flag name='tpm-emulator'/>
+ <flag name='vfio-pci.display'/>
<version>2011090</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>347550</microcodeVersion>
diff --git a/tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml
b/tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml
index 2ee582f343..5d702789bd 100644
--- a/tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml
+++ b/tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml
@@ -166,6 +166,7 @@
<flag name='vhost-vsock'/>
<flag name='chardev-fd-pass'/>
<flag name='tpm-emulator'/>
+ <flag name='vfio-pci.display'/>
<version>2011090</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>428334</microcodeVersion>
diff --git a/tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml
b/tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml
index 87d189e58d..75121a7dc1 100644
--- a/tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml
+++ b/tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml
@@ -133,6 +133,7 @@
<flag name='vhost-vsock'/>
<flag name='chardev-fd-pass'/>
<flag name='tpm-emulator'/>
+ <flag name='vfio-pci.display'/>
<version>2012000</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>375999</microcodeVersion>
diff --git a/tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml
b/tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml
index 9c1f6c327c..2bfdb8c047 100644
--- a/tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml
@@ -211,6 +211,7 @@
<flag name='mch'/>
<flag name='mch.extended-tseg-mbytes'/>
<flag name='sev-guest'/>
+ <flag name='vfio-pci.display'/>
<version>2011090</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>416196</microcodeVersion>
diff --git a/tests/qemucapabilitiesdata/caps_3.0.0.ppc64.xml
b/tests/qemucapabilitiesdata/caps_3.0.0.ppc64.xml
index 7e958b2efc..8ee4201d0f 100644
--- a/tests/qemucapabilitiesdata/caps_3.0.0.ppc64.xml
+++ b/tests/qemucapabilitiesdata/caps_3.0.0.ppc64.xml
@@ -166,6 +166,7 @@
<flag name='chardev-fd-pass'/>
<flag name='tpm-emulator'/>
<flag name='machine.pseries.cap-hpt-max-page-size'/>
+ <flag name='vfio-pci.display'/>
<version>2012050</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>446771</microcodeVersion>
--
2.14.4