From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:34925) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T108H-0000HB-4I for qemu-devel@nongnu.org; Mon, 13 Aug 2012 15:16:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T108G-00036r-6o for qemu-devel@nongnu.org; Mon, 13 Aug 2012 15:16:57 -0400 Received: from mx1.redhat.com ([209.132.183.28]:45839) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T108F-00036Y-V5 for qemu-devel@nongnu.org; Mon, 13 Aug 2012 15:16:56 -0400 Message-ID: <502952A4.4070508@redhat.com> Date: Mon, 13 Aug 2012 21:16:52 +0200 From: Igor Mammedov MIME-Version: 1.0 References: <1344369413-9053-1-git-send-email-ehabkost@redhat.com> <1344369413-9053-4-git-send-email-ehabkost@redhat.com> In-Reply-To: <1344369413-9053-4-git-send-email-ehabkost@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [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: Eduardo Habkost Cc: qemu-devel@nongnu.org, Gleb Natapov , =?ISO-8859-1?Q?Andreas_F=E4rber?= On 08/07/2012 09:56 PM, Eduardo Habkost wrote: > 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. What it would break if APIC ID != CPU index ? > > 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; > -- Regards, Igor