qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [RFC 03/15] kvm: set vcpu_id to APIC ID instead of CPU inde


From: Eduardo Habkost
Subject: [Qemu-devel] [RFC 03/15] kvm: set vcpu_id to APIC ID instead of CPU index
Date: Tue, 7 Aug 2012 16:56:41 -0300

The CPU ID in KVM is supposed to be the APIC ID, so change the
KVM_CREATE_VCPU call to match it. It didn't break anything yet because
today the APIC ID is assumed to be == the CPU index, but this won't be
true in the future.

Signed-off-by: Eduardo Habkost <address@hidden>
---
 kvm-all.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kvm-all.c b/kvm-all.c
index 2148b20..38de992 100644
--- a/kvm-all.c
+++ b/kvm-all.c
@@ -213,7 +213,7 @@ int kvm_init_vcpu(CPUArchState *env)
 
     DPRINTF("kvm_init_vcpu\n");
 
-    ret = kvm_vm_ioctl(s, KVM_CREATE_VCPU, env->cpu_index);
+    ret = kvm_vm_ioctl(s, KVM_CREATE_VCPU, env->cpuid_apic_id);
     if (ret < 0) {
         DPRINTF("kvm_create_vcpu failed\n");
         goto err;
-- 
1.7.11.2




reply via email to

[Prev in Thread] Current Thread [Next in Thread]