--- xen-unstable/./xen/include/asm-x86/x86_32/page.h 2008-07-17 09:49:27.000000000 -0500 +++ xen-hpage/./xen/include/asm-x86/x86_32/page.h 2008-07-23 09:30:40.000000000 -0500 @@ -112,7 +112,7 @@ extern unsigned int PAGE_HYPERVISOR_NOCA * Disallow unused flag bits plus PAT/PSE, PCD, PWT and GLOBAL. * Permit the NX bit if the hardware supports it. */ -#define BASE_DISALLOW_MASK (0xFFFFF198U & ~_PAGE_NX) +#define BASE_DISALLOW_MASK (0xFFFFF118U & ~_PAGE_NX) #define L1_DISALLOW_MASK (BASE_DISALLOW_MASK | _PAGE_GNTTAB) #define L2_DISALLOW_MASK (BASE_DISALLOW_MASK) --- xen-unstable/./xen/include/asm-x86/x86_64/page.h 2008-07-17 09:49:27.000000000 -0500 +++ xen-hpage/./xen/include/asm-x86/x86_64/page.h 2008-07-23 09:30:40.000000000 -0500 @@ -109,7 +109,7 @@ typedef l4_pgentry_t root_pgentry_t; * Permit the NX bit if the hardware supports it. * Note that range [62:52] is available for software use on x86/64. */ -#define BASE_DISALLOW_MASK (0xFF800198U & ~_PAGE_NX) +#define BASE_DISALLOW_MASK (0xFF800118U & ~_PAGE_NX) #define L1_DISALLOW_MASK (BASE_DISALLOW_MASK | _PAGE_GNTTAB) #define L2_DISALLOW_MASK (BASE_DISALLOW_MASK) --- xen-unstable/./xen/arch/x86/mm.c 2008-07-17 09:49:27.000000000 -0500 +++ xen-hpage/./xen/arch/x86/mm.c 2008-07-23 09:30:40.000000000 -0500 @@ -755,6 +755,9 @@ get_page_from_l2e( MEM_LOG("Bad L2 flags %x", l2e_get_flags(l2e) & L2_DISALLOW_MASK); return 0; } + if ( l2e_get_flags(l2e) & _PAGE_PSE ) + return 1; + rc = get_page_and_type_from_pagenr(l2e_get_pfn(l2e), PGT_l1_page_table, d); if ( unlikely(!rc) ) @@ -948,6 +951,7 @@ void put_page_from_l1e(l1_pgentry_t l1e, static void put_page_from_l2e(l2_pgentry_t l2e, unsigned long pfn) { if ( (l2e_get_flags(l2e) & _PAGE_PRESENT) && + (!(l2e_get_flags(l2e) & _PAGE_PSE)) && (l2e_get_pfn(l2e) != pfn) ) put_page_and_type(l2e_get_page(l2e)); }