From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:37189) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TJP03-0004DL-Or for qemu-devel@nongnu.org; Wed, 03 Oct 2012 09:28:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TJOzs-0006aU-SF for qemu-devel@nongnu.org; Wed, 03 Oct 2012 09:28:31 -0400 Received: from mx1.redhat.com ([209.132.183.28]:45386) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TJOzs-0006a9-KP for qemu-devel@nongnu.org; Wed, 03 Oct 2012 09:28:20 -0400 From: Eduardo Habkost Date: Wed, 3 Oct 2012 10:29:04 -0300 Message-Id: <1349270954-4657-9-git-send-email-ehabkost@redhat.com> In-Reply-To: <1349270954-4657-1-git-send-email-ehabkost@redhat.com> References: <1349270954-4657-1-git-send-email-ehabkost@redhat.com> Subject: [Qemu-devel] [RFC 08/18] target-i386: kvm: set vcpu_id to APIC ID instead of CPU index (v2) List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Igor Mammedov , =?UTF-8?q?Andreas=20F=C3=A4rber?= , Gleb Natapov , Paolo Bonzini The CPU ID in KVM is supposed to be the APIC ID, so change the KVM_CREATE_VCPU call to match it. The current behavior 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. Chagnes v1 -> v2: - Change only i386 code (kvm_arch_vcpu_id()) Signed-off-by: Eduardo Habkost --- target-i386/kvm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target-i386/kvm.c b/target-i386/kvm.c index bb972d8..45ebddc 100644 --- a/target-i386/kvm.c +++ b/target-i386/kvm.c @@ -355,7 +355,7 @@ static void cpu_update_state(void *opaque, int running, RunState state) unsigned long kvm_arch_vcpu_id(CPUArchState *env) { - return env->cpu_index; + return env->cpuid_apic_id; } int kvm_arch_init_vcpu(CPUX86State *env) -- 1.7.11.4