direct-io.hg
changeset 11397:358eacd440f1
[XEN] Clean up BASE_DISALLOW_MASK and fix for x86/64.
Original patch from Xiaohui Xin <xiaohui.xin@intel.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
Original patch from Xiaohui Xin <xiaohui.xin@intel.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
author | kaf24@firebug.cl.cam.ac.uk |
---|---|
date | Thu Aug 31 23:44:41 2006 +0100 (2006-08-31) |
parents | 9b2c574a9afc |
children | c5c567fdad11 |
files | xen/include/asm-x86/page.h xen/include/asm-x86/x86_32/page-2level.h xen/include/asm-x86/x86_32/page-3level.h xen/include/asm-x86/x86_32/page.h xen/include/asm-x86/x86_64/page.h |
line diff
1.1 --- a/xen/include/asm-x86/page.h Thu Aug 31 22:53:46 2006 +0100 1.2 +++ b/xen/include/asm-x86/page.h Thu Aug 31 23:44:41 2006 +0100 1.3 @@ -300,13 +300,6 @@ void setup_idle_pagetable(void); 1.4 #define _PAGE_GNTTAB 0 1.5 #endif 1.6 1.7 -/* 1.8 - * Disallow unused flag bits plus PAT, PSE and GLOBAL. 1.9 - * Also disallow GNTTAB if we are using it for grant-table debugging. 1.10 - * Permit the NX bit if the hardware supports it. 1.11 - */ 1.12 -#define BASE_DISALLOW_MASK ((0xFFFFF180U | _PAGE_GNTTAB) & ~_PAGE_NX) 1.13 - 1.14 #define __PAGE_HYPERVISOR \ 1.15 (_PAGE_PRESENT | _PAGE_RW | _PAGE_DIRTY | _PAGE_ACCESSED) 1.16 #define __PAGE_HYPERVISOR_NOCACHE \
2.1 --- a/xen/include/asm-x86/x86_32/page-2level.h Thu Aug 31 22:53:46 2006 +0100 2.2 +++ b/xen/include/asm-x86/x86_32/page-2level.h Thu Aug 31 23:44:41 2006 +0100 2.3 @@ -53,7 +53,4 @@ typedef l2_pgentry_t root_pgentry_t; 2.4 #define get_pte_flags(x) ((int)(x) & 0xFFF) 2.5 #define put_pte_flags(x) ((intpte_t)((x) & 0xFFF)) 2.6 2.7 -#define L1_DISALLOW_MASK BASE_DISALLOW_MASK 2.8 -#define L2_DISALLOW_MASK BASE_DISALLOW_MASK 2.9 - 2.10 #endif /* __X86_32_PAGE_2LEVEL_H__ */
3.1 --- a/xen/include/asm-x86/x86_32/page-3level.h Thu Aug 31 22:53:46 2006 +0100 3.2 +++ b/xen/include/asm-x86/x86_32/page-3level.h Thu Aug 31 23:44:41 2006 +0100 3.3 @@ -66,8 +66,6 @@ typedef l3_pgentry_t root_pgentry_t; 3.4 #define get_pte_flags(x) (((int)((x) >> 32) & ~0xFFF) | ((int)(x) & 0xFFF)) 3.5 #define put_pte_flags(x) (((intpte_t)((x) & ~0xFFF) << 32) | ((x) & 0xFFF)) 3.6 3.7 -#define L1_DISALLOW_MASK BASE_DISALLOW_MASK 3.8 -#define L2_DISALLOW_MASK BASE_DISALLOW_MASK 3.9 #define L3_DISALLOW_MASK 0xFFFFF1E6U /* must-be-zero */ 3.10 3.11 #endif /* __X86_32_PAGE_3LEVEL_H__ */
4.1 --- a/xen/include/asm-x86/x86_32/page.h Thu Aug 31 22:53:46 2006 +0100 4.2 +++ b/xen/include/asm-x86/x86_32/page.h Thu Aug 31 23:44:41 2006 +0100 4.3 @@ -26,6 +26,15 @@ extern unsigned int PAGE_HYPERVISOR_NOCA 4.4 #define GRANT_PTE_FLAGS \ 4.5 (_PAGE_PRESENT|_PAGE_ACCESSED|_PAGE_DIRTY|_PAGE_GNTTAB) 4.6 4.7 +/* 4.8 + * Disallow unused flag bits plus PAT, PSE and GLOBAL. 4.9 + * Permit the NX bit if the hardware supports it. 4.10 + */ 4.11 +#define BASE_DISALLOW_MASK (0xFFFFF180U & ~_PAGE_NX) 4.12 + 4.13 +#define L1_DISALLOW_MASK (BASE_DISALLOW_MASK | _PAGE_GNTTAB) 4.14 +#define L2_DISALLOW_MASK (BASE_DISALLOW_MASK) 4.15 + 4.16 #endif /* __X86_32_PAGE_H__ */ 4.17 4.18 /*
5.1 --- a/xen/include/asm-x86/x86_64/page.h Thu Aug 31 22:53:46 2006 +0100 5.2 +++ b/xen/include/asm-x86/x86_64/page.h Thu Aug 31 23:44:41 2006 +0100 5.3 @@ -75,8 +75,15 @@ typedef l4_pgentry_t root_pgentry_t; 5.4 #define _PAGE_NX_BIT (1U<<23) 5.5 #define _PAGE_NX (cpu_has_nx ? _PAGE_NX_BIT : 0U) 5.6 5.7 -#define L1_DISALLOW_MASK BASE_DISALLOW_MASK 5.8 -#define L2_DISALLOW_MASK BASE_DISALLOW_MASK 5.9 +/* 5.10 + * Disallow unused flag bits plus PAT, PSE and GLOBAL. 5.11 + * Permit the NX bit if the hardware supports it. 5.12 + * Note that range [62:52] is available for software use on x86/64. 5.13 + */ 5.14 +#define BASE_DISALLOW_MASK (0xFF000180U & ~_PAGE_NX) 5.15 + 5.16 +#define L1_DISALLOW_MASK (BASE_DISALLOW_MASK | _PAGE_GNTTAB) 5.17 +#define L2_DISALLOW_MASK (BASE_DISALLOW_MASK) 5.18 #define L3_DISALLOW_MASK (BASE_DISALLOW_MASK | 0x180U /* must-be-zero */) 5.19 #define L4_DISALLOW_MASK (BASE_DISALLOW_MASK | 0x180U /* must-be-zero */) 5.20