CPU models past gen16a will no longer support the csske feature. In
order to secure migration of guests running on machines that still
support this feature to machines that do not, let's disable csske
in the host-model.
Signed-off-by: Collin Walling <walling(a)linux.ibm.com>
---
src/qemu/qemu_capabilities.c | 10 ++++++++++
tests/domaincapsdata/qemu_2.11.0.s390x.xml | 1 +
tests/domaincapsdata/qemu_2.12.0.s390x.xml | 1 +
tests/domaincapsdata/qemu_2.8.0.s390x.xml | 1 +
tests/domaincapsdata/qemu_2.9.0.s390x.xml | 1 +
tests/domaincapsdata/qemu_3.0.0.s390x.xml | 1 +
tests/domaincapsdata/qemu_4.2.0.s390x.xml | 1 +
tests/domaincapsdata/qemu_6.0.0.s390x.xml | 1 +
8 files changed, 17 insertions(+)
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index 1b28c3f161..6a65c81f81 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -3804,6 +3804,16 @@ virQEMUCapsInitHostCPUModel(virQEMUCaps *qemuCaps,
goto error;
}
+ if (ARCH_IS_S390(qemuCaps->arch)) {
+ /*
+ * The CSSKE feature will no longer be supported beyond gen16a.
+ * To protect migration, disable this feature ahead of time
+ * for all s390x CPU models.
+ */
+ if (virCPUDefAddFeatureIfMissing(cpu, "csske", VIR_CPU_FEATURE_DISABLE)
< 0)
+ goto error;
+ }
+
virQEMUCapsSetHostModel(qemuCaps, type, cpu, migCPU, fullCPU);
cleanup:
diff --git a/tests/domaincapsdata/qemu_2.11.0.s390x.xml
b/tests/domaincapsdata/qemu_2.11.0.s390x.xml
index 804bf8020e..f21efca122 100644
--- a/tests/domaincapsdata/qemu_2.11.0.s390x.xml
+++ b/tests/domaincapsdata/qemu_2.11.0.s390x.xml
@@ -61,6 +61,7 @@
<feature policy='require' name='sea_esop2'/>
<feature policy='require' name='te'/>
<feature policy='require' name='cmm'/>
+ <feature policy='disable' name='csske'/>
</mode>
<mode name='custom' supported='yes'>
<model usable='yes'>z890.2</model>
diff --git a/tests/domaincapsdata/qemu_2.12.0.s390x.xml
b/tests/domaincapsdata/qemu_2.12.0.s390x.xml
index 5c3d9ce7db..9dc5d1396c 100644
--- a/tests/domaincapsdata/qemu_2.12.0.s390x.xml
+++ b/tests/domaincapsdata/qemu_2.12.0.s390x.xml
@@ -60,6 +60,7 @@
<feature policy='require' name='sea_esop2'/>
<feature policy='require' name='te'/>
<feature policy='require' name='cmm'/>
+ <feature policy='disable' name='csske'/>
</mode>
<mode name='custom' supported='yes'>
<model usable='yes'>z890.2</model>
diff --git a/tests/domaincapsdata/qemu_2.8.0.s390x.xml
b/tests/domaincapsdata/qemu_2.8.0.s390x.xml
index 2c075d7cdb..857cb1ad5b 100644
--- a/tests/domaincapsdata/qemu_2.8.0.s390x.xml
+++ b/tests/domaincapsdata/qemu_2.8.0.s390x.xml
@@ -48,6 +48,7 @@
<feature policy='require' name='cte'/>
<feature policy='require' name='te'/>
<feature policy='require' name='cmm'/>
+ <feature policy='disable' name='csske'/>
</mode>
<mode name='custom' supported='yes'>
<model usable='unknown'>z10EC-base</model>
diff --git a/tests/domaincapsdata/qemu_2.9.0.s390x.xml
b/tests/domaincapsdata/qemu_2.9.0.s390x.xml
index d5b58a786d..2e1ba62dc0 100644
--- a/tests/domaincapsdata/qemu_2.9.0.s390x.xml
+++ b/tests/domaincapsdata/qemu_2.9.0.s390x.xml
@@ -49,6 +49,7 @@
<feature policy='require' name='cte'/>
<feature policy='require' name='te'/>
<feature policy='require' name='cmm'/>
+ <feature policy='disable' name='csske'/>
</mode>
<mode name='custom' supported='yes'>
<model usable='unknown'>z10EC-base</model>
diff --git a/tests/domaincapsdata/qemu_3.0.0.s390x.xml
b/tests/domaincapsdata/qemu_3.0.0.s390x.xml
index f49b6907ff..1b6f64e69f 100644
--- a/tests/domaincapsdata/qemu_3.0.0.s390x.xml
+++ b/tests/domaincapsdata/qemu_3.0.0.s390x.xml
@@ -64,6 +64,7 @@
<feature policy='require' name='sea_esop2'/>
<feature policy='require' name='te'/>
<feature policy='require' name='cmm'/>
+ <feature policy='disable' name='csske'/>
</mode>
<mode name='custom' supported='yes'>
<model usable='yes'>z890.2</model>
diff --git a/tests/domaincapsdata/qemu_4.2.0.s390x.xml
b/tests/domaincapsdata/qemu_4.2.0.s390x.xml
index fb162ea578..b41929b585 100644
--- a/tests/domaincapsdata/qemu_4.2.0.s390x.xml
+++ b/tests/domaincapsdata/qemu_4.2.0.s390x.xml
@@ -81,6 +81,7 @@
<feature policy='require' name='sea_esop2'/>
<feature policy='require' name='te'/>
<feature policy='require' name='cmm'/>
+ <feature policy='disable' name='csske'/>
</mode>
<mode name='custom' supported='yes'>
<model usable='yes'>z800-base</model>
diff --git a/tests/domaincapsdata/qemu_6.0.0.s390x.xml
b/tests/domaincapsdata/qemu_6.0.0.s390x.xml
index 13fa3a637e..da4017541d 100644
--- a/tests/domaincapsdata/qemu_6.0.0.s390x.xml
+++ b/tests/domaincapsdata/qemu_6.0.0.s390x.xml
@@ -84,6 +84,7 @@
<feature policy='require' name='sea_esop2'/>
<feature policy='require' name='te'/>
<feature policy='require' name='cmm'/>
+ <feature policy='disable' name='csske'/>
</mode>
<mode name='custom' supported='yes'>
<model usable='yes'>z800-base</model>
--
2.31.1