From: Gianluca Guida <gianluca.guida@eu.citrix.com>
To: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
Cc: deshantm@gmail.com
Subject: [PATCH] Allow removing writable mappings from splintered page tables.
Date: Fri, 12 Sep 2008 17:51:37 +0100 [thread overview]
Message-ID: <48CA9E19.2030201@eu.citrix.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 632 bytes --]
Hello,
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).
Todd: Can you try try the linux-2.6.27 kernbench with the following patch?
Also, are you using ioemu stub-domains? That should also give a
performance gain.
Thanks,
Gianluca
[-- Attachment #2: fix_linux_hvm.patch --]
[-- Type: text/x-patch, Size: 1719 bytes --]
diff -r dbac9ee4d761 xen/arch/x86/mm/shadow/common.c
--- a/xen/arch/x86/mm/shadow/common.c Mon Sep 08 16:02:13 2008 +0100
+++ b/xen/arch/x86/mm/shadow/common.c Fri Sep 12 17:40:31 2008 +0100
@@ -2462,22 +2462,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 dbac9ee4d761 xen/arch/x86/mm/shadow/multi.c
--- a/xen/arch/x86/mm/shadow/multi.c Mon Sep 08 16:02:13 2008 +0100
+++ b/xen/arch/x86/mm/shadow/multi.c Fri Sep 12 17:40:31 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);
[-- Attachment #3: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
next reply other threads:[~2008-09-12 16:51 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-12 16:51 Gianluca Guida [this message]
2008-09-12 17:08 ` [PATCH] Allow removing writable mappings from splintered page tables Todd Deshane
2008-09-12 17:14 ` Gianluca Guida
2008-09-12 18:28 ` Samuel Thibault
2008-09-12 19:52 ` Todd Deshane
2008-09-12 22:13 ` Todd Deshane
2008-09-15 10:38 ` George Dunlap
2008-09-15 16:30 ` Todd Deshane
2008-09-15 17:03 ` George Dunlap
2008-09-16 13:46 ` George Dunlap
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=48CA9E19.2030201@eu.citrix.com \
--to=gianluca.guida@eu.citrix.com \
--cc=deshantm@gmail.com \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.