Nakajima, Jun
2006-Aug-30 06:43 UTC
[Xen-devel] [PATCH] Optimizing x86-64 xenlinux using global pages for user mode (take 2)
The previous patch had a problem with the builder, which constructs the initial page tables with the USER bit on. And Xen couldn''t distinguish kernel or use pages. It was partially checked avoiding the bug, and it''s finished with this patch. linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/hypervisor.h | 4 ++ linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/pgtable.h | 19 +++++----- tools/libxc/xc_linux_build.c | 3 + tools/libxc/xg_private.h | 3 + xen/arch/x86/domain_build.c | 2 - xen/arch/x86/flushtlb.c | 7 +++ xen/arch/x86/mm.c | 12 ++++-- xen/arch/x86/x86_64/traps.c | 2 - xen/include/asm-x86/flushtlb.h | 8 +++- xen/include/asm-x86/x86_64/page.h | 8 +++- 10 files changed, 50 insertions(+), 18 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
Keir Fraser
2006-Aug-30 21:18 UTC
Re: [Xen-devel] [PATCH] Optimizing x86-64 xenlinux using global pages for user mode (take 2)
On 30/8/06 7:43 am, "Nakajima, Jun" <jun.nakajima@intel.com> wrote:> The previous patch had a problem with the builder, which constructs the > initial page tables with the USER bit on. And Xen couldn''t distinguish > kernel or use pages. It was partially checked avoiding the bug, and it''s > finished with this patch.I''d like to avoid awareness of the extra PAGE_GUEST_KERNEL bit in guests and tools as much as possible (in fact, entirely would be good). There''s no need for all the PAGE_KERNEL macros in Linux to include the new flag. The absence of PAGE_USER will suffice to allow Xen to distinguish kernel entries from user entries. All that is necessary is for Xen to add the flag when it adds PAGE_USER to a kernel entry, so that kernel entries remain disambiguated from user entries. Also, you should use one of the high-order available bits (one of bits 52-60). Other OSes use the low-order available bits for their own purposes -- we may as well avoid conflicting with them. -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Nakajima, Jun
2006-Sep-01 17:56 UTC
RE: [Xen-devel] [PATCH] Optimizing x86-64 xenlinux using global pages for user mode (take 2)
Keir Fraser wrote:> On 30/8/06 7:43 am, "Nakajima, Jun" <jun.nakajima@intel.com> wrote: > >> The previous patch had a problem with the builder, which constructs >> the initial page tables with the USER bit on. And Xen couldn''t >> distinguish kernel or use pages. It was partially checked avoiding >> the bug, and it''s finished with this patch. > > I''d like to avoid awareness of the extra PAGE_GUEST_KERNEL bit in > guests and tools as much as possible (in fact, entirely would be > good).The updated patch avoids that.> > There''s no need for all the PAGE_KERNEL macros in Linux to include > the new flag. The absence of PAGE_USER will suffice to allow Xen to > distinguish kernel entries from user entries. All that is necessary > is for Xen to add the flag when it adds PAGE_USER to a kernel entry, > so that kernel entries remain disambiguated from user entries. > > Also, you should use one of the high-order available bits (one of bits > 52-60). Other OSes use the low-order available bits for their own > purposes -- we may as well avoid conflicting with them. >I used the bit 52 this time, but it''s still possible to see such conflicts.> -- Keirarch/x86/domain_build.c | 2 +- arch/x86/flushtlb.c | 7 +++++++ arch/x86/mm.c | 29 +++++++++++++++++++++++++---- arch/x86/x86_64/traps.c | 2 +- include/asm-x86/flushtlb.h | 8 +++++++- include/asm-x86/x86_64/page.h | 7 +++++-- 6 files changed, 46 insertions(+), 9 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