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-devel

[Xen-devel] [PATCH] linux/x86-64: fix phys_pmd_init() (regression from c

To: <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] linux/x86-64: fix phys_pmd_init() (regression from c/s 547)
From: "Jan Beulich" <JBeulich@xxxxxxxxxx>
Date: Thu, 28 May 2009 14:14:53 +0100
Delivery-date: Thu, 28 May 2009 06:16:36 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
I didn't pay attention to the fact that 'end' must always be an upper
bound, while xen_start_info->nr_pages must be additionally during boot.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>

--- a/arch/x86_64/mm/init-xen.c
+++ b/arch/x86_64/mm/init-xen.c
@@ -457,9 +457,9 @@ phys_pmd_init(pmd_t *pmd_page, unsigned 
                for (k = 0; k < PTRS_PER_PTE; pte++, k++, address += PTE_SIZE) {
                        unsigned long pteval = address | _PAGE_NX | 
_KERNPG_TABLE;
 
-                       if (address >= (after_bootmem
-                                       ? end
-                                       : xen_start_info->nr_pages << 
PAGE_SHIFT))
+                       if (address >= end ||
+                           (!after_bootmem &&
+                            (address >> PAGE_SHIFT) >= 
xen_start_info->nr_pages))
                                pteval = 0;
                        else if (make_readonly(address))
                                pteval &= ~_PAGE_RW;




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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] linux/x86-64: fix phys_pmd_init() (regression from c/s 547), Jan Beulich <=