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: Fix 16889:60bb765b25b5 in a couple o

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] x86: Fix 16889:60bb765b25b5 in a couple of respects:
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 29 Jan 2008 07:40:08 -0800
Delivery-date: Tue, 29 Jan 2008 07:40:06 -0800
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 1201599397 0
# Node ID e23144190f93900a0f5411461a1e16ba69d05c50
# Parent  01e178f7ec6da1d2402d6af5d8b755b9907b6c1f
x86: Fix 16889:60bb765b25b5 in a couple of respects:
 1. Leave bottom-most 1MB permanently mapped.
 2. ACPI-table mapping code shoudl be aware that mappings above 1MB of
 non-RAM are not permanent.
Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
 xen/arch/x86/acpi/boot.c |    3 ++-
 xen/arch/x86/mm.c        |   11 ++++++-----
 2 files changed, 8 insertions(+), 6 deletions(-)

diff -r 01e178f7ec6d -r e23144190f93 xen/arch/x86/acpi/boot.c
--- a/xen/arch/x86/acpi/boot.c  Mon Jan 28 12:58:57 2008 +0000
+++ b/xen/arch/x86/acpi/boot.c  Tue Jan 29 09:36:37 2008 +0000
@@ -110,7 +110,8 @@ char *__acpi_map_table(unsigned long phy
        unsigned long base, offset, mapped_size;
        int idx;
 
-       if (phys + size < 8 * 1024 * 1024)
+       /* XEN: RAM holes above 1MB are not permanently mapped. */
+       if (phys + size < 1 * 1024 * 1024)
                return __va(phys);
 
        offset = phys & (PAGE_SIZE - 1);
diff -r 01e178f7ec6d -r e23144190f93 xen/arch/x86/mm.c
--- a/xen/arch/x86/mm.c Mon Jan 28 12:58:57 2008 +0000
+++ b/xen/arch/x86/mm.c Tue Jan 29 09:36:37 2008 +0000
@@ -207,7 +207,7 @@ void __init arch_init_memory(void)
 {
     extern void subarch_init_memory(void);
 
-    unsigned long i, pfn, rstart_pfn, rend_pfn, ioend_pfn;
+    unsigned long i, pfn, rstart_pfn, rend_pfn, iostart_pfn, ioend_pfn;
 
     /*
      * Initialise our DOMID_XEN domain.
@@ -252,17 +252,18 @@ void __init arch_init_memory(void)
         }
 
         /*
-         * Make sure any Xen mappings are blown away.
+         * Make sure any Xen mappings of RAM holes above 1MB are blown away.
          * In particular this ensures that RAM holes are respected even in
-         * the statically-initialised 0-16MB mapping area.
+         * the statically-initialised 1-16MB mapping area.
          */
+        iostart_pfn = max_t(unsigned long, pfn, 1UL << (20 - PAGE_SHIFT));
         ioend_pfn = rstart_pfn;
 #if defined(CONFIG_X86_32)
         ioend_pfn = min_t(unsigned long, ioend_pfn,
                           DIRECTMAP_MBYTES << (20 - PAGE_SHIFT));
 #endif
-        if ( pfn < ioend_pfn )            
-            destroy_xen_mappings((unsigned long)mfn_to_virt(pfn),
+        if ( iostart_pfn < ioend_pfn )            
+            destroy_xen_mappings((unsigned long)mfn_to_virt(iostart_pfn),
                                  (unsigned long)mfn_to_virt(ioend_pfn));
 
         /* Mark as I/O up to next RAM 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: Fix 16889:60bb765b25b5 in a couple of respects:, Xen patchbot-unstable <=