commit 364e19b3ebc59897d7e0b6fe1aaa8a241ac17459
Author: Sérgio M. Basto <sergio(a)serjux.com>
Date: Tue Oct 12 21:19:02 2021 +0100
Add fixes for EL8.5 or Centos Stream kernels
VirtualBox-kmod.spec | 9 +-
fixes-for-EL8.5.patch | 358 ++++++++++++++++++++++++++++++++++++++++++++++++++
update_vbox.sh | 2 +-
3 files changed, 366 insertions(+), 3 deletions(-)
---
diff --git a/VirtualBox-kmod.spec b/VirtualBox-kmod.spec
index c0c2e3c..6b33130 100644
--- a/VirtualBox-kmod.spec
+++ b/VirtualBox-kmod.spec
@@ -15,7 +15,7 @@
# "buildforkernels newest" macro for just that build; immediately after
# queuing that build enable the macro again for subsequent builds; that way
# a new akmod package will only get build when a new one is actually needed
-%if 0%{?fedora}
+%if 0%{?fedora} || 0%{?rhel}
%global buildforkernels akmod
%global debug_package %{nil}
%endif
@@ -32,7 +32,7 @@
Name: VirtualBox-kmod
Version: 6.1.26
-Release: 2%{?dist}
+Release: 3%{?dist}
#Release: 1%%{?prerel:.%%{prerel}}%%{?dist}
Summary: Kernel module for VirtualBox
@@ -41,6 +41,7 @@ URL:
http://www.virtualbox.org/wiki/VirtualBox
# This filters out the XEN kernel, since we don't run on XEN
Source1: excludekernel-filter.txt
Patch1: fixes-for-5.15_fedora.patch
+Patch2: fixes-for-EL8.5.patch
%global AkmodsBuildRequires %{_bindir}/kmodtool VirtualBox-kmodsrc >=
%{version}%{vboxreltag} xz time elfutils-libelf-devel gcc
@@ -63,6 +64,7 @@ Kernel module for VirtualBox
tar --use-compress-program xz -xf
%{_datadir}/%{name}-%{version}/%{name}-%{version}.tar.xz
pushd %{name}-%{version}
%patch1 -p1
+%patch2 -p1
popd
# error out if there was something wrong with kmodtool
@@ -126,6 +128,9 @@ DIRS=$(ls %{name}-%{version} |wc -l)
%changelog
+* Tue Oct 12 2021 Sérgio Basto <sergio(a)serjux.com> - 6.1.26-3
+- Add fixes for EL8.5 or Centos Stream kernels
+
* Mon Sep 13 2021 Sérgio Basto <sergio(a)serjux.com> - 6.1.26-2
- Add fixes-for-5.15
diff --git a/fixes-for-EL8.5.patch b/fixes-for-EL8.5.patch
new file mode 100644
index 0000000..67e3b3c
--- /dev/null
+++ b/fixes-for-EL8.5.patch
@@ -0,0 +1,358 @@
+diff -rup -x .orig VirtualBox-kmod-6.1.26.orig/vboxdrv/r0drv/linux/alloc-r0drv-linux.c
VirtualBox-kmod-6.1.26/vboxdrv/r0drv/linux/alloc-r0drv-linux.c
+--- VirtualBox-kmod-6.1.26.orig/vboxdrv/r0drv/linux/alloc-r0drv-linux.c 2021-07-28
17:24:50.000000000 +0100
++++ VirtualBox-kmod-6.1.26/vboxdrv/r0drv/linux/alloc-r0drv-linux.c 2021-10-12
18:49:32.252593879 +0100
+@@ -38,7 +38,7 @@
+
+
+ #if (defined(RT_ARCH_AMD64) || defined(DOXYGEN_RUNNING)) &&
!defined(RTMEMALLOC_EXEC_HEAP)
+-# if RTLNX_VER_MIN(2,6,23) && RTLNX_VER_MAX(5,8,0)
++# if RTLNX_VER_MIN(2,6,23) && RTLNX_VER_MAX(5,8,0) &&
!RTLNX_RHEL_MAJ_PREREQ(8,5)
+ /**
+ * Starting with 2.6.23 we can use __get_vm_area and map_vm_area to allocate
+ * memory in the moduel range. This is preferrable to the exec heap below.
+diff -rup -x .orig VirtualBox-kmod-6.1.26.orig/vboxguest/r0drv/linux/alloc-r0drv-linux.c
VirtualBox-kmod-6.1.26/vboxguest/r0drv/linux/alloc-r0drv-linux.c
+--- VirtualBox-kmod-6.1.26.orig/vboxguest/r0drv/linux/alloc-r0drv-linux.c 2021-07-28
17:24:50.000000000 +0100
++++ VirtualBox-kmod-6.1.26/vboxguest/r0drv/linux/alloc-r0drv-linux.c 2021-10-12
18:49:32.253593876 +0100
+@@ -38,7 +38,7 @@
+
+
+ #if (defined(RT_ARCH_AMD64) || defined(DOXYGEN_RUNNING)) &&
!defined(RTMEMALLOC_EXEC_HEAP)
+-# if RTLNX_VER_MIN(2,6,23) && RTLNX_VER_MAX(5,8,0)
++# if RTLNX_VER_MIN(2,6,23) && RTLNX_VER_MAX(5,8,0) &&
!RTLNX_RHEL_MAJ_PREREQ(8,5)
+ /**
+ * Starting with 2.6.23 we can use __get_vm_area and map_vm_area to allocate
+ * memory in the moduel range. This is preferrable to the exec heap below.
+diff -rup -x .orig VirtualBox-kmod-6.1.26.orig/vboxvideo/vbox_drv.c
VirtualBox-kmod-6.1.26/vboxvideo/vbox_drv.c
+--- VirtualBox-kmod-6.1.26.orig/vboxvideo/vbox_drv.c 2021-08-09 17:39:08.000000000 +0100
++++ VirtualBox-kmod-6.1.26/vboxvideo/vbox_drv.c 2021-10-12 18:49:32.250593886 +0100
+@@ -345,7 +345,7 @@ static struct drm_driver driver = {
+ .dumb_map_offset = vbox_dumb_mmap_offset,
+ #if RTLNX_VER_MAX(3,12,0) && !RTLNX_RHEL_MAJ_PREREQ(7,3)
+ .dumb_destroy = vbox_dumb_destroy,
+-#elif RTLNX_VER_MAX(5,12,0)
++#elif RTLNX_VER_MAX(5,12,0) && !RTLNX_RHEL_MAJ_PREREQ(8,5)
+ .dumb_destroy = drm_gem_dumb_destroy,
+ #endif
+ .prime_handle_to_fd = drm_gem_prime_handle_to_fd,
+@@ -355,7 +355,7 @@ static struct drm_driver driver = {
+ .gem_prime_import_sg_table = vbox_gem_prime_import_sg_table,
+ .gem_prime_mmap = vbox_gem_prime_mmap,
+
+-#if RTLNX_VER_MAX(5,11,0)
++#if RTLNX_VER_MAX(5,11,0) && !RTLNX_RHEL_MAJ_PREREQ(8,5)
+ .dev_priv_size = 0,
+ # if RTLNX_VER_MIN(4,7,0)
+ .gem_free_object_unlocked = vbox_gem_free_object,
+Only in VirtualBox-kmod-6.1.26/vboxvideo: vbox_drv.c.orig
+diff -rup -x .orig VirtualBox-kmod-6.1.26.orig/vboxvideo/vbox_drv.h
VirtualBox-kmod-6.1.26/vboxvideo/vbox_drv.h
+--- VirtualBox-kmod-6.1.26.orig/vboxvideo/vbox_drv.h 2021-08-09 17:39:08.000000000 +0100
++++ VirtualBox-kmod-6.1.26/vboxvideo/vbox_drv.h 2021-10-12 18:49:32.250593886 +0100
+@@ -171,7 +171,7 @@
+ #if RTLNX_VER_MAX(5,13,0)
+ # include <drm/ttm/ttm_memory.h>
+ #endif
+-#if RTLNX_VER_MAX(5,12,0)
++#if RTLNX_VER_MAX(5,12,0) && !RTLNX_RHEL_MAJ_PREREQ(8,5)
+ # include <drm/ttm/ttm_module.h>
+ #endif
+ #if RTLNX_VER_MIN(5,10,0)
+Only in VirtualBox-kmod-6.1.26/vboxvideo: vbox_drv.h.orig
+diff -rup -x .orig VirtualBox-kmod-6.1.26.orig/vboxvideo/vbox_fb.c
VirtualBox-kmod-6.1.26/vboxvideo/vbox_fb.c
+--- VirtualBox-kmod-6.1.26.orig/vboxvideo/vbox_fb.c 2021-08-09 17:39:08.000000000 +0100
++++ VirtualBox-kmod-6.1.26/vboxvideo/vbox_fb.c 2021-10-12 18:50:18.475449235 +0100
+@@ -296,7 +296,7 @@ static int vboxfb_create(struct drm_fb_h
+ return ret;
+ }
+
+-#if RTLNX_VER_MIN(5,12,0)
++#if RTLNX_VER_MIN(5,12,0) || RTLNX_RHEL_MAJ_PREREQ(8,5)
+ ret = ttm_bo_kmap(&bo->bo, 0, bo->bo.mem.num_pages, &bo->kmap);
+ #else
+ ret = ttm_bo_kmap(&bo->bo, 0, bo->bo.num_pages, &bo->kmap);
+Only in VirtualBox-kmod-6.1.26/vboxvideo: vbox_fb.c.orig
+diff -rup -x .orig VirtualBox-kmod-6.1.26.orig/vboxvideo/vbox_mode.c
VirtualBox-kmod-6.1.26/vboxvideo/vbox_mode.c
+--- VirtualBox-kmod-6.1.26.orig/vboxvideo/vbox_mode.c 2021-08-09 17:39:08.000000000
+0100
++++ VirtualBox-kmod-6.1.26/vboxvideo/vbox_mode.c 2021-10-12 18:51:05.138303200 +0100
+@@ -851,7 +851,7 @@ static int vbox_cursor_set2(struct drm_c
+ vbox->cursor_data_size = data_size;
+ dst = vbox->cursor_data;
+
+-#if RTLNX_VER_MIN(5,12,0)
++#if RTLNX_VER_MIN(5,12,0) || RTLNX_RHEL_MAJ_PREREQ(8,5)
+ ret = ttm_bo_kmap(&bo->bo, 0, bo->bo.mem.num_pages, &uobj_map);
+ #else
+ ret = ttm_bo_kmap(&bo->bo, 0, bo->bo.num_pages, &uobj_map);
+Only in VirtualBox-kmod-6.1.26/vboxvideo: vbox_mode.c.orig
+diff -rup -x .orig VirtualBox-kmod-6.1.26.orig/vboxvideo/vbox_ttm.c
VirtualBox-kmod-6.1.26/vboxvideo/vbox_ttm.c
+--- VirtualBox-kmod-6.1.26.orig/vboxvideo/vbox_ttm.c 2021-08-09 17:39:08.000000000 +0100
++++ VirtualBox-kmod-6.1.26/vboxvideo/vbox_ttm.c 2021-10-12 19:46:47.551880097 +0100
+@@ -28,7 +28,7 @@
+ * Michael Thayer <michael.thayer(a)oracle.com>
+ */
+ #include "vbox_drv.h"
+-#if RTLNX_VER_MIN(5,11,0)
++#if RTLNX_VER_MIN(5,11,0) || RTLNX_RHEL_MAJ_PREREQ(8,5)
+ # include <drm/drm_gem.h>
+ # include <drm/drm_gem_ttm_helper.h>
+ # include <drm/drm_gem_vram_helper.h>
+@@ -131,7 +131,7 @@ static bool vbox_ttm_bo_is_vbox_bo(struc
+ return false;
+ }
+
+-#if RTLNX_VER_MAX(5,10,0)
++#if RTLNX_VER_MAX(5,10,0) && !RTLNX_RHEL_MAJ_PREREQ(8,5)
+ static int
+ vbox_bo_init_mem_type(struct ttm_bo_device *bdev, u32 type,
+ struct ttm_mem_type_manager *man)
+@@ -175,7 +175,7 @@ static int vbox_bo_verify_access(struct
+ return 0;
+ }
+
+-#if RTLNX_VER_MAX(5,10,0)
++#if RTLNX_VER_MAX(5,10,0) && !RTLNX_RHEL_RANGE(8,5, 8,99)
+ static int vbox_ttm_io_mem_reserve(struct ttm_bo_device *bdev,
+ struct ttm_mem_reg *mem)
+ {
+@@ -215,7 +215,7 @@ static int vbox_ttm_io_mem_reserve(struc
+ struct vbox_private *vbox = vbox_bdev(bdev);
+ mem->bus.addr = NULL;
+ mem->bus.offset = 0;
+-# if RTLNX_VER_MAX(5,12,0)
++# if RTLNX_VER_MAX(5,12,0) && !RTLNX_RHEL_MAJ_PREREQ(8,5)
+ mem->size = mem->num_pages << PAGE_SHIFT;
+ # endif
+ mem->start = 0;
+@@ -225,10 +225,10 @@ static int vbox_ttm_io_mem_reserve(struc
+ /* system memory */
+ return 0;
+ case TTM_PL_VRAM:
+-# if RTLNX_VER_MIN(5,11,0)
++# if RTLNX_VER_MIN(5,11,0) || RTLNX_RHEL_RANGE(8,5, 8,99)
+ mem->bus.caching = ttm_write_combined;
+ # endif
+-# if RTLNX_VER_MIN(5,10,0)
++# if RTLNX_VER_MIN(5,10,0) || RTLNX_RHEL_RANGE(8,5, 8,99)
+ mem->bus.offset = (mem->start << PAGE_SHIFT) +
pci_resource_start(vbox->dev->pdev, 0);
+ # else
+ mem->bus.offset = mem->start << PAGE_SHIFT;
+@@ -250,7 +250,7 @@ static void vbox_ttm_io_mem_free(struct
+ struct ttm_resource *mem)
+ {
+ }
+-#elif RTLNX_VER_MIN(5,10,0)
++#elif RTLNX_VER_MIN(5,10,0) || RTLNX_RHEL_RANGE(8,5, 8,99)
+ static void vbox_ttm_io_mem_free(struct ttm_bo_device *bdev,
+ struct ttm_resource *mem)
+ {
+@@ -268,7 +268,7 @@ static void vbox_ttm_tt_destroy(struct t
+ ttm_tt_fini(tt);
+ kfree(tt);
+ }
+-#elif RTLNX_VER_MIN(5,10,0)
++#elif RTLNX_VER_MIN(5,10,0) || RTLNX_RHEL_RANGE(8,5, 8,99)
+ static void vbox_ttm_tt_destroy(struct ttm_bo_device *bdev, struct ttm_tt *tt)
+ {
+ ttm_tt_fini(tt);
+@@ -302,12 +302,12 @@ static struct ttm_tt *vbox_ttm_tt_create
+ if (!tt)
+ return NULL;
+
+-#if RTLNX_VER_MAX(5,10,0)
++#if RTLNX_VER_MAX(5,10,0) && !RTLNX_RHEL_RANGE(8,5, 8,99)
+ tt->func = &vbox_tt_backend_func;
+ #endif
+ #if RTLNX_VER_MAX(4,17,0) && !RTLNX_RHEL_MAJ_PREREQ(7,6) &&
!RTLNX_SUSE_MAJ_PREREQ(15,1) && !RTLNX_SUSE_MAJ_PREREQ(12,5)
+ if (ttm_tt_init(tt, bdev, size, page_flags, dummy_read_page)) {
+-#elif RTLNX_VER_MAX(5,11,0)
++#elif RTLNX_VER_MAX(5,11,0) && !RTLNX_RHEL_RANGE(8,5, 8,99)
+ if (ttm_tt_init(tt, bo, page_flags)) {
+ #else
+ if (ttm_tt_init(tt, bo, page_flags, ttm_write_combined)) {
+@@ -339,7 +339,7 @@ static void vbox_ttm_tt_unpopulate(struc
+ }
+ #endif
+
+-#if RTLNX_VER_MIN(5,11,0)
++#if RTLNX_VER_MIN(5,11,0) || RTLNX_RHEL_RANGE(8,5, 8,99)
+ static int vbox_bo_move(struct ttm_buffer_object *bo, bool evict,
+ struct ttm_operation_ctx *ctx, struct ttm_resource *new_mem,
+ struct ttm_place *hop)
+@@ -354,14 +354,14 @@ static struct ttm_device_funcs vbox_bo_d
+ static struct ttm_bo_driver vbox_bo_driver = {
+ #endif /* < 5.13.0 */
+ .ttm_tt_create = vbox_ttm_tt_create,
+-#if RTLNX_VER_MIN(5,10,0)
++#if RTLNX_VER_MIN(5,10,0) || RTLNX_RHEL_RANGE(8,5, 8,99)
+ .ttm_tt_destroy = vbox_ttm_tt_destroy,
+ #endif
+ #if RTLNX_VER_MAX(4,17,0)
+ .ttm_tt_populate = vbox_ttm_tt_populate,
+ .ttm_tt_unpopulate = vbox_ttm_tt_unpopulate,
+ #endif
+-#if RTLNX_VER_MAX(5,10,0)
++#if RTLNX_VER_MAX(5,10,0) && !RTLNX_RHEL_MAJ_PREREQ(8,5)
+ .init_mem_type = vbox_bo_init_mem_type,
+ #endif
+ #if RTLNX_VER_MIN(4,10,0) || RTLNX_RHEL_MAJ_PREREQ(7,4)
+@@ -380,7 +380,7 @@ static struct ttm_bo_driver vbox_bo_driv
+ .lru_tail = &ttm_bo_default_lru_tail,
+ .swap_lru_tail = &ttm_bo_default_swap_lru_tail,
+ #endif
+-#if RTLNX_VER_MIN(5,11,0)
++#if RTLNX_VER_MIN(5,11,0) || RTLNX_RHEL_RANGE(8,5, 8,99)
+ .move = &vbox_bo_move,
+ #endif
+ };
+@@ -409,7 +409,7 @@ int vbox_mm_init(struct vbox_private *vb
+ vbox->ttm.bo_global_ref.ref.object,
+ #endif
+ &vbox_bo_driver,
+-#if RTLNX_VER_MIN(5,11,0)
++#if RTLNX_VER_MIN(5,11,0) || RTLNX_RHEL_RANGE(8,5, 8,99)
+ dev->dev,
+ #endif
+ #if RTLNX_VER_MIN(3,15,0) || RTLNX_RHEL_MAJ_PREREQ(7,1)
+@@ -420,7 +420,7 @@ int vbox_mm_init(struct vbox_private *vb
+ #elif RTLNX_VER_MAX(5,2,0) && !RTLNX_RHEL_MAJ_PREREQ(8,2)
+ DRM_FILE_PAGE_OFFSET,
+ #endif
+-#if RTLNX_VER_MIN(5,11,0)
++#if RTLNX_VER_MIN(5,11,0) || RTLNX_RHEL_RANGE(8,5, 8,99)
+ false,
+ #endif
+ true);
+@@ -433,7 +433,7 @@ int vbox_mm_init(struct vbox_private *vb
+ #endif
+ }
+
+-#if RTLNX_VER_MIN(5,10,0)
++#if RTLNX_VER_MIN(5,10,0) || RTLNX_RHEL_RANGE(8,5, 8,99)
+ ret = ttm_range_man_init(bdev, TTM_PL_VRAM, false,
+ vbox->available_vram_size >> PAGE_SHIFT);
+ #else
+@@ -501,7 +501,7 @@ void vbox_ttm_placement(struct vbox_bo *
+ bo->placement.busy_placement = bo->placements;
+
+ if (mem_type & VBOX_MEM_TYPE_VRAM) {
+-#if RTLNX_VER_MIN(5,11,0)
++#if RTLNX_VER_MIN(5,11,0) || RTLNX_RHEL_RANGE(8,5, 8,99)
+ bo->placements[c].mem_type = TTM_PL_VRAM;
+ PLACEMENT_FLAGS(bo->placements[c++]) = 0;
+ #elif RTLNX_VER_MIN(5,10,0)
+@@ -514,7 +514,7 @@ void vbox_ttm_placement(struct vbox_bo *
+ #endif
+ }
+ if (mem_type & VBOX_MEM_TYPE_SYSTEM) {
+-#if RTLNX_VER_MIN(5,11,0)
++#if RTLNX_VER_MIN(5,11,0) || RTLNX_RHEL_RANGE(8,5, 8,99)
+ bo->placements[c].mem_type = TTM_PL_SYSTEM;
+ PLACEMENT_FLAGS(bo->placements[c++]) = 0;
+ #elif RTLNX_VER_MIN(5,10,0)
+@@ -527,7 +527,7 @@ void vbox_ttm_placement(struct vbox_bo *
+ #endif
+ }
+ if (!c) {
+-#if RTLNX_VER_MIN(5,11,0)
++#if RTLNX_VER_MIN(5,11,0) || RTLNX_RHEL_RANGE(8,5, 8,99)
+ bo->placements[c].mem_type = TTM_PL_SYSTEM;
+ PLACEMENT_FLAGS(bo->placements[c++]) = 0;
+ #elif RTLNX_VER_MIN(5,10,0)
+@@ -551,7 +551,7 @@ void vbox_ttm_placement(struct vbox_bo *
+ #endif
+ }
+
+-#if RTLNX_VER_MIN(5,11,0)
++#if RTLNX_VER_MIN(5,11,0) || RTLNX_RHEL_RANGE(8,5, 8,99)
+ static const struct drm_gem_object_funcs vbox_drm_gem_object_funcs = {
+ .free = vbox_gem_free_object,
+ .print_info = drm_gem_ttm_print_info,
+@@ -576,7 +576,7 @@ int vbox_bo_create(struct drm_device *de
+ if (ret)
+ goto err_free_vboxbo;
+
+-#if RTLNX_VER_MIN(5,11,0)
++#if RTLNX_VER_MIN(5,11,0) || RTLNX_RHEL_RANGE(8,5, 8,99)
+ if (!vboxbo->gem.funcs) {
+ vboxbo->gem.funcs = &vbox_drm_gem_object_funcs;
+ }
+@@ -634,7 +634,7 @@ int vbox_bo_pin(struct vbox_bo *bo, u32
+ struct ttm_operation_ctx ctx = { false, false };
+ #endif
+ int ret;
+-#if RTLNX_VER_MAX(5,11,0)
++#if RTLNX_VER_MAX(5,11,0) && !RTLNX_RHEL_MAJ_PREREQ(8,5)
+ int i;
+ #endif
+
+@@ -648,7 +648,7 @@ int vbox_bo_pin(struct vbox_bo *bo, u32
+
+ vbox_ttm_placement(bo, mem_type);
+
+-#if RTLNX_VER_MAX(5,11,0)
++#if RTLNX_VER_MAX(5,11,0) && !RTLNX_RHEL_MAJ_PREREQ(8,5)
+ for (i = 0; i < bo->placement.num_placement; i++)
+ PLACEMENT_FLAGS(bo->placements[i]) |= TTM_PL_FLAG_NO_EVICT;
+ #endif
+@@ -663,7 +663,7 @@ int vbox_bo_pin(struct vbox_bo *bo, u32
+
+ bo->pin_count = 1;
+
+-#if RTLNX_VER_MIN(5,11,0)
++#if RTLNX_VER_MIN(5,11,0) || RTLNX_RHEL_RANGE(8,5, 8,99)
+ ttm_bo_pin(&bo->bo);
+ #endif
+
+@@ -676,12 +676,12 @@ int vbox_bo_pin(struct vbox_bo *bo, u32
+ int vbox_bo_unpin(struct vbox_bo *bo)
+ {
+ #if RTLNX_VER_MIN(4,16,0) || RTLNX_RHEL_MAJ_PREREQ(7,6) || RTLNX_SUSE_MAJ_PREREQ(15,1)
|| RTLNX_SUSE_MAJ_PREREQ(12,5)
+-# if RTLNX_VER_MAX(5,11,0)
++# if RTLNX_VER_MAX(5,11,0) && !RTLNX_RHEL_MAJ_PREREQ(8,5)
+ struct ttm_operation_ctx ctx = { false, false };
+ # endif
+ #endif
+ int ret;
+-#if RTLNX_VER_MAX(5,11,0)
++#if RTLNX_VER_MAX(5,11,0) && !RTLNX_RHEL_MAJ_PREREQ(8,5)
+ int i;
+ #endif
+
+@@ -693,27 +693,27 @@ int vbox_bo_unpin(struct vbox_bo *bo)
+ if (bo->pin_count)
+ return 0;
+
+-#if RTLNX_VER_MAX(5,11,0)
++#if RTLNX_VER_MAX(5,11,0) && !RTLNX_RHEL_MAJ_PREREQ(8,5)
+ for (i = 0; i < bo->placement.num_placement; i++)
+ PLACEMENT_FLAGS(bo->placements[i]) &= ~TTM_PL_FLAG_NO_EVICT;
+ #endif
+
+ #if RTLNX_VER_MAX(4,16,0) && !RTLNX_RHEL_MAJ_PREREQ(7,6) &&
!RTLNX_SUSE_MAJ_PREREQ(15,1) && !RTLNX_SUSE_MAJ_PREREQ(12,5)
+ ret = ttm_bo_validate(&bo->bo, &bo->placement, false, false);
+-#elif RTLNX_VER_MAX(5,11,0)
++#elif RTLNX_VER_MAX(5,11,0) && !RTLNX_RHEL_MAJ_PREREQ(8,5)
+ ret = ttm_bo_validate(&bo->bo, &bo->placement, &ctx);
+ #endif
+ if (ret)
+ return ret;
+
+-#if RTLNX_VER_MIN(5,11,0)
++#if RTLNX_VER_MIN(5,11,0) || RTLNX_RHEL_RANGE(8,5, 8,99)
+ ttm_bo_unpin(&bo->bo);
+ #endif
+
+ return 0;
+ }
+
+-#if RTLNX_VER_MAX(5,11,0)
++#if RTLNX_VER_MAX(5,11,0) && !RTLNX_RHEL_MAJ_PREREQ(8,5)
+ /*
+ * Move a vbox-owned buffer object to system memory if no one else has it
+ * pinned. The caller must have pinned it previously, and this call will
+@@ -767,5 +767,4 @@ int vbox_mmap(struct file *filp, struct
+ file_priv = filp->private_data;
+ vbox = file_priv->minor->dev->dev_private;
+
+- return ttm_bo_mmap(filp, vma, &vbox->ttm.bdev);
+-}
++ return ttm_bo_mmap(filp, vma, &vbox->ttm.bdev);}
diff --git a/update_vbox.sh b/update_vbox.sh
index 0b22ca7..14df09e 100755
--- a/update_vbox.sh
+++ b/update_vbox.sh
@@ -32,7 +32,7 @@ echo Press enter to continue; read dummy;
BRANCH1=f$RAWHIDE
BRANCH2=fc$RAWHIDE
echo koji-rpmfusion tag-build $BRANCH1-free-override VirtualBox-$VERSION-$REL.$BRANCH2
-koji-rpmfusion tag-build $BRANCH1-free-override VirtualBox-$VERSION-3.$BRANCH2
+koji-rpmfusion tag-build $BRANCH1-free-override VirtualBox-$VERSION-$REL.$BRANCH2
(koji-rpmfusion wait-repo $BRANCH1-free-build --build=VirtualBox-$VERSION-$REL.$BRANCH2
&& \
rfpkg push && rfpkg build --nowait ) &
fi