From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:36268) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sypso-00020E-V8 for qemu-devel@nongnu.org; Tue, 07 Aug 2012 15:56:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Sypsn-0008O8-Hv for qemu-devel@nongnu.org; Tue, 07 Aug 2012 15:56:02 -0400 Received: from mx1.redhat.com ([209.132.183.28]:37936) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sypsn-0008Nm-An for qemu-devel@nongnu.org; Tue, 07 Aug 2012 15:56:01 -0400 From: Eduardo Habkost Date: Tue, 7 Aug 2012 16:56:41 -0300 Message-Id: <1344369413-9053-4-git-send-email-ehabkost@redhat.com> In-Reply-To: <1344369413-9053-1-git-send-email-ehabkost@redhat.com> References: <1344369413-9053-1-git-send-email-ehabkost@redhat.com> Subject: [Qemu-devel] [RFC 03/15] kvm: set vcpu_id to APIC ID instead of CPU index 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 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 --- 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