
Changes in v2: - dropped former patch 01 since qemu ppc64 caps are up to date for 7.0.0 - v1 link: https://listman.redhat.com/archives/libvir-list/2022-May/230686.html Daniel Henrique Barboza (2): cpu_map: add POWER10 cpu model cpu_ppc64: add support for host-model on POWER10 src/cpu/cpu_ppc64.c | 8 ++--- src/cpu_map/index.xml | 1 + src/cpu_map/meson.build | 1 + src/cpu_map/ppc64_POWER10.xml | 6 ++++ tests/domaincapsdata/qemu_5.0.0.ppc64.xml | 1 + tests/domaincapsdata/qemu_5.2.0.ppc64.xml | 1 + tests/domaincapsdata/qemu_6.2.0.ppc64.xml | 1 + tests/domaincapsdata/qemu_7.0.0.ppc64.xml | 1 + .../qemucapabilitiesdata/caps_5.0.0.ppc64.xml | 4 +-- .../qemucapabilitiesdata/caps_5.2.0.ppc64.xml | 4 +-- .../qemucapabilitiesdata/caps_6.2.0.ppc64.xml | 4 +-- .../qemucapabilitiesdata/caps_7.0.0.ppc64.xml | 4 +-- .../pseries-cpu-compat-power10.args | 32 +++++++++++++++++++ .../pseries-cpu-compat-power10.err | 1 + .../pseries-cpu-compat-power10.xml | 21 ++++++++++++ tests/qemuxml2argvtest.c | 11 +++++++ tests/testutilshostcpus.h | 11 +++++++ tests/testutilsqemu.c | 4 ++- tests/testutilsqemu.h | 1 + 19 files changed, 104 insertions(+), 13 deletions(-) create mode 100644 src/cpu_map/ppc64_POWER10.xml create mode 100644 tests/qemuxml2argvdata/pseries-cpu-compat-power10.args create mode 100644 tests/qemuxml2argvdata/pseries-cpu-compat-power10.err create mode 100644 tests/qemuxml2argvdata/pseries-cpu-compat-power10.xml -- 2.32.0

Add POWER10 as a supported cpu model. Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com> --- src/cpu_map/index.xml | 1 + src/cpu_map/meson.build | 1 + src/cpu_map/ppc64_POWER10.xml | 6 ++++++ tests/domaincapsdata/qemu_5.0.0.ppc64.xml | 1 + tests/domaincapsdata/qemu_5.2.0.ppc64.xml | 1 + tests/domaincapsdata/qemu_6.2.0.ppc64.xml | 1 + tests/domaincapsdata/qemu_7.0.0.ppc64.xml | 1 + tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml | 4 ++-- tests/qemucapabilitiesdata/caps_5.2.0.ppc64.xml | 4 ++-- tests/qemucapabilitiesdata/caps_6.2.0.ppc64.xml | 4 ++-- tests/qemucapabilitiesdata/caps_7.0.0.ppc64.xml | 4 ++-- 11 files changed, 20 insertions(+), 8 deletions(-) create mode 100644 src/cpu_map/ppc64_POWER10.xml diff --git a/src/cpu_map/index.xml b/src/cpu_map/index.xml index ffe1fa91e5..351c2ae4fa 100644 --- a/src/cpu_map/index.xml +++ b/src/cpu_map/index.xml @@ -82,6 +82,7 @@ <include filename='ppc64_POWER7.xml'/> <include filename='ppc64_POWER8.xml'/> <include filename='ppc64_POWER9.xml'/> + <include filename='ppc64_POWER10.xml'/> <!-- Freescale-based CPU models --> <include filename='ppc64_POWERPC_e5500.xml'/> diff --git a/src/cpu_map/meson.build b/src/cpu_map/meson.build index 013fc62a02..99815981b5 100644 --- a/src/cpu_map/meson.build +++ b/src/cpu_map/meson.build @@ -14,6 +14,7 @@ cpumap_data = [ 'ppc64_POWER7.xml', 'ppc64_POWER8.xml', 'ppc64_POWER9.xml', + 'ppc64_POWER10.xml', 'ppc64_POWERPC_e5500.xml', 'ppc64_POWERPC_e6500.xml', 'ppc64_vendors.xml', diff --git a/src/cpu_map/ppc64_POWER10.xml b/src/cpu_map/ppc64_POWER10.xml new file mode 100644 index 0000000000..62f3486ae4 --- /dev/null +++ b/src/cpu_map/ppc64_POWER10.xml @@ -0,0 +1,6 @@ +<cpus> + <model name='POWER10'> + <vendor name='IBM'/> + <pvr value='0x00800000' mask='0xffff0000'/> + </model> +</cpus> diff --git a/tests/domaincapsdata/qemu_5.0.0.ppc64.xml b/tests/domaincapsdata/qemu_5.0.0.ppc64.xml index 5772045e35..d196676b14 100644 --- a/tests/domaincapsdata/qemu_5.0.0.ppc64.xml +++ b/tests/domaincapsdata/qemu_5.0.0.ppc64.xml @@ -40,6 +40,7 @@ <model fallback='allow'>POWER8</model> </mode> <mode name='custom' supported='yes'> + <model usable='unknown'>POWER10</model> <model usable='unknown'>POWER9</model> <model usable='unknown'>POWER8</model> <model usable='unknown'>POWER7</model> diff --git a/tests/domaincapsdata/qemu_5.2.0.ppc64.xml b/tests/domaincapsdata/qemu_5.2.0.ppc64.xml index 051b7d43a8..b2c0577be9 100644 --- a/tests/domaincapsdata/qemu_5.2.0.ppc64.xml +++ b/tests/domaincapsdata/qemu_5.2.0.ppc64.xml @@ -40,6 +40,7 @@ <model fallback='allow'>POWER8</model> </mode> <mode name='custom' supported='yes'> + <model usable='unknown'>POWER10</model> <model usable='unknown'>POWER9</model> <model usable='unknown'>POWER8</model> <model usable='unknown'>POWER7</model> diff --git a/tests/domaincapsdata/qemu_6.2.0.ppc64.xml b/tests/domaincapsdata/qemu_6.2.0.ppc64.xml index 8fed9d30b7..b07072778b 100644 --- a/tests/domaincapsdata/qemu_6.2.0.ppc64.xml +++ b/tests/domaincapsdata/qemu_6.2.0.ppc64.xml @@ -40,6 +40,7 @@ <model fallback='allow'>POWER8</model> </mode> <mode name='custom' supported='yes'> + <model usable='unknown'>POWER10</model> <model usable='unknown'>POWER9</model> <model usable='unknown'>POWER8</model> <model usable='unknown'>POWER7</model> diff --git a/tests/domaincapsdata/qemu_7.0.0.ppc64.xml b/tests/domaincapsdata/qemu_7.0.0.ppc64.xml index 942c721afd..ec171bcdd9 100644 --- a/tests/domaincapsdata/qemu_7.0.0.ppc64.xml +++ b/tests/domaincapsdata/qemu_7.0.0.ppc64.xml @@ -40,6 +40,7 @@ <model fallback='allow'>POWER8</model> </mode> <mode name='custom' supported='yes'> + <model usable='unknown'>POWER10</model> <model usable='unknown'>POWER9</model> <model usable='unknown'>POWER8</model> <model usable='unknown'>POWER7</model> diff --git a/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml b/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml index f2f3558fdc..597c38af30 100644 --- a/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml @@ -190,7 +190,7 @@ <cpu type='kvm' name='ppc' typename='604-powerpc64-cpu'/> <cpu type='kvm' name='ppc32' typename='604-powerpc64-cpu'/> <cpu type='kvm' name='ppc64' typename='970fx_v3.1-powerpc64-cpu'/> - <cpu type='kvm' name='power10' typename='power10_v1.0-powerpc64-cpu'/> + <cpu type='kvm' name='POWER10' typename='power10_v1.0-powerpc64-cpu'/> <cpu type='kvm' name='POWER9' typename='host-powerpc64-cpu'/> <cpu type='kvm' name='power8nvl' typename='power8nvl_v1.0-powerpc64-cpu'/> <cpu type='kvm' name='POWER8' typename='power8_v2.0-powerpc64-cpu'/> @@ -662,7 +662,7 @@ <cpu type='tcg' name='ppc' typename='604-powerpc64-cpu'/> <cpu type='tcg' name='ppc32' typename='604-powerpc64-cpu'/> <cpu type='tcg' name='ppc64' typename='970fx_v3.1-powerpc64-cpu'/> - <cpu type='tcg' name='power10' typename='power10_v1.0-powerpc64-cpu'/> + <cpu type='tcg' name='POWER10' typename='power10_v1.0-powerpc64-cpu'/> <cpu type='tcg' name='POWER9' typename='power9_v2.0-powerpc64-cpu'/> <cpu type='tcg' name='power8nvl' typename='power8nvl_v1.0-powerpc64-cpu'/> <cpu type='tcg' name='POWER8' typename='power8_v2.0-powerpc64-cpu'/> diff --git a/tests/qemucapabilitiesdata/caps_5.2.0.ppc64.xml b/tests/qemucapabilitiesdata/caps_5.2.0.ppc64.xml index b949f88b5a..1e6c57482e 100644 --- a/tests/qemucapabilitiesdata/caps_5.2.0.ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_5.2.0.ppc64.xml @@ -195,7 +195,7 @@ <cpu type='kvm' name='ppc' typename='604-powerpc64-cpu'/> <cpu type='kvm' name='ppc32' typename='604-powerpc64-cpu'/> <cpu type='kvm' name='ppc64' typename='970fx_v3.1-powerpc64-cpu'/> - <cpu type='kvm' name='power10' typename='power10_v1.0-powerpc64-cpu'/> + <cpu type='kvm' name='POWER10' typename='power10_v1.0-powerpc64-cpu'/> <cpu type='kvm' name='POWER9' typename='host-powerpc64-cpu'/> <cpu type='kvm' name='power8nvl' typename='power8nvl_v1.0-powerpc64-cpu'/> <cpu type='kvm' name='POWER8' typename='power8_v2.0-powerpc64-cpu'/> @@ -669,7 +669,7 @@ <cpu type='tcg' name='ppc' typename='604-powerpc64-cpu'/> <cpu type='tcg' name='ppc32' typename='604-powerpc64-cpu'/> <cpu type='tcg' name='ppc64' typename='970fx_v3.1-powerpc64-cpu'/> - <cpu type='tcg' name='power10' typename='power10_v1.0-powerpc64-cpu'/> + <cpu type='tcg' name='POWER10' typename='power10_v1.0-powerpc64-cpu'/> <cpu type='tcg' name='POWER9' typename='power9_v2.0-powerpc64-cpu'/> <cpu type='tcg' name='power8nvl' typename='power8nvl_v1.0-powerpc64-cpu'/> <cpu type='tcg' name='POWER8' typename='power8_v2.0-powerpc64-cpu'/> diff --git a/tests/qemucapabilitiesdata/caps_6.2.0.ppc64.xml b/tests/qemucapabilitiesdata/caps_6.2.0.ppc64.xml index 9c9d9aa08e..1cde325749 100644 --- a/tests/qemucapabilitiesdata/caps_6.2.0.ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_6.2.0.ppc64.xml @@ -206,7 +206,7 @@ <cpu type='kvm' name='ppc' typename='604-powerpc64-cpu'/> <cpu type='kvm' name='ppc32' typename='604-powerpc64-cpu'/> <cpu type='kvm' name='ppc64' typename='970fx_v3.1-powerpc64-cpu'/> - <cpu type='kvm' name='power10' typename='power10_v2.0-powerpc64-cpu'/> + <cpu type='kvm' name='POWER10' typename='power10_v2.0-powerpc64-cpu'/> <cpu type='kvm' name='POWER9' typename='host-powerpc64-cpu'/> <cpu type='kvm' name='power8nvl' typename='power8nvl_v1.0-powerpc64-cpu'/> <cpu type='kvm' name='POWER8' typename='power8_v2.0-powerpc64-cpu'/> @@ -686,7 +686,7 @@ <cpu type='tcg' name='ppc' typename='604-powerpc64-cpu'/> <cpu type='tcg' name='ppc32' typename='604-powerpc64-cpu'/> <cpu type='tcg' name='ppc64' typename='970fx_v3.1-powerpc64-cpu'/> - <cpu type='tcg' name='power10' typename='power10_v2.0-powerpc64-cpu'/> + <cpu type='tcg' name='POWER10' typename='power10_v2.0-powerpc64-cpu'/> <cpu type='tcg' name='POWER9' typename='power9_v2.0-powerpc64-cpu'/> <cpu type='tcg' name='power8nvl' typename='power8nvl_v1.0-powerpc64-cpu'/> <cpu type='tcg' name='POWER8' typename='power8_v2.0-powerpc64-cpu'/> diff --git a/tests/qemucapabilitiesdata/caps_7.0.0.ppc64.xml b/tests/qemucapabilitiesdata/caps_7.0.0.ppc64.xml index 1ddca7d767..179b74a5f4 100644 --- a/tests/qemucapabilitiesdata/caps_7.0.0.ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_7.0.0.ppc64.xml @@ -219,7 +219,7 @@ <cpu type='kvm' name='ppc' typename='604-powerpc64-cpu'/> <cpu type='kvm' name='ppc32' typename='604-powerpc64-cpu'/> <cpu type='kvm' name='ppc64' typename='970fx_v3.1-powerpc64-cpu'/> - <cpu type='kvm' name='power10' typename='power10_v2.0-powerpc64-cpu'/> + <cpu type='kvm' name='POWER10' typename='power10_v2.0-powerpc64-cpu'/> <cpu type='kvm' name='POWER9' typename='host-powerpc64-cpu'/> <cpu type='kvm' name='power8nvl' typename='power8nvl_v1.0-powerpc64-cpu'/> <cpu type='kvm' name='POWER8' typename='power8_v2.0-powerpc64-cpu'/> @@ -679,7 +679,7 @@ <cpu type='tcg' name='ppc' typename='604-powerpc64-cpu'/> <cpu type='tcg' name='ppc32' typename='604-powerpc64-cpu'/> <cpu type='tcg' name='ppc64' typename='970fx_v3.1-powerpc64-cpu'/> - <cpu type='tcg' name='power10' typename='power10_v2.0-powerpc64-cpu'/> + <cpu type='tcg' name='POWER10' typename='power10_v2.0-powerpc64-cpu'/> <cpu type='tcg' name='POWER9' typename='power9_v2.0-powerpc64-cpu'/> <cpu type='tcg' name='power8nvl' typename='power8nvl_v1.0-powerpc64-cpu'/> <cpu type='tcg' name='POWER8' typename='power8_v2.0-powerpc64-cpu'/> -- 2.32.0

On Thu, May 05, 2022 at 05:26:13PM -0300, Daniel Henrique Barboza wrote:
Add POWER10 as a supported cpu model.
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com> --- src/cpu_map/index.xml | 1 + src/cpu_map/meson.build | 1 + src/cpu_map/ppc64_POWER10.xml | 6 ++++++ tests/domaincapsdata/qemu_5.0.0.ppc64.xml | 1 + tests/domaincapsdata/qemu_5.2.0.ppc64.xml | 1 + tests/domaincapsdata/qemu_6.2.0.ppc64.xml | 1 + tests/domaincapsdata/qemu_7.0.0.ppc64.xml | 1 + tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml | 4 ++-- tests/qemucapabilitiesdata/caps_5.2.0.ppc64.xml | 4 ++-- tests/qemucapabilitiesdata/caps_6.2.0.ppc64.xml | 4 ++-- tests/qemucapabilitiesdata/caps_7.0.0.ppc64.xml | 4 ++-- 11 files changed, 20 insertions(+), 8 deletions(-) create mode 100644 src/cpu_map/ppc64_POWER10.xml
Reviewed-by: Andrea Bolognani <abologna@redhat.com> -- Andrea Bolognani / Red Hat / Virtualization

Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com> --- src/cpu/cpu_ppc64.c | 8 ++--- .../pseries-cpu-compat-power10.args | 32 +++++++++++++++++++ .../pseries-cpu-compat-power10.err | 1 + .../pseries-cpu-compat-power10.xml | 21 ++++++++++++ tests/qemuxml2argvtest.c | 11 +++++++ tests/testutilshostcpus.h | 11 +++++++ tests/testutilsqemu.c | 4 ++- tests/testutilsqemu.h | 1 + 8 files changed, 84 insertions(+), 5 deletions(-) create mode 100644 tests/qemuxml2argvdata/pseries-cpu-compat-power10.args create mode 100644 tests/qemuxml2argvdata/pseries-cpu-compat-power10.err create mode 100644 tests/qemuxml2argvdata/pseries-cpu-compat-power10.xml diff --git a/src/cpu/cpu_ppc64.c b/src/cpu/cpu_ppc64.c index 314d2f7c86..087635404d 100644 --- a/src/cpu/cpu_ppc64.c +++ b/src/cpu/cpu_ppc64.c @@ -88,22 +88,22 @@ ppc64CheckCompatibilityMode(const char *host_model, if (!compat_mode) return VIR_CPU_COMPARE_IDENTICAL; - /* Valid host CPUs: POWER6, POWER7, POWER8, POWER9 */ + /* Valid host CPUs: POWER6, POWER7, POWER8, POWER9, POWER10 */ if (!STRPREFIX(host_model, "POWER") || !(tmp = (char *) host_model + strlen("POWER")) || virStrToLong_i(tmp, NULL, 10, &host) < 0 || - host < 6 || host > 9) { + host < 6 || host > 10) { virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("Host CPU does not support compatibility modes")); return VIR_CPU_COMPARE_ERROR; } - /* Valid compatibility modes: power6, power7, power8, power9 */ + /* Valid compatibility modes: power6, power7, power8, power9, power10 */ if (!STRPREFIX(compat_mode, "power") || !(tmp = (char *) compat_mode + strlen("power")) || virStrToLong_i(tmp, NULL, 10, &compat) < 0 || - compat < 6 || compat > 9) { + compat < 6 || compat > 10) { virReportError(VIR_ERR_INTERNAL_ERROR, _("Unknown compatibility mode %s"), compat_mode); diff --git a/tests/qemuxml2argvdata/pseries-cpu-compat-power10.args b/tests/qemuxml2argvdata/pseries-cpu-compat-power10.args new file mode 100644 index 0000000000..cc485d960f --- /dev/null +++ b/tests/qemuxml2argvdata/pseries-cpu-compat-power10.args @@ -0,0 +1,32 @@ +LC_ALL=C \ +PATH=/bin \ +HOME=/tmp/lib/domain--1-QEMUGuest1 \ +USER=test \ +LOGNAME=test \ +XDG_DATA_HOME=/tmp/lib/domain--1-QEMUGuest1/.local/share \ +XDG_CACHE_HOME=/tmp/lib/domain--1-QEMUGuest1/.cache \ +XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ +QEMU_AUDIO_DRV=none \ +/usr/bin/qemu-system-ppc64 \ +-name guest=QEMUGuest1,debug-threads=on \ +-S \ +-object secret,id=masterKey0,format=raw,file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \ +-machine pseries,usb=off,dump-guest-core=off,max-cpu-compat=power10 \ +-accel kvm \ +-cpu host \ +-m 256 \ +-overcommit mem-lock=off \ +-smp 4,sockets=4,cores=1,threads=1 \ +-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ +-display none \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=charmonitor,fd=1729,server=on,wait=off \ +-mon chardev=charmonitor,id=monitor,mode=control \ +-rtc base=utc \ +-no-shutdown \ +-boot strict=on \ +-usb \ +-chardev pty,id=charserial0 \ +-device spapr-vty,chardev=charserial0,id=serial0,reg=805306368 \ +-msg timestamp=on diff --git a/tests/qemuxml2argvdata/pseries-cpu-compat-power10.err b/tests/qemuxml2argvdata/pseries-cpu-compat-power10.err new file mode 100644 index 0000000000..f2322ccea5 --- /dev/null +++ b/tests/qemuxml2argvdata/pseries-cpu-compat-power10.err @@ -0,0 +1 @@ +the CPU is incompatible with host CPU diff --git a/tests/qemuxml2argvdata/pseries-cpu-compat-power10.xml b/tests/qemuxml2argvdata/pseries-cpu-compat-power10.xml new file mode 100644 index 0000000000..1414f5bb75 --- /dev/null +++ b/tests/qemuxml2argvdata/pseries-cpu-compat-power10.xml @@ -0,0 +1,21 @@ +<domain type='kvm'> + <name>QEMUGuest1</name> + <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid> + <memory unit='KiB'>219100</memory> + <currentMemory unit='KiB'>219100</currentMemory> + <vcpu placement='static'>4</vcpu> + <os> + <type arch='ppc64' machine='pseries'>hvm</type> + </os> + <cpu mode='host-model'> + <model>power10</model> + </cpu> + <clock offset='utc'/> + <devices> + <emulator>/usr/bin/qemu-system-ppc64</emulator> + <console type='pty'> + <address type="spapr-vio"/> + </console> + <memballoon model="none"/> + </devices> +</domain> diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 1f080daba7..78e7d89f8e 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -2209,6 +2209,17 @@ mymain(void) QEMU_CAPS_DEVICE_SPAPR_VTY); qemuTestSetHostCPU(&driver, driver.hostarch, NULL); + DO_TEST_FAILURE("pseries-cpu-compat-power10", + QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE, + QEMU_CAPS_KVM); + + qemuTestSetHostCPU(&driver, driver.hostarch, cpuPower10); + DO_TEST("pseries-cpu-compat-power10", + QEMU_CAPS_KVM, + QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE, + QEMU_CAPS_DEVICE_SPAPR_VTY); + qemuTestSetHostCPU(&driver, driver.hostarch, NULL); + qemuTestSetHostArch(&driver, VIR_ARCH_NONE); DO_TEST("pseries-panic-missing", diff --git a/tests/testutilshostcpus.h b/tests/testutilshostcpus.h index cf0fc833e1..e38d7c8b5a 100644 --- a/tests/testutilshostcpus.h +++ b/tests/testutilshostcpus.h @@ -114,6 +114,15 @@ static virCPUDef cpuPower9Data = { .threads = 1, }; +static virCPUDef cpuPower10Data = { + .type = VIR_CPU_TYPE_HOST, + .arch = VIR_ARCH_PPC64, + .model = (char *) "POWER10", + .sockets = 1, + .cores = 16, + .threads = 1, +}; + static virCPUDef cpuAarch64Data = { .type = VIR_CPU_TYPE_HOST, .arch = VIR_ARCH_AARCH64, @@ -154,6 +163,8 @@ testUtilsHostCpusGetDefForModel(const char *model) return virCPUDefCopy(&cpuPower8Data); else if (STREQ(model, "POWER9")) return virCPUDefCopy(&cpuPower9Data); + else if (STREQ(model, "POWER10")) + return virCPUDefCopy(&cpuPower10Data); return NULL; } diff --git a/tests/testutilsqemu.c b/tests/testutilsqemu.c index 105b41cbeb..8f1b72890a 100644 --- a/tests/testutilsqemu.c +++ b/tests/testutilsqemu.c @@ -22,6 +22,7 @@ virCPUDef *cpuDefault; virCPUDef *cpuHaswell; virCPUDef *cpuPower8; virCPUDef *cpuPower9; +virCPUDef *cpuPower10; static const char *qemu_emulators[VIR_ARCH_LAST] = { @@ -567,7 +568,8 @@ int qemuTestDriverInit(virQEMUDriver *driver) if (!(cpuDefault = virCPUDefCopy(&cpuDefaultData)) || !(cpuHaswell = virCPUDefCopy(&cpuHaswellData)) || !(cpuPower8 = virCPUDefCopy(&cpuPower8Data)) || - !(cpuPower9 = virCPUDefCopy(&cpuPower9Data))) + !(cpuPower9 = virCPUDefCopy(&cpuPower9Data)) || + !(cpuPower10 = virCPUDefCopy(&cpuPower10Data))) return -1; if (virMutexInit(&driver->lock) < 0) diff --git a/tests/testutilsqemu.h b/tests/testutilsqemu.h index 187f9b7cd3..76a6954019 100644 --- a/tests/testutilsqemu.h +++ b/tests/testutilsqemu.h @@ -106,6 +106,7 @@ extern virCPUDef *cpuDefault; extern virCPUDef *cpuHaswell; extern virCPUDef *cpuPower8; extern virCPUDef *cpuPower9; +extern virCPUDef *cpuPower10; void qemuTestSetHostArch(virQEMUDriver *driver, virArch arch); -- 2.32.0

On Thu, May 05, 2022 at 05:26:14PM -0300, Daniel Henrique Barboza wrote:
+++ b/tests/qemuxml2argvtest.c @@ -2209,6 +2209,17 @@ mymain(void) QEMU_CAPS_DEVICE_SPAPR_VTY); qemuTestSetHostCPU(&driver, driver.hostarch, NULL);
+ DO_TEST_FAILURE("pseries-cpu-compat-power10", + QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE, + QEMU_CAPS_KVM); + + qemuTestSetHostCPU(&driver, driver.hostarch, cpuPower10); + DO_TEST("pseries-cpu-compat-power10", + QEMU_CAPS_KVM, + QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE, + QEMU_CAPS_DEVICE_SPAPR_VTY);
Don't forget to add the new test case to qemuxml2xmltest too. It would be great if, as a follow-up, you could look into converting these test cases to the DO_TEST_CAPS_ARCH_LATEST_* macros, which would allow us to drop the hardcoded list of capabilities.
+++ b/tests/testutilsqemu.c @@ -22,6 +22,7 @@ virCPUDef *cpuDefault; virCPUDef *cpuHaswell; virCPUDef *cpuPower8; virCPUDef *cpuPower9; +virCPUDef *cpuPower10;
This part, as well as others, no longer applies. Easy enough to fix. Can you please update the NEWS file to mention the new feature? -- Andrea Bolognani / Red Hat / Virtualization

On 5/12/22 04:52, Andrea Bolognani wrote:
On Thu, May 05, 2022 at 05:26:14PM -0300, Daniel Henrique Barboza wrote:
+++ b/tests/qemuxml2argvtest.c @@ -2209,6 +2209,17 @@ mymain(void) QEMU_CAPS_DEVICE_SPAPR_VTY); qemuTestSetHostCPU(&driver, driver.hostarch, NULL);
+ DO_TEST_FAILURE("pseries-cpu-compat-power10", + QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE, + QEMU_CAPS_KVM); + + qemuTestSetHostCPU(&driver, driver.hostarch, cpuPower10); + DO_TEST("pseries-cpu-compat-power10", + QEMU_CAPS_KVM, + QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE, + QEMU_CAPS_DEVICE_SPAPR_VTY);
Don't forget to add the new test case to qemuxml2xmltest too.
It would be great if, as a follow-up, you could look into converting these test cases to the DO_TEST_CAPS_ARCH_LATEST_* macros, which would allow us to drop the hardcoded list of capabilities.
Right. Guess I'll use ARCH_LATEST in the tests I'm adding in this patch as well. Daniel
+++ b/tests/testutilsqemu.c @@ -22,6 +22,7 @@ virCPUDef *cpuDefault; virCPUDef *cpuHaswell; virCPUDef *cpuPower8; virCPUDef *cpuPower9; +virCPUDef *cpuPower10;
This part, as well as others, no longer applies. Easy enough to fix.
Can you please update the NEWS file to mention the new feature?

On Tue, May 17, 2022 at 05:32:56PM -0300, Daniel Henrique Barboza wrote:
On 5/12/22 04:52, Andrea Bolognani wrote:
Don't forget to add the new test case to qemuxml2xmltest too.
It would be great if, as a follow-up, you could look into converting these test cases to the DO_TEST_CAPS_ARCH_LATEST_* macros, which would allow us to drop the hardcoded list of capabilities.
Right. Guess I'll use ARCH_LATEST in the tests I'm adding in this patch as well.
Yeah, that'd be fantastic :) -- Andrea Bolognani / Red Hat / Virtualization

On 5/19/22 04:44, Andrea Bolognani wrote:
On Tue, May 17, 2022 at 05:32:56PM -0300, Daniel Henrique Barboza wrote:
On 5/12/22 04:52, Andrea Bolognani wrote:
Don't forget to add the new test case to qemuxml2xmltest too.
It would be great if, as a follow-up, you could look into converting these test cases to the DO_TEST_CAPS_ARCH_LATEST_* macros, which would allow us to drop the hardcoded list of capabilities.
Right. Guess I'll use ARCH_LATEST in the tests I'm adding in this patch as well.
Yeah, that'd be fantastic :)
I had to make adjustments (add a new ARG_CAPS_HOST_CPU_MODEL arg) to allow these conversions for tests that requires a specific cpu model to work and with arch_latest. Just sent some patches. If we get them first then I can also use arch_latest in the new P10 tests as well. Daniel

On Fri, May 20, 2022 at 05:49:53PM -0300, Daniel Henrique Barboza wrote:
On 5/19/22 04:44, Andrea Bolognani wrote:
On Tue, May 17, 2022 at 05:32:56PM -0300, Daniel Henrique Barboza wrote:
On 5/12/22 04:52, Andrea Bolognani wrote:
Don't forget to add the new test case to qemuxml2xmltest too.
It would be great if, as a follow-up, you could look into converting these test cases to the DO_TEST_CAPS_ARCH_LATEST_* macros, which would allow us to drop the hardcoded list of capabilities.
Right. Guess I'll use ARCH_LATEST in the tests I'm adding in this patch as well.
Yeah, that'd be fantastic :)
I had to make adjustments (add a new ARG_CAPS_HOST_CPU_MODEL arg) to allow these conversions for tests that requires a specific cpu model to work and with arch_latest.
Just sent some patches. If we get them first then I can also use arch_latest in the new P10 tests as well.
I see Martin has already taken care of reviewing those patches, so you should be able to post a rebased version of the POWER10 support now, right? Freeze starts tomorrow, so we can still get that merged in time for the next release if we're quick. -- Andrea Bolognani / Red Hat / Virtualization

On 5/24/22 06:21, Andrea Bolognani wrote:
On Fri, May 20, 2022 at 05:49:53PM -0300, Daniel Henrique Barboza wrote:
On 5/19/22 04:44, Andrea Bolognani wrote:
On Tue, May 17, 2022 at 05:32:56PM -0300, Daniel Henrique Barboza wrote:
On 5/12/22 04:52, Andrea Bolognani wrote:
Don't forget to add the new test case to qemuxml2xmltest too.
It would be great if, as a follow-up, you could look into converting these test cases to the DO_TEST_CAPS_ARCH_LATEST_* macros, which would allow us to drop the hardcoded list of capabilities.
Right. Guess I'll use ARCH_LATEST in the tests I'm adding in this patch as well.
Yeah, that'd be fantastic :)
I had to make adjustments (add a new ARG_CAPS_HOST_CPU_MODEL arg) to allow these conversions for tests that requires a specific cpu model to work and with arch_latest.
Just sent some patches. If we get them first then I can also use arch_latest in the new P10 tests as well.
I see Martin has already taken care of reviewing those patches, so you should be able to post a rebased version of the POWER10 support now, right? Freeze starts tomorrow, so we can still get that merged in time for the next release if we're quick.
I'll rebase it, post with the extra qemuxml2xmltests you asked for, and post it shortly. Daniel
participants (2)
-
Andrea Bolognani
-
Daniel Henrique Barboza