[vbox-dev] Patch needed for kernel 3.7

Larry Finger Larry.Finger at lwfinger.net
Mon Oct 15 16:29:26 GMT 2012


In kernel 3.7-rc1, the flag VM_RESERVED is removed, and should be replaced by 
(VM_DONTEXPAND | VM_DONTDUMP). The latter one is new. The patch listed below, 
which is under the MIT License) will work.

Index: vboxhost/vboxdrv/r0drv/linux/memobj-r0drv-linux.c
===================================================================
--- vboxhost.orig/vboxdrv/r0drv/linux/memobj-r0drv-linux.c
+++ vboxhost/vboxdrv/r0drv/linux/memobj-r0drv-linux.c
@@ -50,6 +50,10 @@
  # define PAGE_READONLY_EXEC PAGE_READONLY
  #endif

+#ifndef VM_RESERVED
+# define  VM_RESERVED   (VM_DONTEXPAND | VM_DONTDUMP)
+#endif
+
  /*
   * 2.6.29+ kernels don't work with remap_pfn_range() anymore because
   * track_pfn_vma_new() is apparently not defined for non-RAM pages.

For reasons that are not yet understood, the straight-forward test for 
"LINUX_VERSION_CODE >= KERNEL_VERSION(3, 7, 0)" fails. That problem is being 
investigated.

Larry






More information about the vbox-dev mailing list