numa: move numa_node from CPUState into target specific classes

Move vcpu's associated numa_node field out of generic CPUState
into inherited classes that actually care about cpu<->numa mapping,
i.e: ARMCPU, PowerPCCPU, X86CPU.

Backports relevant parts of commit 15f8b14228b856850df3fa5ba999ad96521f2208 from qemu
This commit is contained in:
Igor Mammedov 2018-03-20 06:46:10 -04:00 committed by Lioncash
parent 6bdfeb35ec
commit 15eb359656
No known key found for this signature in database
GPG key ID: 4E3C3CC1031BA9C7
3 changed files with 3 additions and 2 deletions

View file

@ -225,7 +225,6 @@ struct CPUAddressSpace {
* @cpu_index: CPU index (informative).
* @nr_cores: Number of cores within this CPU package.
* @nr_threads: Number of threads within this CPU.
* @numa_node: NUMA node this CPU is belonging to.
* @host_tid: Host thread ID.
* @running: #true if CPU is currently running (usermode).
* @created: Indicates whether the CPU thread has been successfully created.
@ -263,7 +262,6 @@ struct CPUState {
int nr_cores;
int nr_threads;
int numa_node;
struct QemuThread *thread;
#ifdef _WIN32

View file

@ -816,6 +816,8 @@ typedef struct ARMCPU {
ARMELChangeHook *el_change_hook;
void *el_change_hook_opaque;
int32_t node_id; /* NUMA node this CPU belongs to */
} ARMCPU;
static inline ARMCPU *arm_env_get_cpu(CPUARMState *env)

View file

@ -1286,6 +1286,7 @@ typedef struct X86CPU {
struct DeviceState *apic_state;
struct MemoryRegion *cpu_as_root, *cpu_as_mem, *smram;
int32_t node_id; /* NUMA node this CPU belongs to */
int32_t socket_id;
int32_t core_id;
int32_t thread_id;