summaryrefslogtreecommitdiff
path: root/target-i386
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 /target-i386
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 'target-i386')
-rw-r--r--target-i386/kvm.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/target-i386/kvm.c b/target-i386/kvm.c
index 3acff40c47..5f3f7894c1 100644
--- a/target-i386/kvm.c
+++ b/target-i386/kvm.c
@@ -411,6 +411,11 @@ static void cpu_update_state(void *opaque, int running, RunState state)
}
}
+unsigned long kvm_arch_vcpu_id(CPUState *cpu)
+{
+ return cpu->cpu_index;
+}
+
int kvm_arch_init_vcpu(CPUState *cs)
{
struct {