From: Nitin A Kamble Subject: [patch] provide uniqe x2apicid for each vcpu in the cpuid leaf 0xb Date: Wed, 06 May 2009 15:11:46 -0700 Message-ID: <1241647906.4486.6.camel@mukti.sc.intel.com> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Keir Fraser Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org Keir, Just like the apicid, x2apicid is also unique to each cpu. x2apicid is coming from edx register of the cpuid leaf 0xb. Please Apply/comment. Signed-Off-By: Nitin A Kamble diff -r 08618cd10522 xen/arch/x86/hvm/hvm.c --- a/xen/arch/x86/hvm/hvm.c Mon May 04 14:13:49 2009 -0700 +++ b/xen/arch/x86/hvm/hvm.c Mon May 04 14:19:05 2009 -0700 @@ -1687,6 +1687,10 @@ *ebx |= (v->vcpu_id * 2) << 24; if ( vlapic_hw_disabled(vcpu_vlapic(v)) ) __clear_bit(X86_FEATURE_APIC & 31, edx); + } else if ( input == 0x0000000b ) + { + /* fix the x2apicid */ + *edx = v->vcpu_id * 2; } }