Kay, Allen M
2006-Mar-03 01:54 UTC
[Xen-devel] [PATCH] Fix network connectivity problem in dom0 on Yonah/Napa Platform
The original code only calls io_apic_get_unique_id() for P4 or earlier processors by checking for CPU family < 15. However, this check does not apply to Yonah family of processors whose CPU family value is 6. This caused io_apic_get_unique_id() being called in Xen but not in Dom0 since the code in Dom0 has been ifdef''ed out. The end result is IOAPIC ID mismatch between Xen and Dom0 - which caused IOAPIC not being programmed at all. This patch generalizes earlier code by checking for LAPIC version number < 0x14 instead of CPU family - hence covers both P4 and new P6 family processors such as Yonah. Signed-Off-By: Allen M. Kay <allen.m.kay@intel.com> diff -r 0807931dfa54 xen/arch/x86/mpparse.c --- a/xen/arch/x86/mpparse.c Fri Feb 24 15:37:09 2006 +++ b/xen/arch/x86/mpparse.c Thu Mar 2 17:24:12 2006 @@ -935,7 +935,9 @@ mp_ioapics[idx].mpc_apicaddr = address; set_fixmap_nocache(FIX_IO_APIC_BASE_0 + idx, address); - if ((boot_cpu_data.x86_vendor == X86_VENDOR_INTEL) && (boot_cpu_data.x86 < 15)) + if ((boot_cpu_data.x86_vendor == X86_VENDOR_INTEL) && + (GET_APIC_VERSION(apic_read(APIC_LVR)) < 0x14)) + mp_ioapics[idx].mpc_apicid = io_apic_get_unique_id(idx, id); else mp_ioapics[idx].mpc_apicid = id; _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Kay, Allen M
2006-Mar-03 02:29 UTC
RE: [Xen-devel] [PATCH] Fix network connectivity problem in dom0 on Yonah/Napa Platform
Resending with the same patch in the attachment. Allen ________________________________ From: Kay, Allen M Sent: Thursday, March 02, 2006 5:54 PM To: ''xen-devel@lists.xensource.com'' Subject: [Xen-devel] [PATCH] Fix network connectivity problem in dom0 on Yonah/Napa Platform The original code only calls io_apic_get_unique_id() for P4 or earlier processors by checking for CPU family < 15. However, this check does not apply to Yonah family of processors whose CPU family value is 6. This caused io_apic_get_unique_id() being called in Xen but not in Dom0 since the code in Dom0 has been ifdef''ed out. The end result is IOAPIC ID mismatch between Xen and Dom0 - which caused IOAPIC not being programmed at all. This patch generalizes earlier code by checking for LAPIC version number < 0x14 instead of CPU family - hence covers both P4 and new P6 family processors such as Yonah. Signed-Off-By: Allen M. Kay <allen.m.kay@intel.com> diff -r 0807931dfa54 xen/arch/x86/mpparse.c --- a/xen/arch/x86/mpparse.c Fri Feb 24 15:37:09 2006 +++ b/xen/arch/x86/mpparse.c Thu Mar 2 17:24:12 2006 @@ -935,7 +935,9 @@ mp_ioapics[idx].mpc_apicaddr = address; set_fixmap_nocache(FIX_IO_APIC_BASE_0 + idx, address); - if ((boot_cpu_data.x86_vendor == X86_VENDOR_INTEL) && (boot_cpu_data.x86 < 15)) + if ((boot_cpu_data.x86_vendor == X86_VENDOR_INTEL) && + (GET_APIC_VERSION(apic_read(APIC_LVR)) < 0x14)) + mp_ioapics[idx].mpc_apicid = io_apic_get_unique_id(idx, id); else mp_ioapics[idx].mpc_apicid = id; _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Keir Fraser
2006-Mar-03 14:06 UTC
Re: [Xen-devel] [PATCH] Fix network connectivity problem in dom0 on Yonah/Napa Platform
On 3 Mar 2006, at 01:54, Kay, Allen M wrote:> The original code only calls io_apic_get_unique_id() for P4 or earlier > processors by checking for CPU family < 15. However, this check does > not apply to Yonah family of processors whose CPU family value is 6. > This caused io_apic_get_unique_id() being called in Xen but not in > Dom0 since the code in Dom0 has been ifdef’ed out. The end result is > IOAPIC ID mismatch between Xen and Dom0 - which caused IOAPIC not > being programmed at all. This patch generalizes earlier code by > checking for LAPIC version number < 0x14 instead of CPU family - hence > covers both P4 and new P6 family processors such as Yonah.I checked in an alternative patch so that domain0 identifies IOAPICs by their physical base address rather than their apicid. That seems a more reliable method of identification and should fix your oberved problems with Yonah chipsets. -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel