[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 13/14] machine: reject -smp dies!=1 for non-PC machines
From: |
Paolo Bonzini |
Subject: |
[PATCH 13/14] machine: reject -smp dies!=1 for non-PC machines |
Date: |
Thu, 13 May 2021 12:29:00 -0400 |
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
hw/core/machine.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/hw/core/machine.c b/hw/core/machine.c
index 7daca0b86a..55e878fc3e 100644
--- a/hw/core/machine.c
+++ b/hw/core/machine.c
@@ -745,6 +745,10 @@ static void smp_parse(MachineState *ms, SMPConfiguration
*config, Error **errp)
unsigned cores = config->has_cores ? config->cores : 0;
unsigned threads = config->has_threads ? config->threads : 0;
+ if (config->has_dies && config->dies != 0 && config->dies != 1) {
+ error_setg(errp, "dies not supported by this machine's CPU topology");
+ }
+
/* compute missing values, prefer sockets over cores over threads */
if (cpus == 0 || sockets == 0) {
cores = cores > 0 ? cores : 1;
--
2.26.2
- [PATCH 05/14] keyval: introduce keyval_parse_into, (continued)
- [PATCH 05/14] keyval: introduce keyval_parse_into, Paolo Bonzini, 2021/05/13
- [PATCH 03/14] vl: plumb keyval-based options into -set and -readconfig, Paolo Bonzini, 2021/05/13
- [PATCH 09/14] machine: move dies from X86MachineState to CpuTopology, Paolo Bonzini, 2021/05/13
- [PATCH 08/14] vl: switch -accel parsing to keyval, Paolo Bonzini, 2021/05/13
- [PATCH 07/14] qemu-option: remove now-dead code, Paolo Bonzini, 2021/05/13
- [PATCH 06/14] vl: switch -M parsing to keyval, Paolo Bonzini, 2021/05/13
- [PATCH 02/14] qemu-config: parse configuration files to a QDict, Paolo Bonzini, 2021/05/13
- [PATCH 04/14] qom: export more functions for use with non-UserCreatable objects, Paolo Bonzini, 2021/05/13
- [PATCH 14/14] machine: add smp compound property, Paolo Bonzini, 2021/05/13
- [PATCH 13/14] machine: reject -smp dies!=1 for non-PC machines,
Paolo Bonzini <=
- [PATCH 10/14] machine: move common smp_parse code to caller, Paolo Bonzini, 2021/05/13
- [PATCH 12/14] machine: pass QAPI struct to mc->smp_parse, Paolo Bonzini, 2021/05/13
- [PATCH 11/14] machine: add error propagation to mc->smp_parse, Paolo Bonzini, 2021/05/13
- Re: [PATCH 00/14] vl: compound properties for machines and accelerators, no-reply, 2021/05/13