[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH] [x86_64] Fixing PGT_va_mutable and PGT_va_unknown
This patch ensures that type_info is always greater than PGT_va_unknown if PGT_va_mutable is set. Today, some (rare) cases (#PF in the kernel address space, such vmalloc handling) are unnecessarily sent to the emulation code. int ptwr_do_page_fault(struct domain *d, unsigned long addr, struct cpu_user_regs *regs) { unsigned long pfn; ... if ( unlikely(l2_idx >= PGT_va_unknown) ) goto emulate; /* Urk! This L1 is mapped in multiple L2 slots! */ Signed-off-by: Jun Nakajima <jun.nakajima@xxxxxxxxx> diff -r f2e241ecf1c3 -r f89a34a65e7d xen/include/asm-x86/mm.h --- a/xen/include/asm-x86/mm.h Mon Aug 15 01:10:47 2005 +++ b/xen/include/asm-x86/mm.h Mon Aug 15 03:31:27 2005 @@ -88,14 +88,11 @@ #elif defined(__x86_64__) /* The 27 most significant bits of virt address if this is a page table. */ #define PGT_va_shift 32 -#define PGT_va_mask ((unsigned long)((1U<<28)-1)<<PGT_va_shift) +#define PGT_va_mask ((unsigned long)((1U<<29)-1)<<PGT_va_shift) /* Is the back pointer still mutable (i.e. not fixed yet)? */ - /* Use PML4 slot for HYPERVISOR_VIRT_START. - 18 = L4_PAGETABLE_SHIFT - L2_PAGETABLE_SHIFT */ -#define PGT_va_mutable ((unsigned long)(256U<<18)<<PGT_va_shift) +#define PGT_va_mutable ((unsigned long)(1U<<28)<<PGT_va_shift) /* Is the back pointer unknown (e.g., p.t. is mapped at multiple VAs)? */ - /* Use PML4 slot for HYPERVISOR_VIRT_START + 1 */ -#define PGT_va_unknown ((unsigned long)(257U<<18)<<PGT_va_shift) +#define PGT_va_unknown ((unsigned long)((1U<<28)-1)<<PGT_va_shift) #endif /* 16-bit count of uses of this frame as its current type. */ Jun --- Intel Open Source Technology Center Attachment:
mm_h.patch _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |