Changeset 12360 in vbox
- Timestamp:
- Sep 10, 2008 3:02:01 PM (16 years ago)
- Location:
- trunk/src/VBox
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/Support/linux/SUPDrv-linux.c
r12115 r12360 123 123 # error "CONFIG_X86_HIGH_ENTRY is not supported by VBoxDrv at this time." 124 124 #endif 125 126 /*127 * This sucks soooo badly on x86! Why don't they export __PAGE_KERNEL_EXEC so PAGE_KERNEL_EXEC would be usable?128 */129 #if defined(RT_ARCH_AMD64)130 # define MY_PAGE_KERNEL_EXEC PAGE_KERNEL_EXEC131 #elif defined(PAGE_KERNEL_EXEC) && defined(CONFIG_X86_PAE)132 # define MY_PAGE_KERNEL_EXEC __pgprot(cpu_has_pge ? _PAGE_KERNEL_EXEC | _PAGE_GLOBAL : _PAGE_KERNEL_EXEC)133 #else134 # define MY_PAGE_KERNEL_EXEC PAGE_KERNEL135 #endif136 137 /*138 * The redhat hack section.139 * - The current hacks are for 2.4.21-15.EL only.140 */141 #ifndef NO_REDHAT_HACKS142 /* accounting. */143 # if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 0)144 # ifdef VM_ACCOUNT145 # define MY_DO_MUNMAP(a,b,c) do_munmap(a, b, c, 0) /* should it be 1 or 0? */146 # endif147 # endif148 149 /* backported remap_page_range. */150 # if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 0)151 # include <asm/tlb.h>152 # ifdef tlb_vma /* probably not good enough... */153 # define HAVE_26_STYLE_REMAP_PAGE_RANGE 1154 # endif155 # endif156 157 #endif /* !NO_REDHAT_HACKS */158 159 160 #ifndef MY_DO_MUNMAP161 # define MY_DO_MUNMAP(a,b,c) do_munmap(a, b, c)162 #endif163 164 125 165 126 #ifdef CONFIG_X86_LOCAL_APIC -
trunk/src/VBox/Runtime/r0drv/linux/alloc-r0drv-linux.c
r8245 r12360 132 132 else 133 133 # endif 134 pHdr = (PRTMEMHDR)__vmalloc(cb + sizeof(*pHdr), GFP_KERNEL | __GFP_HIGHMEM, PAGE_KERNEL_EXEC);134 pHdr = (PRTMEMHDR)__vmalloc(cb + sizeof(*pHdr), GFP_KERNEL | __GFP_HIGHMEM, MY_PAGE_KERNEL_EXEC); 135 135 136 136 #elif defined(PAGE_KERNEL_EXEC) && defined(CONFIG_X86_PAE) 137 pHdr = (PRTMEMHDR)__vmalloc(cb + sizeof(*pHdr), GFP_KERNEL | __GFP_HIGHMEM, 138 __pgprot(cpu_has_pge ? _PAGE_KERNEL_EXEC | _PAGE_GLOBAL : _PAGE_KERNEL_EXEC)); 137 pHdr = (PRTMEMHDR)__vmalloc(cb + sizeof(*pHdr), GFP_KERNEL | __GFP_HIGHMEM, MY_PAGE_KERNEL_EXEC); 139 138 #else 140 139 pHdr = (PRTMEMHDR)vmalloc(cb + sizeof(*pHdr)); -
trunk/src/VBox/Runtime/r0drv/linux/the-linux-kernel.h
r10935 r12360 188 188 # define MY_PAGE_KERNEL_EXEC PAGE_KERNEL_EXEC 189 189 #elif defined(PAGE_KERNEL_EXEC) && defined(CONFIG_X86_PAE) 190 # define MY_PAGE_KERNEL_EXEC __pgprot(cpu_has_pge ? _PAGE_KERNEL_EXEC | _PAGE_GLOBAL : _PAGE_KERNEL_EXEC) 190 # ifdef __PAGE_KERNEL_EXEC 191 /* >= 2.6.27 */ 192 # define MY_PAGE_KERNEL_EXEC __pgprot(cpu_has_pge ? __PAGE_KERNEL_EXEC | _PAGE_GLOBAL : __PAGE_KERNEL_EXEC) 193 # else 194 # define MY_PAGE_KERNEL_EXEC __pgprot(cpu_has_pge ? _PAGE_KERNEL_EXEC | _PAGE_GLOBAL : _PAGE_KERNEL_EXEC) 195 # endif 191 196 #else 192 197 # define MY_PAGE_KERNEL_EXEC PAGE_KERNEL
Note:
See TracChangeset
for help on using the changeset viewer.