lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.64.0705070030380.1899@chino.kir.corp.google.com>
Date:	Mon, 7 May 2007 09:35:14 -0700 (PDT)
From:	David Rientjes <rientjes@...gle.com>
To:	Andi Kleen <ak@...e.de>
cc:	linux-kernel@...r.kernel.org
Subject: [patch 4/4] x86_64 numa: fake apicid_to_node mapping for fake numa

When we are in the emulated NUMA case, we need to make sure that all
existing apicid_to_node mappings that point to real node ID's now point
to the equivalent fake node ID's.

Signed-off-by: David Rientjes <rientjes@...gle.com>
---
 arch/x86_64/mm/srat.c |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/arch/x86_64/mm/srat.c b/arch/x86_64/mm/srat.c
--- a/arch/x86_64/mm/srat.c
+++ b/arch/x86_64/mm/srat.c
@@ -472,7 +472,7 @@ static int __init find_node_by_addr(const struct bootnode *nodes,
  */
 void __init acpi_fake_nodes(const struct bootnode *fake_nodes, int num_nodes)
 {
-	int i;
+	int i, j;
 
 	printk(KERN_INFO "Faking PXM affinity for fake nodes on real "
 			 "topology.\n");
@@ -486,6 +486,13 @@ void __init acpi_fake_nodes(const struct bootnode *fake_nodes, int num_nodes)
 		if (nid == NUMA_NO_NODE)
 			continue;
 		__acpi_map_pxm_to_node(pxm, nid);
+		/*
+		 * For each apicid-to-node mapping that exists for this real
+		 * node, it must now point to the fake node ID.
+		 */
+		for (j = 0; j < MAX_LOCAL_APIC; j++)
+			if (apicid_to_node[j] == i)
+				apicid_to_node[j] = nid;
 	}
 
 	nodes_clear(nodes_parsed);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ