[VirtualBox-kmod] add opensuse patches fix_7.0.6_locking_problems.patch and
by Sérgio M. Basto
commit ffaadaf8908f3c696714c70fcb266aa45503e8ba
Author: Sérgio M. Basto <sergio(a)serjux.com>
Date: Thu Apr 13 01:11:49 2023 +0100
add opensuse patches fix_7.0.6_locking_problems.patch and
fixes_for_kernel_6.3.patch
VirtualBox-kmod.spec | 12 +-
fix_7.0.6_locking_problems.patch | 96 ++++++++++++
fixes_for_kernel_6.3.patch | 330 +++++++++++++++++++++++++++++++++++++++
3 files changed, 436 insertions(+), 2 deletions(-)
---
diff --git a/VirtualBox-kmod.spec b/VirtualBox-kmod.spec
index cee1f57..bc26629 100644
--- a/VirtualBox-kmod.spec
+++ b/VirtualBox-kmod.spec
@@ -40,7 +40,7 @@
Name: VirtualBox-kmod
Version: 7.0.6
-Release: 3%{?dist}
+Release: 4%{?dist}
#Release: 1%%{?prerel:.%%{prerel}}%%{?dist}
Summary: Kernel module for VirtualBox
@@ -48,7 +48,9 @@ License: GPLv2 or CDDL
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: 0001-Additions-Linux-vboxvideo-Additional-build-fixes-for.patch
+Patch1: fixes_for_kernel_6.3.patch
+Patch2: fix_7.0.6_locking_problems.patch
+Patch3: 0001-Additions-Linux-vboxvideo-Additional-build-fixes-for.patch
%global AkmodsBuildRequires %{_bindir}/kmodtool VirtualBox-kmodsrc = %{version} xz time elfutils-libelf-devel gcc
@@ -71,6 +73,8 @@ Kernel module for VirtualBox
tar --use-compress-program xz -xf %{_datadir}/%{name}-%{version}/%{name}-%{version}.tar.xz
pushd %{name}-%{version}
%patch1 -p1
+%patch2 -p1
+%patch3 -p1
popd
# error out if there was something wrong with kmodtool
@@ -133,6 +137,10 @@ DIRS=$(ls %{name}-%{version} |wc -l)
[ $MODS = $DIRS ] || [ $MODS = 0 ]
%changelog
+* Thu Apr 13 2023 Sérgio Basto <sergio(a)serjux.com> - 7.0.6-4
+- add opensuse patches fix_7.0.6_locking_problems.patch and
+ fixes_for_kernel_6.3.patch
+
* Fri Mar 31 2023 Sérgio Basto <sergio(a)serjux.com> - 7.0.6-3
- Add support to Centos Stream 8 (8.8)
diff --git a/fix_7.0.6_locking_problems.patch b/fix_7.0.6_locking_problems.patch
new file mode 100644
index 0000000..14bf5c7
--- /dev/null
+++ b/fix_7.0.6_locking_problems.patch
@@ -0,0 +1,96 @@
+Index: VirtualBox-7.0.6/src/VBox/HostDrivers/Support/SUPDrv.cpp
+===================================================================
+--- ./vboxdrv/SUPDrv.c
++++ ./vboxdrv/SUPDrv.c
+@@ -871,8 +871,8 @@ void VBOXCALL supdrvDeleteDevExt(PSUPDRV
+
+ /* kill the GIP. */
+ supdrvGipDestroy(pDevExt);
+- RTSpinlockDestroy(pDevExt->hGipSpinlock);
+ pDevExt->hGipSpinlock = NIL_RTSPINLOCK;
++ RTSpinlockDestroy(pDevExt->hGipSpinlock);
+
+ supdrvTracerTerm(pDevExt);
+
+@@ -5351,8 +5351,8 @@ static int supdrvIOCtl_LdrOpen(PSUPDRVDE
+ rc = supdrvLdrAddUsage(pDevExt, pSession, pImage, true /*fRing3Usage*/);
+ if (RT_FAILURE(rc))
+ {
+- supdrvLdrUnlock(pDevExt);
+ pImage->uMagic = SUPDRVLDRIMAGE_MAGIC_DEAD;
++ supdrvLdrUnlock(pDevExt);
+ RTMemFree(pImage);
+ Log(("supdrvIOCtl_LdrOpen(%s): failed - %Rrc\n", pReq->u.In.szName, rc));
+ return rc;
+@@ -6095,6 +6095,7 @@ static int supdrvIOCtl_LdrFree(PSUPDRVDE
+ /* free it */
+ pUsage->pImage = NULL;
+ pUsage->pNext = NULL;
++ RTSpinlockRelease(pDevExt->Spinlock);
+ RTMemFree(pUsage);
+
+ /*
+@@ -6106,7 +6107,10 @@ static int supdrvIOCtl_LdrFree(PSUPDRVDE
+ supdrvLdrSubtractUsage(pDevExt, pImage, 1);
+ }
+ else
++ {
++ RTSpinlockRelease(pDevExt->Spinlock);
+ Log(("supdrvIOCtl_LdrFree: Dangling objects in %p/%s!\n", pImage->pvImage, pImage->szName));
++ }
+ }
+ else
+ {
+@@ -6334,9 +6338,9 @@ static int supdrvIOCtl_LdrQuerySymbol(PS
+ rc = VERR_INVALID_HANDLE;
+ }
+
++ pReq->u.Out.pvSymbol = pvSymbol;
+ supdrvLdrUnlock(pDevExt);
+
+- pReq->u.Out.pvSymbol = pvSymbol;
+ return rc;
+ }
+
+Index: VirtualBox-7.0.6/src/VBox/HostDrivers/Support/SUPDrvGip.cpp
+===================================================================
+--- ./vboxdrv/SUPDrvGip.c
++++ ./vboxdrv/SUPDrvGip.c
+@@ -4537,9 +4537,9 @@ static int supdrvTscDeltaThreadWait(PSUP
+ */
+ static void supdrvTscDeltaThreadStartMeasurement(PSUPDRVDEVEXT pDevExt, bool fForceAll)
+ {
++ RTSpinlockAcquire(pDevExt->hTscDeltaSpinlock);
+ if (pDevExt->hTscDeltaThread != NIL_RTTHREAD)
+ {
+- RTSpinlockAcquire(pDevExt->hTscDeltaSpinlock);
+ if ( pDevExt->enmTscDeltaThreadState == kTscDeltaThreadState_Listening
+ || pDevExt->enmTscDeltaThreadState == kTscDeltaThreadState_Measuring)
+ {
+@@ -4550,9 +4550,9 @@ static void supdrvTscDeltaThreadStartMea
+ else if ( pDevExt->enmTscDeltaThreadState == kTscDeltaThreadState_WaitAndMeasure
+ && fForceAll)
+ pDevExt->fTscThreadRecomputeAllDeltas = true;
+- RTSpinlockRelease(pDevExt->hTscDeltaSpinlock);
+ RTThreadUserSignal(pDevExt->hTscDeltaThread);
+ }
++ RTSpinlockRelease(pDevExt->hTscDeltaSpinlock);
+ }
+
+
+@@ -4628,13 +4628,13 @@ static int supdrvTscDeltaThreadInit(PSUP
+ }
+ else
+ OSDBGPRINT(("supdrvTscDeltaInit: RTThreadCreate failed. rc=%Rrc\n", rc));
+- RTSemEventDestroy(pDevExt->hTscDeltaEvent);
+ pDevExt->hTscDeltaEvent = NIL_RTSEMEVENT;
++ RTSemEventDestroy(pDevExt->hTscDeltaEvent);
+ }
+ else
+ OSDBGPRINT(("supdrvTscDeltaInit: RTSemEventCreate failed. rc=%Rrc\n", rc));
+- RTSpinlockDestroy(pDevExt->hTscDeltaSpinlock);
+ pDevExt->hTscDeltaSpinlock = NIL_RTSPINLOCK;
++ RTSpinlockDestroy(pDevExt->hTscDeltaSpinlock);
+ }
+ else
+ OSDBGPRINT(("supdrvTscDeltaInit: RTSpinlockCreate failed. rc=%Rrc\n", rc));
diff --git a/fixes_for_kernel_6.3.patch b/fixes_for_kernel_6.3.patch
new file mode 100644
index 0000000..da19630
--- /dev/null
+++ b/fixes_for_kernel_6.3.patch
@@ -0,0 +1,330 @@
+diff -rup VirtualBox-kmod-7.0.6.orig/vboxdrv/r0drv/linux/memobj-r0drv-linux.c VirtualBox-kmod-7.0.6/vboxdrv/r0drv/linux/memobj-r0drv-linux.c
+--- VirtualBox-kmod-7.0.6.orig/vboxdrv/r0drv/linux/memobj-r0drv-linux.c 2023-01-11 14:44:35.000000000 +0000
++++ VirtualBox-kmod-7.0.6/vboxdrv/r0drv/linux/memobj-r0drv-linux.c 2023-04-13 01:09:32.458555010 +0100
+@@ -1401,7 +1401,11 @@ DECLHIDDEN(int) rtR0MemObjNativeLockUser
+ while (rc-- > 0)
+ {
+ flush_dcache_page(pMemLnx->apPages[rc]);
++#if RTLNX_VER_MIN(6,3,0)
++ vm_flags_set(papVMAs[rc], VM_DONTCOPY | VM_LOCKED);
++#else
+ papVMAs[rc]->vm_flags |= VM_DONTCOPY | VM_LOCKED;
++#endif
+ }
+
+ LNX_MM_UP_READ(pTask->mm);
+@@ -1872,7 +1876,10 @@ DECLHIDDEN(int) rtR0MemObjNativeMapUser(
+ rc = vm_insert_page(vma, ulAddrCur, pMemLnxToMap->apPages[iPage]);
+ /* Thes flags help making 100% sure some bad stuff wont happen (swap, core, ++).
+ * See remap_pfn_range() in mm/memory.c */
+-#if RTLNX_VER_MIN(3,7,0)
++
++#if RTLNX_VER_MIN(6,3,0)
++ vm_flags_set(vma, VM_DONTEXPAND | VM_DONTDUMP);
++#elif RTLNX_VER_MIN(3,7,0)
+ vma->vm_flags |= VM_DONTEXPAND | VM_DONTDUMP;
+ #else
+ vma->vm_flags |= VM_RESERVED;
+diff -rup VirtualBox-kmod-7.0.6.orig/vboxguest/r0drv/linux/memobj-r0drv-linux.c VirtualBox-kmod-7.0.6/vboxguest/r0drv/linux/memobj-r0drv-linux.c
+--- VirtualBox-kmod-7.0.6.orig/vboxguest/r0drv/linux/memobj-r0drv-linux.c 2023-01-11 14:44:35.000000000 +0000
++++ VirtualBox-kmod-7.0.6/vboxguest/r0drv/linux/memobj-r0drv-linux.c 2023-04-13 01:09:32.457555014 +0100
+@@ -1401,7 +1401,11 @@ DECLHIDDEN(int) rtR0MemObjNativeLockUser
+ while (rc-- > 0)
+ {
+ flush_dcache_page(pMemLnx->apPages[rc]);
++#if RTLNX_VER_MIN(6,3,0)
++ vm_flags_set(papVMAs[rc], VM_DONTCOPY | VM_LOCKED);
++#else
+ papVMAs[rc]->vm_flags |= VM_DONTCOPY | VM_LOCKED;
++#endif
+ }
+
+ LNX_MM_UP_READ(pTask->mm);
+@@ -1872,7 +1876,10 @@ DECLHIDDEN(int) rtR0MemObjNativeMapUser(
+ rc = vm_insert_page(vma, ulAddrCur, pMemLnxToMap->apPages[iPage]);
+ /* Thes flags help making 100% sure some bad stuff wont happen (swap, core, ++).
+ * See remap_pfn_range() in mm/memory.c */
+-#if RTLNX_VER_MIN(3,7,0)
++
++#if RTLNX_VER_MIN(6,3,0)
++ vm_flags_set(vma, VM_DONTEXPAND | VM_DONTDUMP);
++#elif RTLNX_VER_MIN(3,7,0)
+ vma->vm_flags |= VM_DONTEXPAND | VM_DONTDUMP;
+ #else
+ vma->vm_flags |= VM_RESERVED;
+diff -rup VirtualBox-kmod-7.0.6.orig/vboxsf/dirops.c VirtualBox-kmod-7.0.6/vboxsf/dirops.c
+--- VirtualBox-kmod-7.0.6.orig/vboxsf/dirops.c 2023-01-11 14:35:42.000000000 +0000
++++ VirtualBox-kmod-7.0.6/vboxsf/dirops.c 2023-04-13 01:09:32.461555000 +0100
+@@ -1038,14 +1038,16 @@ static int vbsf_inode_atomic_open(struct
+ /**
+ * Create a new regular file.
+ *
+- * @param ns The name space.
++ * @param idmap idmap of the mount.
+ * @param parent inode of the directory
+ * @param dentry directory cache entry
+ * @param mode file mode
+ * @param excl Possible O_EXCL...
+ * @returns 0 on success, Linux error code otherwise
+ */
+-#if RTLNX_VER_MIN(5,12,0) || defined(DOXYGEN_RUNNING)
++#if RTLNX_VER_MIN(6,3,0)
++static int vbsf_inode_create(struct mnt_idmap *idmap, struct inode *parent, struct dentry *dentry, umode_t mode, bool excl)
++#elif RTLNX_VER_MIN(5,12,0) || defined(DOXYGEN_RUNNING)
+ static int vbsf_inode_create(struct user_namespace *ns, struct inode *parent, struct dentry *dentry, umode_t mode, bool excl)
+ #elif RTLNX_VER_MIN(3,6,0)
+ static int vbsf_inode_create(struct inode *parent, struct dentry *dentry, umode_t mode, bool excl)
+@@ -1079,13 +1081,15 @@ static int vbsf_inode_create(struct inod
+ /**
+ * Create a new directory.
+ *
+- * @param ns The name space.
++ * @param idmap idmap of the mount.
+ * @param parent inode of the directory
+ * @param dentry directory cache entry
+ * @param mode file mode
+ * @returns 0 on success, Linux error code otherwise
+ */
+-#if RTLNX_VER_MIN(5,12,0) || defined(DOXYGEN_RUNNING)
++#if RTLNX_VER_MIN(6,3,0)
++static int vbsf_inode_mkdir(struct mnt_idmap *idmap, struct inode *parent, struct dentry *dentry, umode_t mode)
++#elif RTLNX_VER_MIN(5,12,0) || defined(DOXYGEN_RUNNING)
+ static int vbsf_inode_mkdir(struct user_namespace *ns, struct inode *parent, struct dentry *dentry, umode_t mode)
+ #elif RTLNX_VER_MIN(3,3,0)
+ static int vbsf_inode_mkdir(struct inode *parent, struct dentry *dentry, umode_t mode)
+@@ -1192,7 +1196,7 @@ static int vbsf_inode_rmdir(struct inode
+ /**
+ * Rename a regular file / directory.
+ *
+- * @param ns The name space.
++ * @param idmap idmap of the mount.
+ * @param old_parent inode of the old parent directory
+ * @param old_dentry old directory cache entry
+ * @param new_parent inode of the new parent directory
+@@ -1200,7 +1204,11 @@ static int vbsf_inode_rmdir(struct inode
+ * @param flags flags
+ * @returns 0 on success, Linux error code otherwise
+ */
+-#if RTLNX_VER_MIN(5,12,0) || defined(DOXYGEN_RUNNING)
++#if RTLNX_VER_MIN(6,3,0)
++static int vbsf_inode_rename(struct mnt_idmap *idmap,
++ struct inode *old_parent, struct dentry *old_dentry,
++ struct inode *new_parent, struct dentry *new_dentry, unsigned flags)
++#elif RTLNX_VER_MIN(5,12,0) || defined(DOXYGEN_RUNNING)
+ static int vbsf_inode_rename(struct user_namespace *ns,
+ struct inode *old_parent, struct dentry *old_dentry,
+ struct inode *new_parent, struct dentry *new_dentry, unsigned flags)
+@@ -1312,7 +1320,9 @@ static int vbsf_inode_rename_no_flags(st
+ /**
+ * Create a symbolic link.
+ */
+-#if RTLNX_VER_MIN(5,12,0)
++#if RTLNX_VER_MIN(6,3,0)
++static int vbsf_inode_symlink(struct mnt_idmap *idmap, struct inode *parent, struct dentry *dentry, const char *target)
++#elif RTLNX_VER_MIN(5,12,0)
+ static int vbsf_inode_symlink(struct user_namespace *ns, struct inode *parent, struct dentry *dentry, const char *target)
+ #else
+ static int vbsf_inode_symlink(struct inode *parent, struct dentry *dentry, const char *target)
+diff -rup VirtualBox-kmod-7.0.6.orig/vboxsf/utils.c VirtualBox-kmod-7.0.6/vboxsf/utils.c
+--- VirtualBox-kmod-7.0.6.orig/vboxsf/utils.c 2023-01-11 14:35:42.000000000 +0000
++++ VirtualBox-kmod-7.0.6/vboxsf/utils.c 2023-04-13 01:09:32.461555000 +0100
+@@ -697,8 +697,10 @@ int vbsf_inode_revalidate_with_handle(st
+ has inode at all) from these new attributes we derive [kstat] via
+ [generic_fillattr] */
+ #if RTLNX_VER_MIN(2,5,18)
+-
+-# if RTLNX_VER_MIN(5,12,0)
++# if RTLNX_VER_MIN(6,3,0)
++int vbsf_inode_getattr(struct mnt_idmap *idmap, const struct path *path,
++ struct kstat *kstat, u32 request_mask, unsigned int flags)
++# elif RTLNX_VER_MIN(5,12,0)
+ int vbsf_inode_getattr(struct user_namespace *ns, const struct path *path,
+ struct kstat *kstat, u32 request_mask, unsigned int flags)
+ # elif RTLNX_VER_MIN(4,11,0)
+@@ -741,7 +743,9 @@ int vbsf_inode_getattr(struct vfsmount *
+ # endif
+ if (rc == 0) {
+ /* Do generic filling in of info. */
+-# if RTLNX_VER_MIN(5,12,0)
++# if RTLNX_VER_MIN(6,3,0)
++ generic_fillattr(idmap, dentry->d_inode, kstat);
++# elif RTLNX_VER_MIN(5,12,0)
+ generic_fillattr(ns, dentry->d_inode, kstat);
+ # else
+ generic_fillattr(dentry->d_inode, kstat);
+@@ -791,7 +795,9 @@ int vbsf_inode_getattr(struct vfsmount *
+ /**
+ * Modify inode attributes.
+ */
+-#if RTLNX_VER_MIN(5,12,0)
++#if RTLNX_VER_MIN(6,3,0)
++int vbsf_inode_setattr(struct mnt_idmap *idmap, struct dentry *dentry, struct iattr *iattr)
++#elif RTLNX_VER_MIN(5,12,0)
+ int vbsf_inode_setattr(struct user_namespace *ns, struct dentry *dentry, struct iattr *iattr)
+ #else
+ int vbsf_inode_setattr(struct dentry *dentry, struct iattr *iattr)
+@@ -815,7 +821,9 @@ int vbsf_inode_setattr(struct dentry *de
+ */
+ iattr->ia_valid |= ATTR_FORCE;
+ #if (RTLNX_VER_RANGE(3,16,39, 3,17,0)) || RTLNX_VER_MIN(4,9,0) || (RTLNX_VER_RANGE(4,1,37, 4,2,0)) || RTLNX_UBUNTU_ABI_MIN(4,4,255,208)
+-# if RTLNX_VER_MIN(5,12,0)
++# if RTLNX_VER_MIN(6,3,0)
++ rc = setattr_prepare(idmap, dentry, iattr);
++# elif RTLNX_VER_MIN(5,12,0)
+ rc = setattr_prepare(ns, dentry, iattr);
+ # else
+ rc = setattr_prepare(dentry, iattr);
+diff -rup VirtualBox-kmod-7.0.6.orig/vboxsf/vfsmod.h VirtualBox-kmod-7.0.6/vboxsf/vfsmod.h
+--- VirtualBox-kmod-7.0.6.orig/vboxsf/vfsmod.h 2023-01-11 14:35:42.000000000 +0000
++++ VirtualBox-kmod-7.0.6/vboxsf/vfsmod.h 2023-04-13 01:09:32.461555000 +0100
+@@ -264,7 +264,10 @@ extern void vbsf_update_inode(struct ino
+ extern int vbsf_inode_revalidate_worker(struct dentry *dentry, bool fForced, bool fInodeLocked);
+ extern int vbsf_inode_revalidate_with_handle(struct dentry *dentry, SHFLHANDLE hHostFile, bool fForced, bool fInodeLocked);
+ #if RTLNX_VER_MIN(2,5,18)
+-# if RTLNX_VER_MIN(5,12,0)
++# if RTLNX_VER_MIN(6,3,0)
++extern int vbsf_inode_getattr(struct mnt_idmap *idmap, const struct path *path,
++ struct kstat *kstat, u32 request_mask, unsigned int query_flags);
++# elif RTLNX_VER_MIN(5,12,0)
+ extern int vbsf_inode_getattr(struct user_namespace *ns, const struct path *path,
+ struct kstat *kstat, u32 request_mask, unsigned int query_flags);
+ # elif RTLNX_VER_MIN(4,11,0)
+@@ -275,7 +278,9 @@ extern int vbsf_inode_getattr(struct vf
+ #else /* < 2.5.44 */
+ extern int vbsf_inode_revalidate(struct dentry *dentry);
+ #endif /* < 2.5.44 */
+-#if RTLNX_VER_MIN(5,12,0)
++#if RTLNX_VER_MIN(6,3,0)
++extern int vbsf_inode_setattr(struct mnt_idmap *idmap, struct dentry *dentry, struct iattr *iattr);
++#elif RTLNX_VER_MIN(5,12,0)
+ extern int vbsf_inode_setattr(struct user_namespace *ns, struct dentry *dentry, struct iattr *iattr);
+ #else
+ extern int vbsf_inode_setattr(struct dentry *dentry, struct iattr *iattr);
+Only in VirtualBox-kmod-7.0.6/vboxsf: vfsmod.h.orig
+diff -rup VirtualBox-kmod-7.0.6.orig/vboxvideo/vbox_drv.h VirtualBox-kmod-7.0.6/vboxvideo/vbox_drv.h
+--- VirtualBox-kmod-7.0.6.orig/vboxvideo/vbox_drv.h 2023-01-18 18:19:40.000000000 +0000
++++ VirtualBox-kmod-7.0.6/vboxvideo/vbox_drv.h 2023-04-13 01:09:32.458555010 +0100
+@@ -167,8 +167,12 @@
+ # include <drm/drm_gem.h>
+ #endif
+
+-#include <drm/ttm/ttm_bo_api.h>
+-#include <drm/ttm/ttm_bo_driver.h>
++#if RTLNX_VER_MIN(6,3,0)
++# include <drm/ttm/ttm_bo.h>
++#else
++# include <drm/ttm/ttm_bo_api.h>
++# include <drm/ttm/ttm_bo_driver.h>
++#endif
+ #include <drm/ttm/ttm_placement.h>
+ #if RTLNX_VER_MAX(5,13,0) && !RTLNX_RHEL_RANGE(8,6, 8,99)
+ # include <drm/ttm/ttm_memory.h>
+Only in VirtualBox-kmod-7.0.6/vboxvideo: vbox_drv.h.orig
+diff -rup VirtualBox-kmod-7.0.6.orig/vboxvideo/vbox_fb.c VirtualBox-kmod-7.0.6/vboxvideo/vbox_fb.c
+--- VirtualBox-kmod-7.0.6.orig/vboxvideo/vbox_fb.c 2023-01-18 18:19:40.000000000 +0000
++++ VirtualBox-kmod-7.0.6/vboxvideo/vbox_fb.c 2023-04-13 01:09:32.460555003 +0100
+@@ -340,12 +340,14 @@ static int vboxfb_create(struct drm_fb_h
+ info->flags = FBINFO_DEFAULT | FBINFO_MISC_ALWAYS_SETPAR;
+ info->fbops = &vboxfb_ops;
+
++#if RTLNX_VER_MAX(6,3,0)
+ /*
+ * This seems to be done for safety checking that the framebuffer
+ * is not registered twice by different drivers.
+ */
+ info->apertures->ranges[0].base = pci_resource_start(VBOX_DRM_TO_PCI_DEV(dev), 0);
+ info->apertures->ranges[0].size = pci_resource_len(VBOX_DRM_TO_PCI_DEV(dev), 0);
++#endif
+
+ #if RTLNX_VER_MIN(5,2,0) || RTLNX_RHEL_MAJ_PREREQ(8,2)
+ /*
+@@ -452,11 +454,14 @@ int vbox_fbdev_init(struct drm_device *d
+ vbox->fbdev = fbdev;
+ spin_lock_init(&fbdev->dirty_lock);
+
+-#if RTLNX_VER_MAX(3,17,0) && !RTLNX_RHEL_MAJ_PREREQ(7,2)
+- fbdev->helper.funcs = &vbox_fb_helper_funcs;
+-#else
++#if RTLNX_VER_MIN(6,3,0)
++ drm_fb_helper_prepare(dev, &fbdev->helper, 32, &vbox_fb_helper_funcs);
++#elif RTLNX_VER_MIN(3,17,0) || RTLNX_RHEL_MIN(7,2)
+ drm_fb_helper_prepare(dev, &fbdev->helper, &vbox_fb_helper_funcs);
++#else
++ fbdev->helper.funcs = &vbox_fb_helper_funcs;
+ #endif
++
+ #if RTLNX_VER_MIN(5,7,0) || RTLNX_RHEL_MIN(8,4) || RTLNX_SUSE_MAJ_PREREQ(15,3)
+ ret = drm_fb_helper_init(dev, &fbdev->helper);
+ #elif RTLNX_VER_MIN(4,11,0) || RTLNX_RHEL_MAJ_PREREQ(7,5)
+@@ -478,7 +483,11 @@ int vbox_fbdev_init(struct drm_device *d
+ /* disable all the possible outputs/crtcs before entering KMS mode */
+ drm_helper_disable_unused_functions(dev);
+
++#if RTLNX_VER_MIN(6,3,0)
++ ret = drm_fb_helper_initial_config(&fbdev->helper);
++#else
+ ret = drm_fb_helper_initial_config(&fbdev->helper, 32);
++#endif
+ if (ret)
+ goto err_fini;
+
+@@ -493,6 +502,11 @@ void vbox_fbdev_set_base(struct vbox_pri
+ {
+ struct fb_info *fbdev = VBOX_FBDEV_INFO(vbox->fbdev->helper);
+
++#if RTLNX_VER_MIN(6,3,0)
++ fbdev->fix.smem_start =
++pci_resource_start(VBOX_DRM_TO_PCI_DEV(vbox->fbdev->helper.dev), 0) + gpu_addr;
++#else
+ fbdev->fix.smem_start = fbdev->apertures->ranges[0].base + gpu_addr;
++#endif
+ fbdev->fix.smem_len = vbox->available_vram_size - gpu_addr;
+ }
+Only in VirtualBox-kmod-7.0.6/vboxvideo: vbox_fb.c.orig
+diff -rup VirtualBox-kmod-7.0.6.orig/vboxvideo/vbox_main.c VirtualBox-kmod-7.0.6/vboxvideo/vbox_main.c
+--- VirtualBox-kmod-7.0.6.orig/vboxvideo/vbox_main.c 2023-01-18 18:19:40.000000000 +0000
++++ VirtualBox-kmod-7.0.6/vboxvideo/vbox_main.c 2023-04-13 01:09:48.850496829 +0100
+@@ -31,6 +31,10 @@
+ #include <drm/drm_fb_helper.h>
+ #include <drm/drm_crtc_helper.h>
+
++#if RTLNX_VER_MIN(6,3,0)
++# include <drm/drm_modeset_helper.h>
++#endif
++
+ #include "vboxvideo_guest.h"
+ #include "vboxvideo_vbe.h"
+
+Only in VirtualBox-kmod-7.0.6/vboxvideo: vbox_main.c.orig
+Only in VirtualBox-kmod-7.0.6/vboxvideo: vbox_main.c.rej
+diff -rup VirtualBox-kmod-7.0.6.orig/vboxvideo/vbox_mode.c VirtualBox-kmod-7.0.6/vboxvideo/vbox_mode.c
+--- VirtualBox-kmod-7.0.6.orig/vboxvideo/vbox_mode.c 2023-01-18 18:19:40.000000000 +0000
++++ VirtualBox-kmod-7.0.6/vboxvideo/vbox_mode.c 2023-04-13 01:09:32.459555007 +0100
+@@ -34,6 +34,10 @@
+ #include "vbox_drv.h"
+ #include <linux/export.h>
+ #include <drm/drm_crtc_helper.h>
++#if RTLNX_VER_MIN(6,3,0)
++# include <drm/drm_modeset_helper_vtables.h>
++# include <drm/drm_modeset_helper.h>
++#endif
+ #if RTLNX_VER_MIN(3,18,0) || RTLNX_RHEL_MAJ_PREREQ(7,2)
+ # include <drm/drm_plane_helper.h>
+ #endif
+Only in VirtualBox-kmod-7.0.6/vboxvideo: vbox_mode.c.orig
+diff -rup VirtualBox-kmod-7.0.6.orig/vboxvideo/vbox_ttm.c VirtualBox-kmod-7.0.6/vboxvideo/vbox_ttm.c
+--- VirtualBox-kmod-7.0.6.orig/vboxvideo/vbox_ttm.c 2023-01-18 18:19:40.000000000 +0000
++++ VirtualBox-kmod-7.0.6/vboxvideo/vbox_ttm.c 2023-04-13 01:09:32.460555003 +0100
+@@ -28,6 +28,11 @@
+ * Michael Thayer <michael.thayer(a)oracle.com>
+ */
+ #include "vbox_drv.h"
++
++#if RTLNX_VER_MIN(6,3,0)
++# include <drm/ttm/ttm_tt.h>
++#endif
++
+ #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>
+Only in VirtualBox-kmod-7.0.6/vboxvideo: vbox_ttm.c.orig
1 year, 7 months
[qarte/f36: 2/2] Merge branch 'master' into f36
by Leigh Scott
commit cc98e5a6cb57e1bc4a53a279a827a153fb333948
Merge: 218edfc 96f03a8
Author: Leigh Scott <leigh123linux(a)gmail.com>
Date: Fri Apr 14 09:57:44 2023 +0100
Merge branch 'master' into f36
qarte.spec | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
---
1 year, 7 months
[qarte/f37: 2/2] Merge branch 'master' into f37
by Leigh Scott
commit 5062713acf066f49d5c89e7c6623534044565e16
Merge: 218edfc 96f03a8
Author: Leigh Scott <leigh123linux(a)gmail.com>
Date: Fri Apr 14 09:57:04 2023 +0100
Merge branch 'master' into f37
qarte.spec | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
---
1 year, 7 months
[qarte/f38] Fix broken requires
by Leigh Scott
Summary of changes:
96f03a8... Fix broken requires (*)
(*) This commit already existed in another branch; no separate mail sent
1 year, 7 months