[PATCH 2/2] xen: fix pinning when not using split pte locks

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Jeremy Fitzhardinge
Date: Tuesday, September 9, 2008 - 3:43 pm

We only pin PTE pages when using split PTE locks, so don't do the
pin/unpin when attaching/detaching pte pages to a pinned pagetable.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
---
 arch/x86/xen/enlighten.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

===================================================================
--- a/arch/x86/xen/enlighten.c
+++ b/arch/x86/xen/enlighten.c
@@ -864,7 +864,7 @@
 
 		if (!PageHighMem(page)) {
 			make_lowmem_page_readonly(__va(PFN_PHYS((unsigned long)pfn)));
-			if (level == PT_PTE)
+			if (level == PT_PTE && USE_SPLIT_PTLOCKS)
 				pin_pagetable_pfn(MMUEXT_PIN_L1_TABLE, pfn);
 		} else
 			/* make sure there are no stray mappings of
@@ -932,7 +932,7 @@
 
 	if (PagePinned(page)) {
 		if (!PageHighMem(page)) {
-			if (level == PT_PTE)
+			if (level == PT_PTE && USE_SPLIT_PTLOCKS)
 				pin_pagetable_pfn(MMUEXT_UNPIN_TABLE, pfn);
 			make_lowmem_page_readwrite(__va(PFN_PHYS(pfn)));
 		}


--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] Xen: Fix pte unpin BUG when !CONFIG_SMP, Alex Nixon, (Tue Sep 9, 4:25 am)
Re: [PATCH] Xen: Fix pte unpin BUG when !CONFIG_SMP, Ingo Molnar, (Tue Sep 9, 4:27 am)
Re: [PATCH] Xen: Fix pte unpin BUG when !CONFIG_SMP, Jeremy Fitzhardinge, (Tue Sep 9, 11:05 am)
Re: [PATCH] Xen: Fix pte unpin BUG when !CONFIG_SMP, Alex Nixon, (Tue Sep 9, 12:21 pm)
Re: [PATCH] Xen: Fix pte unpin BUG when !CONFIG_SMP, Jeremy Fitzhardinge, (Tue Sep 9, 1:37 pm)
Re: [PATCH] Xen: Fix pte unpin BUG when !CONFIG_SMP, Alex Nixon, (Tue Sep 9, 3:26 pm)
Re: [PATCH] Xen: Fix pte unpin BUG when !CONFIG_SMP, Jeremy Fitzhardinge, (Tue Sep 9, 3:28 pm)
[PATCH 1/2] mm: define USE_SPLIT_PTLOCKS rather than repea ..., Jeremy Fitzhardinge, (Tue Sep 9, 3:43 pm)
[PATCH 2/2] xen: fix pinning when not using split pte locks, Jeremy Fitzhardinge, (Tue Sep 9, 3:43 pm)
Re: [PATCH 2/2] xen: fix pinning when not using split pte ..., Jeremy Fitzhardinge, (Tue Sep 9, 4:29 pm)
Re: [PATCH 2/2] xen: fix pinning when not using split pte ..., Jeremy Fitzhardinge, (Tue Sep 9, 4:32 pm)