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