diff options
author | Alexey Kardashevskiy <aik@ozlabs.ru> | 2014-02-02 01:45:52 +1100 |
---|---|---|
committer | Alexander Graf <agraf@suse.de> | 2014-03-05 03:07:04 +0100 |
commit | 0f20ba62c35e6a779ba4ea00616192ef2abb6896 (patch) | |
tree | 7cc5b649cd408c0868908413252baef08b30c520 /target-ppc | |
parent | 0ce470cd4ca88e84e547a3b95159d23ce6be419e (diff) | |
download | qemu-0f20ba62c35e6a779ba4ea00616192ef2abb6896.zip qemu-0f20ba62c35e6a779ba4ea00616192ef2abb6896.tar.gz qemu-0f20ba62c35e6a779ba4ea00616192ef2abb6896.tar.bz2 |
target-ppc: spapr: e500: fix to use cpu_dt_id
This makes use of @cpu_dt_id and related API in:
1. emulated XICS hypercall handlers as they receive fixed CPU indexes;
2. XICS-KVM to enable in-kernel XICS on right CPU;
3. device-tree renderer.
This removes @cpu_index fixup as @cpu_dt_id is used instead so QEMU monitor
can accept command-line CPU indexes again.
This changes kvm_arch_vcpu_id() to use ppc_get_vcpu_dt_id() as at the moment
KVM CPU id and device tree ID are calculated using the same algorithm.
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Acked-by: Mike Day <ncmike@ncultra.org>
Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'target-ppc')
-rw-r--r-- | target-ppc/kvm.c | 2 | ||||
-rw-r--r-- | target-ppc/translate_init.c | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/target-ppc/kvm.c b/target-ppc/kvm.c index a483322..32e7a8c 100644 --- a/target-ppc/kvm.c +++ b/target-ppc/kvm.c @@ -402,7 +402,7 @@ static inline void kvm_fixup_page_sizes(PowerPCCPU *cpu) unsigned long kvm_arch_vcpu_id(CPUState *cpu) { - return cpu->cpu_index; + return ppc_get_vcpu_dt_id(POWERPC_CPU(cpu)); } int kvm_arch_init_vcpu(CPUState *cs) diff --git a/target-ppc/translate_init.c b/target-ppc/translate_init.c index ef74d94..3eafbb0 100644 --- a/target-ppc/translate_init.c +++ b/target-ppc/translate_init.c @@ -8457,6 +8457,7 @@ static void ppc_cpu_initfn(Object *obj) cs->env_ptr = env; cpu_exec_init(env); + cpu->cpu_dt_id = cs->cpu_index; env->msr_mask = pcc->msr_mask; env->mmu_model = pcc->mmu_model; |