[VirtualBox] git add modify_for_4_8_bo_move.patch smap.diff

Sérgio M. Basto sergiomb at rpmfusion.org
Wed Sep 7 09:24:51 CEST 2016


commit 1400e0e3f184e66fc1d09d8cc28bee6a1d3ac0de
Author: Sérgio M. Basto <sergio at serjux.com>
Date:   Wed Sep 7 08:21:25 2016 +0100

    git add modify_for_4_8_bo_move.patch smap.diff
    
    From: https://build.opensuse.org/package/show/openSUSE:Factory/virtualbox or
    https://build.opensuse.org/package/show/Virtualization/virtualbox
    I don't know the difference of this 2 links.

 modify_for_4_8_bo_move.patch | 56 ++++++++++++++++++++++++++++++++++++++++++++
 smap.diff                    | 17 ++++++++++++++
 2 files changed, 73 insertions(+)
---
diff --git a/modify_for_4_8_bo_move.patch b/modify_for_4_8_bo_move.patch
new file mode 100644
index 0000000..d4a3704
--- /dev/null
+++ b/modify_for_4_8_bo_move.patch
@@ -0,0 +1,56 @@
+Index: VirtualBox-5.1.4/src/VBox/Additions/linux/drm/vbox_ttm.c
+===================================================================
+--- VirtualBox-5.1.4.orig/src/VBox/Additions/linux/drm/vbox_ttm.c
++++ VirtualBox-5.1.4/src/VBox/Additions/linux/drm/vbox_ttm.c
+@@ -221,7 +221,11 @@ static int vbox_bo_move(struct ttm_buffe
+                struct ttm_mem_reg *new_mem)
+ {
+     int r;
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 8, 0)
+     r = ttm_bo_move_memcpy(bo, evict, no_wait_gpu, new_mem);
++#else
++    r = ttm_bo_move_memcpy(bo, evict, interruptible, no_wait_gpu, new_mem);
++#endif
+     return r;
+ }
+ 
+Index: VirtualBox-5.1.4/src/VBox/Additions/linux/drm/vbox_drv.c
+===================================================================
+--- VirtualBox-5.1.4.orig/src/VBox/Additions/linux/drm/vbox_drv.c
++++ VirtualBox-5.1.4/src/VBox/Additions/linux/drm/vbox_drv.c
+@@ -244,9 +244,14 @@ static int vbox_master_set(struct drm_de
+     return 0;
+ }
+ 
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 8, 0)
+ static void vbox_master_drop(struct drm_device *dev,
+                              struct drm_file *file_priv,
+                              bool from_release)
++#else
++static void vbox_master_drop(struct drm_device *dev,
++                             struct drm_file *file_priv)
++#endif
+ {
+     struct vbox_private *vbox = dev->dev_private;
+     vbox->initial_mode_queried = false;
+Index: VirtualBox-5.1.4/src/VBox/Runtime/r0drv/linux/alloc-r0drv-linux.c
+===================================================================
+--- VirtualBox-5.1.4.orig/src/VBox/Runtime/r0drv/linux/alloc-r0drv-linux.c
++++ VirtualBox-5.1.4/src/VBox/Runtime/r0drv/linux/alloc-r0drv-linux.c
+@@ -35,7 +35,7 @@
+ #include <iprt/assert.h>
+ #include <iprt/err.h>
+ #include "r0drv/alloc-r0drv.h"
+-
++#include <linux/kmemleak.h>
+ 
+ #if (defined(RT_ARCH_AMD64) || defined(DOXYGEN_RUNNING)) && !defined(RTMEMALLOC_EXEC_HEAP)
+ # if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 23)
+@@ -294,6 +294,7 @@ DECLHIDDEN(int) rtR0MemAllocEx(size_t cb
+                 fFlags &= ~RTMEMHDR_FLAG_KMALLOC;
+                 pHdr = vmalloc(cb + sizeof(*pHdr));
+             }
++	    kmemleak_not_leak(pHdr);
+         }
+         else
+             pHdr = vmalloc(cb + sizeof(*pHdr));
diff --git a/smap.diff b/smap.diff
new file mode 100644
index 0000000..b9a4347
--- /dev/null
+++ b/smap.diff
@@ -0,0 +1,17 @@
+Index: VirtualBox-5.1.4/src/VBox/HostDrivers/Support/linux/SUPDrv-linux.c
+===================================================================
+--- VirtualBox-5.1.4.orig/src/VBox/HostDrivers/Support/linux/SUPDrv-linux.c
++++ VirtualBox-5.1.4/src/VBox/HostDrivers/Support/linux/SUPDrv-linux.c
+@@ -50,6 +50,12 @@
+ # include <iprt/power.h>
+ # define VBOX_WITH_SUSPEND_NOTIFICATION
+ #endif
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 7, 0)
++# include <asm/smap.h>
++#else
++static inline void clac(void) { }
++static inline void stac(void) { }
++#endif
+ 
+ #include <linux/sched.h>
+ #include <linux/miscdevice.h>


More information about the rpmfusion-commits mailing list