From 6f64fe1da59ebda6988d940b84acd322ab942d372bff5127a058f2bb8450c021 Mon Sep 17 00:00:00 2001 From: Larry Finger Date: Wed, 26 Oct 2016 17:09:38 +0000 Subject: [PATCH] - 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 --- vbox_fix_4.9_api_changes.patch | 33 +++++++++++++++++++++++++++++++++ virtualbox.changes | 5 +++++ virtualbox.spec | 1 + 3 files changed, 39 insertions(+) diff --git a/vbox_fix_4.9_api_changes.patch b/vbox_fix_4.9_api_changes.patch index 0fba3ed..8c87295 100644 --- a/vbox_fix_4.9_api_changes.patch +++ b/vbox_fix_4.9_api_changes.patch @@ -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. */ diff --git a/virtualbox.changes b/virtualbox.changes index 64c7163..ce9d170 100644 --- a/virtualbox.changes +++ b/virtualbox.changes @@ -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 diff --git a/virtualbox.spec b/virtualbox.spec index 08f03b9..b11ffa7 100644 --- a/virtualbox.spec +++ b/virtualbox.spec @@ -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