summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'trunk/2.6.22/20072_xen-x86_64-physmap-nx.patch1')
-rw-r--r--trunk/2.6.22/20072_xen-x86_64-physmap-nx.patch136
1 files changed, 36 insertions, 0 deletions
diff --git a/trunk/2.6.22/20072_xen-x86_64-physmap-nx.patch1 b/trunk/2.6.22/20072_xen-x86_64-physmap-nx.patch1
new file mode 100644
index 0000000..0da1777
--- /dev/null
+++ b/trunk/2.6.22/20072_xen-x86_64-physmap-nx.patch1
@@ -0,0 +1,36 @@
+From: jbeulich@novell.com
+Subject: force _PAGE_NX on the 1:1 mapping (matching native)
+Patch-mainline: obsolete
+
+---
+ arch/x86_64/mm/init-xen.c | 17 +++++++----------
+ 1 file changed, 7 insertions(+), 10 deletions(-)
+
+--- a/arch/x86_64/mm/init-xen.c 2007-08-27 14:01:27.000000000 -0400
++++ b/arch/x86_64/mm/init-xen.c 2007-08-27 14:01:27.000000000 -0400
+@@ -490,18 +490,15 @@ phys_pmd_init(pmd_t *pmd_page, unsigned
+ 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 >= (after_bootmem
+ ? end
+- : xen_start_info->nr_pages << PAGE_SHIFT)) {
+- __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 << PAGE_SHIFT))
++ 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);