1
0
forked from pool/virtualbox

- Found and fixed another API change for kernel 4.9. In addition, the libreadline6 package is now needed.

OBS-URL: https://build.opensuse.org/package/show/Virtualization/virtualbox?expand=0&rev=287
This commit is contained in:
Larry Finger 2016-10-26 17:09:38 +00:00 committed by Git OBS Bridge
parent 0bcfefc0a1
commit 6f64fe1da5
3 changed files with 39 additions and 0 deletions

View File

@ -31,3 +31,36 @@ Index: VirtualBox-5.1.8/src/VBox/Additions/linux/drm/vbox_ttm.c
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);
Index: VirtualBox-5.1.8/src/VBox/Runtime/r0drv/linux/memobj-r0drv-linux.c
===================================================================
--- VirtualBox-5.1.8.orig/src/VBox/Runtime/r0drv/linux/memobj-r0drv-linux.c
+++ VirtualBox-5.1.8/src/VBox/Runtime/r0drv/linux/memobj-r0drv-linux.c
@@ -1045,7 +1045,27 @@ DECLHIDDEN(int) rtR0MemObjNativeLockUser
/*
* Get user pages.
*/
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 6, 0)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0)
+ if (R0Process == RTR0ProcHandleSelf())
+ rc = get_user_pages(R3Ptr, /* Where from. */
+ cPages, /* How many pages. */
+ fWrite, /* Write to memory. */
+ &pMemLnx->apPages[0], /* Page array. */
+ papVMAs); /* vmas */
+ /*
+ * Actually this should not happen at the moment as call this function
+ * only for our own process.
+ */
+ else
+ rc = get_user_pages_remote(
+ pTask, /* Task for fault accounting. */
+ pTask->mm, /* Whose pages. */
+ R3Ptr, /* Where from. */
+ cPages, /* How many pages. */
+ fWrite, /* Write to memory. */
+ &pMemLnx->apPages[0], /* Page array. */
+ papVMAs); /* vmas */
+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(4, 6, 0)
if (R0Process == RTR0ProcHandleSelf())
rc = get_user_pages(R3Ptr, /* Where from. */
cPages, /* How many pages. */

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Wed Oct 26 17:08:03 UTC 2016 - Larry.Finger@lwfinger.net
- Found and fixed another API change for kernel 4.9. In addition, the libreadline6 package is now needed.
-------------------------------------------------------------------
Fri Oct 21 16:05:13 UTC 2016 - Larry.Finger@lwfinger.net

View File

@ -116,6 +116,7 @@ BuildRequires: libopenssl-devel
BuildRequires: libqt5-linguist
BuildRequires: libqt5-qtbase-devel
BuildRequires: libqt5-qtx11extras-devel
BuildRequires: libreadline6
BuildRequires: libvpx-devel
BuildRequires: libxslt-devel
BuildRequires: module-init-tools