aboutsummaryrefslogtreecommitdiffstats
path: root/xen/arch/x86/srat.c
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2009-08-12 14:16:09 +0100
committerKeir Fraser <keir.fraser@citrix.com>2009-08-12 14:16:09 +0100
commit2606d3eec651a0e6d9b912df903f695db425e148 (patch)
tree5a4b9d84e841a50a6bf748cad19026350201f66f /xen/arch/x86/srat.c
parent6ebb9d5ec8073d416a743739dc27108d2649830b (diff)
downloadxen-2606d3eec651a0e6d9b912df903f695db425e148.tar.gz
xen-2606d3eec651a0e6d9b912df903f695db425e148.tar.bz2
xen-2606d3eec651a0e6d9b912df903f695db425e148.zip
x86 numa: fix nodes' memory parsing when SRAT table includes future-hotplug memory range
A node's future-hotplug memory range starts from very high end normally, e.g. 1TB, and is not continuous with its current existing memory range. It should not be covered by the global variable 'nodes' as it assumes the node's memory is continuous. Otherwise it can make nodes' memory ranges become very big and overlapped, and populate_memnodemap() fails. We can ignore future-hotplug memory range for now. Physical memory hotplug support in future will handle it. Signed-off-by: Yang Xiaowei <xiaowei.yang@intel.com>
Diffstat (limited to 'xen/arch/x86/srat.c')
-rw-r--r--xen/arch/x86/srat.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/xen/arch/x86/srat.c b/xen/arch/x86/srat.c
index f5fe812bf0..7f90e09685 100644
--- a/xen/arch/x86/srat.c
+++ b/xen/arch/x86/srat.c
@@ -189,10 +189,21 @@ acpi_numa_memory_affinity_init(struct acpi_srat_mem_affinity *ma)
bad_srat();
return;
}
- /* It is fine to add this area to the nodes data it will be used later*/
- if (ma->flags & ACPI_SRAT_MEM_HOT_PLUGGABLE)
- printk(KERN_INFO "SRAT: hot plug zone found %"PRIx64" - %"PRIx64" \n",
+ if (ma->flags & ACPI_SRAT_MEM_HOT_PLUGGABLE) {
+ if (page_is_ram_type(paddr_to_pfn(start), RAM_TYPE_CONVENTIONAL))
+ printk(KERN_INFO "SRAT: hot-pluggable zone found %"PRIx64" - %"PRIx64" \n",
start, end);
+ else {
+ /* TODO: This range contains no existing memory yet,
+ * and shouldn't be included in nodes' [start, end]. It
+ * will be covered with physical memory hotplug support
+ * in future.
+ */
+ printk(KERN_INFO "SRAT: future hotplug zone found %"PRIx64" - %"PRIx64" \n",
+ start, end);
+ return;
+ }
+ }
i = conflicting_nodes(start, end);
if (i == node) {
printk(KERN_WARNING