[Pkg-virtualbox-commits] r365 - trunk/debian/patches
meskes at alioth.debian.org
meskes at alioth.debian.org
Tue Oct 14 07:39:54 UTC 2008
Author: meskes
Date: 2008-10-14 07:39:54 +0000 (Tue, 14 Oct 2008)
New Revision: 365
Added:
trunk/debian/patches/16-fix-for-2.6.27.dpatch
Log:
Added patch file
Added: trunk/debian/patches/16-fix-for-2.6.27.dpatch
===================================================================
--- trunk/debian/patches/16-fix-for-2.6.27.dpatch (rev 0)
+++ trunk/debian/patches/16-fix-for-2.6.27.dpatch 2008-10-14 07:39:54 UTC (rev 365)
@@ -0,0 +1,91 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 16-fix-for-2.6.27.dpatch by <Sven Hartge <sven at svenhartge.de>>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Fix for 2.6.27
+## DP: Taken from http://www.virtualbox.org/changeset/12360
+
+ at DPATCH@
+
+diff -Nur virtualbox-ose-1.6.6-dfsg.old/src/VBox/HostDrivers/Support/linux/SUPDrv-linux.c virtualbox-ose-1.6.6-dfsg/src/VBox/HostDrivers/Support/linux/SUPDrv-linux.c
+--- virtualbox-ose-1.6.6-dfsg.old/src/VBox/HostDrivers/Support/linux/SUPDrv-linux.c 2008-08-11 22:03:12.000000000 +0200
++++ virtualbox-ose-1.6.6-dfsg/src/VBox/HostDrivers/Support/linux/SUPDrv-linux.c 2008-10-13 13:27:46.000000000 +0200
+@@ -115,44 +115,6 @@
+ # error "CONFIG_X86_HIGH_ENTRY is not supported by VBoxDrv at this time."
+ #endif
+
+-/*
+- * This sucks soooo badly on x86! Why don't they export __PAGE_KERNEL_EXEC so PAGE_KERNEL_EXEC would be usable?
+- */
+-#if defined(RT_ARCH_AMD64)
+-# define MY_PAGE_KERNEL_EXEC PAGE_KERNEL_EXEC
+-#elif defined(PAGE_KERNEL_EXEC) && defined(CONFIG_X86_PAE)
+-# define MY_PAGE_KERNEL_EXEC __pgprot(cpu_has_pge ? _PAGE_KERNEL_EXEC | _PAGE_GLOBAL : _PAGE_KERNEL_EXEC)
+-#else
+-# define MY_PAGE_KERNEL_EXEC PAGE_KERNEL
+-#endif
+-
+-/*
+- * The redhat hack section.
+- * - The current hacks are for 2.4.21-15.EL only.
+- */
+-#ifndef NO_REDHAT_HACKS
+-/* accounting. */
+-# if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 0)
+-# ifdef VM_ACCOUNT
+-# define MY_DO_MUNMAP(a,b,c) do_munmap(a, b, c, 0) /* should it be 1 or 0? */
+-# endif
+-# endif
+-
+-/* backported remap_page_range. */
+-# if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 0)
+-# include <asm/tlb.h>
+-# ifdef tlb_vma /* probably not good enough... */
+-# define HAVE_26_STYLE_REMAP_PAGE_RANGE 1
+-# endif
+-# endif
+-
+-#endif /* !NO_REDHAT_HACKS */
+-
+-
+-#ifndef MY_DO_MUNMAP
+-# define MY_DO_MUNMAP(a,b,c) do_munmap(a, b, c)
+-#endif
+-
+
+ /** @def ONE_MSEC_IN_JIFFIES
+ * The number of jiffies that make up 1 millisecond. Must be at least 1! */
+diff -Nur virtualbox-ose-1.6.6-dfsg.old/src/VBox/Runtime/r0drv/linux/alloc-r0drv-linux.c virtualbox-ose-1.6.6-dfsg/src/VBox/Runtime/r0drv/linux/alloc-r0drv-linux.c
+--- virtualbox-ose-1.6.6-dfsg.old/src/VBox/Runtime/r0drv/linux/alloc-r0drv-linux.c 2008-06-25 17:47:32.000000000 +0200
++++ virtualbox-ose-1.6.6-dfsg/src/VBox/Runtime/r0drv/linux/alloc-r0drv-linux.c 2008-10-13 13:28:43.000000000 +0200
+@@ -131,11 +131,10 @@
+ }
+ else
+ # endif
+- pHdr = (PRTMEMHDR)__vmalloc(cb + sizeof(*pHdr), GFP_KERNEL | __GFP_HIGHMEM, PAGE_KERNEL_EXEC);
++ pHdr = (PRTMEMHDR)__vmalloc(cb + sizeof(*pHdr), GFP_KERNEL | __GFP_HIGHMEM, MY_PAGE_KERNEL_EXEC);
+
+ #elif defined(PAGE_KERNEL_EXEC) && defined(CONFIG_X86_PAE)
+- pHdr = (PRTMEMHDR)__vmalloc(cb + sizeof(*pHdr), GFP_KERNEL | __GFP_HIGHMEM,
+- __pgprot(cpu_has_pge ? _PAGE_KERNEL_EXEC | _PAGE_GLOBAL : _PAGE_KERNEL_EXEC));
++ pHdr = (PRTMEMHDR)__vmalloc(cb + sizeof(*pHdr), GFP_KERNEL | __GFP_HIGHMEM, MY_PAGE_KERNEL_EXEC);
+ #else
+ pHdr = (PRTMEMHDR)vmalloc(cb + sizeof(*pHdr));
+ #endif
+diff -Nur virtualbox-ose-1.6.6-dfsg.old/src/VBox/Runtime/r0drv/linux/the-linux-kernel.h virtualbox-ose-1.6.6-dfsg/src/VBox/Runtime/r0drv/linux/the-linux-kernel.h
+--- virtualbox-ose-1.6.6-dfsg.old/src/VBox/Runtime/r0drv/linux/the-linux-kernel.h 2008-07-29 22:13:57.000000000 +0200
++++ virtualbox-ose-1.6.6-dfsg/src/VBox/Runtime/r0drv/linux/the-linux-kernel.h 2008-10-13 13:30:30.000000000 +0200
+@@ -174,7 +174,12 @@
+ #if defined(RT_ARCH_AMD64)
+ # define MY_PAGE_KERNEL_EXEC PAGE_KERNEL_EXEC
+ #elif defined(PAGE_KERNEL_EXEC) && defined(CONFIG_X86_PAE)
+-# define MY_PAGE_KERNEL_EXEC __pgprot(cpu_has_pge ? _PAGE_KERNEL_EXEC | _PAGE_GLOBAL : _PAGE_KERNEL_EXEC)
++# ifdef __PAGE_KERNEL_EXEC
++ /* >= 2.6.27 */
++# define MY_PAGE_KERNEL_EXEC __pgprot(cpu_has_pge ? __PAGE_KERNEL_EXEC | _PAGE_GLOBAL : __PAGE_KERNEL_EXEC)
++# else
++# define MY_PAGE_KERNEL_EXEC __pgprot(cpu_has_pge ? _PAGE_KERNEL_EXEC | _PAGE_GLOBAL : _PAGE_KERNEL_EXEC)
++# endif
+ #else
+ # define MY_PAGE_KERNEL_EXEC PAGE_KERNEL
+ #endif
More information about the Pkg-virtualbox-commits
mailing list