diff options
author | Igor Mammedov <imammedo@redhat.com> | 2017-05-30 18:24:00 +0200 |
---|---|---|
committer | Eduardo Habkost <ehabkost@redhat.com> | 2017-06-05 14:59:09 -0300 |
commit | 15f8b14228b856850df3fa5ba999ad96521f2208 (patch) | |
tree | 2ca59eabe74480c267f910e1bd1ff6cfe6e824c0 /hw | |
parent | f75cd44de0ec20d72dc9eef5e6e48a8874c40727 (diff) | |
download | qemu-15f8b14228b856850df3fa5ba999ad96521f2208.zip qemu-15f8b14228b856850df3fa5ba999ad96521f2208.tar.gz qemu-15f8b14228b856850df3fa5ba999ad96521f2208.tar.bz2 |
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.
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Message-Id: <1496161442-96665-6-git-send-email-imammedo@redhat.com>
[ehabkost: s/CPU is belonging to/CPU belongs to/ on comments]
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/ppc/spapr.c | 2 | ||||
-rw-r--r-- | hw/ppc/spapr_cpu_core.c | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index 94563cd..96471a5 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -191,7 +191,7 @@ static int spapr_fixup_cpu_numa_dt(void *fdt, int offset, CPUState *cs) cpu_to_be32(0x0), cpu_to_be32(0x0), cpu_to_be32(0x0), - cpu_to_be32(cs->numa_node), + cpu_to_be32(cpu->node_id), cpu_to_be32(index)}; /* Advertise NUMA via ibm,associativity */ diff --git a/hw/ppc/spapr_cpu_core.c b/hw/ppc/spapr_cpu_core.c index ff7058e..029a141 100644 --- a/hw/ppc/spapr_cpu_core.c +++ b/hw/ppc/spapr_cpu_core.c @@ -184,15 +184,17 @@ static void spapr_cpu_core_realize(DeviceState *dev, Error **errp) for (i = 0; i < cc->nr_threads; i++) { char id[32]; CPUState *cs; + PowerPCCPU *cpu; obj = sc->threads + i * size; object_initialize(obj, size, typename); cs = CPU(obj); + cpu = POWERPC_CPU(cs); cs->cpu_index = cc->core_id + i; /* Set NUMA node for the threads belonged to core */ - cs->numa_node = sc->node_id; + cpu->node_id = sc->node_id; snprintf(id, sizeof(id), "thread[%d]", i); object_property_add_child(OBJECT(sc), id, obj, &local_err); |