This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Home Products Support Community News


[Xen-changelog] [xen-unstable] x86: Fix Xen boot on 8-node AMD machines

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] x86: Fix Xen boot on 8-node AMD machines
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 23 May 2008 09:50:14 -0700
Delivery-date: Fri, 23 May 2008 09:50:29 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1211537719 -3600
# Node ID 5cc5b9c37c6d429502e75536822810219b23b033
# Parent  938ae6abe297867e165acedcef186b8a63dd2f18
x86: Fix Xen boot on 8-node AMD machines

In xen/arch/x86/cpu/amd.c the function disable_c1_ramping iterates
over the northbridges using NR_CPUS as an upper bound for the number of
nodes. If there are no more northbridges found, it stops iterating.
Sadly it just adds the northbridge number to 0x18 and uses this as a
PCI device number, so probing the 9th northbridge on an 8 node system will
be caught by the newly inserted assertion in pci_conf_read in current
unstable. We fix this by first querying the number of nodes from the
first northbridge to avoid the overflow.

Signed-off-by: Andre Przywara <andre.przywara@xxxxxxx>
Verified by Mark.Johnson@xxxxxxx
 xen/arch/x86/cpu/amd.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff -r 938ae6abe297 -r 5cc5b9c37c6d xen/arch/x86/cpu/amd.c
--- a/xen/arch/x86/cpu/amd.c    Fri May 23 10:57:03 2008 +0100
+++ b/xen/arch/x86/cpu/amd.c    Fri May 23 11:15:19 2008 +0100
@@ -74,9 +74,11 @@ static void disable_c1_ramping(void)
 static void disable_c1_ramping(void) 
        u8 pmm7;
-       int node;
-       for (node=0; node < NR_CPUS; node++) {
+       int node, nr_nodes;
+       /* Read the number of nodes from the first Northbridge. */
+       nr_nodes = ((pci_conf_read32(0, 0x18, 0x0, 0x60)>>4)&0x07)+1;
+       for (node = 0; node < nr_nodes; node++) {
                /* PMM7: bus=0, dev=0x18+node, function=0x3, register=0x87. */
                pmm7 = pci_conf_read8(0, 0x18+node, 0x3, 0x87);
                /* Invalid read means we've updated every Northbridge. */

Xen-changelog mailing list

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] x86: Fix Xen boot on 8-node AMD machines, Xen patchbot-unstable <=