51d9a2
From f3d851dfec29dabaf5c9ab9e889376bb6df2d93c Mon Sep 17 00:00:00 2001
51d9a2
Message-Id: <f3d851dfec29dabaf5c9ab9e889376bb6df2d93c@dist-git>
51d9a2
From: Andrea Bolognani <abologna@redhat.com>
51d9a2
Date: Tue, 3 Jul 2018 15:25:15 +0200
51d9a2
Subject: [PATCH] qemu: Add capability for the HTM pSeries feature
51d9a2
51d9a2
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
51d9a2
Reviewed-by: John Ferlan <jferlan@redhat.com>
51d9a2
51d9a2
(cherry picked from commit 755a5765accf8fe9b2b8ec3fb01c37ac91313c7c)
51d9a2
https: //bugzilla.redhat.com/show_bug.cgi?id=1525599
51d9a2
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
51d9a2
Acked-by: David Gibson <dgibson@redhat.com>
51d9a2
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
51d9a2
---
51d9a2
 src/qemu/qemu_capabilities.c                     | 2 ++
51d9a2
 src/qemu/qemu_capabilities.h                     | 1 +
51d9a2
 tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml | 1 +
51d9a2
 tests/qemucapabilitiesdata/caps_3.0.0.ppc64.xml  | 1 +
51d9a2
 4 files changed, 5 insertions(+)
51d9a2
51d9a2
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
51d9a2
index fc1cf53066..883ca5dab7 100644
51d9a2
--- a/src/qemu/qemu_capabilities.c
51d9a2
+++ b/src/qemu/qemu_capabilities.c
51d9a2
@@ -501,6 +501,7 @@ VIR_ENUM_IMPL(virQEMUCaps, QEMU_CAPS_LAST,
51d9a2
               /* 310 */
51d9a2
               "sev-guest",
51d9a2
               "machine.pseries.cap-hpt-max-page-size",
51d9a2
+              "machine.pseries.cap-htm",
51d9a2
     );
51d9a2
 
51d9a2
 
51d9a2
@@ -1432,6 +1433,7 @@ static struct virQEMUCapsStringFlags virQEMUCapsObjectPropsMemoryBackendFile[] =
51d9a2
 
51d9a2
 static struct virQEMUCapsStringFlags virQEMUCapsObjectPropsSPAPRMachine[] = {
51d9a2
     { "cap-hpt-max-page-size", QEMU_CAPS_MACHINE_PSERIES_CAP_HPT_MAX_PAGE_SIZE },
51d9a2
+    { "cap-htm", QEMU_CAPS_MACHINE_PSERIES_CAP_HTM },
51d9a2
 };
51d9a2
 
51d9a2
 static virQEMUCapsObjectTypeProps virQEMUCapsObjectProps[] = {
51d9a2
diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h
51d9a2
index df9bf49abb..a048a1cf02 100644
51d9a2
--- a/src/qemu/qemu_capabilities.h
51d9a2
+++ b/src/qemu/qemu_capabilities.h
51d9a2
@@ -485,6 +485,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for syntax-check */
51d9a2
     /* 310 */
51d9a2
     QEMU_CAPS_SEV_GUEST, /* -object sev-guest,... */
51d9a2
     QEMU_CAPS_MACHINE_PSERIES_CAP_HPT_MAX_PAGE_SIZE, /* -machine pseries.cap-hpt-max-page-size */
51d9a2
+    QEMU_CAPS_MACHINE_PSERIES_CAP_HTM, /* -machine pseries.cap-htm */
51d9a2
 
51d9a2
     QEMU_CAPS_LAST /* this must always be the last item */
51d9a2
 } virQEMUCapsFlags;
51d9a2
diff --git a/tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml b/tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml
51d9a2
index 2ee582f343..7139179304 100644
51d9a2
--- a/tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml
51d9a2
+++ b/tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml
51d9a2
@@ -166,6 +166,7 @@
51d9a2
   <flag name='vhost-vsock'/>
51d9a2
   <flag name='chardev-fd-pass'/>
51d9a2
   <flag name='tpm-emulator'/>
51d9a2
+  <flag name='machine.pseries.cap-htm'/>
51d9a2
   <version>2011090</version>
51d9a2
   <kvmVersion>0</kvmVersion>
51d9a2
   <microcodeVersion>428334</microcodeVersion>
51d9a2
diff --git a/tests/qemucapabilitiesdata/caps_3.0.0.ppc64.xml b/tests/qemucapabilitiesdata/caps_3.0.0.ppc64.xml
51d9a2
index 7e958b2efc..33cd00e613 100644
51d9a2
--- a/tests/qemucapabilitiesdata/caps_3.0.0.ppc64.xml
51d9a2
+++ b/tests/qemucapabilitiesdata/caps_3.0.0.ppc64.xml
51d9a2
@@ -166,6 +166,7 @@
51d9a2
   <flag name='chardev-fd-pass'/>
51d9a2
   <flag name='tpm-emulator'/>
51d9a2
   <flag name='machine.pseries.cap-hpt-max-page-size'/>
51d9a2
+  <flag name='machine.pseries.cap-htm'/>
51d9a2
   <version>2012050</version>
51d9a2
   <kvmVersion>0</kvmVersion>
51d9a2
   <microcodeVersion>446771</microcodeVersion>
51d9a2
-- 
51d9a2
2.18.0
51d9a2