QEMU_CAPS_MACHINE_PSERIES_RESIZE_HPT and
QEMU_CAPS_MACHINE_PSERIES_MAX_CPU_COMPAT are now always asserted on PPC
machine types, move them to virQEMUCapsInitQMPBasicArch.
It's now always set for AARCH64, move it into the function setting basic
caps for the emulator.
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
Reviewed-by: Pavel Hrdina <phrdina(a)redhat.com>
Reviewed-by: Neal Gompa <ngompa13(a)gmail.com>
---
src/qemu/qemu_capabilities.c | 13 ++++---------
.../qemuxml2argvdata/pseries-cpu-compat-power9.args | 4 ++--
tests/qemuxml2argvdata/pseries-cpu-compat.args | 4 ++--
3 files changed, 8 insertions(+), 13 deletions(-)
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index fd69a5e8d5..b93e648a4c 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -5061,6 +5061,10 @@ virQEMUCapsInitQMPBasicArch(virQEMUCaps *qemuCaps)
case VIR_ARCH_PPC64:
case VIR_ARCH_PPC64LE:
+ virQEMUCapsSet(qemuCaps, QEMU_CAPS_MACHINE_PSERIES_RESIZE_HPT);
+ virQEMUCapsSet(qemuCaps, QEMU_CAPS_MACHINE_PSERIES_MAX_CPU_COMPAT);
+ break;
+
case VIR_ARCH_ALPHA:
case VIR_ARCH_PPC:
case VIR_ARCH_PPCEMB:
@@ -5120,15 +5124,6 @@ virQEMUCapsInitQMPVersionCaps(virQEMUCaps *qemuCaps)
virQEMUCapsSet(qemuCaps, QEMU_CAPS_EGL_HEADLESS);
virQEMUCapsSet(qemuCaps, QEMU_CAPS_NUMA_DIST);
- if (ARCH_IS_PPC64(qemuCaps->arch)) {
- /* HPT resizing is supported since QEMU 2.10 on ppc64; unfortunately
- * there's no sane way to probe for it */
- virQEMUCapsSet(qemuCaps, QEMU_CAPS_MACHINE_PSERIES_RESIZE_HPT);
-
- /* no way to query max-cpu-compat */
- virQEMUCapsSet(qemuCaps, QEMU_CAPS_MACHINE_PSERIES_MAX_CPU_COMPAT);
- }
-
/* -enable-fips is deprecated in QEMU 5.2.0, and QEMU
* should be built with gcrypt to achieve FIPS compliance
* automatically / implicitly
diff --git a/tests/qemuxml2argvdata/pseries-cpu-compat-power9.args
b/tests/qemuxml2argvdata/pseries-cpu-compat-power9.args
index 00857740ae..f7f500da39 100644
--- a/tests/qemuxml2argvdata/pseries-cpu-compat-power9.args
+++ b/tests/qemuxml2argvdata/pseries-cpu-compat-power9.args
@@ -10,8 +10,8 @@ QEMU_AUDIO_DRV=none \
/usr/bin/qemu-system-ppc64 \
-name QEMUGuest1 \
-S \
--machine pseries,accel=kvm,usb=off,dump-guest-core=off \
--cpu host,compat=power9 \
+-machine pseries,accel=kvm,usb=off,dump-guest-core=off,max-cpu-compat=power9 \
+-cpu host \
-m 256 \
-realtime mlock=off \
-smp 4,sockets=4,cores=1,threads=1 \
diff --git a/tests/qemuxml2argvdata/pseries-cpu-compat.args
b/tests/qemuxml2argvdata/pseries-cpu-compat.args
index 8ace0b1623..7871651f9b 100644
--- a/tests/qemuxml2argvdata/pseries-cpu-compat.args
+++ b/tests/qemuxml2argvdata/pseries-cpu-compat.args
@@ -10,8 +10,8 @@ QEMU_AUDIO_DRV=none \
/usr/bin/qemu-system-ppc64 \
-name QEMUGuest1 \
-S \
--machine pseries,accel=kvm,usb=off,dump-guest-core=off \
--cpu host,compat=power7 \
+-machine pseries,accel=kvm,usb=off,dump-guest-core=off,max-cpu-compat=power7 \
+-cpu host \
-m 256 \
-realtime mlock=off \
-smp 4,sockets=4,cores=1,threads=1 \
--
2.30.2