edecca
From 93a2ea36d65b36b542b1a96f16ea0ef271baad37 Mon Sep 17 00:00:00 2001
edecca
Message-Id: <93a2ea36d65b36b542b1a96f16ea0ef271baad37@dist-git>
edecca
From: Erik Skultety <eskultet@redhat.com>
edecca
Date: Thu, 19 Jul 2018 15:03:59 +0200
edecca
Subject: [PATCH] qemu: caps: Add vfio-pci.display capability
edecca
MIME-Version: 1.0
edecca
Content-Type: text/plain; charset=UTF-8
edecca
Content-Transfer-Encoding: 8bit
edecca
edecca
QEMU 2.12 introduced a new vfio-pci device option 'display=on/off/auto'.
edecca
This patch introduces the necessary capability.
edecca
edecca
Signed-off-by: Erik Skultety <eskultet@redhat.com>
edecca
Reviewed-by: John Ferlan <jferlan@redhat.com>
edecca
Reviewed-by: Ján Tomko <jtomko@redhat.com>
edecca
(cherry picked from commit 11c7bdac6dbe8659c2f8bf7a35b97288b0acb207)
edecca
edecca
https://bugzilla.redhat.com/show_bug.cgi?id=1475770
edecca
Signed-off-by: Erik Skultety <eskultet@redhat.com>
edecca
Reviewed-by: Ján Tomko <jtomko@redhat.com>
edecca
---
edecca
 src/qemu/qemu_capabilities.c                       | 4 ++++
edecca
 src/qemu/qemu_capabilities.h                       | 3 +++
edecca
 tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml | 1 +
edecca
 tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml   | 1 +
edecca
 tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml   | 1 +
edecca
 tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml  | 1 +
edecca
 tests/qemucapabilitiesdata/caps_3.0.0.ppc64.xml    | 1 +
edecca
 tests/qemucapabilitiesdata/caps_3.0.0.x86_64.xml   | 1 +
edecca
 8 files changed, 13 insertions(+)
edecca
edecca
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
edecca
index df358f8967..0fb800589a 100644
edecca
--- a/src/qemu/qemu_capabilities.c
edecca
+++ b/src/qemu/qemu_capabilities.c
edecca
@@ -504,6 +504,9 @@ VIR_ENUM_IMPL(virQEMUCaps, QEMU_CAPS_LAST,
edecca
               "machine.pseries.cap-htm",
edecca
               "usb-storage.werror",
edecca
               "egl-headless",
edecca
+
edecca
+              /* 315 */
edecca
+              "vfio-pci.display",
edecca
     );
edecca
 
edecca
 
edecca
@@ -1197,6 +1200,7 @@ static struct virQEMUCapsStringFlags virQEMUCapsDevicePropsPCIAssign[] = {
edecca
 
edecca
 static struct virQEMUCapsStringFlags virQEMUCapsDevicePropsVfioPCI[] = {
edecca
     { "bootindex", QEMU_CAPS_VFIO_PCI_BOOTINDEX },
edecca
+    { "display", QEMU_CAPS_VFIO_PCI_DISPLAY },
edecca
 };
edecca
 
edecca
 static struct virQEMUCapsStringFlags virQEMUCapsDevicePropsSCSIDisk[] = {
edecca
diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h
edecca
index 55221e7e57..9e8ad5f5c3 100644
edecca
--- a/src/qemu/qemu_capabilities.h
edecca
+++ b/src/qemu/qemu_capabilities.h
edecca
@@ -489,6 +489,9 @@ typedef enum { /* virQEMUCapsFlags grouping marker for syntax-check */
edecca
     QEMU_CAPS_USB_STORAGE_WERROR, /* -device usb-storage,werror=..,rerror=.. */
edecca
     QEMU_CAPS_EGL_HEADLESS, /* -display egl-headless */
edecca
 
edecca
+    /* 315 */
edecca
+    QEMU_CAPS_VFIO_PCI_DISPLAY, /* -device vfio-pci.display */
edecca
+
edecca
     QEMU_CAPS_LAST /* this must always be the last item */
edecca
 } virQEMUCapsFlags;
edecca
 
edecca
diff --git a/tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml b/tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml
edecca
index 80e7afec04..0cc6327573 100644
edecca
--- a/tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml
edecca
+++ b/tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml
edecca
@@ -170,6 +170,7 @@
edecca
   <flag name='chardev-fd-pass'/>
edecca
   <flag name='tpm-emulator'/>
edecca
   <flag name='egl-headless'/>
edecca
+  <flag name='vfio-pci.display'/>
edecca
   <version>2011090</version>
edecca
   <kvmVersion>0</kvmVersion>
edecca
   <microcodeVersion>347550</microcodeVersion>
edecca
diff --git a/tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml b/tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml
edecca
index c4b09c0003..a88da6193e 100644
edecca
--- a/tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml
edecca
+++ b/tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml
edecca
@@ -168,6 +168,7 @@
edecca
   <flag name='tpm-emulator'/>
edecca
   <flag name='machine.pseries.cap-htm'/>
edecca
   <flag name='egl-headless'/>
edecca
+  <flag name='vfio-pci.display'/>
edecca
   <version>2011090</version>
edecca
   <kvmVersion>0</kvmVersion>
edecca
   <microcodeVersion>428334</microcodeVersion>
edecca
diff --git a/tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml b/tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml
edecca
index 1ff2fe45e1..7121da27a0 100644
edecca
--- a/tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml
edecca
+++ b/tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml
edecca
@@ -134,6 +134,7 @@
edecca
   <flag name='chardev-fd-pass'/>
edecca
   <flag name='tpm-emulator'/>
edecca
   <flag name='egl-headless'/>
edecca
+  <flag name='vfio-pci.display'/>
edecca
   <version>2012000</version>
edecca
   <kvmVersion>0</kvmVersion>
edecca
   <microcodeVersion>375999</microcodeVersion>
edecca
diff --git a/tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml
edecca
index 37d17786cf..78889facce 100644
edecca
--- a/tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml
edecca
+++ b/tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml
edecca
@@ -212,6 +212,7 @@
edecca
   <flag name='mch.extended-tseg-mbytes'/>
edecca
   <flag name='sev-guest'/>
edecca
   <flag name='egl-headless'/>
edecca
+  <flag name='vfio-pci.display'/>
edecca
   <version>2011090</version>
edecca
   <kvmVersion>0</kvmVersion>
edecca
   <microcodeVersion>416196</microcodeVersion>
edecca
diff --git a/tests/qemucapabilitiesdata/caps_3.0.0.ppc64.xml b/tests/qemucapabilitiesdata/caps_3.0.0.ppc64.xml
edecca
index 57bf5dba11..01bb968938 100644
edecca
--- a/tests/qemucapabilitiesdata/caps_3.0.0.ppc64.xml
edecca
+++ b/tests/qemucapabilitiesdata/caps_3.0.0.ppc64.xml
edecca
@@ -168,6 +168,7 @@
edecca
   <flag name='machine.pseries.cap-hpt-max-page-size'/>
edecca
   <flag name='machine.pseries.cap-htm'/>
edecca
   <flag name='egl-headless'/>
edecca
+  <flag name='vfio-pci.display'/>
edecca
   <version>2012050</version>
edecca
   <kvmVersion>0</kvmVersion>
edecca
   <microcodeVersion>446771</microcodeVersion>
edecca
diff --git a/tests/qemucapabilitiesdata/caps_3.0.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_3.0.0.x86_64.xml
edecca
index 431910a9e3..4bc7cfeebc 100644
edecca
--- a/tests/qemucapabilitiesdata/caps_3.0.0.x86_64.xml
edecca
+++ b/tests/qemucapabilitiesdata/caps_3.0.0.x86_64.xml
edecca
@@ -215,6 +215,7 @@
edecca
   <flag name='sev-guest'/>
edecca
   <flag name='usb-storage.werror'/>
edecca
   <flag name='egl-headless'/>
edecca
+  <flag name='vfio-pci.display'/>
edecca
   <version>2012090</version>
edecca
   <kvmVersion>0</kvmVersion>
edecca
   <microcodeVersion>438109</microcodeVersion>
edecca
-- 
edecca
2.18.0
edecca