diff --git a/fixes_for_leap.patch b/fixes_for_leap.patch index 19f491d..0352843 100644 --- a/fixes_for_leap.patch +++ b/fixes_for_leap.patch @@ -2,24 +2,20 @@ Index: VirtualBox-7.0.14/src/VBox/HostDrivers/VBoxNetFlt/linux/VBoxNetFlt-linux. =================================================================== --- VirtualBox-7.0.14.orig/src/VBox/HostDrivers/VBoxNetFlt/linux/VBoxNetFlt-linux.c +++ VirtualBox-7.0.14/src/VBox/HostDrivers/VBoxNetFlt/linux/VBoxNetFlt-linux.c -@@ -89,6 +89,21 @@ +@@ -89,6 +89,17 @@ #define VBOXNETFLT_OS_SPECFIC 1 #include "../VBoxNetFltInternal.h" -+# if defined(CONFIG_SUSE_VERSION) && CONFIG_SUSE_VERSION == 15 && CONFIG_SUSE_PATCHLEVEL == 2 -+# define OPENSUSE_152 ++# if defined(CONFIG_SUSE_VERSION) && CONFIG_SUSE_VERSION == 15 && CONFIG_SUSE_PATCHLEVEL == 6 ++# define OPENSUSE_156 +# endif +# if defined(CONFIG_SUSE_VERSION) && CONFIG_SUSE_VERSION == 15 && CONFIG_SUSE_PATCHLEVEL == 5 +# define OPENSUSE_155 +# endif + -+#if !defined(skb_gso_segment) -+#if defined(CONFIG_SUSE_VERSION) && (CONFIG_SUSE_VERSION == 15) -+//#include -+#else ++#if RTLNX_SUSE_MAJ_PREREQ(15, 6) +#include +#endif -+#endif + typedef struct VBOXNETFLTNOTIFIER { struct notifier_block Notifier; @@ -55,6 +51,15 @@ Index: VirtualBox-7.0.14/src/VBox/Additions/linux/drm/vbox_drv.c #else /* >= 5.4.0 && RHEL >= 8.3 && SLES >= 15-SP3 */ .driver_features = DRIVER_MODESET | DRIVER_GEM | DRIVER_HAVE_IRQ, #endif /* < 5.4.0 */ +@@ -395,7 +399,7 @@ static struct drm_driver driver = { + #endif + .gem_prime_import = drm_gem_prime_import, + .gem_prime_import_sg_table = vbox_gem_prime_import_sg_table, +-#if RTLNX_VER_MAX(6,6,0) && !RTLNX_RHEL_RANGE(9,4, 9,99) ++#if RTLNX_VER_MAX(6,4,0) && !RTLNX_RHEL_RANGE(9,4, 9,99) + .gem_prime_mmap = vbox_gem_prime_mmap, + #endif + Index: VirtualBox-7.0.14/src/VBox/Additions/linux/drm/vbox_main.c =================================================================== --- VirtualBox-7.0.14.orig/src/VBox/Additions/linux/drm/vbox_main.c @@ -425,6 +430,24 @@ Index: VirtualBox-7.0.14/src/VBox/Additions/linux/drm/vbox_fb.c #include +@@ -196,7 +197,7 @@ static struct fb_ops vboxfb_ops = { + .owner = THIS_MODULE, + .fb_check_var = drm_fb_helper_check_var, + .fb_set_par = drm_fb_helper_set_par, +-#if RTLNX_VER_MIN(6,5,0) || RTLNX_RHEL_RANGE(9,4, 9,99) ++#if RTLNX_VER_MIN(6, 4, 0) || RTLNX_RHEL_RANGE(9,4, 9,99) + .fb_read = fb_sys_read, + .fb_write = fb_sys_write, + .fb_fillrect = sys_fillrect, +@@ -351,7 +352,7 @@ static int vboxfb_create(struct drm_fb_h + * The last flag forces a mode set on VT switches even if the kernel + * does not think it is needed. + */ +-#if RTLNX_VER_MIN(6,6,0) ++#if RTLNX_VER_MIN(6,4,0) + info->flags = FBINFO_MISC_ALWAYS_SETPAR; + #else + info->flags = FBINFO_DEFAULT | FBINFO_MISC_ALWAYS_SETPAR; Index: VirtualBox-7.0.14/src/VBox/Additions/linux/drm/vbox_mode.c =================================================================== --- VirtualBox-7.0.14.orig/src/VBox/Additions/linux/drm/vbox_mode.c @@ -450,3 +473,44 @@ Index: VirtualBox-7.0.14/src/VBox/HostDrivers/VBoxNetAdp/linux/VBoxNetAdp-linux. # define VBOX_DEV_ADDR_SET(dev, addr, len) dev_addr_mod(dev, 0, addr, len) #else /* < 5.17.0 */ # define VBOX_DEV_ADDR_SET(dev, addr, len) memcpy(dev->dev_addr, addr, len) +Index: VirtualBox-7.0.14/src/VBox/Runtime/r0drv/linux/memobj-r0drv-linux.c +=================================================================== +--- VirtualBox-7.0.14.orig/src/VBox/Runtime/r0drv/linux/memobj-r0drv-linux.c ++++ VirtualBox-7.0.14/src/VBox/Runtime/r0drv/linux/memobj-r0drv-linux.c +@@ -1342,7 +1342,7 @@ DECLHIDDEN(int) rtR0MemObjNativeLockUser + fWrite, /* force write access. */ + # endif + &pMemLnx->apPages[0] /* Page array. */ +-# if GET_USER_PAGES_API < KERNEL_VERSION(6, 5, 0) ++# if GET_USER_PAGES_API < KERNEL_VERSION(6, 5, 0) && !RTLNX_SUSE_MAJ_PREREQ(15, 6) + , papVMAs /* vmas */ + # endif + ); +@@ -1389,7 +1389,7 @@ DECLHIDDEN(int) rtR0MemObjNativeLockUser + fWrite, /* force write access. */ + # endif + &pMemLnx->apPages[0] /* Page array. */ +-# if GET_USER_PAGES_API < KERNEL_VERSION(6, 5, 0) ++# if GET_USER_PAGES_API < KERNEL_VERSION(6, 5, 0) && && !defined(OPENSUSE_156) + , papVMAs /* vmas */ + # endif + ); +Index: VirtualBox-7.0.14/src/VBox/Additions/linux/sharedfolders/regops.c +=================================================================== +--- VirtualBox-7.0.14.orig/src/VBox/Additions/linux/sharedfolders/regops.c ++++ VirtualBox-7.0.14/src/VBox/Additions/linux/sharedfolders/regops.c +@@ -270,8 +270,12 @@ static ssize_t vbsf_iov_iter_get_pages(s + size_t cPagesLocked; + + down_read(&pTask->mm->mmap_sem); +- cPagesLocked = get_user_pages(pTask, pTask->mm, uPtrFrom, cPages, iter->v_write, 1 /*force*/, papPages, NULL); +- up_read(&pTask->mm->mmap_sem); ++#if defined(OPENSUSE_156) ++ cPagesLocked = get_user_pages(pTask, pTask->mm, uPtrFrom, cPages); ++#else ++ cPagesLocked = get_user_pages(pTask, pTask->mm, uPtrFrom, cPages, iter->v_write, 1 /*force*/, papPages, NULL); ++#endif ++ up_read(&pTask->mm->mmap_sem); + if (cPagesLocked == cPages) { + size_t cbRet = (cPages << PAGE_SHIFT) - offPg0; + if (cPages == cPagesLeft) { diff --git a/virtualbox.changes b/virtualbox.changes index e370bce..6761809 100644 --- a/virtualbox.changes +++ b/virtualbox.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Feb 6 19:56:11 UTC 2024 - Larry Finger + +- Fix build on Leap 15.6. + ------------------------------------------------------------------- Sat Jan 27 08:18:41 UTC 2024 - Bingwu Zhang diff --git a/virtualbox.spec b/virtualbox.spec index 3421406..52c99ec 100644 --- a/virtualbox.spec +++ b/virtualbox.spec @@ -159,6 +159,8 @@ Patch38: python311.patch Patch39: fix_sdl_build.patch # Fixes for openSUSE Leap 15.X Patch40: fixes_for_leap.patch +# Fix for set_pte() warning +#Patch41: fix_pte_warning.patch # # Common BuildRequires for both virtualbox and virtualbox-kmp BuildRequires: %{kernel_module_package_buildreqs} @@ -471,6 +473,7 @@ This package contains the kernel-modules that VirtualBox uses to create or run v %patch38 -p1 %patch39 -p1 %patch40 -p1 +#%patch41 -p1 ### Documents for virtualbox main package ### %if %{main_package}