Received: from eggs.gnu.org ([208.118.235.92]:42770) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sogwk-0004xL-RW for qemu-devel@nongnu.org; Tue, 10 Jul 2012 16:22:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Sogwg-0001uG-KJ for qemu-devel@nongnu.org; Tue, 10 Jul 2012 16:22:10 -0400 Received: from mx1.redhat.com ([209.132.183.28]:44751) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sogwg-0001tW-AT for qemu-devel@nongnu.org; Tue, 10 Jul 2012 16:22:06 -0400 From: Eduardo Habkost Date: Tue, 10 Jul 2012 17:22:18 -0300 Message-Id: <1341951743-2285-4-git-send-email-ehabkost@redhat.com> In-Reply-To: <1341951743-2285-1-git-send-email-ehabkost@redhat.com> References: <1341951743-2285-1-git-send-email-ehabkost@redhat.com> Subject: [Qemu-devel] [QEMU PATCH 3/7] 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 , seabios@seabios.org, Gleb Natapov , Anthony Liguori 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 f8e4328..2d1fe6a 100644 --- a/kvm-all.c +++ b/kvm-all.c @@ -212,7 +212,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.10.4