IBS (Indirect Branch Speculation) is the last capability added
in QEMU 2.12 related to Spectre mitigation for Power. It was
added in commit 4be8d4e7d935.
This patch introduces it as QEMU_CAPS_MACHINE_PSERIES_CAP_IBS.
Like CFPC and SBBC, users might want to tune in IBS based on
their HW and guest OS requirements, and it's better to do it
so in a proper Libvirt feature than to put QEMU arguments
in the middle of the domain XML.
Signed-off-by: Daniel Henrique Barboza <danielhb413(a)gmail.com>
---
src/qemu/qemu_capabilities.c | 2 ++
src/qemu/qemu_capabilities.h | 1 +
tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml | 1 +
tests/qemucapabilitiesdata/caps_3.0.0.ppc64.xml | 1 +
tests/qemucapabilitiesdata/caps_3.1.0.ppc64.xml | 1 +
tests/qemucapabilitiesdata/caps_4.0.0.ppc64.xml | 1 +
tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml | 1 +
tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml | 1 +
8 files changed, 9 insertions(+)
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index 2e2b9874a7..3e00299a91 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -578,6 +578,7 @@ VIR_ENUM_IMPL(virQEMUCaps,
/* 365 */
"machine.pseries.cap-sbbc",
+ "machine.pseries.cap-ibs",
);
@@ -1623,6 +1624,7 @@ static struct virQEMUCapsStringFlags
virQEMUCapsMachinePropsPSeries[] = {
{ "cap-ccf-assist", QEMU_CAPS_MACHINE_PSERIES_CAP_CCF_ASSIST },
{ "cap-cfpc", QEMU_CAPS_MACHINE_PSERIES_CAP_CFPC },
{ "cap-sbbc", QEMU_CAPS_MACHINE_PSERIES_CAP_SBBC },
+ { "cap-ibs", QEMU_CAPS_MACHINE_PSERIES_CAP_IBS },
};
static struct virQEMUCapsStringFlags virQEMUCapsMachinePropsVirt[] = {
diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h
index 4040c50dc4..281aca5ea7 100644
--- a/src/qemu/qemu_capabilities.h
+++ b/src/qemu/qemu_capabilities.h
@@ -559,6 +559,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for syntax-check
*/
/* 365 */
QEMU_CAPS_MACHINE_PSERIES_CAP_SBBC, /* -machine pseries.cap-sbbc */
+ QEMU_CAPS_MACHINE_PSERIES_CAP_IBS, /* -machine pseries.cap-ibs */
QEMU_CAPS_LAST /* this must always be the last item */
} virQEMUCapsFlags;
diff --git a/tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml
b/tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml
index 2046f1097c..4c1758fbfe 100644
--- a/tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml
+++ b/tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml
@@ -156,6 +156,7 @@
<flag name='i8042'/>
<flag name='machine.pseries.cap-cfpc'/>
<flag name='machine.pseries.cap-sbbc'/>
+ <flag name='machine.pseries.cap-ibs'/>
<version>2011090</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>42900289</microcodeVersion>
diff --git a/tests/qemucapabilitiesdata/caps_3.0.0.ppc64.xml
b/tests/qemucapabilitiesdata/caps_3.0.0.ppc64.xml
index 9e71080152..a8390a12eb 100644
--- a/tests/qemucapabilitiesdata/caps_3.0.0.ppc64.xml
+++ b/tests/qemucapabilitiesdata/caps_3.0.0.ppc64.xml
@@ -158,6 +158,7 @@
<flag name='i8042'/>
<flag name='machine.pseries.cap-cfpc'/>
<flag name='machine.pseries.cap-sbbc'/>
+ <flag name='machine.pseries.cap-ibs'/>
<version>2012050</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>42900239</microcodeVersion>
diff --git a/tests/qemucapabilitiesdata/caps_3.1.0.ppc64.xml
b/tests/qemucapabilitiesdata/caps_3.1.0.ppc64.xml
index f13b384e91..d96caaa9ed 100644
--- a/tests/qemucapabilitiesdata/caps_3.1.0.ppc64.xml
+++ b/tests/qemucapabilitiesdata/caps_3.1.0.ppc64.xml
@@ -163,6 +163,7 @@
<flag name='storage.werror'/>
<flag name='machine.pseries.cap-cfpc'/>
<flag name='machine.pseries.cap-sbbc'/>
+ <flag name='machine.pseries.cap-ibs'/>
<version>3000091</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>42900240</microcodeVersion>
diff --git a/tests/qemucapabilitiesdata/caps_4.0.0.ppc64.xml
b/tests/qemucapabilitiesdata/caps_4.0.0.ppc64.xml
index 674e4b4944..44c1b9205e 100644
--- a/tests/qemucapabilitiesdata/caps_4.0.0.ppc64.xml
+++ b/tests/qemucapabilitiesdata/caps_4.0.0.ppc64.xml
@@ -177,6 +177,7 @@
<flag name='storage.werror'/>
<flag name='machine.pseries.cap-cfpc'/>
<flag name='machine.pseries.cap-sbbc'/>
+ <flag name='machine.pseries.cap-ibs'/>
<version>4000000</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>42900240</microcodeVersion>
diff --git a/tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml
b/tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml
index f89498171b..2eef337cc4 100644
--- a/tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml
+++ b/tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml
@@ -182,6 +182,7 @@
<flag name='storage.werror'/>
<flag name='machine.pseries.cap-cfpc'/>
<flag name='machine.pseries.cap-sbbc'/>
+ <flag name='machine.pseries.cap-ibs'/>
<version>4001050</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>42900242</microcodeVersion>
diff --git a/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml
b/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml
index ebc39130df..d972def4b3 100644
--- a/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml
+++ b/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml
@@ -194,6 +194,7 @@
<flag name='virtio.packed'/>
<flag name='machine.pseries.cap-cfpc'/>
<flag name='machine.pseries.cap-sbbc'/>
+ <flag name='machine.pseries.cap-ibs'/>
<version>4002050</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>42900241</microcodeVersion>
--
2.25.4