|
@@ -1916,6 +1916,18 @@ void __init xen_setup_kernel_pagetable(pgd_t *pgd, unsigned long max_pfn)
|
|
/* Graft it onto L4[511][510] */
|
|
/* Graft it onto L4[511][510] */
|
|
copy_page(level2_kernel_pgt, l2);
|
|
copy_page(level2_kernel_pgt, l2);
|
|
|
|
|
|
|
|
+ /*
|
|
|
|
+ * Zap execute permission from the ident map. Due to the sharing of
|
|
|
|
+ * L1 entries we need to do this in the L2.
|
|
|
|
+ */
|
|
|
|
+ if (__supported_pte_mask & _PAGE_NX) {
|
|
|
|
+ for (i = 0; i < PTRS_PER_PMD; ++i) {
|
|
|
|
+ if (pmd_none(level2_ident_pgt[i]))
|
|
|
|
+ continue;
|
|
|
|
+ level2_ident_pgt[i] = pmd_set_flags(level2_ident_pgt[i], _PAGE_NX);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
/* Copy the initial P->M table mappings if necessary. */
|
|
/* Copy the initial P->M table mappings if necessary. */
|
|
i = pgd_index(xen_start_info->mfn_list);
|
|
i = pgd_index(xen_start_info->mfn_list);
|
|
if (i && i < pgd_index(__START_KERNEL_map))
|
|
if (i && i < pgd_index(__START_KERNEL_map))
|