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