[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] x86, shadow: Allow removing writable mappings from splintered page tables.
# HG changeset patch # User Keir Fraser <keir.fraser@xxxxxxxxxx> # Date 1221474882 -3600 # Node ID c353f07bae84133a83ec1dbf54bc5f868fd45bb2 # Parent 8f456fcd8af115672a2e7a310403fc4d9f125b75 x86, shadow: Allow removing writable mappings from splintered page tables. The moving of the pagetable mapping in the linux kernel exposed the fact that under the linux kernel sh_rm_write_access_from_sl1p was always failing. Linux seems to use big pages to access page tables, so we should instruct the shadow code to be able to remove writable mappings from splintered pagetables as well, avoiding using OS heuristic (which were failing in 2.6.27 before George patch, leading to brute-force search at each resync). Signed-off-by: Gianluca Guida <gianluca.guida@xxxxxxxxxxxxx> --- xen/arch/x86/mm/shadow/common.c | 11 +++++++---- xen/arch/x86/mm/shadow/multi.c | 3 ++- 2 files changed, 9 insertions(+), 5 deletions(-) diff -r 8f456fcd8af1 -r c353f07bae84 xen/arch/x86/mm/shadow/common.c --- a/xen/arch/x86/mm/shadow/common.c Sat Sep 13 08:15:26 2008 +0100 +++ b/xen/arch/x86/mm/shadow/common.c Mon Sep 15 11:34:42 2008 +0100 @@ -2464,22 +2464,25 @@ int sh_remove_write_access_from_sl1p(str ASSERT(mfn_valid(smfn)); ASSERT(mfn_valid(gmfn)); - if ( sp->type == SH_type_l1_32_shadow ) + if ( sp->type == SH_type_l1_32_shadow + || sp->type == SH_type_fl1_32_shadow ) { return SHADOW_INTERNAL_NAME(sh_rm_write_access_from_sl1p,2) (v, gmfn, smfn, off); } #if CONFIG_PAGING_LEVELS >= 3 - else if ( sp->type == SH_type_l1_pae_shadow ) + else if ( sp->type == SH_type_l1_pae_shadow + || sp->type == SH_type_fl1_pae_shadow ) return SHADOW_INTERNAL_NAME(sh_rm_write_access_from_sl1p,3) (v, gmfn, smfn, off); #if CONFIG_PAGING_LEVELS >= 4 - else if ( sp->type == SH_type_l1_64_shadow ) + else if ( sp->type == SH_type_l1_64_shadow + || sp->type == SH_type_fl1_64_shadow ) return SHADOW_INTERNAL_NAME(sh_rm_write_access_from_sl1p,4) (v, gmfn, smfn, off); #endif #endif - + return 0; } #endif diff -r 8f456fcd8af1 -r c353f07bae84 xen/arch/x86/mm/shadow/multi.c --- a/xen/arch/x86/mm/shadow/multi.c Sat Sep 13 08:15:26 2008 +0100 +++ b/xen/arch/x86/mm/shadow/multi.c Mon Sep 15 11:34:42 2008 +0100 @@ -4539,7 +4539,8 @@ int sh_rm_write_access_from_sl1p(struct sp = mfn_to_shadow_page(smfn); if ( sp->mbz != 0 - || (sp->type != SH_type_l1_shadow) ) + || (sp->type != SH_type_l1_shadow + && sp->type != SH_type_fl1_shadow) ) goto fail; sl1p = sh_map_domain_page(smfn); _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |