From 423b46b14c89f3d65a07ab9e9b9c7ceefcc34b9dfbcec5b31b1a50cde07ea570 Mon Sep 17 00:00:00 2001 From: Larry Finger Date: Fri, 11 May 2018 14:28:09 +0000 Subject: [PATCH] - Version bump to 5.2.12 (released May 09 2018 by Oracle) This is a maintenance release. The following items were fixed and/or added: Serial: fixed possible data corruption when sending data under certain circumstances Video recording: fixed starting / stopping recording under certain circumstances Linux hosts: support Linux 4.17 changes. Thank you Larry Finger Linux guests: support Linux 4.16 and EL 7.5 kernels (bugs #17676 and #17678) Linux guests: 3D fixes for recent guests (bug #17623) File "fixes_for_4.16.patch" is removed - fixed upstream. OBS-URL: https://build.opensuse.org/package/show/Virtualization/virtualbox?expand=0&rev=425 --- UserManual.pdf | 4 +- VirtualBox-5.2.10-patched.tar.bz2 | 3 - VirtualBox-5.2.12-patched.tar.bz2 | 3 + fixes_for_4.16.patch | 158 ------------------------------ fixes_for_4.17.patch | 31 ++---- virtualbox.changes | 15 +++ virtualbox.spec | 8 +- 7 files changed, 27 insertions(+), 195 deletions(-) delete mode 100644 VirtualBox-5.2.10-patched.tar.bz2 create mode 100644 VirtualBox-5.2.12-patched.tar.bz2 delete mode 100644 fixes_for_4.16.patch diff --git a/UserManual.pdf b/UserManual.pdf index a4f0dc0..cb9c77c 100644 --- a/UserManual.pdf +++ b/UserManual.pdf @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:92a0048f70ab8504f3fc11db8615b44205faabe259ccd2dcb1a034e42d096c6e -size 4438609 +oid sha256:60867bb1ccbf0acfc83c717061815da22f2bea316c23f40e2193b557dd887d54 +size 4440198 diff --git a/VirtualBox-5.2.10-patched.tar.bz2 b/VirtualBox-5.2.10-patched.tar.bz2 deleted file mode 100644 index 3accbcd..0000000 --- a/VirtualBox-5.2.10-patched.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:71ff33fc6247114b58809e274d5fd71fcc65081a412494aa62f62f3efd412244 -size 83379852 diff --git a/VirtualBox-5.2.12-patched.tar.bz2 b/VirtualBox-5.2.12-patched.tar.bz2 new file mode 100644 index 0000000..ca20cca --- /dev/null +++ b/VirtualBox-5.2.12-patched.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d960a40bb60635a9a00742fab7cafbd58b0281bc9109f8474fc317755faf78f9 +size 83428187 diff --git a/fixes_for_4.16.patch b/fixes_for_4.16.patch deleted file mode 100644 index 40715d2..0000000 --- a/fixes_for_4.16.patch +++ /dev/null @@ -1,158 +0,0 @@ -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,6 +198,17 @@ static void vbox_ttm_io_mem_free(struct - { - } - -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 16, 0) -+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; -+ -+ r = ttm_bo_move_memcpy(bo, ctx, new_mem); -+ return r; -+} -+#else - static int vbox_bo_move(struct ttm_buffer_object *bo, - bool evict, bool interruptible, - bool no_wait_gpu, struct ttm_mem_reg *new_mem) -@@ -213,6 +224,7 @@ static int vbox_bo_move(struct ttm_buffe - #endif - return r; - } -+#endif - - static void vbox_ttm_backend_destroy(struct ttm_tt *tt) - { -@@ -244,16 +256,48 @@ static struct ttm_tt *vbox_ttm_tt_create - return tt; - } - -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 16, 0) -+static int vbox_ttm_tt_populate(struct ttm_tt *ttm, struct ttm_operation_ctx *ctx) -+{ -+ return ttm_pool_populate(ttm, ctx); -+} -+#else - static int vbox_ttm_tt_populate(struct ttm_tt *ttm) - { - return ttm_pool_populate(ttm); - } -+#endif - - static void vbox_ttm_tt_unpopulate(struct ttm_tt *ttm) - { - ttm_pool_unpopulate(ttm); - } - -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 16, 0) -+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); -+} -+#endif -+ - struct ttm_bo_driver vbox_bo_driver = { - .ttm_tt_create = vbox_ttm_tt_create, - .ttm_tt_populate = vbox_ttm_tt_populate, -@@ -268,8 +312,12 @@ 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) -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 16, 0) -+ .io_mem_pfn = vbox_ttm_io_mem_pfn, -+#else - .io_mem_pfn = ttm_bo_default_io_mem_pfn, - #endif -+#endif - #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 7, 0) && LINUX_VERSION_CODE < KERNEL_VERSION(4, 11, 0)) \ - || defined(RHEL_74) - .lru_tail = &ttm_bo_default_lru_tail, -@@ -422,6 +470,9 @@ static inline u64 vbox_bo_gpu_offset(str - - int vbox_bo_pin(struct vbox_bo *bo, u32 pl_flag, u64 *gpu_addr) - { -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 16, 0) -+ struct ttm_operation_ctx ctx = {false, false}; -+#endif - int i, ret; - - if (bo->pin_count) { -@@ -437,7 +488,11 @@ 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; - -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 16, 0) -+ ret = ttm_bo_validate(&bo->bo, &bo->placement, &ctx); -+#else - ret = ttm_bo_validate(&bo->bo, &bo->placement, false, false); -+#endif - if (ret) - return ret; - -@@ -451,6 +506,9 @@ int vbox_bo_pin(struct vbox_bo *bo, u32 - - int vbox_bo_unpin(struct vbox_bo *bo) - { -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 16, 0) -+ struct ttm_operation_ctx ctx = {false, false}; -+#endif - int i, ret; - - if (!bo->pin_count) { -@@ -464,7 +522,11 @@ 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; - -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 16, 0) -+ ret = ttm_bo_validate(&bo->bo, &bo->placement, &ctx); -+#else - ret = ttm_bo_validate(&bo->bo, &bo->placement, false, false); -+#endif - if (ret) - return ret; - -@@ -478,6 +540,9 @@ int vbox_bo_unpin(struct vbox_bo *bo) - */ - int vbox_bo_push_sysram(struct vbox_bo *bo) - { -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 16, 0) -+ struct ttm_operation_ctx ctx = {false, false}; -+#endif - int i, ret; - - if (!bo->pin_count) { -@@ -496,7 +561,11 @@ 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; - -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 16, 0) -+ ret = ttm_bo_validate(&bo->bo, &bo->placement, &ctx); -+#else - ret = ttm_bo_validate(&bo->bo, &bo->placement, false, false); -+#endif - if (ret) { - DRM_ERROR("pushing to VRAM failed\n"); - return ret; diff --git a/fixes_for_4.17.patch b/fixes_for_4.17.patch index a9d637f..33943b7 100644 --- a/fixes_for_4.17.patch +++ b/fixes_for_4.17.patch @@ -10,30 +10,11 @@ This patch released under a combined MIT/GPLv2 license. Signed-off-by: Larry Finger -Index: VirtualBox-5.2.10/src/VBox/HostDrivers/VBoxPci/linux/VBoxPci-linux.c +Index: VirtualBox-5.2.12/src/VBox/Additions/linux/drm/vbox_ttm.c =================================================================== ---- VirtualBox-5.2.10.orig/src/VBox/HostDrivers/VBoxPci/linux/VBoxPci-linux.c -+++ VirtualBox-5.2.10/src/VBox/HostDrivers/VBoxPci/linux/VBoxPci-linux.c -@@ -89,7 +89,14 @@ MODULE_VERSION(VBOX_VERSION_STRING " r" - #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 20) - # define PCI_DEV_GET(v,d,p) pci_get_device(v,d,p) - # define PCI_DEV_PUT(x) pci_dev_put(x) -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 17, 0) -+/* assume the domain number to be zero - exactly the same assumption of -+ * pci_get_bus_and_slot() -+ */ -+# define PCI_DEV_GET_SLOT(bus, devfn) pci_get_domain_bus_and_slot(0, bus, devfn) -+#else - # define PCI_DEV_GET_SLOT(bus, devfn) pci_get_bus_and_slot(bus, devfn) -+#endif - #else - # define PCI_DEV_GET(v,d,p) pci_find_device(v,d,p) - # define PCI_DEV_PUT(x) do { } while (0) -Index: VirtualBox-5.2.10/src/VBox/Additions/linux/drm/vbox_ttm.c -=================================================================== ---- VirtualBox-5.2.10.orig/src/VBox/Additions/linux/drm/vbox_ttm.c -+++ VirtualBox-5.2.10/src/VBox/Additions/linux/drm/vbox_ttm.c -@@ -236,10 +236,15 @@ static struct ttm_backend_func vbox_tt_b +--- VirtualBox-5.2.12.orig/src/VBox/Additions/linux/drm/vbox_ttm.c ++++ VirtualBox-5.2.12/src/VBox/Additions/linux/drm/vbox_ttm.c +@@ -208,10 +208,15 @@ static struct ttm_backend_func vbox_tt_b .destroy = &vbox_ttm_backend_destroy, }; @@ -49,7 +30,7 @@ Index: VirtualBox-5.2.10/src/VBox/Additions/linux/drm/vbox_ttm.c { struct ttm_tt *tt; -@@ -248,7 +253,11 @@ static struct ttm_tt *vbox_ttm_tt_create +@@ -220,7 +225,11 @@ static struct ttm_tt *vbox_ttm_tt_create return NULL; tt->func = &vbox_tt_backend_func; @@ -61,7 +42,7 @@ Index: VirtualBox-5.2.10/src/VBox/Additions/linux/drm/vbox_ttm.c kfree(tt); return NULL; } -@@ -450,7 +459,11 @@ int vbox_bo_create(struct drm_device *de +@@ -401,7 +410,11 @@ int vbox_bo_create(struct drm_device *de ret = ttm_bo_init(&vbox->ttm.bdev, &vboxbo->bo, size, ttm_bo_type_device, &vboxbo->placement, diff --git a/virtualbox.changes b/virtualbox.changes index a40bb5f..c4737d1 100644 --- a/virtualbox.changes +++ b/virtualbox.changes @@ -1,3 +1,18 @@ +------------------------------------------------------------------- +Fri May 11 14:21:59 UTC 2018 - Larry.Finger@lwfinger.net + +- Version bump to 5.2.12 (released May 09 2018 by Oracle) + +This is a maintenance release. The following items were fixed and/or added: + + Serial: fixed possible data corruption when sending data under certain circumstances + Video recording: fixed starting / stopping recording under certain circumstances + Linux hosts: support Linux 4.17 changes. Thank you Larry Finger + Linux guests: support Linux 4.16 and EL 7.5 kernels (bugs #17676 and #17678) + Linux guests: 3D fixes for recent guests (bug #17623) + + File "fixes_for_4.16.patch" is removed - fixed upstream. + ------------------------------------------------------------------- Thu Apr 26 16:27:04 UTC 2018 - Larry.Finger@lwfinger.net diff --git a/virtualbox.spec b/virtualbox.spec index 8455141..e702406 100644 --- a/virtualbox.spec +++ b/virtualbox.spec @@ -28,7 +28,7 @@ %define _udevrulesdir %{_sysconfdir}/udev/rules.d Name: virtualbox # ********* If the VB version exceeds 5.2.x, notify the libvirt maintainer!! -Version: 5.2.10 +Version: 5.2.12 Release: 0 Summary: VirtualBox is an Emulator License: GPL-2.0-or-later @@ -115,8 +115,6 @@ Patch119: fixes_for_leap15.patch Patch120: fixes_for_python.patch # Remove vboxvideo from build Patch121: remove_vbox_video_build.patch -# Fix build for kernel 4.16 -Patch122: fixes_for_4.16.patch # Fix build for kernel 4.17 Patch123: fixes_for_4.17.patch Patch124: gcc8-configure.patch @@ -412,10 +410,6 @@ as an "extpack" for VirtualBox. The implementation is licensed under GPL. %endif %patch120 -p1 %patch121 -p1 -%if 0%{suse_version} != 1500 -# The patch for kernel 4.16 interferes with Leap 15 fixes -%patch122 -p1 -%endif %patch123 -p1 %patch124 -p1