aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/x86/xen/enlighten.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c
index 16e2f8096a1a..f16b056e5c56 100644
--- a/arch/x86/xen/enlighten.c
+++ b/arch/x86/xen/enlighten.c
@@ -689,8 +689,6 @@ static void xen_alloc_ptpage(struct mm_struct *mm, u32 pfn, unsigned level)
689 make_lowmem_page_readonly(__va(PFN_PHYS(pfn))); 689 make_lowmem_page_readonly(__va(PFN_PHYS(pfn)));
690 if (level == PT_PTE) 690 if (level == PT_PTE)
691 pin_pagetable_pfn(MMUEXT_PIN_L1_TABLE, pfn); 691 pin_pagetable_pfn(MMUEXT_PIN_L1_TABLE, pfn);
692 else if (level == PT_PMD)
693 pin_pagetable_pfn(MMUEXT_PIN_L2_TABLE, pfn);
694 } else 692 } else
695 /* make sure there are no stray mappings of 693 /* make sure there are no stray mappings of
696 this page */ 694 this page */
@@ -715,7 +713,8 @@ static void xen_release_ptpage(u32 pfn, unsigned level)
715 713
716 if (PagePinned(page)) { 714 if (PagePinned(page)) {
717 if (!PageHighMem(page)) { 715 if (!PageHighMem(page)) {
718 pin_pagetable_pfn(MMUEXT_UNPIN_TABLE, pfn); 716 if (level == PT_PTE)
717 pin_pagetable_pfn(MMUEXT_UNPIN_TABLE, pfn);
719 make_lowmem_page_readwrite(__va(PFN_PHYS(pfn))); 718 make_lowmem_page_readwrite(__va(PFN_PHYS(pfn)));
720 } 719 }
721 } 720 }