- Update so that the system will build on the new Leap 15 kernel.
OBS-URL: https://build.opensuse.org/package/show/Virtualization/virtualbox?expand=0&rev=412
This commit is contained in:
parent
b60141ed05
commit
cf13951bb8
@ -1,7 +1,7 @@
|
|||||||
Index: VirtualBox-5.2.6/src/VBox/Runtime/r0drv/linux/waitqueue-r0drv-linux.h
|
Index: VirtualBox-5.2.8/src/VBox/Runtime/r0drv/linux/waitqueue-r0drv-linux.h
|
||||||
===================================================================
|
===================================================================
|
||||||
--- VirtualBox-5.2.6.orig/src/VBox/Runtime/r0drv/linux/waitqueue-r0drv-linux.h
|
--- VirtualBox-5.2.8.orig/src/VBox/Runtime/r0drv/linux/waitqueue-r0drv-linux.h
|
||||||
+++ VirtualBox-5.2.6/src/VBox/Runtime/r0drv/linux/waitqueue-r0drv-linux.h
|
+++ VirtualBox-5.2.8/src/VBox/Runtime/r0drv/linux/waitqueue-r0drv-linux.h
|
||||||
@@ -46,7 +46,7 @@
|
@@ -46,7 +46,7 @@
|
||||||
typedef struct RTR0SEMLNXWAIT
|
typedef struct RTR0SEMLNXWAIT
|
||||||
{
|
{
|
||||||
@ -11,10 +11,10 @@ Index: VirtualBox-5.2.6/src/VBox/Runtime/r0drv/linux/waitqueue-r0drv-linux.h
|
|||||||
wait_queue_entry_t WaitQE;
|
wait_queue_entry_t WaitQE;
|
||||||
#else
|
#else
|
||||||
wait_queue_t WaitQE;
|
wait_queue_t WaitQE;
|
||||||
Index: VirtualBox-5.2.6/src/VBox/HostDrivers/VBoxNetFlt/linux/VBoxNetFlt-linux.c
|
Index: VirtualBox-5.2.8/src/VBox/HostDrivers/VBoxNetFlt/linux/VBoxNetFlt-linux.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- VirtualBox-5.2.6.orig/src/VBox/HostDrivers/VBoxNetFlt/linux/VBoxNetFlt-linux.c
|
--- VirtualBox-5.2.8.orig/src/VBox/HostDrivers/VBoxNetFlt/linux/VBoxNetFlt-linux.c
|
||||||
+++ VirtualBox-5.2.6/src/VBox/HostDrivers/VBoxNetFlt/linux/VBoxNetFlt-linux.c
|
+++ VirtualBox-5.2.8/src/VBox/HostDrivers/VBoxNetFlt/linux/VBoxNetFlt-linux.c
|
||||||
@@ -150,6 +150,10 @@ typedef struct VBOXNETFLTNOTIFIER *PVBOX
|
@@ -150,6 +150,10 @@ typedef struct VBOXNETFLTNOTIFIER *PVBOX
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
@ -26,3 +26,133 @@ Index: VirtualBox-5.2.6/src/VBox/HostDrivers/VBoxNetFlt/linux/VBoxNetFlt-linux.c
|
|||||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 20, 0)
|
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 20, 0)
|
||||||
# define VBOX_HAVE_SKB_VLAN
|
# define VBOX_HAVE_SKB_VLAN
|
||||||
#else
|
#else
|
||||||
|
Index: VirtualBox-5.2.8/src/VBox/Additions/linux/drm/vbox_ttm.c
|
||||||
|
===================================================================
|
||||||
|
--- VirtualBox-5.2.8.orig/src/VBox/Additions/linux/drm/vbox_ttm.c
|
||||||
|
+++ VirtualBox-5.2.8/src/VBox/Additions/linux/drm/vbox_ttm.c
|
||||||
|
@@ -198,19 +198,13 @@ static void vbox_ttm_io_mem_free(struct
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
-static int vbox_bo_move(struct ttm_buffer_object *bo,
|
||||||
|
- bool evict, bool interruptible,
|
||||||
|
- bool no_wait_gpu, struct ttm_mem_reg *new_mem)
|
||||||
|
+static int vbox_bo_move(struct ttm_buffer_object *bo, bool evict,
|
||||||
|
+ struct ttm_operation_ctx *ctx,
|
||||||
|
+ struct ttm_mem_reg *new_mem)
|
||||||
|
{
|
||||||
|
int r;
|
||||||
|
|
||||||
|
-#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 8, 0) && !defined(RHEL_74)
|
||||||
|
- r = ttm_bo_move_memcpy(bo, evict, no_wait_gpu, new_mem);
|
||||||
|
-#elif LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0) && !defined(RHEL_74)
|
||||||
|
- r = ttm_bo_move_memcpy(bo, evict, interruptible, no_wait_gpu, new_mem);
|
||||||
|
-#else
|
||||||
|
- r = ttm_bo_move_memcpy(bo, interruptible, no_wait_gpu, new_mem);
|
||||||
|
-#endif
|
||||||
|
+ r = ttm_bo_move_memcpy(bo, ctx, new_mem);
|
||||||
|
return r;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -244,9 +238,9 @@ static struct ttm_tt *vbox_ttm_tt_create
|
||||||
|
return tt;
|
||||||
|
}
|
||||||
|
|
||||||
|
-static int vbox_ttm_tt_populate(struct ttm_tt *ttm)
|
||||||
|
+static int vbox_ttm_tt_populate(struct ttm_tt *ttm, struct ttm_operation_ctx *ctx)
|
||||||
|
{
|
||||||
|
- return ttm_pool_populate(ttm);
|
||||||
|
+ return ttm_pool_populate(ttm, ctx);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void vbox_ttm_tt_unpopulate(struct ttm_tt *ttm)
|
||||||
|
@@ -254,6 +248,29 @@ static void vbox_ttm_tt_unpopulate(struc
|
||||||
|
ttm_pool_unpopulate(ttm);
|
||||||
|
}
|
||||||
|
|
||||||
|
+static struct drm_mm_node *vbox_find_mm_node(struct ttm_mem_reg *mem,
|
||||||
|
+ unsigned long *offset)
|
||||||
|
+{
|
||||||
|
+ struct drm_mm_node *mm_node = mem->mm_node;
|
||||||
|
+
|
||||||
|
+ while (*offset >= (mm_node->size << PAGE_SHIFT)) {
|
||||||
|
+ *offset -= (mm_node->size << PAGE_SHIFT);
|
||||||
|
+ ++mm_node;
|
||||||
|
+ }
|
||||||
|
+ return mm_node;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+static unsigned long vbox_ttm_io_mem_pfn(struct ttm_buffer_object *bo,
|
||||||
|
+ unsigned long page_offset)
|
||||||
|
+{
|
||||||
|
+ struct drm_mm_node *mm;
|
||||||
|
+ unsigned long offset = (page_offset << PAGE_SHIFT);
|
||||||
|
+
|
||||||
|
+ mm = vbox_find_mm_node(&bo->mem, &offset);
|
||||||
|
+ return (bo->mem.bus.base >> PAGE_SHIFT) + mm->start +
|
||||||
|
+ (offset >> PAGE_SHIFT);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
struct ttm_bo_driver vbox_bo_driver = {
|
||||||
|
.ttm_tt_create = vbox_ttm_tt_create,
|
||||||
|
.ttm_tt_populate = vbox_ttm_tt_populate,
|
||||||
|
@@ -268,7 +285,7 @@ struct ttm_bo_driver vbox_bo_driver = {
|
||||||
|
.io_mem_reserve = &vbox_ttm_io_mem_reserve,
|
||||||
|
.io_mem_free = &vbox_ttm_io_mem_free,
|
||||||
|
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
|
||||||
|
- .io_mem_pfn = ttm_bo_default_io_mem_pfn,
|
||||||
|
+ .io_mem_pfn = vbox_ttm_io_mem_pfn,
|
||||||
|
#endif
|
||||||
|
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 7, 0) && LINUX_VERSION_CODE < KERNEL_VERSION(4, 11, 0)) \
|
||||||
|
|| defined(RHEL_74)
|
||||||
|
@@ -422,6 +439,7 @@ static inline u64 vbox_bo_gpu_offset(str
|
||||||
|
|
||||||
|
int vbox_bo_pin(struct vbox_bo *bo, u32 pl_flag, u64 *gpu_addr)
|
||||||
|
{
|
||||||
|
+ struct ttm_operation_ctx ctx = {false, false};
|
||||||
|
int i, ret;
|
||||||
|
|
||||||
|
if (bo->pin_count) {
|
||||||
|
@@ -437,7 +455,7 @@ int vbox_bo_pin(struct vbox_bo *bo, u32
|
||||||
|
for (i = 0; i < bo->placement.num_placement; i++)
|
||||||
|
PLACEMENT_FLAGS(bo->placements[i]) |= TTM_PL_FLAG_NO_EVICT;
|
||||||
|
|
||||||
|
- ret = ttm_bo_validate(&bo->bo, &bo->placement, false, false);
|
||||||
|
+ ret = ttm_bo_validate(&bo->bo, &bo->placement, &ctx);
|
||||||
|
if (ret)
|
||||||
|
return ret;
|
||||||
|
|
||||||
|
@@ -451,6 +469,7 @@ int vbox_bo_pin(struct vbox_bo *bo, u32
|
||||||
|
|
||||||
|
int vbox_bo_unpin(struct vbox_bo *bo)
|
||||||
|
{
|
||||||
|
+ struct ttm_operation_ctx ctx = {false, false};
|
||||||
|
int i, ret;
|
||||||
|
|
||||||
|
if (!bo->pin_count) {
|
||||||
|
@@ -464,7 +483,7 @@ int vbox_bo_unpin(struct vbox_bo *bo)
|
||||||
|
for (i = 0; i < bo->placement.num_placement; i++)
|
||||||
|
PLACEMENT_FLAGS(bo->placements[i]) &= ~TTM_PL_FLAG_NO_EVICT;
|
||||||
|
|
||||||
|
- ret = ttm_bo_validate(&bo->bo, &bo->placement, false, false);
|
||||||
|
+ ret = ttm_bo_validate(&bo->bo, &bo->placement, &ctx);
|
||||||
|
if (ret)
|
||||||
|
return ret;
|
||||||
|
|
||||||
|
@@ -478,6 +497,7 @@ int vbox_bo_unpin(struct vbox_bo *bo)
|
||||||
|
*/
|
||||||
|
int vbox_bo_push_sysram(struct vbox_bo *bo)
|
||||||
|
{
|
||||||
|
+ struct ttm_operation_ctx ctx = {false, false};
|
||||||
|
int i, ret;
|
||||||
|
|
||||||
|
if (!bo->pin_count) {
|
||||||
|
@@ -496,7 +516,7 @@ int vbox_bo_push_sysram(struct vbox_bo *
|
||||||
|
for (i = 0; i < bo->placement.num_placement; i++)
|
||||||
|
PLACEMENT_FLAGS(bo->placements[i]) |= TTM_PL_FLAG_NO_EVICT;
|
||||||
|
|
||||||
|
- ret = ttm_bo_validate(&bo->bo, &bo->placement, false, false);
|
||||||
|
+ ret = ttm_bo_validate(&bo->bo, &bo->placement, &ctx);
|
||||||
|
if (ret) {
|
||||||
|
DRM_ERROR("pushing to VRAM failed\n");
|
||||||
|
return ret;
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Mar 21 04:06:19 UTC 2018 - Larry.Finger@lwfinger.net
|
||||||
|
|
||||||
|
- Update so that the system will build on the new Leap 15 kernel.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Sat Mar 10 21:20:15 UTC 2018 - Larry.Finger@lwfinger.net
|
Sat Mar 10 21:20:15 UTC 2018 - Larry.Finger@lwfinger.net
|
||||||
|
|
||||||
|
@ -109,7 +109,7 @@ Patch115: vbox_fix_for_gcc7.patch
|
|||||||
Patch116: Fix_for_server_1.19.patch
|
Patch116: Fix_for_server_1.19.patch
|
||||||
# Fix invalid use of internal headers
|
# Fix invalid use of internal headers
|
||||||
Patch118: internal-headers.patch
|
Patch118: internal-headers.patch
|
||||||
# Fix kernl API change in Leap 15
|
# Fix kernel API change in Leap 15
|
||||||
Patch119: fixes_for_leap15.patch
|
Patch119: fixes_for_leap15.patch
|
||||||
# Fix rpmlint error for script /lib/usr/virtualbox/vboxshell.py
|
# Fix rpmlint error for script /lib/usr/virtualbox/vboxshell.py
|
||||||
Patch120: fixes_for_python.patch
|
Patch120: fixes_for_python.patch
|
||||||
@ -409,7 +409,10 @@ as an "extpack" for VirtualBox. The implementation is licensed under GPL.
|
|||||||
%endif
|
%endif
|
||||||
%patch120 -p1
|
%patch120 -p1
|
||||||
%patch121 -p1
|
%patch121 -p1
|
||||||
|
%if 0%{suse_version} != 1500
|
||||||
|
# The patch for kernel 4.16 interferes with Leap 15 fixes
|
||||||
%patch122 -p1
|
%patch122 -p1
|
||||||
|
%endif
|
||||||
|
|
||||||
#copy user manual
|
#copy user manual
|
||||||
cp %{SOURCE1} UserManual.pdf
|
cp %{SOURCE1} UserManual.pdf
|
||||||
@ -763,7 +766,7 @@ getent group vboxsf >/dev/null || groupadd -r vboxsf
|
|||||||
# scriptlets - post
|
# scriptlets - post
|
||||||
#######################################################
|
#######################################################
|
||||||
|
|
||||||
%post
|
%posttrans
|
||||||
/sbin/ldconfig
|
/sbin/ldconfig
|
||||||
#setup our sysconfig file /etc/sysconfig/vbox
|
#setup our sysconfig file /etc/sysconfig/vbox
|
||||||
%set_permissions %{_vbox_instdir}/VBoxNetNAT
|
%set_permissions %{_vbox_instdir}/VBoxNetNAT
|
||||||
@ -772,7 +775,7 @@ getent group vboxsf >/dev/null || groupadd -r vboxsf
|
|||||||
%set_permissions %{_vbox_instdir}/VBoxHeadless
|
%set_permissions %{_vbox_instdir}/VBoxHeadless
|
||||||
%service_add_post vboxdrv.service
|
%service_add_post vboxdrv.service
|
||||||
|
|
||||||
%post qt
|
%posttrans qt
|
||||||
%set_permissions %{_vbox_instdir}/VirtualBox
|
%set_permissions %{_vbox_instdir}/VirtualBox
|
||||||
%set_permissions %{_vbox_instdir}/VBoxSDL
|
%set_permissions %{_vbox_instdir}/VBoxSDL
|
||||||
|
|
||||||
@ -786,12 +789,12 @@ getent group vboxsf >/dev/null || groupadd -r vboxsf
|
|||||||
%verify_permissions -e %{_vbox_instdir}/VirtualBox
|
%verify_permissions -e %{_vbox_instdir}/VirtualBox
|
||||||
%verify_permissions -e %{_vbox_instdir}/VBoxSDL
|
%verify_permissions -e %{_vbox_instdir}/VBoxSDL
|
||||||
|
|
||||||
%post guest-tools
|
%posttrans guest-tools
|
||||||
%service_add_post vboxadd-service.service
|
%service_add_post vboxadd-service.service
|
||||||
|
|
||||||
%post websrv
|
%posttrans websrv
|
||||||
|
|
||||||
%post vnc
|
%posttrans vnc
|
||||||
EXTPACK="/usr/share/virtualbox/extensions/VNC-%{version}.vbox-extpack"
|
EXTPACK="/usr/share/virtualbox/extensions/VNC-%{version}.vbox-extpack"
|
||||||
ACCEPT="$(tar --to-stdout -xf "${EXTPACK}" ./ExtPack-license.txt | sha256sum | head --bytes=64)"
|
ACCEPT="$(tar --to-stdout -xf "${EXTPACK}" ./ExtPack-license.txt | sha256sum | head --bytes=64)"
|
||||||
VBoxManage extpack install --replace "${EXTPACK}" --accept-license="${ACCEPT}" > /dev/null
|
VBoxManage extpack install --replace "${EXTPACK}" --accept-license="${ACCEPT}" > /dev/null
|
||||||
@ -819,7 +822,7 @@ exit 0
|
|||||||
# scriptlets postun
|
# scriptlets postun
|
||||||
#######################################################
|
#######################################################
|
||||||
|
|
||||||
%postun
|
%posttrans
|
||||||
/sbin/ldconfig
|
/sbin/ldconfig
|
||||||
%restart_on_update vboxdrv
|
%restart_on_update vboxdrv
|
||||||
%insserv_cleanup
|
%insserv_cleanup
|
||||||
@ -827,13 +830,13 @@ exit 0
|
|||||||
export DISABLE_RESTART_ON_UPDATE=yes
|
export DISABLE_RESTART_ON_UPDATE=yes
|
||||||
%service_del_postun vboxdrv.service
|
%service_del_postun vboxdrv.service
|
||||||
|
|
||||||
%postun guest-tools
|
%posttrans guest-tools
|
||||||
%restart_on_update vboxadd
|
%restart_on_update vboxadd
|
||||||
%restart_on_update vboxadd-service
|
%restart_on_update vboxadd-service
|
||||||
%insserv_cleanup
|
%insserv_cleanup
|
||||||
%service_del_postun vboxadd-service.service
|
%service_del_postun vboxadd-service.service
|
||||||
|
|
||||||
%postun websrv
|
%posttrans websrv
|
||||||
%restart_on_update vboxweb-service
|
%restart_on_update vboxweb-service
|
||||||
%insserv_cleanup
|
%insserv_cleanup
|
||||||
#
|
#
|
||||||
|
Loading…
Reference in New Issue
Block a user