aboutsummaryrefslogtreecommitdiff
path: root/hw/i386/pc.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2021-06-17 17:53:03 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2021-06-25 16:13:48 +0200
commit67872eb8ed194117f5af71694374a083c3f45eb2 (patch)
tree8c932318f0fb053f535edb50e3e2a5520788b2f1 /hw/i386/pc.c
parentbd80936a4f18075e0e407df180801a9743ce290c (diff)
downloadqemu-67872eb8ed194117f5af71694374a083c3f45eb2.zip
qemu-67872eb8ed194117f5af71694374a083c3f45eb2.tar.gz
qemu-67872eb8ed194117f5af71694374a083c3f45eb2.tar.bz2
machine: move dies from X86MachineState to CpuTopology
In order to make SMP configuration a Machine property, we need a getter as well as a setter. To simplify the implementation put everything that the getter needs in the CpuTopology struct. Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <20210617155308.928754-7-pbonzini@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/i386/pc.c')
-rw-r--r--hw/i386/pc.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index c6d8d0d..92958e9 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -712,8 +712,6 @@ void pc_acpi_smi_interrupt(void *opaque, int irq, int level)
*/
void pc_smp_parse(MachineState *ms, QemuOpts *opts)
{
- X86MachineState *x86ms = X86_MACHINE(ms);
-
if (opts) {
unsigned cpus = qemu_opt_get_number(opts, "cpus", 0);
unsigned sockets = qemu_opt_get_number(opts, "sockets", 0);
@@ -769,7 +767,7 @@ void pc_smp_parse(MachineState *ms, QemuOpts *opts)
ms->smp.cores = cores;
ms->smp.threads = threads;
ms->smp.sockets = sockets;
- x86ms->smp_dies = dies;
+ ms->smp.dies = dies;
}
if (ms->smp.cpus > 1) {