diff options
author | Babu Moger <babu.moger@amd.com> | 2020-03-11 17:53:20 -0500 |
---|---|---|
committer | Eduardo Habkost <ehabkost@redhat.com> | 2020-03-17 19:48:10 -0400 |
commit | c24a41bb53c0854d22c96b30d57cfcaa543c409d (patch) | |
tree | 2a03557cef16c1f01a417ea715e4a1ab29ba9e61 /hw/i386 | |
parent | 156778a08314dd224e675acee7975ec2354e68e5 (diff) |
hw/i386: Update structures to save the number of nodes per package
Update structures X86CPUTopoIDs and CPUX86State to hold the number of
nodes per package. This is required to build EPYC mode topology.
Signed-off-by: Babu Moger <babu.moger@amd.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Message-Id: <158396720035.58170.1973738805301006456.stgit@naples-babu.amd.com>
Diffstat (limited to 'hw/i386')
-rw-r--r-- | hw/i386/pc.c | 1 | ||||
-rw-r--r-- | hw/i386/x86.c | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 05e7f1090f..ee89fcd1c3 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -1525,6 +1525,7 @@ static void pc_cpu_pre_plug(HotplugHandler *hotplug_dev, init_topo_info(&topo_info, x86ms); env->nr_dies = x86ms->smp_dies; + env->nr_nodes = topo_info.nodes_per_pkg; /* * If APIC ID is not set, diff --git a/hw/i386/x86.c b/hw/i386/x86.c index 41b884605f..87b73fe33c 100644 --- a/hw/i386/x86.c +++ b/hw/i386/x86.c @@ -62,6 +62,7 @@ inline void init_topo_info(X86CPUTopoInfo *topo_info, { MachineState *ms = MACHINE(x86ms); + topo_info->nodes_per_pkg = ms->numa_state->num_nodes / ms->smp.sockets; topo_info->dies_per_pkg = x86ms->smp_dies; topo_info->cores_per_die = ms->smp.cores; topo_info->threads_per_core = ms->smp.threads; |