diff options
author | Sam Bobroff | 2017-08-03 08:28:44 +0200 |
---|---|---|
committer | David Gibson | 2017-09-08 01:30:55 +0200 |
commit | 81210c2009296261879af5d58a3a499815031765 (patch) | |
tree | eeeefcf5c0a44318da81a5d962b49f3dcb380654 /hw/ppc/ppc.c | |
parent | e500: Use cpu_index instead of vcpu_dt_id (diff) | |
download | qemu-81210c2009296261879af5d58a3a499815031765.tar.gz qemu-81210c2009296261879af5d58a3a499815031765.tar.xz qemu-81210c2009296261879af5d58a3a499815031765.zip |
ppc: spapr: Rename cpu_dt_id to vcpu_id
This field actually records the VCPU ID used by KVM and, although the
value is also used in the device tree it is primarily the VCPU ID so
rename it as such.
Signed-off-by: Sam Bobroff <sam.bobroff@au1.ibm.com>
[dwg: Updated comment missed in cpu.h]
Reviewed-by: Greg Kurz <groug@kaod.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'hw/ppc/ppc.c')
-rw-r--r-- | hw/ppc/ppc.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/hw/ppc/ppc.c b/hw/ppc/ppc.c index 224184d66d..4477d4ad89 100644 --- a/hw/ppc/ppc.c +++ b/hw/ppc/ppc.c @@ -1359,19 +1359,19 @@ void PPC_debug_write (void *opaque, uint32_t addr, uint32_t val) } /* CPU device-tree ID helpers */ -int ppc_get_vcpu_dt_id(PowerPCCPU *cpu) +int ppc_get_vcpu_id(PowerPCCPU *cpu) { - return cpu->cpu_dt_id; + return cpu->vcpu_id; } -PowerPCCPU *ppc_get_vcpu_by_dt_id(int cpu_dt_id) +PowerPCCPU *ppc_get_cpu_by_vcpu_id(int vcpu_id) { CPUState *cs; CPU_FOREACH(cs) { PowerPCCPU *cpu = POWERPC_CPU(cs); - if (cpu->cpu_dt_id == cpu_dt_id) { + if (cpu->vcpu_id == vcpu_id) { return cpu; } } |