In order for the CPU model expansion command to consider any deprecated
CPU features, s390x will need to use the special static recommended
expansion type after baselining.
Signed-off-by: Collin Walling <walling@linux.ibm.com>
Reviewed-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
---
src/qemu/qemu_driver.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 1c61685489..c4428c066f 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -11687,7 +11687,8 @@ qemuConnectCPUModelBaseline(virQEMUCaps *qemuCaps,
bool expand_features,
virCPUDef **cpus,
int ncpus,
- virDomainCapsCPUModels *cpuModels)
+ virDomainCapsCPUModels *cpuModels,
+ virArch arch)
{
g_autoptr(qemuProcessQMP) proc = NULL;
g_autoptr(virCPUDef) baseline = NULL;
@@ -11739,6 +11740,9 @@ qemuConnectCPUModelBaseline(virQEMUCaps *qemuCaps,
expansion_type = expand_features ? QEMU_MONITOR_CPU_MODEL_EXPANSION_FULL
: QEMU_MONITOR_CPU_MODEL_EXPANSION_STATIC;
+ if (ARCH_IS_S390(arch) && expansion_type == QEMU_MONITOR_CPU_MODEL_EXPANSION_STATIC)
+ expansion_type = QEMU_MONITOR_CPU_MODEL_EXPANSION_STATIC_REC;
+
if (qemuMonitorGetCPUModelExpansion(proc->mon, expansion_type,
baseline, true,
false, false, &result) < 0)
@@ -11827,7 +11831,7 @@ qemuConnectBaselineHypervisorCPU(virConnectPtr conn,
if (!(cpu = qemuConnectCPUModelBaseline(qemuCaps, cfg->libDir,
cfg->user, cfg->group,
expand_features, cpus, ncpus,
- cpuModels)))
+ cpuModels, arch)))
goto cleanup;
} else {
virReportError(VIR_ERR_OPERATION_UNSUPPORTED,
--
2.41.0