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] linux/x86-64: force _PAGE_NX on the 1:1 m

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] linux/x86-64: force _PAGE_NX on the 1:1 mapping (matching native)
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 04 Jun 2007 03:15:40 -0700
Delivery-date: Mon, 04 Jun 2007 03:30:02 -0700
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 kfraser@xxxxxxxxxxxxxxxxxxxxx
# Date 1180015951 -3600
# Node ID 1fde9ebb8019c0f7079ffbc5ba800abcc9b1f882
# Parent  965bf43c9f1139135c2956cf90f916c335fd8e77
linux/x86-64: force _PAGE_NX on the 1:1 mapping (matching native)
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>
---
 linux-2.6-xen-sparse/arch/x86_64/mm/init-xen.c |   17 +++++++----------
 1 files changed, 7 insertions(+), 10 deletions(-)

diff -r 965bf43c9f11 -r 1fde9ebb8019 
linux-2.6-xen-sparse/arch/x86_64/mm/init-xen.c
--- a/linux-2.6-xen-sparse/arch/x86_64/mm/init-xen.c    Thu May 24 14:07:40 
2007 +0100
+++ b/linux-2.6-xen-sparse/arch/x86_64/mm/init-xen.c    Thu May 24 15:12:31 
2007 +0100
@@ -479,18 +479,15 @@ phys_pmd_init(pmd_t *pmd, unsigned long 
                pte = alloc_static_page(&pte_phys);
                pte_save = pte;
                for (k = 0; k < PTRS_PER_PTE; pte++, k++, address += PTE_SIZE) {
+                       unsigned long pteval = address | _PAGE_NX | 
_KERNPG_TABLE;
+
                        if ((address >= end) ||
                            ((address >> PAGE_SHIFT) >=
-                            xen_start_info->nr_pages)) { 
-                               __set_pte(pte, __pte(0)); 
-                               continue;
-                       }
-                       if (make_readonly(address)) {
-                               __set_pte(pte, 
-                                         __pte(address | (_KERNPG_TABLE & 
~_PAGE_RW)));
-                               continue;
-                       }
-                       __set_pte(pte, __pte(address | _KERNPG_TABLE));
+                            xen_start_info->nr_pages))
+                               pteval = 0;
+                       else if (make_readonly(address))
+                               pteval &= ~_PAGE_RW;
+                       __set_pte(pte, __pte(pteval & __supported_pte_mask));
                }
                pte = pte_save;
                early_make_page_readonly(pte, XENFEAT_writable_page_tables);

_______________________________________________
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] linux/x86-64: force _PAGE_NX on the 1:1 mapping (matching native), Xen patchbot-unstable <=