aboutsummaryrefslogtreecommitdiff
path: root/kvm-all.c
diff options
context:
space:
mode:
authorEduardo Habkost <ehabkost@redhat.com>2013-01-22 18:25:01 -0200
committerAndreas Färber <afaerber@suse.de>2013-01-27 14:34:26 +0100
commitb164e48ed1600055bc190aa3ab42c18004d2c711 (patch)
treeaa0b929a382279f4a2bc3defbae311c0ccc2fdd8 /kvm-all.c
parent2969475869a6f33b8883c2fbf90252dcf617902e (diff)
kvm: Create kvm_arch_vcpu_id() function
This will allow each architecture to define how the VCPU ID is set on the KVM_CREATE_VCPU ioctl call. Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Acked-by: Gleb Natapov <gleb@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'kvm-all.c')
-rw-r--r--kvm-all.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kvm-all.c b/kvm-all.c
index 6278d615b1..363a358a39 100644
--- a/kvm-all.c
+++ b/kvm-all.c
@@ -222,7 +222,7 @@ int kvm_init_vcpu(CPUState *cpu)
DPRINTF("kvm_init_vcpu\n");
- ret = kvm_vm_ioctl(s, KVM_CREATE_VCPU, cpu->cpu_index);
+ ret = kvm_vm_ioctl(s, KVM_CREATE_VCPU, (void *)kvm_arch_vcpu_id(cpu));
if (ret < 0) {
DPRINTF("kvm_create_vcpu failed\n");
goto err;