aboutsummaryrefslogtreecommitdiff
path: root/target
diff options
context:
space:
mode:
authorLike Xu <like.xu@linux.intel.com>2019-06-12 16:40:58 +0800
committerEduardo Habkost <ehabkost@redhat.com>2019-07-05 17:08:03 -0300
commit176d2cda0dee9f4f78f604ad72d6a111e8e38f3b (patch)
tree57db8dcefd1a3899e570cb1f07e5e0360d54ae39 /target
parentcabea7dcd0e2084bdd32fcfe54f6275599f55bb7 (diff)
i386/cpu: Consolidate die-id validity in smp context
The field die_id (default as 0) and has_die_id are introduced to X86CPU. Following the legacy smp check rules, the die_id validity is added to the same contexts as leagcy smp variables such as hmp_hotpluggable_cpus(), machine_set_cpu_numa_node(), cpu_slot_to_string() and pc_cpu_pre_plug(). Acked-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: Like Xu <like.xu@linux.intel.com> Message-Id: <20190612084104.34984-4-like.xu@linux.intel.com> Reviewed-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Diffstat (limited to 'target')
-rw-r--r--target/i386/cpu.c2
-rw-r--r--target/i386/cpu.h1
2 files changed, 3 insertions, 0 deletions
diff --git a/target/i386/cpu.c b/target/i386/cpu.c
index 8ef3063140..6b3d0035e0 100644
--- a/target/i386/cpu.c
+++ b/target/i386/cpu.c
@@ -5865,11 +5865,13 @@ static Property x86_cpu_properties[] = {
DEFINE_PROP_UINT32("apic-id", X86CPU, apic_id, 0),
DEFINE_PROP_INT32("thread-id", X86CPU, thread_id, 0),
DEFINE_PROP_INT32("core-id", X86CPU, core_id, 0),
+ DEFINE_PROP_INT32("die-id", X86CPU, die_id, 0),
DEFINE_PROP_INT32("socket-id", X86CPU, socket_id, 0),
#else
DEFINE_PROP_UINT32("apic-id", X86CPU, apic_id, UNASSIGNED_APIC_ID),
DEFINE_PROP_INT32("thread-id", X86CPU, thread_id, -1),
DEFINE_PROP_INT32("core-id", X86CPU, core_id, -1),
+ DEFINE_PROP_INT32("die-id", X86CPU, die_id, -1),
DEFINE_PROP_INT32("socket-id", X86CPU, socket_id, -1),
#endif
DEFINE_PROP_INT32("node-id", X86CPU, node_id, CPU_UNSET_NUMA_NODE_ID),
diff --git a/target/i386/cpu.h b/target/i386/cpu.h
index 14c19e61b1..4d2ae2384e 100644
--- a/target/i386/cpu.h
+++ b/target/i386/cpu.h
@@ -1500,6 +1500,7 @@ struct X86CPU {
int32_t node_id; /* NUMA node this CPU belongs to */
int32_t socket_id;
+ int32_t die_id;
int32_t core_id;
int32_t thread_id;