mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-01-10 20:25:34 +00:00
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:
parent
6bdfeb35ec
commit
15eb359656
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue