forked from pool/virtualbox
Accepting request 606518 from Virtualization
- 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/request/show/606518 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/virtualbox?expand=0&rev=163
This commit is contained in:
commit
e2c9aa8c17
@ -1,3 +1,3 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:92a0048f70ab8504f3fc11db8615b44205faabe259ccd2dcb1a034e42d096c6e
|
oid sha256:60867bb1ccbf0acfc83c717061815da22f2bea316c23f40e2193b557dd887d54
|
||||||
size 4438609
|
size 4440198
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:71ff33fc6247114b58809e274d5fd71fcc65081a412494aa62f62f3efd412244
|
|
||||||
size 83379852
|
|
3
VirtualBox-5.2.12-patched.tar.bz2
Normal file
3
VirtualBox-5.2.12-patched.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:d960a40bb60635a9a00742fab7cafbd58b0281bc9109f8474fc317755faf78f9
|
||||||
|
size 83428187
|
@ -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;
|
|
@ -10,30 +10,11 @@ This patch released under a combined MIT/GPLv2 license.
|
|||||||
|
|
||||||
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
|
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
|
||||||
|
|
||||||
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.12.orig/src/VBox/Additions/linux/drm/vbox_ttm.c
|
||||||
+++ VirtualBox-5.2.10/src/VBox/HostDrivers/VBoxPci/linux/VBoxPci-linux.c
|
+++ VirtualBox-5.2.12/src/VBox/Additions/linux/drm/vbox_ttm.c
|
||||||
@@ -89,7 +89,14 @@ MODULE_VERSION(VBOX_VERSION_STRING " r"
|
@@ -208,10 +208,15 @@ static struct ttm_backend_func vbox_tt_b
|
||||||
#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
|
|
||||||
.destroy = &vbox_ttm_backend_destroy,
|
.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;
|
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;
|
return NULL;
|
||||||
|
|
||||||
tt->func = &vbox_tt_backend_func;
|
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);
|
kfree(tt);
|
||||||
return NULL;
|
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,
|
ret = ttm_bo_init(&vbox->ttm.bdev, &vboxbo->bo, size,
|
||||||
ttm_bo_type_device, &vboxbo->placement,
|
ttm_bo_type_device, &vboxbo->placement,
|
||||||
|
@ -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
|
Thu Apr 26 16:27:04 UTC 2018 - Larry.Finger@lwfinger.net
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
%define _udevrulesdir %{_sysconfdir}/udev/rules.d
|
%define _udevrulesdir %{_sysconfdir}/udev/rules.d
|
||||||
Name: virtualbox
|
Name: virtualbox
|
||||||
# ********* If the VB version exceeds 5.2.x, notify the libvirt maintainer!!
|
# ********* If the VB version exceeds 5.2.x, notify the libvirt maintainer!!
|
||||||
Version: 5.2.10
|
Version: 5.2.12
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: VirtualBox is an Emulator
|
Summary: VirtualBox is an Emulator
|
||||||
License: GPL-2.0-or-later
|
License: GPL-2.0-or-later
|
||||||
@ -115,8 +115,6 @@ Patch119: fixes_for_leap15.patch
|
|||||||
Patch120: fixes_for_python.patch
|
Patch120: fixes_for_python.patch
|
||||||
# Remove vboxvideo from build
|
# Remove vboxvideo from build
|
||||||
Patch121: remove_vbox_video_build.patch
|
Patch121: remove_vbox_video_build.patch
|
||||||
# Fix build for kernel 4.16
|
|
||||||
Patch122: fixes_for_4.16.patch
|
|
||||||
# Fix build for kernel 4.17
|
# Fix build for kernel 4.17
|
||||||
Patch123: fixes_for_4.17.patch
|
Patch123: fixes_for_4.17.patch
|
||||||
Patch124: gcc8-configure.patch
|
Patch124: gcc8-configure.patch
|
||||||
@ -412,10 +410,6 @@ 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
|
|
||||||
%endif
|
|
||||||
%patch123 -p1
|
%patch123 -p1
|
||||||
%patch124 -p1
|
%patch124 -p1
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user