aboutsummaryrefslogtreecommitdiff
path: root/target/i386
diff options
context:
space:
mode:
authorBabu Moger <babu.moger@amd.com>2020-03-11 17:53:20 -0500
committerEduardo Habkost <ehabkost@redhat.com>2020-03-17 19:48:10 -0400
commitc24a41bb53c0854d22c96b30d57cfcaa543c409d (patch)
tree2a03557cef16c1f01a417ea715e4a1ab29ba9e61 /target/i386
parent156778a08314dd224e675acee7975ec2354e68e5 (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 'target/i386')
-rw-r--r--target/i386/cpu.c1
-rw-r--r--target/i386/cpu.h1
2 files changed, 2 insertions, 0 deletions
diff --git a/target/i386/cpu.c b/target/i386/cpu.c
index f1ac572efd..34b511f078 100644
--- a/target/i386/cpu.c
+++ b/target/i386/cpu.c
@@ -6957,6 +6957,7 @@ static void x86_cpu_initfn(Object *obj)
FeatureWord w;
env->nr_dies = 1;
+ env->nr_nodes = 1;
cpu_set_cpustate_pointers(cpu);
object_property_add(obj, "family", "int",
diff --git a/target/i386/cpu.h b/target/i386/cpu.h
index 68b186d258..7e9e963d78 100644
--- a/target/i386/cpu.h
+++ b/target/i386/cpu.h
@@ -1609,6 +1609,7 @@ typedef struct CPUX86State {
TPRAccess tpr_access_type;
unsigned nr_dies;
+ unsigned nr_nodes;
} CPUX86State;
struct kvm_msrs;