Nakajima, Jun
2005-Aug-08 08:03 UTC
[Xen-devel] [PATCH 1/2] Writable pagetable support for x86_64 xenlinux (xen part)
Attached is a patch to xen. I would like thank Ian/Keir for the design suggestions. arch/x86/audit.c | 62 ++++++---- arch/x86/domain.c | 6 - arch/x86/mm.c | 238 ++++++++++++++++++++++++++++++------------ arch/x86/shadow32.c | 2 arch/x86/shadow_public.c | 6 - arch/x86/traps.c | 11 + common/grant_table.c | 2 include/asm-x86/mm.h | 28 +++- include/asm-x86/page.h | 27 ++-- include/asm-x86/shadow.h | 13 +- include/asm-x86/x86_64/page.h | 3 11 files changed, 271 insertions(+), 127 deletions(-) Signed-off-by: Jun Nakajima <jun.nakajima@intel.com> Jun --- Intel Open Source Technology Center _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Nakajima, Jun
2005-Aug-09 07:59 UTC
[Xen-devel] RE: [PATCH 1/2] Writable pagetable support for x86_64 xenlinux (xen part)
Now _SMP_ x86_64 kernel works fine with writable pagetable! This _additional_ patch ptwr-smp.patch (just a single line change, effectively + minor bug fix) is required to get SMP kernel working. The first patch (ptwr-xen.patch) is also attached for convenience. Once these two are (ptwr-xen.patch & ptwr-smp.patch) applied to Xen, the patch for x86_64 xenlinux (already sent) is required to activate writable pagetable. One ugly code that I don''t like is __not_mapped(l2_pgentry_t *pl2e). Any idea for doing it better? I used a patch from Chris/Xin for the x86_64 SMP kernel. Probably he has more updates there. Nakajima, Jun wrote:> Attached is a patch to xen. I would like thank Ian/Keir for the > design suggestions. > > arch/x86/audit.c | 62 ++++++---- > arch/x86/domain.c | 6 - > arch/x86/mm.c | 238 > ++++++++++++++++++++++++++++++------------ arch/x86/shadow32.c > | 2 arch/x86/shadow_public.c | 6 - > arch/x86/traps.c | 11 + > common/grant_table.c | 2 > include/asm-x86/mm.h | 28 +++- > include/asm-x86/page.h | 27 ++-- > include/asm-x86/shadow.h | 13 +- > include/asm-x86/x86_64/page.h | 3 > 11 files changed, 271 insertions(+), 127 deletions(-) > > Signed-off-by: Jun Nakajima <jun.nakajima@intel.com> > > Jun > --- > Intel Open Source Technology CenterJun --- Intel Open Source Technology Center _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Keir Fraser
2005-Aug-09 10:51 UTC
Re: [Xen-devel] RE: [PATCH 1/2] Writable pagetable support for x86_64 xenlinux (xen part)
On 9 Aug 2005, at 08:59, Nakajima, Jun wrote:> One ugly code that I don''t like is __not_mapped(l2_pgentry_t *pl2e). > Any > idea for doing it better? > > I used a patch from Chris/Xin for the x86_64 SMP kernel. Probably he > has > more updates there.i checked in a cleaned up version of your SMP patch, as part of some wider-ranging cleanups of your previous wrpt patch. A couple of notes on that: 1. I got rid of __not_mapped(). It should suffice to attempt the access through the linear mapping and handle the possible fault. 2. You had gross CONFIG_X86_64-specific tests in get_page_type(). I cannot see how any good could possible come of them so I removed them. Either you need a good justification why they''re needed or, if they actually fixed observed problems, I think there must be some underlying bug that those conditional sections of code were masking. Either way, this needs looking at. -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel