From 0f20ba62c35e6a779ba4ea00616192ef2abb6896 Mon Sep 17 00:00:00 2001 From: Alexey Kardashevskiy Date: Sun, 2 Feb 2014 01:45:52 +1100 Subject: 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 Acked-by: Mike Day Signed-off-by: Alexander Graf --- hw/intc/openpic_kvm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'hw/intc/openpic_kvm.c') diff --git a/hw/intc/openpic_kvm.c b/hw/intc/openpic_kvm.c index c7f7b8406c..87fdb126cf 100644 --- a/hw/intc/openpic_kvm.c +++ b/hw/intc/openpic_kvm.c @@ -228,7 +228,7 @@ int kvm_openpic_connect_vcpu(DeviceState *d, CPUState *cs) encap.cap = KVM_CAP_IRQ_MPIC; encap.args[0] = opp->fd; - encap.args[1] = cs->cpu_index; + encap.args[1] = kvm_arch_vcpu_id(cs); return kvm_vcpu_ioctl(cs, KVM_ENABLE_CAP, &encap); } -- cgit v1.2.3