summaryrefslogtreecommitdiffstats
path: root/hw/intc/openpic_kvm.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/intc/openpic_kvm.c')
-rw-r--r--hw/intc/openpic_kvm.c2
1 files changed, 1 insertions, 1 deletions
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);
}