Hi, the HVM CPUID intercept does not mask out the local APIC ID bits in CPUID Fn0000_0001, bits 24-31 in EBX. This results in inconsistent values of subsequent calls to cpuid on the same VCPU (delivering the value of the physical CPU), depending on the current scheduling. This for instance confuses Linux'' NUMA code. The attached patch fixes this by replacing the physical APIC ID with the VCPU number, both in the VMX and SVM branches. Signed-off-by: Andre Przywara <andre.przywara@amd.com> I hope this does not trigger any side effects... Regards, Andre -- Andre Przywara AMD-Operating System Research Center (OSRC), Dresden, Germany Tel: +49 351 277-84917 ----to satisfy European Law for business letters: AMD Saxony Limited Liability Company & Co. KG, Wilschdorfer Landstr. 101, 01109 Dresden, Germany Register Court Dresden: HRA 4896, General Partner authorized to represent: AMD Saxony LLC (Wilmington, Delaware, US) General Manager of AMD Saxony LLC: Dr. Hans-R. Deppe, Thomas McCoy _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Keir Fraser
2008-Feb-07 08:19 UTC
[Xen-devel] Re: [PATCH] hvm: Fix APIC-ID cpuid intercept
On 6/2/08 22:44, "Andre Przywara" <andre.przywara@amd.com> wrote:> the HVM CPUID intercept does not mask out the local APIC ID bits in > CPUID Fn0000_0001, bits 24-31 in EBX. This results in inconsistent > values of subsequent calls to cpuid on the same VCPU (delivering the > value of the physical CPU), depending on the current scheduling. This > for instance confuses Linux'' NUMA code. > The attached patch fixes this by replacing the physical APIC ID with the > VCPU number, both in the VMX and SVM branches. > > Signed-off-by: Andre Przywara <andre.przywara@amd.com> > > I hope this does not trigger any side effects...I''m sure it can''t do worse than the current broken behaviour! Thanks, Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel