On Mon, Jan 08, 2024 at 20:26:04 +0100, Andrea Bolognani wrote:
> https://issues.redhat.com/browse/RHEL-7043
>
> Signed-off-by: Andrea Bolognani <[email protected]>
> ---
> src/qemu/qemu_command.c | 4 +++-
> tests/qemuxml2argvdata/cpu-hotplug-startup.x86_64-latest.args | 2 +-
> tests/qemuxml2argvdata/cpu-numa-disjoint.x86_64-latest.args | 2 +-
> tests/qemuxml2argvdata/cpu-numa-disordered.x86_64-latest.args | 2 +-
> tests/qemuxml2argvdata/cpu-numa-memshared.x86_64-latest.args | 2 +-
> .../cpu-numa-no-memory-element.x86_64-latest.args | 2 +-
> tests/qemuxml2argvdata/cpu-numa1.x86_64-latest.args | 2 +-
> tests/qemuxml2argvdata/cpu-numa2.x86_64-latest.args | 2 +-
> tests/qemuxml2argvdata/cpu-topology1.x86_64-latest.args | 2 +-
> tests/qemuxml2argvdata/cpu-topology2.x86_64-latest.args | 2 +-
> tests/qemuxml2argvdata/cpu-topology3.x86_64-latest.args | 2 +-
> tests/qemuxml2argvdata/cpu-topology4.x86_64-latest.args | 2 +-
> .../fd-memory-no-numa-topology.x86_64-latest.args | 2 +-
> .../fd-memory-numa-topology.x86_64-latest.args | 2 +-
> .../fd-memory-numa-topology2.x86_64-latest.args | 2 +-
> .../fd-memory-numa-topology3.x86_64-latest.args | 2 +-
> tests/qemuxml2argvdata/hugepages-nvdimm.x86_64-latest.args | 2 +-
> .../memfd-memory-default-hugepage.x86_64-latest.args | 2 +-
> tests/qemuxml2argvdata/memfd-memory-numa.x86_64-latest.args | 2 +-
> .../memory-hotplug-dimm-addr.x86_64-latest.args | 2 +-
> tests/qemuxml2argvdata/memory-hotplug-dimm.x86_64-latest.args | 2 +-
> .../memory-hotplug-multiple.x86_64-latest.args | 2 +-
> .../memory-hotplug-nvdimm-access.x86_64-latest.args | 2 +-
> .../memory-hotplug-nvdimm-align.x86_64-latest.args | 2 +-
> .../memory-hotplug-nvdimm-label.x86_64-latest.args | 2 +-
> .../memory-hotplug-nvdimm-pmem.x86_64-latest.args | 2 +-
> .../memory-hotplug-nvdimm-ppc64-abi-update.ppc64-latest.args | 2 +-
> .../memory-hotplug-nvdimm-ppc64.ppc64-latest.args | 2 +-
> .../memory-hotplug-nvdimm-readonly.x86_64-latest.args | 2 +-
> .../qemuxml2argvdata/memory-hotplug-nvdimm.x86_64-latest.args | 2 +-
> .../memory-hotplug-virtio-mem.x86_64-latest.args | 2 +-
> .../memory-hotplug-virtio-pmem.x86_64-latest.args | 2 +-
> tests/qemuxml2argvdata/memory-hotplug.x86_64-latest.args | 2 +-
> .../numad-auto-memory-vcpu-cpuset.x86_64-latest.args | 2 +-
> ...uto-memory-vcpu-no-cpuset-and-placement.x86_64-latest.args | 2 +-
> .../numad-auto-vcpu-no-numatune.x86_64-latest.args | 2 +-
> .../numad-auto-vcpu-static-numatune.x86_64-latest.args | 2 +-
> .../numad-static-memory-auto-vcpu.x86_64-latest.args | 2 +-
> .../numad-static-vcpu-no-numatune.x86_64-latest.args | 2 +-
> tests/qemuxml2argvdata/numad.x86_64-latest.args | 2 +-
> .../numatune-auto-nodeset-invalid.x86_64-latest.args | 2 +-
> tests/qemuxml2argvdata/pci-expander-bus.x86_64-latest.args | 2 +-
> tests/qemuxml2argvdata/pcie-expander-bus.x86_64-latest.args | 2 +-
> .../qemuxml2argvdata/pseries-phb-numa-node.ppc64-latest.args | 2 +-
> 44 files changed, 46 insertions(+), 44 deletions(-)
>
> diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
> index 71daa85e55..65e08b3e9c 100644
> --- a/src/qemu/qemu_command.c
> +++ b/src/qemu/qemu_command.c
> @@ -7226,7 +7226,7 @@ qemuBuildSmpCommandLine(virCommand *cmd,
> _("Only 1 die per socket is supported"));
> return -1;
> }
> - if (def->cpu->clusters != 1) {
> + if (def->cpu->clusters != 1 && !virQEMUCapsGet(qemuCaps,
> QEMU_CAPS_SMP_CLUSTERS)) {
Long, easily breakable, line.
> virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
> _("Only 1 cluster per die is supported"));
> return -1;
> @@ -7234,6 +7234,8 @@ qemuBuildSmpCommandLine(virCommand *cmd,
> virBufferAsprintf(&buf, ",sockets=%u", def->cpu->sockets);
> if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_SMP_DIES))
> virBufferAsprintf(&buf, ",dies=%u", def->cpu->dies);
> + if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_SMP_CLUSTERS))
> + virBufferAsprintf(&buf, ",clusters=%u", def->cpu->clusters);
> virBufferAsprintf(&buf, ",cores=%u", def->cpu->cores);
> virBufferAsprintf(&buf, ",threads=%u", def->cpu->threads);
> } else {
Reviewed-by: Peter Krempa <[email protected]>
_______________________________________________
Devel mailing list -- [email protected]
To unsubscribe send an email to [email protected]