render / rpms / libvirt

Forked from rpms/libvirt 9 months ago
Clone
c480ed
From 3ff9abfcfa6a79c47755a6e8d9da5b1bc4bdd655 Mon Sep 17 00:00:00 2001
c480ed
Message-Id: <3ff9abfcfa6a79c47755a6e8d9da5b1bc4bdd655@dist-git>
c480ed
From: Yi Min Zhao <zyimin@linux.ibm.com>
c480ed
Date: Mon, 8 Apr 2019 10:57:19 +0200
c480ed
Subject: [PATCH] qemu: Introduce zPCI capability
c480ed
MIME-Version: 1.0
c480ed
Content-Type: text/plain; charset=UTF-8
c480ed
Content-Transfer-Encoding: 8bit
c480ed
c480ed
Let's introduce zPCI capability.
c480ed
c480ed
Signed-off-by: Yi Min Zhao <zyimin@linux.ibm.com>
c480ed
Reviewed-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
c480ed
Reviewed-by: Stefan Zimmermann <stzi@linux.ibm.com>
c480ed
Reviewed-by: Bjoern Walk <bwalk@linux.ibm.com>
c480ed
Reviewed-by: Ján Tomko <jtomko@redhat.com>
c480ed
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
c480ed
c480ed
(cherry-picked from commit 29ad952f7e50bbbd920cbfb009a45b55fdb2f069)
c480ed
c480ed
https://bugzilla.redhat.com/show_bug.cgi?id=1508149
c480ed
c480ed
Conflicts:
c480ed
c480ed
  * src/qemu/qemu_capabilities.c
c480ed
    src/qemu/qemu_capabilities.h
c480ed
    + several capabilities have not been backported
c480ed
c480ed
Removed:
c480ed
c480ed
  * tests/qemucapabilitiesdata/caps_3.0.0.s390x.xml
c480ed
    + the file does not exist at all downstream
c480ed
      - missing d7434ae8009f
c480ed
c480ed
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
c480ed
Message-Id: <20190408085732.28684-3-abologna@redhat.com>
c480ed
Reviewed-by: Laine Stump <laine@redhat.com>
c480ed
Reviewed-by: Ján Tomko <jtomko@redhat.com>
c480ed
---
c480ed
 src/qemu/qemu_capabilities.c                     | 2 ++
c480ed
 src/qemu/qemu_capabilities.h                     | 1 +
c480ed
 tests/qemucapabilitiesdata/caps_2.10.0.s390x.xml | 1 +
c480ed
 tests/qemucapabilitiesdata/caps_2.11.0.s390x.xml | 1 +
c480ed
 tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml | 1 +
c480ed
 tests/qemucapabilitiesdata/caps_2.7.0.s390x.xml  | 1 +
c480ed
 tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml  | 1 +
c480ed
 tests/qemucapabilitiesdata/caps_2.9.0.s390x.xml  | 1 +
c480ed
 8 files changed, 9 insertions(+)
c480ed
c480ed
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
c480ed
index 0d6fa02560..8ca53abf2b 100644
c480ed
--- a/src/qemu/qemu_capabilities.c
c480ed
+++ b/src/qemu/qemu_capabilities.c
c480ed
@@ -512,6 +512,7 @@ VIR_ENUM_IMPL(virQEMUCaps, QEMU_CAPS_LAST,
c480ed
               /* 315 */
c480ed
               "vfio-pci.display",
c480ed
               "vfio-ap",
c480ed
+              "zpci",
c480ed
               "machine.pseries.cap-nested-hv",
c480ed
     );
c480ed
 
c480ed
@@ -1153,6 +1154,7 @@ struct virQEMUCapsStringFlags virQEMUCapsObjectTypes[] = {
c480ed
     { "mch", QEMU_CAPS_DEVICE_MCH },
c480ed
     { "sev-guest", QEMU_CAPS_SEV_GUEST },
c480ed
     { "vfio-ap", QEMU_CAPS_DEVICE_VFIO_AP },
c480ed
+    { "zpci", QEMU_CAPS_DEVICE_ZPCI },
c480ed
 };
c480ed
 
c480ed
 static struct virQEMUCapsStringFlags virQEMUCapsDevicePropsVirtioBalloon[] = {
c480ed
diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h
c480ed
index 9550df2cd5..bea4767f3c 100644
c480ed
--- a/src/qemu/qemu_capabilities.h
c480ed
+++ b/src/qemu/qemu_capabilities.h
c480ed
@@ -492,6 +492,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for syntax-check */
c480ed
     /* 315 */
c480ed
     QEMU_CAPS_VFIO_PCI_DISPLAY, /* -device vfio-pci.display */
c480ed
     QEMU_CAPS_DEVICE_VFIO_AP, /* -device vfio-ap */
c480ed
+    QEMU_CAPS_DEVICE_ZPCI, /* -device zpci */
c480ed
     QEMU_CAPS_MACHINE_PSERIES_CAP_NESTED_HV, /* -machine pseries.cap-nested-hv */
c480ed
 
c480ed
     QEMU_CAPS_LAST /* this must always be the last item */
c480ed
diff --git a/tests/qemucapabilitiesdata/caps_2.10.0.s390x.xml b/tests/qemucapabilitiesdata/caps_2.10.0.s390x.xml
c480ed
index 7347f5683f..b46efe880d 100644
c480ed
--- a/tests/qemucapabilitiesdata/caps_2.10.0.s390x.xml
c480ed
+++ b/tests/qemucapabilitiesdata/caps_2.10.0.s390x.xml
c480ed
@@ -120,6 +120,7 @@
c480ed
   <flag name='blockdev-del'/>
c480ed
   <flag name='vhost-vsock'/>
c480ed
   <flag name='egl-headless'/>
c480ed
+  <flag name='zpci'/>
c480ed
   <version>2010000</version>
c480ed
   <kvmVersion>0</kvmVersion>
c480ed
   <microcodeVersion>307899</microcodeVersion>
c480ed
diff --git a/tests/qemucapabilitiesdata/caps_2.11.0.s390x.xml b/tests/qemucapabilitiesdata/caps_2.11.0.s390x.xml
c480ed
index b359f9a049..3ac1fc941c 100644
c480ed
--- a/tests/qemucapabilitiesdata/caps_2.11.0.s390x.xml
c480ed
+++ b/tests/qemucapabilitiesdata/caps_2.11.0.s390x.xml
c480ed
@@ -127,6 +127,7 @@
c480ed
   <flag name='vhost-vsock'/>
c480ed
   <flag name='tpm-emulator'/>
c480ed
   <flag name='egl-headless'/>
c480ed
+  <flag name='zpci'/>
c480ed
   <version>2011000</version>
c480ed
   <kvmVersion>0</kvmVersion>
c480ed
   <microcodeVersion>346751</microcodeVersion>
c480ed
diff --git a/tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml b/tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml
c480ed
index 7121da27a0..184f115fe4 100644
c480ed
--- a/tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml
c480ed
+++ b/tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml
c480ed
@@ -135,6 +135,7 @@
c480ed
   <flag name='tpm-emulator'/>
c480ed
   <flag name='egl-headless'/>
c480ed
   <flag name='vfio-pci.display'/>
c480ed
+  <flag name='zpci'/>
c480ed
   <version>2012000</version>
c480ed
   <kvmVersion>0</kvmVersion>
c480ed
   <microcodeVersion>375999</microcodeVersion>
c480ed
diff --git a/tests/qemucapabilitiesdata/caps_2.7.0.s390x.xml b/tests/qemucapabilitiesdata/caps_2.7.0.s390x.xml
c480ed
index 9ed25178f8..b04a9fbfd5 100644
c480ed
--- a/tests/qemucapabilitiesdata/caps_2.7.0.s390x.xml
c480ed
+++ b/tests/qemucapabilitiesdata/caps_2.7.0.s390x.xml
c480ed
@@ -107,6 +107,7 @@
c480ed
   <flag name='nbd-tls'/>
c480ed
   <flag name='virtual-css-bridge'/>
c480ed
   <flag name='sdl-gl'/>
c480ed
+  <flag name='zpci'/>
c480ed
   <version>2007000</version>
c480ed
   <kvmVersion>0</kvmVersion>
c480ed
   <microcodeVersion>220792</microcodeVersion>
c480ed
diff --git a/tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml b/tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml
c480ed
index 646239ff25..b2b267be8d 100644
c480ed
--- a/tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml
c480ed
+++ b/tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml
c480ed
@@ -110,6 +110,7 @@
c480ed
   <flag name='virtual-css-bridge'/>
c480ed
   <flag name='sdl-gl'/>
c480ed
   <flag name='vhost-vsock'/>
c480ed
+  <flag name='zpci'/>
c480ed
   <version>2007093</version>
c480ed
   <kvmVersion>0</kvmVersion>
c480ed
   <microcodeVersion>246206</microcodeVersion>
c480ed
diff --git a/tests/qemucapabilitiesdata/caps_2.9.0.s390x.xml b/tests/qemucapabilitiesdata/caps_2.9.0.s390x.xml
c480ed
index 09d68e1f18..f908ab88f3 100644
c480ed
--- a/tests/qemucapabilitiesdata/caps_2.9.0.s390x.xml
c480ed
+++ b/tests/qemucapabilitiesdata/caps_2.9.0.s390x.xml
c480ed
@@ -114,6 +114,7 @@
c480ed
   <flag name='sdl-gl'/>
c480ed
   <flag name='blockdev-del'/>
c480ed
   <flag name='vhost-vsock'/>
c480ed
+  <flag name='zpci'/>
c480ed
   <version>2009000</version>
c480ed
   <kvmVersion>0</kvmVersion>
c480ed
   <microcodeVersion>269625</microcodeVersion>
c480ed
-- 
c480ed
2.22.0
c480ed