WARNING - OLD ARCHIVES

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/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] x86-64: enforce memory limits imposed by

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] x86-64: enforce memory limits imposed by virtual memory layout
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 17 Sep 2008 09:50:40 -0700
Delivery-date: Wed, 17 Sep 2008 09:52:19 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/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 1221577042 -3600
# Node ID 9ab9dadf4876fcab63fcc2e3a8ad13e87b1a8293
# Parent  15efb62ecf09efd07105b10a3b0b84eecfe8ec8f
x86-64: enforce memory limits imposed by virtual memory layout

... which currently means:
- The 1:1 map cannot deal with more than 1Tb.
- The m2p table can handle at most 8Tb.
- The page_info array can cover up to e.g. 1.6Gb (<=3D 64 CPUs) or
  1Tb (193-256 CPUs).

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>
---
 xen/arch/x86/e820.c |   22 ++++++++++++++++++++--
 1 files changed, 20 insertions(+), 2 deletions(-)

diff -r 15efb62ecf09 -r 9ab9dadf4876 xen/arch/x86/e820.c
--- a/xen/arch/x86/e820.c       Tue Sep 16 15:54:17 2008 +0100
+++ b/xen/arch/x86/e820.c       Tue Sep 16 15:57:22 2008 +0100
@@ -4,6 +4,7 @@
 #include <xen/compat.h>
 #include <xen/dmi.h>
 #include <asm/e820.h>
+#include <asm/mm.h>
 #include <asm/page.h>
 
 /* opt_mem: Limit of physical RAM. Any RAM beyond this point is ignored. */
@@ -327,7 +328,7 @@ static void __init clip_to_limit(uint64_
             continue;
         if ( warnmsg )
         {
-            snprintf(_warnmsg, sizeof(_warnmsg), warnmsg, (int)(limit>>30));
+            snprintf(_warnmsg, sizeof(_warnmsg), warnmsg, (long)(limit>>30));
             printk("WARNING: %s\n", _warnmsg);
         }
         printk("Truncating memory map to %lukB\n",
@@ -366,8 +367,25 @@ static void __init machine_specific_memo
 
 #ifdef __i386__
     clip_to_limit((1ULL << 30) * MACHPHYS_MBYTES,
-                  "Only the first %u GB of the physical memory map "
+                  "Only the first %lu GB of the physical memory map "
                   "can be accessed by Xen in 32-bit mode.");
+#else
+    {
+        unsigned long limit, mpt_limit, pft_limit;
+
+        limit = DIRECTMAP_VIRT_END - DIRECTMAP_VIRT_START;
+        mpt_limit = ((RDWR_MPT_VIRT_END - RDWR_MPT_VIRT_START)
+                     / sizeof(unsigned long)) << PAGE_SHIFT;
+        pft_limit = ((FRAMETABLE_VIRT_END - FRAMETABLE_VIRT_START)
+                     / sizeof(struct page_info)) << PAGE_SHIFT;
+        if ( limit > mpt_limit )
+            limit = mpt_limit;
+        if ( limit > pft_limit )
+            limit = pft_limit;
+        clip_to_limit(limit,
+                      "Only the first %lu GB of the physical "
+                      "memory map can be accessed by Xen.");
+    }
 #endif
 
     reserve_dmi_region();

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] x86-64: enforce memory limits imposed by virtual memory layout, Xen patchbot-unstable <=