From 8cb30e3aec07cb85fe424191e37cf983a2ac5416 Mon Sep 17 00:00:00 2001 From: Babu Moger Date: Wed, 11 Mar 2020 17:53:06 -0500 Subject: machine: Add SMP Sockets in CpuTopology Store the smp sockets in CpuTopology. The socket information required to build the apic id in EPYC mode. Right now socket information is not passed to down when decoding the apic id. Add the socket information here. Signed-off-by: Babu Moger Reviewed-by: Eduardo Habkost Reviewed-by: Igor Mammedov Acked-by: Michael S. Tsirkin Message-Id: <158396718647.58170.2278448323151215741.stgit@naples-babu.amd.com> --- hw/core/machine.c | 1 + hw/i386/pc.c | 1 + 2 files changed, 2 insertions(+) (limited to 'hw') diff --git a/hw/core/machine.c b/hw/core/machine.c index 4778bc6..b958cd1 100644 --- a/hw/core/machine.c +++ b/hw/core/machine.c @@ -757,6 +757,7 @@ static void smp_parse(MachineState *ms, QemuOpts *opts) ms->smp.cpus = cpus; ms->smp.cores = cores; ms->smp.threads = threads; + ms->smp.sockets = sockets; } if (ms->smp.cpus > 1) { diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 662abb5..05e7f10 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -781,6 +781,7 @@ void pc_smp_parse(MachineState *ms, QemuOpts *opts) ms->smp.cpus = cpus; ms->smp.cores = cores; ms->smp.threads = threads; + ms->smp.sockets = sockets; x86ms->smp_dies = dies; } -- cgit v1.1