Merge pull request #10754 from Rmys/master

virtualbox-7.0.2
This commit is contained in:
Rmys
2022-10-23 20:12:43 +03:00
committed by GitHub
43 changed files with 275 additions and 8230 deletions
@@ -41,7 +41,7 @@ def install():
# dkms packages
with open("env.sh") as f:
for l in f.readlines():
if l.startswith("BUILD_PLATFORM_ARCH"):
if l.startswith("KBUILD_HOST_ARCH"):
a = l.split("=")[1].strip()[1:-1]
break
@@ -91,7 +91,7 @@ def install():
for link in apps:
pisitools.dosym("../share/virtualbox/VBox.sh", "/usr/bin/%s" % link)
pisitools.dobin("VBoxTunctl")
# pisitools.dobin("VBoxTunctl")
# Desktop file, mimetype file for xml and icon
pisitools.domove("%s/*.desktop" % VBoxLibDir, "/usr/share/applications")
@@ -1,189 +0,0 @@
From 369dd2ee3c82c4417fee04aeec933c74fd198e78 Mon Sep 17 00:00:00 2001
From: Hans de Goede <hdegoede@redhat.com>
Date: Tue, 23 Jan 2018 15:09:20 +0100
Subject: [PATCH resend] VBoxServiceAutoMount: Change Linux mount code to use
an options string
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
.../common/VBoxService/VBoxServiceAutoMount.cpp | 62 +++-------------------
1 file changed, 8 insertions(+), 54 deletions(-)
diff --git a/src/VBox/Additions/common/VBoxService/VBoxServiceAutoMount.cpp b/src/VBox/Additions/common/VBoxService/VBoxServiceAutoMount.cpp
--- ./src/VBox/Additions/common/VBoxService/VBoxServiceAutoMount.cpp.orig 2019-04-16 11:09:11.000000000 +0100
+++ ./src/VBox/Additions/common/VBoxService/VBoxServiceAutoMount.cpp 2019-04-26 17:10:47.178485356 +0100
@@ -40,6 +40,7 @@
#include <iprt/ctype.h>
#include <iprt/dir.h>
#include <iprt/mem.h>
+#include <iprt/param.h>
#include <iprt/path.h>
#include <iprt/semaphore.h>
#include <iprt/sort.h>
@@ -114,6 +115,9 @@ RT_C_DECLS_END
# define VBOXSERVICE_AUTOMOUNT_MIQF SHFL_MIQF_PATH
#endif
+#ifndef MAX_MNTOPT_STR
+#define MAX_MNTOPT_STR PAGE_SIZE
+#endif
/*********************************************************************************************************************************
* Structures and Typedefs *
@@ -400,13 +399,13 @@ static int vbsvcAutoMountSharedFolderOld
int rc = vbsvcAutoMountPrepareMountPointOld(pszMountPoint, pszShareName, &Opts);
if (RT_SUCCESS(rc))
{
+ char szOptBuf[MAX_MNTOPT_STR] = { '\0', };
+ RTStrPrintf(szOptBuf, sizeof(szOptBuf), "uid=%d,gid=%d,dmode=%0o,fmode=%0o,dmask=%0o,fmask=%0o",
+ Opts.uid, Opts.gid, Opts.dmode, Opts.fmode, Opts.dmask, Opts.fmask);
# ifdef RT_OS_SOLARIS
int fFlags = 0;
if (Opts.ronly)
fFlags |= MS_RDONLY;
- char szOptBuf[MAX_MNTOPT_STR] = { '\0', };
- RTStrPrintf(szOptBuf, sizeof(szOptBuf), "uid=%d,gid=%d,dmode=%0o,fmode=%0o,dmask=%0o,fmask=%0o",
- Opts.uid, Opts.gid, Opts.dmode, Opts.fmode, Opts.dmask, Opts.fmask);
int r = mount(pszShareName,
pszMountPoint,
fFlags | MS_OPTIONSTR,
@@ -423,35 +422,11 @@ static int vbsvcAutoMountSharedFolderOld
# else /* RT_OS_LINUX */
unsigned long fFlags = MS_NODEV;
-
- /*const char *szOptions = { "rw" }; - ??? */
- struct vbsf_mount_info_new mntinf;
- RT_ZERO(mntinf);
-
- mntinf.nullchar = '\0';
- mntinf.signature[0] = VBSF_MOUNT_SIGNATURE_BYTE_0;
- mntinf.signature[1] = VBSF_MOUNT_SIGNATURE_BYTE_1;
- mntinf.signature[2] = VBSF_MOUNT_SIGNATURE_BYTE_2;
- mntinf.length = sizeof(mntinf);
-
- mntinf.uid = Opts.uid;
- mntinf.gid = Opts.gid;
- mntinf.ttl = Opts.ttl;
- mntinf.dmode = Opts.dmode;
- mntinf.fmode = Opts.fmode;
- mntinf.dmask = Opts.dmask;
- mntinf.fmask = Opts.fmask;
- mntinf.cMaxIoPages = Opts.cMaxIoPages;
- mntinf.szTag[0] = '\0';
-
- strcpy(mntinf.name, pszShareName);
- strcpy(mntinf.nls_name, "\0");
-
int r = mount(pszShareName,
pszMountPoint,
"vboxsf",
fFlags,
- &mntinf);
+ szOptBuf);
if (r == 0)
{
VGSvcVerbose(0, "vbsvcAutoMountWorker: Shared folder '%s' was mounted to '%s'\n", pszShareName, pszMountPoint);
@@ -484,34 +459,6 @@ static int vbsvcAutoMountSharedFolderOld
}
else /* r == -1, we got some error in errno. */
{
- if (errno == EPROTO)
- {
- VGSvcVerbose(3, "vbsvcAutoMountWorker: Messed up share name, re-trying ...\n");
-
- /** @todo r=bird: What on earth is going on here????? Why can't you
- * strcpy(mntinf.name, pszShareName) to fix it again? */
-
- /* Sometimes the mount utility messes up the share name. Try to
- * un-mangle it again. */
- char szCWD[RTPATH_MAX];
- size_t cchCWD;
- if (!getcwd(szCWD, sizeof(szCWD)))
- {
- VGSvcError("vbsvcAutoMountWorker: Failed to get the current working directory\n");
- szCWD[0] = '\0';
- }
- cchCWD = strlen(szCWD);
- if (!strncmp(pszMountPoint, szCWD, cchCWD))
- {
- while (pszMountPoint[cchCWD] == '/')
- ++cchCWD;
- /* We checked before that we have enough space */
- strcpy(mntinf.name, pszMountPoint + cchCWD);
- }
- r = mount(mntinf.name, pszMountPoint, "vboxsf", fFlags, &mntinf);
- }
- if (r == -1) /* Was there some error from one of the tries above? */
- {
switch (errno)
{
/* If we get EINVAL here, the system already has mounted the Shared Folder to another
@@ -530,7 +477,6 @@ static int vbsvcAutoMountSharedFolderOld
rc = RTErrConvertFromErrno(errno);
break;
}
- }
}
# endif
}
@@ -1464,51 +1410,21 @@ static int vbsvcAutomounterMountIt(PVBSV
}
# if defined(RT_OS_LINUX)
- /*
- * Linux a bit more work...
- */
- struct vbsf_mount_info_new MntInfo;
- RT_ZERO(MntInfo);
- struct vbsf_mount_opts MntOpts;
- RT_ZERO(MntOpts);
- MntInfo.nullchar = '\0';
- MntInfo.signature[0] = VBSF_MOUNT_SIGNATURE_BYTE_0;
- MntInfo.signature[1] = VBSF_MOUNT_SIGNATURE_BYTE_1;
- MntInfo.signature[2] = VBSF_MOUNT_SIGNATURE_BYTE_2;
- MntInfo.length = sizeof(MntInfo);
- MntInfo.ttl = MntOpts.ttl = -1 /*default*/;
- MntInfo.msDirCacheTTL= MntOpts.msDirCacheTTL = -1 /*default*/;
- MntInfo.msInodeTTL = MntOpts.msInodeTTL = -1 /*default*/;
- MntInfo.cMaxIoPages = MntOpts.cMaxIoPages = 0 /*default*/;
- MntInfo.cbDirBuf = MntOpts.cbDirBuf = 0 /*default*/;
- MntInfo.enmCacheMode = MntOpts.enmCacheMode = kVbsfCacheMode_Default;
- MntInfo.uid = MntOpts.uid = 0;
- MntInfo.gid = MntOpts.gid = gidMount;
- MntInfo.dmode = MntOpts.dmode = 0770;
- MntInfo.fmode = MntOpts.fmode = 0770;
- MntInfo.dmask = MntOpts.dmask = 0000;
- MntInfo.fmask = MntOpts.fmask = 0000;
- memcpy(MntInfo.szTag, g_szTag, sizeof(g_szTag)); AssertCompile(sizeof(MntInfo.szTag) >= sizeof(g_szTag));
- rc = RTStrCopy(MntInfo.name, sizeof(MntInfo.name), pEntry->pszName);
- if (RT_FAILURE(rc))
+ unsigned long fFlags = MS_NODEV;
+ char szOpts[MAX_MNTOPT_STR] = { '\0', };
+ ssize_t cchOpts = RTStrPrintf2(szOpts, sizeof(szOpts),
+ "uid=0,gid=%d,dmode=0770,fmode=0770,dmask=0000,fmask=0000", gidMount);
+ if (cchOpts <= 0)
{
- VGSvcError("vbsvcAutomounterMountIt: Share name '%s' is too long for the MntInfo.name field!\n", pEntry->pszName);
- return rc;
+ VGSvcError("vbsvcAutomounterMountIt: szOpts overflow! %zd\n", cchOpts);
+ return VERR_BUFFER_OVERFLOW;
}
- errno = 0;
- unsigned long fFlags = MS_NODEV;
- rc = mount(pEntry->pszName, pEntry->pszActualMountPoint, "vboxsf", fFlags, &MntInfo);
+ rc = mount(pEntry->pszName, pEntry->pszActualMountPoint, "vboxsf", fFlags, szOpts);
if (rc == 0)
{
VGSvcVerbose(0, "vbsvcAutomounterMountIt: Successfully mounted '%s' on '%s'\n",
pEntry->pszName, pEntry->pszActualMountPoint);
-
- errno = 0;
- rc = vbsfmount_complete(pEntry->pszName, pEntry->pszActualMountPoint, fFlags, &MntOpts);
- if (rc != 0) /* Ignorable. /etc/mtab is probably a link to /proc/mounts. */
- VGSvcVerbose(1, "vbsvcAutomounterMountIt: vbsfmount_complete failed: %s (%d/%d)\n",
- rc == 1 ? "open_memstream" : rc == 2 ? "setmntent" : rc == 3 ? "addmntent" : "unknown", rc, errno);
return VINF_SUCCESS;
}
else if (errno == EINVAL)
@@ -1,36 +0,0 @@
--- VirtualBox-5.0.16/configure
+++ VirtualBox-5.0.16/configure
@@ -1270,10 +1270,7 @@
XCloseDisplay(dpy);
}
EOF
- [ -n "$INCX11" ] && I_INCX11=`prefix_I "$INCX11"`
- if test_compile "$LIBX11 $I_INCX11" Xlibs Xlibs; then
- log_success "found"
- fi
+ test_compile "$LIBX11 $I_INCX11" Xlibs Xlibs
}
@@ -1427,21 +1424,6 @@
#include <GL/glu.h>
extern "C" int main(void)
{
- Display *dpy;
- int major, minor;
-
- dpy = XOpenDisplay(NULL);
- if (dpy)
- {
- Bool glx_version = glXQueryVersion(dpy, &major, &minor);
- XCloseDisplay(dpy);
- if (glx_version)
- {
- printf("found version %u.%u, OK.\n", major, minor);
- return 0;
- }
- }
- printf("found (inactive), OK.\n");
return 0;
}
EOF
@@ -1,28 +0,0 @@
diff -Nuar a/src/VBox/Additions/common/crOpenGL/fakedri_drv.c b/src/VBox/Additions/common/crOpenGL/fakedri_drv.c
--- a/src/VBox/Additions/common/crOpenGL/fakedri_drv.c 2018-05-09 19:32:17.000000000 +0300
+++ b/src/VBox/Additions/common/crOpenGL/fakedri_drv.c 2018-05-11 23:24:22.415626074 +0300
@@ -57,23 +57,8 @@
//#define DEBUG_DRI_CALLS
/// @todo this could be different...
-#ifdef RT_ARCH_AMD64
-# ifdef RT_OS_FREEBSD
-# define DRI_DEFAULT_DRIVER_DIR "/usr/local/lib/dri"
-# define DRI_XORG_DRV_DIR "/usr/local/lib/xorg/modules/drivers/"
-# else
-# define DRI_DEFAULT_DRIVER_DIR "/usr/lib64/dri:/usr/lib/dri:/usr/lib/x86_64-linux-gnu/dri:/usr/lib/xorg/modules/dri"
+# define DRI_DEFAULT_DRIVER_DIR "/usr/lib/xorg/modules/dri"
# define DRI_XORG_DRV_DIR "/usr/lib/xorg/modules/drivers/"
-# endif
-#else
-# ifdef RT_OS_FREEBSD
-# define DRI_DEFAULT_DRIVER_DIR "/usr/local/lib/dri"
-# define DRI_XORG_DRV_DIR "/usr/local/lib/xorg/modules/drivers/"
-# else
-# define DRI_DEFAULT_DRIVER_DIR "/usr/lib/dri:/usr/lib/i386-linux-gnu/dri:/usr/lib/xorg/modules/dri"
-# define DRI_XORG_DRV_DIR "/usr/lib/xorg/modules/drivers/"
-# endif
-#endif
#ifdef DEBUG_DRI_CALLS
#define SWDRI_SHOWNAME(pext, func) \
@@ -1,42 +0,0 @@
diff -Nuar a/src/VBox/Additions/common/crOpenGL/Makefile.kmk b/src/VBox/Additions/common/crOpenGL/Makefile.kmk
--- a/src/VBox/Additions/common/crOpenGL/Makefile.kmk 2017-10-18 10:06:45.000000000 +0300
+++ b/src/VBox/Additions/common/crOpenGL/Makefile.kmk 2017-11-20 12:49:55.626419756 +0300
@@ -69,17 +69,12 @@
if1of ($(KBUILD_TARGET), linux solaris freebsd)
ifndef VBOX_USE_SYSTEM_GL_HEADERS
VBoxOGL_INCS += \
- $(VBOX_PATH_X11_ROOT)/libXdamage-1.1 \
- $(VBOX_PATH_X11_ROOT)/libXcomposite-0.4.0 \
- $(VBOX_PATH_X11_ROOT)/libXext-1.3.1 \
- $(VBOX_PATH_X11_ROOT)/libXfixes-4.0.3 \
- $(VBOX_PATH_X11_ROOT)/damageproto-1.1.0 \
- $(VBOX_PATH_X11_ROOT)/compositeproto-0.4 \
- $(VBOX_PATH_X11_ROOT)/fixesproto-4.0 \
- $(VBOX_PATH_X11_ROOT)/libx11-1.1.5-other \
- $(VBOX_PATH_X11_ROOT)/xextproto-7.1.1 \
- $(VBOX_PATH_X11_ROOT)/xproto-7.0.18 \
- $(VBOX_GL_INCS)
+ /usr/include/x11 \
+ /usr/include/xorg \
+ /usr/include/pixman-1 \
+ $(VBOX_GL_INCS) \
+ /usr/include/drm \
+ /usr/include/libdrm
endif
VBoxOGL_DEFS += VBOX_NO_NATIVEGL
endif
@@ -219,10 +214,10 @@
VBoxOGL_LIBS += Xcomposite Xdamage Xfixes Xext
else
VBoxOGL_LIBS += \
- $(PATH_STAGE_LIB)/libXcomposite.so \
- $(PATH_STAGE_LIB)/libXdamage.so \
- $(PATH_STAGE_LIB)/libXfixes.so \
- $(PATH_STAGE_LIB)/libXext.so
+ Xcomposite \
+ Xdamage \
+ Xfixes \
+ Xext
endif
ifdef VBoxOGL_FAKEDRI
ifeq ($(KBUILD_TARGET), freebsd)
@@ -1,43 +0,0 @@
Index: virtualbox/src/VBox/Additions/common/crOpenGL/Makefile.kmk
===================================================================
--- virtualbox.orig/src/VBox/Additions/common/crOpenGL/Makefile.kmk 2015-04-02 15:44:24.955670965 +0200
+++ virtualbox/src/VBox/Additions/common/crOpenGL/Makefile.kmk 2015-04-02 15:44:24.955670965 +0200
@@ -67,18 +67,12 @@
VBoxOGL_INCS = .
if1of ($(KBUILD_TARGET), linux solaris freebsd)
VBoxOGL_INCS += \
- $(VBOX_PATH_X11_ROOT)/libXdamage-1.1 \
- $(VBOX_PATH_X11_ROOT)/libXcomposite-0.4.0 \
- $(VBOX_PATH_X11_ROOT)/libXext-1.3.1 \
- $(VBOX_PATH_X11_ROOT)/libXfixes-4.0.3 \
- $(VBOX_PATH_X11_ROOT)/damageproto-1.1.0 \
- $(VBOX_PATH_X11_ROOT)/compositeproto-0.4 \
- $(VBOX_PATH_X11_ROOT)/fixesproto-4.0 \
- $(VBOX_PATH_X11_ROOT)/libx11-1.1.5-other \
- $(VBOX_PATH_X11_ROOT)/xextproto-7.1.1 \
- $(VBOX_PATH_X11_ROOT)/xproto-7.0.18 \
+ /usr/include/x11 \
+ /usr/include/xorg \
+ /usr/include/pixman-1 \
$(VBOX_MESA_INCS) \
- $(PATH_ROOT)/src/VBox/Additions/x11/x11include/libdrm-2.4.13
+ /usr/include/drm \
+ /usr/include/libdrm
VBoxOGL_DEFS += VBOX_NO_NATIVEGL
endif
@@ -213,10 +207,10 @@
if1of ($(KBUILD_TARGET), linux solaris freebsd)
VBoxOGL_LIBS += \
- $(PATH_STAGE_LIB)/libXcomposite.so \
- $(PATH_STAGE_LIB)/libXdamage.so \
- $(PATH_STAGE_LIB)/libXfixes.so \
- $(PATH_STAGE_LIB)/libXext.so
+ Xcomposite \
+ Xdamage \
+ Xfixes \
+ Xext
ifdef VBoxOGL_FAKEDRI
ifeq ($(KBUILD_TARGET), freebsd)
VBoxOGL_LIBS += \
@@ -1,217 +0,0 @@
--- a/src/VBox/Additions/common/VBoxGuestLib/Makefile.km 2013-09-04 21:03:47.334749420 +0200
+++ b/src/VBox/Additions/common/VBoxGuestLib/Makefile.kmk 2013-10-21 00:06:36.418245968 +0200
@@ -40,8 +40,8 @@
VBoxGuestR3LibShared
ifndef VBOX_ONLY_TESTSUITE
if1of ($(KBUILD_TARGET), freebsd linux netbsd openbsd)
- LIBRARIES += \
- VBoxGuestR3LibXFree86
+# LIBRARIES += \
+# VBoxGuestR3LibXFree86
endif
endif
LIBRARIES.win.amd64 += VBoxGuestR3Lib-x86 VBoxGuestR3LibShared-x86
--- a/src/VBox/Additions/x11/Makefile.kmk 2013-03-19 18:55:28.974949837 +0000
+++ b/src/VBox/Additions/x11/Makefile.kmk 2013-03-19 18:56:00.468064457 +0000
@@ -17,6 +17,10 @@
SUB_DEPTH = ../../../..
include $(KBUILD_PATH)/subheader.kmk
+ifn1of ($(XSERVER_VERSION), 13 14 15 16 17 18 19 110 111)
+ XSERVER_VERSION := 17
+endif
+
# Include sub-makefiles.
if1of ($(KBUILD_TARGET), freebsd linux netbsd openbsd solaris)
include $(PATH_SUB_CURRENT)/VBoxClient/Makefile.kmk
--- a/src/VBox/Additions/x11/vboxmouse/Makefile.kmk 2013-03-19 18:55:28.818284256 +0000
+++ b/src/VBox/Additions/x11/vboxmouse/Makefile.kmk 2013-03-19 18:56:00.468064457 +0000
@@ -29,7 +29,6 @@
# vboxmouse_drv
#
if1of ($(KBUILD_TARGET), linux)
- SYSMODS += vboxmouse_drv
vboxmouse_drv_TEMPLATE = VBOXGUESTR3XF86MOD
vboxmouse_drv_DEFS.linux = linux
vboxmouse_drv_DEFS.x86 += __i386__
@@ -69,7 +68,6 @@
#
# vboxmouse_drv_70
#
-DLLS += vboxmouse_drv_70
vboxmouse_drv_70_TEMPLATE = VBOXGUESTR3XORGMOD
vboxmouse_drv_70_DEFS = \
XFree86Server IN_MODULE XFree86Module XFree86LOADER XINPUT XORG_7X IN_XF86_MODULE DONT_DEFINE_WRAPPERS NO_ANSIC
@@ -85,7 +83,6 @@
#
# vboxmouse_drv_71
#
-DLLS += vboxmouse_drv_71
vboxmouse_drv_71_TEMPLATE = VBOXGUESTR3XORGMOD
vboxmouse_drv_71_DEFS := $(vboxmouse_drv_70_DEFS) NO_ANSIC
vboxmouse_drv_71_INCS := \
@@ -100,7 +97,6 @@
#
# vboxmouse_drv_13
#
-DLLS += vboxmouse_drv_13
vboxmouse_drv_13_TEMPLATE = VBOXGUESTR3XORGMOD
vboxmouse_drv_13_DEFS := $(vboxmouse_drv_70_DEFS) NO_ANSIC
vboxmouse_drv_13_INCS := \
@@ -114,7 +110,6 @@
#
# vboxmouse_drv_14
#
-DLLS += vboxmouse_drv_14
vboxmouse_drv_14_TEMPLATE = VBOXGUESTR3XORGMOD
vboxmouse_drv_14_DEFS := $(vboxmouse_drv_70_DEFS) NO_ANSIC
vboxmouse_drv_14_INCS := \
@@ -128,7 +123,6 @@
#
# vboxmouse_drv_15
#
-DLLS += vboxmouse_drv_15
vboxmouse_drv_15_TEMPLATE = VBOXGUESTR3XORGMOD
vboxmouse_drv_15_DEFS := $(vboxmouse_drv_70_DEFS) NO_ANSIC
vboxmouse_drv_15_INCS := \
@@ -142,7 +136,6 @@
#
# vboxmouse_drv_16
#
-DLLS += vboxmouse_drv_16
vboxmouse_drv_16_TEMPLATE = VBOXGUESTR3XORGMOD
vboxmouse_drv_16_DEFS := $(vboxmouse_drv_70_DEFS) NO_ANSIC
vboxmouse_drv_16_INCS := \
--- a/src/VBox/Additions/x11/vboxvideo/Makefile.kmk 2013-03-19 18:55:28.974949837 +0000
+++ b/src/VBox/Additions/x11/vboxvideo/Makefile.kmk 2013-03-19 18:56:00.468064457 +0000
@@ -53,7 +53,6 @@
# vboxvideo_drv
#
if1of ($(KBUILD_TARGET), linux)
- SYSMODS += vboxvideo_drv
endif # target linux
vboxvideo_drv_TEMPLATE = VBOXGUESTR3XF86MOD
vboxvideo_drv_DEFS.linux = linux
@@ -128,7 +127,6 @@
# base keywords instead of using .solaris or .linux.
# Also it is *important* to use := and not = when deriving a property.
#
-DLLS += vboxvideo_drv_70
vboxvideo_drv_70_TEMPLATE = VBOXGUESTR3XORGMOD
if1of ($(KBUILD_TARGET), linux)
vboxvideo_drv_70_CFLAGS += \
@@ -149,7 +147,6 @@
#
# vboxvideo_drv_71
#
-DLLS += vboxvideo_drv_71
vboxvideo_drv_71_TEMPLATE = VBOXGUESTR3XORGMOD
vboxvideo_drv_71_CFLAGS := $(vboxvideo_drv_70_CFLAGS)
vboxvideo_drv_71_DEFS := $(vboxvideo_70_DEFS) XORG_VERSION_CURRENT=700100000
@@ -164,7 +161,6 @@
#
# vboxvideo_drv_13
#
-DLLS += vboxvideo_drv_13
vboxvideo_drv_13_TEMPLATE = VBOXGUESTR3XORGMOD
vboxvideo_drv_13_CFLAGS := $(vboxvideo_drv_70_CFLAGS)
vboxvideo_drv_13_DEFS := $(vboxvideo_13_DEFS) XORG_VERSION_CURRENT=100300000
@@ -178,7 +174,6 @@
#
# vboxvideo_drv_14
#
-DLLS += vboxvideo_drv_14
vboxvideo_drv_14_TEMPLATE = VBOXGUESTR3XORGMOD
vboxvideo_drv_14_CFLAGS := $(vboxvideo_drv_70_CFLAGS)
vboxvideo_drv_14_DEFS := $(vboxvideo_13_DEFS) XORG_VERSION_CURRENT=100400000
@@ -192,7 +187,6 @@
#
# vboxvideo_drv_15
#
-DLLS += vboxvideo_drv_15
vboxvideo_drv_15_TEMPLATE = VBOXGUESTR3XORGMOD
vboxvideo_drv_15_CFLAGS := $(vboxvideo_drv_70_CFLAGS)
vboxvideo_drv_15_DEFS := $(vboxvideo_15_DEFS) XORG_VERSION_CURRENT=100503000
@@ -213,7 +207,6 @@
#
# vboxvideo_drv_16
#
-DLLS += vboxvideo_drv_16
vboxvideo_drv_16_TEMPLATE = VBOXGUESTR3XORGMOD
vboxvideo_drv_16_CFLAGS := $(vboxvideo_drv_70_CFLAGS)
vboxvideo_drv_16_DEFS := $(vboxvideo_15_DEFS) XORG_VERSION_CURRENT=100600000
@@ -227,7 +220,6 @@
#
# vboxvideo_drv_17
#
-DLLS += vboxvideo_drv_17
vboxvideo_drv_17_TEMPLATE = VBOXGUESTR3XORGMOD
vboxvideo_drv_17_CFLAGS := $(vboxvideo_drv_70_CFLAGS)
vboxvideo_drv_17_DEFS := $(vboxvideo_15_DEFS) XORG_VERSION_CURRENT=100699000
@@ -241,7 +233,6 @@
#
# vboxvideo_drv_18
#
-DLLS += vboxvideo_drv_18
vboxvideo_drv_18_TEMPLATE = VBOXGUESTR3XORGMOD
vboxvideo_drv_18_CFLAGS := $(vboxvideo_drv_70_CFLAGS)
vboxvideo_drv_18_DEFS := $(vboxvideo_15_DEFS) XORG_VERSION_CURRENT=100800000
@@ -255,7 +246,6 @@
#
# vboxvideo_drv_19
#
-DLLS += vboxvideo_drv_19
vboxvideo_drv_19_TEMPLATE = VBOXGUESTR3XORGMOD
vboxvideo_drv_19_CFLAGS := $(vboxvideo_drv_70_CFLAGS)
vboxvideo_drv_19_DEFS := $(vboxvideo_15_DEFS) XORG_VERSION_CURRENT=100900000
@@ -269,7 +259,6 @@
#
# vboxvideo_drv_110
#
-DLLS += vboxvideo_drv_110
vboxvideo_drv_110_TEMPLATE = VBOXGUESTR3XORGMOD
vboxvideo_drv_110_CFLAGS := $(vboxvideo_drv_70_CFLAGS)
vboxvideo_drv_110_DEFS := $(vboxvideo_15_DEFS) XORG_VERSION_CURRENT=101000000
@@ -283,7 +272,6 @@
#
# vboxvideo_drv_111
#
-DLLS += vboxvideo_drv_111
vboxvideo_drv_111_TEMPLATE = VBOXGUESTR3XORGMOD
vboxvideo_drv_111_CFLAGS := $(vboxvideo_drv_70_CFLAGS)
vboxvideo_drv_111_DEFS := $(vboxvideo_15_DEFS) XORG_VERSION_CURRENT=101100000
@@ -297,7 +285,6 @@
#
# vboxvideo_drv_112
#
-DLLS += vboxvideo_drv_112
vboxvideo_drv_112_TEMPLATE = VBOXGUESTR3XORGMOD
vboxvideo_drv_112_CFLAGS := $(vboxvideo_drv_70_CFLAGS)
vboxvideo_drv_112_DEFS := $(vboxvideo_15_DEFS) XORG_VERSION_CURRENT=101200000
@@ -341,6 +328,23 @@
endif
+vboxvideo_drv_$(XSERVER_VERSION)_NAME := vboxvideo_drv
+vboxvideo_drv_$(XSERVER_VERSION)_INCS := \
+ /usr/include/xorg \
+ /usr/include/x11 \
+ /usr/include/pixman-1 \
+ /usr/include/X11/dri \
+ /usr/include/drm \
+ /usr/include/libdrm
+vboxvideo_drv_$(XSERVER_VERSION)_INCS += $(PATH_ROOT)/src/VBox/Runtime/include
+DLLS += vboxvideo_drv_$(XSERVER_VERSION)
+
+# required for lenny backports
+ifeq ($(XSERVER_VERSION),14)
+ vboxvideo_drv_$(XSERVER_VERSION)_INCS += $(VBOX_PATH_X11_XORG_1_4)/xorg
+endif
+
+
# Check the undefined symbols in the X.Org modules against lists of allowed
# symbols. Not very elegant, but it will catch problems early.
@@ -1,12 +0,0 @@
# 2015 © Sébastien Luttringer
--- a/src/VBox/RDP/client-1.8.4/Makefile.kmk
+++ b/src/VBox/RDP/client-1.8.4/Makefile.kmk
@@ -41,7 +41,7 @@
EGD_SOCKET=\"/var/run/egd-pool\" WITH_RDPSND=1 HAVE_DIRENT_H=1 \
HAVE_ICONV=1 HAVE_SYS_STATVFS_H=1 \
HAVE_SYS_PARAM_H=1 HAVE_SYS_MOUNT_H=1 HAVE_STRUCT_STATVFS_F_NAMEMAX=1 \
- KEYMAP_PATH=$(if $(findstring RTPATH_APP_PRIVATE,$(CDEFS)),RTPATH_APP_PRIVATE,\"/opt/VirtualBox\")\"/rdesktop-vrdp-keymaps\" \
+ KEYMAP_PATH=$(if $(findstring RTPATH_APP_PRIVATE,$(CDEFS)),RTPATH_APP_PRIVATE,\"/usr/share/virtualbox\")\"/rdesktop-vrdp-keymaps\" \
RDESKTOP=1
ifdef WITH_BIRD_VD_HACKS
rdesktop-vrdp_DEFS += WITH_BIRD_VD_HACKS
@@ -1,19 +0,0 @@
--- a/src/VBox/Additions/x11/vboxvideo/vboxvideo.h 2015-03-04 00:38:45.381480285 +0100
+++ b/src/VBox/Additions/x11/vboxvideo/vboxvideo.h 2015-03-04 00:40:57.536942966 +0100
@@ -130,15 +130,7 @@
#define VBOX_MAX_DRAWABLES 256 /* At random. */
#define VBOXPTR(p) ((VBOXPtr)((p)->driverPrivate))
-
-/** Helper to work round different ways of getting the root window in different
- * server versions. */
-#if defined(XORG_VERSION_CURRENT) && XORG_VERSION_CURRENT < 70000000 \
- && XORG_VERSION_CURRENT >= 10900000
-# define ROOT_WINDOW(pScrn) screenInfo.screens[(pScrn)->scrnIndex]->root
-#else
-# define ROOT_WINDOW(pScrn) WindowTable[(pScrn)->scrnIndex]
-#endif
+#define ROOT_WINDOW(pScrn) screenInfo.screens[(pScrn)->scrnIndex]->root
/** Structure containing all virtual monitor-specific information. */
struct VBoxScreen
@@ -1,12 +0,0 @@
https://bugs.gentoo.org/588794
--- a/include/VBox/VBoxGL2D.h
+++ b/include/VBox/VBoxGL2D.h
@@ -28,6 +28,7 @@
#define __VBoxGLSupportInfo_h__
#include <iprt/types.h>
+#include <GL/gl.h>
typedef char GLchar;
@@ -1,35 +0,0 @@
This ghetto patch attempts to fix shared folder automounting for guests running
Linux 4.16, and also suggests an alternative to mount.vboxsf.
diff -uprb VirtualBox-5.2.8.orig/src/VBox/Additions/common/VBoxService/VBoxServiceAutoMount.cpp VirtualBox-5.2.8/src/VBox/Additions/common/VBoxService/VBoxServiceAutoMount.cpp
--- VirtualBox-5.2.8.orig/src/VBox/Additions/common/VBoxService/VBoxServiceAutoMount.cpp 2018-02-26 17:57:30.000000000 +0200
+++ VirtualBox-5.2.8/src/VBox/Additions/common/VBoxService/VBoxServiceAutoMount.cpp 2018-04-07 21:00:05.785735622 +0300
@@ -346,6 +346,13 @@ static int vbsvcAutoMountSharedFolder(co
"vboxsf",
fFlags,
&mntinf);
+ if (r == -1 && errno == EINVAL)
+ {
+ /* Mainline vboxsf accepts regular mount opts. */
+ char mount_opts[1024];
+ snprintf(mount_opts, 1024, "gid=%d,dmode=0770,fmode=0770", mntinf.gid);
+ r = mount(pszShareName, pszMountPoint, "vboxsf", fFlags, mount_opts);
+ }
if (r == 0)
{
VGSvcVerbose(0, "vbsvcAutoMountWorker: Shared folder '%s' was mounted to '%s'\n", pszShareName, pszMountPoint);
diff -uprb VirtualBox-5.2.8.orig/src/VBox/Additions/linux/sharedfolders/mount.vboxsf.c VirtualBox-5.2.8/src/VBox/Additions/linux/sharedfolders/mount.vboxsf.c
--- VirtualBox-5.2.8.orig/src/VBox/Additions/linux/sharedfolders/mount.vboxsf.c 2018-02-26 17:57:34.000000000 +0200
+++ VirtualBox-5.2.8/src/VBox/Additions/linux/sharedfolders/mount.vboxsf.c 2018-04-07 21:39:38.121577588 +0300
@@ -485,6 +485,11 @@ main(int argc, char **argv)
* to keep this code here slick without having VbglR3.
*/
err = mount(host_name, mount_point, "vboxsf", flags, &mntinf);
+ if (err == -1 && errno == EINVAL)
+ {
+ /* The mount.vboxsf helper should not be used with mainline vboxsf. */
+ panic("mount.vboxsf cannot be used with mainline vboxsf; instead use:\n\n mount -cit vboxsf NAME MOUNTPOINT\n\n");
+ }
if (err == -1 && errno == EPROTO)
{
/* Sometimes the mount utility messes up the share name. Try to
@@ -1,23 +0,0 @@
https://bugs.gentoo.org/654872
Taken from pg_overlay. Thanks to Perfect Gentleman!
--- a/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsProxy.cpp 2018-04-13 23:37:17.000000000 +0700
+++ b/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsProxy.cpp 2018-04-18 19:42:30.207128585 +0700
@@ -21,6 +21,7 @@
/* Qt includes: */
# include <QRegExpValidator>
+# include <QButtonGroup>
/* GUI includes: */
# include "QIWidgetValidator.h"
--- a/src/VBox/Frontends/VirtualBox/src/precomp_vcc.h
+++ b/src/VBox/Frontends/VirtualBox/src/precomp_vcc.h
@@ -83,6 +83,7 @@
#include <QtWidgets/qgraphicsitem.h>
#include <QtWidgets/qgraphicslayoutitem.h>
#include <QtWidgets/qgraphicswidget.h>
+#include <QtWidgets/qbuttongroup.h>
#include <QtCore/QMetaType>
#include <QtGui/qevent.h>
#include <QtGui/qtouchdevice.h>
@@ -1,20 +0,0 @@
This ghetto patch attempts to fix shared folder automounting for guests running
Linux 4.16, and also suggests an alternative to mount.vboxsf.
diff -uprb VirtualBox-5.2.8.orig/src/VBox/Additions/common/VBoxService/VBoxServiceAutoMount.cpp VirtualBox-5.2.8/src/VBox/Additions/common/VBoxService/VBoxServiceAutoMount.cpp
--- VirtualBox-5.2.8.orig/src/VBox/Additions/common/VBoxService/VBoxServiceAutoMount.cpp 2018-02-26 17:57:30.000000000 +0200
+++ VirtualBox-5.2.8/src/VBox/Additions/common/VBoxService/VBoxServiceAutoMount.cpp 2018-04-07 21:00:05.785735622 +0300
@@ -346,6 +346,13 @@ static int vbsvcAutoMountSharedFolder(co
"vboxsf",
fFlags,
&mntinf);
+ if (r == -1 && errno == EINVAL)
+ {
+ /* Mainline vboxsf accepts regular mount opts. */
+ char mount_opts[1024];
+ snprintf(mount_opts, 1024, "gid=%d,dmode=0770,fmode=0770", mntinf.gid);
+ r = mount(pszShareName, pszMountPoint, "vboxsf", fFlags, mount_opts);
+ }
if (r == 0)
{
VGSvcVerbose(0, "vbsvcAutoMountWorker: Shared folder '%s' was mounted to '%s'\n", pszShareName, pszMountPoint);
@@ -1,44 +0,0 @@
diff --git a/src/VBox/HostDrivers/linux/Makefile b/src/VBox/HostDrivers/linux/Makefile
index 18466b48..7c7de4e5 100644
--- a/src/VBox/HostDrivers/linux/Makefile
+++ b/src/VBox/HostDrivers/linux/Makefile
@@ -23,25 +23,25 @@
# terms and conditions of either the GPL or the CDDL or both.
#
-ifneq ($(KERNELRELEASE),)
+ifneq ($(KBUILD_EXTMOD),)
-# Building from kBuild (make -C <kernel_directory> M=`pwd`),
-# or inside a kernel source tree.
+# Building from kBuild (make -C <kernel_directory> M=`pwd`).
+# KBUILD_EXTMOD is set to $(M) in this case.
obj-m = vboxdrv/
-ifneq ($(wildcard $(CURDIR)/vboxnetflt/Makefile),)
+ifneq ($(wildcard $(KBUILD_EXTMOD)/vboxnetflt/Makefile),)
obj-m += vboxnetflt/
endif
-ifneq ($(wildcard $(CURDIR)/vboxnetadp/Makefile),)
+ifneq ($(wildcard $(KBUILD_EXTMOD)/vboxnetadp/Makefile),)
obj-m += vboxnetadp/
endif
-ifneq ($(wildcard $(CURDIR)/vboxpci/Makefile),)
+ifneq ($(wildcard $(KBUILD_EXTMOD)/vboxpci/Makefile),)
obj-m += vboxpci/
endif
-else # ! KERNELRELEASE
+else # ! KBUILD_EXTMOD
-# convenience Makefile without KERNELRELEASE
+# convenience Makefile without KBUILD_EXTMOD
KBUILD_VERBOSE ?=
KERN_VER ?= $(shell uname -r)
@@ -146,4 +146,4 @@ load: unload
fi; \
done
-endif # ! KERNELRELEASE
+endif # ! KBUILD_EXTMOD
@@ -1,73 +0,0 @@
--- "a/src/VBox/Devices/PC/vbox-cpuhotplug.dsl"
+++ "a/src/VBox/Devices/PC/vbox-cpuhotplug.dsl"
@@ -95,38 +95,38 @@ DefinitionBlock ("SSDT-cpuhotplug.aml",
} \
} \
- GENERATE_CPU_OBJECT(0x00, SCK0, "SCKCPU0", CPU0, "SCK0-CPU0")
- GENERATE_CPU_OBJECT(0x01, SCK1, "SCKCPU1", CPU1, "SCK1-CPU0")
- GENERATE_CPU_OBJECT(0x02, SCK2, "SCKCPU2", CPU2, "SCK2-CPU0")
- GENERATE_CPU_OBJECT(0x03, SCK3, "SCKCPU3", CPU3, "SCK3-CPU0")
- GENERATE_CPU_OBJECT(0x04, SCK4, "SCKCPU4", CPU4, "SCK4-CPU0")
- GENERATE_CPU_OBJECT(0x05, SCK5, "SCKCPU5", CPU5, "SCK5-CPU0")
- GENERATE_CPU_OBJECT(0x06, SCK6, "SCKCPU6", CPU6, "SCK6-CPU0")
- GENERATE_CPU_OBJECT(0x07, SCK7, "SCKCPU7", CPU7, "SCK7-CPU0")
- GENERATE_CPU_OBJECT(0x08, SCK8, "SCKCPU8", CPU8, "SCK8-CPU0")
- GENERATE_CPU_OBJECT(0x09, SCK9, "SCKCPU9", CPU9, "SCK9-CPU0")
- GENERATE_CPU_OBJECT(0x0a, SCKA, "SCKCPUA", CPUA, "SCKA-CPU0")
- GENERATE_CPU_OBJECT(0x0b, SCKB, "SCKCPUB", CPUB, "SCKB-CPU0")
- GENERATE_CPU_OBJECT(0x0c, SCKC, "SCKCPUC", CPUC, "SCKC-CPU0")
- GENERATE_CPU_OBJECT(0x0d, SCKD, "SCKCPUD", CPUD, "SCKD-CPU0")
- GENERATE_CPU_OBJECT(0x0e, SCKE, "SCKCPUE", CPUE, "SCKE-CPU0")
- GENERATE_CPU_OBJECT(0x0f, SCKF, "SCKCPUF", CPUF, "SCKF-CPU0")
- GENERATE_CPU_OBJECT(0x10, SCKG, "SCKCPUG", CPUG, "SCKG-CPU0")
- GENERATE_CPU_OBJECT(0x11, SCKH, "SCKCPUH", CPUH, "SCKH-CPU0")
- GENERATE_CPU_OBJECT(0x12, SCKI, "SCKCPUI", CPUI, "SCKI-CPU0")
- GENERATE_CPU_OBJECT(0x13, SCKJ, "SCKCPUJ", CPUJ, "SCKJ-CPU0")
- GENERATE_CPU_OBJECT(0x14, SCKK, "SCKCPUK", CPUK, "SCKK-CPU0")
- GENERATE_CPU_OBJECT(0x15, SCKL, "SCKCPUL", CPUL, "SCKL-CPU0")
- GENERATE_CPU_OBJECT(0x16, SCKM, "SCKCPUM", CPUM, "SCKM-CPU0")
- GENERATE_CPU_OBJECT(0x17, SCKN, "SCKCPUN", CPUN, "SCKN-CPU0")
- GENERATE_CPU_OBJECT(0x18, SCKO, "SCKCPUO", CPUO, "SCKO-CPU0")
- GENERATE_CPU_OBJECT(0x19, SCKP, "SCKCPUP", CPUP, "SCKP-CPU0")
- GENERATE_CPU_OBJECT(0x1a, SCKQ, "SCKCPUQ", CPUQ, "SCKQ-CPU0")
- GENERATE_CPU_OBJECT(0x1b, SCKR, "SCKCPUR", CPUR, "SCKR-CPU0")
- GENERATE_CPU_OBJECT(0x1c, SCKS, "SCKCPUS", CPUS, "SCKS-CPU0")
- GENERATE_CPU_OBJECT(0x1d, SCKT, "SCKCPUT", CPUT, "SCKT-CPU0")
- GENERATE_CPU_OBJECT(0x1e, SCKU, "SCKCPUU", CPUU, "SCKU-CPU0")
- GENERATE_CPU_OBJECT(0x1f, SCKV, "SCKCPUV", CPUV, "SCKV-CPU0")
+ GENERATE_CPU_OBJECT(0x00, SCK0, "SCKCPU0", CPU0, 0)
+ GENERATE_CPU_OBJECT(0x01, SCK1, "SCKCPU1", CPU1, 1)
+ GENERATE_CPU_OBJECT(0x02, SCK2, "SCKCPU2", CPU2, 2)
+ GENERATE_CPU_OBJECT(0x03, SCK3, "SCKCPU3", CPU3, 3)
+ GENERATE_CPU_OBJECT(0x04, SCK4, "SCKCPU4", CPU4, 4)
+ GENERATE_CPU_OBJECT(0x05, SCK5, "SCKCPU5", CPU5, 5)
+ GENERATE_CPU_OBJECT(0x06, SCK6, "SCKCPU6", CPU6, 6)
+ GENERATE_CPU_OBJECT(0x07, SCK7, "SCKCPU7", CPU7, 7)
+ GENERATE_CPU_OBJECT(0x08, SCK8, "SCKCPU8", CPU8, 8)
+ GENERATE_CPU_OBJECT(0x09, SCK9, "SCKCPU9", CPU9, 9)
+ GENERATE_CPU_OBJECT(0x0a, SCKA, "SCKCPUA", CPUA, 10)
+ GENERATE_CPU_OBJECT(0x0b, SCKB, "SCKCPUB", CPUB, 11)
+ GENERATE_CPU_OBJECT(0x0c, SCKC, "SCKCPUC", CPUC, 12)
+ GENERATE_CPU_OBJECT(0x0d, SCKD, "SCKCPUD", CPUD, 13)
+ GENERATE_CPU_OBJECT(0x0e, SCKE, "SCKCPUE", CPUE, 14)
+ GENERATE_CPU_OBJECT(0x0f, SCKF, "SCKCPUF", CPUF, 15)
+ GENERATE_CPU_OBJECT(0x10, SCKG, "SCKCPUG", CPUG, 16)
+ GENERATE_CPU_OBJECT(0x11, SCKH, "SCKCPUH", CPUH, 17)
+ GENERATE_CPU_OBJECT(0x12, SCKI, "SCKCPUI", CPUI, 18)
+ GENERATE_CPU_OBJECT(0x13, SCKJ, "SCKCPUJ", CPUJ, 19)
+ GENERATE_CPU_OBJECT(0x14, SCKK, "SCKCPUK", CPUK, 20)
+ GENERATE_CPU_OBJECT(0x15, SCKL, "SCKCPUL", CPUL, 21)
+ GENERATE_CPU_OBJECT(0x16, SCKM, "SCKCPUM", CPUM, 22)
+ GENERATE_CPU_OBJECT(0x17, SCKN, "SCKCPUN", CPUN, 23)
+ GENERATE_CPU_OBJECT(0x18, SCKO, "SCKCPUO", CPUO, 24)
+ GENERATE_CPU_OBJECT(0x19, SCKP, "SCKCPUP", CPUP, 25)
+ GENERATE_CPU_OBJECT(0x1a, SCKQ, "SCKCPUQ", CPUQ, 26)
+ GENERATE_CPU_OBJECT(0x1b, SCKR, "SCKCPUR", CPUR, 27)
+ GENERATE_CPU_OBJECT(0x1c, SCKS, "SCKCPUS", CPUS, 28)
+ GENERATE_CPU_OBJECT(0x1d, SCKT, "SCKCPUT", CPUT, 29)
+ GENERATE_CPU_OBJECT(0x1e, SCKU, "SCKCPUU", CPUU, 30)
+ GENERATE_CPU_OBJECT(0x1f, SCKV, "SCKCPUV", CPUV, 31)
#undef GENERATE_CPU_OBJECT
}
@@ -1,37 +0,0 @@
From ee6ae088673d14c407d4773855dbda821024653c Mon Sep 17 00:00:00 2001
From: Christian Hesse <mail@eworm.de>
Date: Sun, 17 May 2020 00:40:18 +0200
Subject: [PATCH 1/1] fix narrowing conversion
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Building fails with:
/build/virtualbox/src/VirtualBox-6.1.8/src/VBox/Debugger/DBGCDumpImage.cpp: In function const char* dbgcMachoCpuType(uint32_t, uint32_t):
/build/virtualbox/src/VirtualBox-6.1.8/include/iprt/formats/mach-o.h:41:46: error: narrowing conversion of -1 from int to unsigned int [-Wnarrowing]
41 | #define CPU_TYPE_ANY INT32_C(-1)
| ^
/build/virtualbox/src/VirtualBox-6.1.8/src/VBox/Debugger/DBGCDumpImage.cpp:471:14: note: in expansion of macro CPU_TYPE_ANY
471 | case CPU_TYPE_ANY: return "CPU_TYPE_ANY";
| ^~~~~~~~~~~~
As uType is unsigned it can never match CPU_TYPE_ANY, which is -1.
Signed-off-by: Christian Hesse <mail@eworm.de>
---
src/VBox/Debugger/DBGCDumpImage.cpp | 1 -
1 file changed, 1 deletion(-)
diff --git a/src/VBox/Debugger/DBGCDumpImage.cpp b/src/VBox/Debugger/DBGCDumpImage.cpp
index 02ba3158..d906c37c 100644
--- a/src/VBox/Debugger/DBGCDumpImage.cpp
+++ b/src/VBox/Debugger/DBGCDumpImage.cpp
@@ -468,7 +468,6 @@ static const char *dbgcMachoCpuType(uint32_t uType, uint32_t uSubType)
{
switch (uType)
{
- case CPU_TYPE_ANY: return "CPU_TYPE_ANY";
case CPU_TYPE_VAX: return "VAX";
case CPU_TYPE_MC680x0: return "MC680x0";
case CPU_TYPE_X86: return "X86";
@@ -1,18 +0,0 @@
From bbd990f83a23c22da787d10c62bd7ff114d32703 Mon Sep 17 00:00:00 2001
From: Christian Hesse <mail@eworm.de>
Date: Mon, 18 May 2020 08:21:06 +0200
Subject: [PATCH 1/1] work around black screen
---
src/VBox/Additions/x11/Installer/98vboxadd-xclient | 1 -
1 file changed, 1 deletion(-)
diff --git a/src/VBox/Additions/x11/Installer/98vboxadd-xclient b/src/VBox/Additions/x11/Installer/98vboxadd-xclient
index e7d4e292..7a17a692 100755
--- a/src/VBox/Additions/x11/Installer/98vboxadd-xclient
+++ b/src/VBox/Additions/x11/Installer/98vboxadd-xclient
@@ -34,5 +34,4 @@ elif test -z "${SSH_CONNECTION}"; then
/usr/bin/VBoxClient --checkhostversion
/usr/bin/VBoxClient --seamless
/usr/bin/VBoxClient --draganddrop
- /usr/bin/VBoxClient --vmsvga # In case VMSVGA emulation is enabled
fi
@@ -1,48 +0,0 @@
diff --git a/src/VBox/Frontends/VirtualBox/src/globals/UIImageTools.cpp b/src/VBox/Frontends/VirtualBox/src/globals/UIImageTools.cpp
index b70d289d..9716781e 100644
--- a/src/VBox/Frontends/VirtualBox/src/globals/UIImageTools.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/globals/UIImageTools.cpp
@@ -17,6 +17,7 @@
/* Qt includes: */
#include <QPainter>
+#include <QPainterPath>
/* GUI include */
#include "UIImageTools.h"
diff --git a/src/VBox/Frontends/VirtualBox/src/widgets/UIMenuToolBar.cpp b/src/VBox/Frontends/VirtualBox/src/widgets/UIMenuToolBar.cpp
index 4d695f19..406c2dbd 100644
--- a/src/VBox/Frontends/VirtualBox/src/widgets/UIMenuToolBar.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/widgets/UIMenuToolBar.cpp
@@ -19,6 +19,7 @@
#include <QApplication>
#include <QHBoxLayout>
#include <QPainter>
+#include <QPainterPath>
#include <QStyle>
#include <QToolButton>
diff --git a/src/VBox/Frontends/VirtualBox/src/widgets/UIMiniToolBar.cpp b/src/VBox/Frontends/VirtualBox/src/widgets/UIMiniToolBar.cpp
index 53b545a4..6e38448c 100644
--- a/src/VBox/Frontends/VirtualBox/src/widgets/UIMiniToolBar.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/widgets/UIMiniToolBar.cpp
@@ -21,6 +21,7 @@
#include <QMenu>
#include <QMoveEvent>
#include <QPainter>
+#include <QPainterPath>
#include <QStateMachine>
#include <QStyle>
#include <QTimer>
diff --git a/src/VBox/Frontends/VirtualBox/src/widgets/UIPopupBox.h b/src/VBox/Frontends/VirtualBox/src/widgets/UIPopupBox.h
index 2f153d80..7b18a66b 100644
--- a/src/VBox/Frontends/VirtualBox/src/widgets/UIPopupBox.h
+++ b/src/VBox/Frontends/VirtualBox/src/widgets/UIPopupBox.h
@@ -24,6 +24,7 @@
/* Qt includes: */
#include <QIcon>
#include <QWidget>
+#include <QPainterPath>
/* GUI includes: */
#include "UILibraryDefs.h"
@@ -1,18 +0,0 @@
--- a/Config.kmk
+++ b/Config.kmk
@@ -4502,11 +4502,14 @@ ifeq ($(VBOX_LDR_FMT),elf)
TEMPLATE_VBoxR0_TOOL = $(VBOX_GCC_TOOL)
TEMPLATE_VBoxR0_CFLAGS = -fno-pie -nostdinc -g $(VBOX_GCC_pipe) $(VBOX_GCC_WERR) $(VBOX_GCC_PEDANTIC_C) \
$(VBOX_GCC_Wno-variadic-macros) $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) -fno-strict-aliasing -fno-exceptions \
- $(VBOX_GCC_fno-stack-protector) -fno-common $(VBOX_GCC_fvisibility-hidden) -std=gnu99 $(VBOX_GCC_IPRT_FMT_CHECK)
+ $(VBOX_GCC_fno-stack-protector) -fno-common -ffreestanding $(VBOX_GCC_fvisibility-hidden) -std=gnu99 $(VBOX_GCC_IPRT_FMT_CHECK)
TEMPLATE_VBoxR0_CXXFLAGS = -fno-pie -nostdinc -g $(VBOX_GCC_pipe) $(VBOX_GCC_WERR) $(VBOX_GCC_PEDANTIC_CXX) \
$(VBOX_GCC_Wno-variadic-macros) $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) -fno-strict-aliasing -fno-exceptions \
$(VBOX_GCC_fno-stack-protector) -fno-common $(VBOX_GCC_fvisibility-inlines-hidden) $(VBOX_GCC_fvisibility-hidden) \
-fno-rtti $(VBOX_GCC_IPRT_FMT_CHECK)
+ if $(VBOX_GCC_VERSION_CC) >= 40500 # 4.1.2 complains, 4.5.2 is okay, didn't check which version inbetween made it okay with g++.
+TEMPLATE_VBoxR0_CXXFLAGS += -ffreestanding
+ endif
TEMPLATE_VBoxR0_CFLAGS.amd64 = -m64 -mno-red-zone -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -fasynchronous-unwind-tables -ffreestanding
TEMPLATE_VBoxR0_CXXFLAGS.amd64 = -m64 -mno-red-zone -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -fasynchronous-unwind-tables
TEMPLATE_VBoxR0_CXXFLAGS.freebsd = -ffreestanding
@@ -1,13 +0,0 @@
diff --git a/src/VBox/Main/webservice/vboxweb.cpp b/src/VBox/Main/webservice/vboxweb.cpp
index 8dd3ca1b..9d5c9138 100644
--- a/src/VBox/Main/webservice/vboxweb.cpp
+++ b/src/VBox/Main/webservice/vboxweb.cpp
@@ -944,7 +944,7 @@ static void doQueuesLoop()
if (rv == 0)
continue; // timeout, not necessary to bother gsoap
// r < 0, errno
- if (soap_socket_errno(soap.master) == SOAP_EINTR)
+ if (soap_socket_errno == SOAP_EINTR)
rv = 0; // re-check if we should terminate
break;
}
@@ -1,440 +0,0 @@
From df0ee1389b64bdfd5afa91d6377f5dd2bd9dfc3b Mon Sep 17 00:00:00 2001
From: Christian Hesse <mail@eworm.de>
Date: Tue, 15 Dec 2020 23:07:27 +0100
Subject: [PATCH 1/3] linux-5.10-r0drv-memobj-fix-r0.patch
---
.../Runtime/r0drv/linux/memobj-r0drv-linux.c | 61 ++++++++++++++++++-
1 file changed, 60 insertions(+), 1 deletion(-)
diff --git a/src/VBox/Runtime/r0drv/linux/memobj-r0drv-linux.c b/src/VBox/Runtime/r0drv/linux/memobj-r0drv-linux.c
index c771c1ba..a34eb149 100644
--- a/src/VBox/Runtime/r0drv/linux/memobj-r0drv-linux.c
+++ b/src/VBox/Runtime/r0drv/linux/memobj-r0drv-linux.c
@@ -56,9 +56,12 @@
* Whether we use alloc_vm_area (3.2+) for executable memory.
* This is a must for 5.8+, but we enable it all the way back to 3.2.x for
* better W^R compliance (fExecutable flag). */
-#if RTLNX_VER_MIN(3,2,0) || defined(DOXYGEN_RUNNING)
+#if RTLNX_VER_RANGE(3,2,0, 5,10,0) || defined(DOXYGEN_RUNNING)
# define IPRT_USE_ALLOC_VM_AREA_FOR_EXEC
#endif
+#if RTLNX_VER_MIN(5,10,0) || defined(DOXYGEN_RUNNING)
+# define IPRT_USE_APPLY_TO_PAGE_RANGE_FOR_EXEC
+#endif
/*
* 2.6.29+ kernels don't work with remap_pfn_range() anymore because
@@ -502,6 +505,42 @@ static void rtR0MemObjLinuxFreePages(PRTR0MEMOBJLNX pMemLnx)
}
+#ifdef IPRT_USE_APPLY_TO_PAGE_RANGE_FOR_EXEC
+/**
+ * User data passed to the apply_to_page_range() callback.
+ */
+typedef struct LNXAPPLYPGRANGE
+{
+ /** Pointer to the memory object. */
+ PRTR0MEMOBJLNX pMemLnx;
+ /** The page protection flags to apply. */
+ pgprot_t fPg;
+} LNXAPPLYPGRANGE;
+/** Pointer to the user data. */
+typedef LNXAPPLYPGRANGE *PLNXAPPLYPGRANGE;
+/** Pointer to the const user data. */
+typedef const LNXAPPLYPGRANGE *PCLNXAPPLYPGRANGE;
+
+/**
+ * Callback called in apply_to_page_range().
+ *
+ * @returns Linux status code.
+ * @param pPte Pointer to the page table entry for the given address.
+ * @param uAddr The address to apply the new protection to.
+ * @param pvUser The opaque user data.
+ */
+static DECLCALLBACK(int) rtR0MemObjLinuxApplyPageRange(pte_t *pPte, unsigned long uAddr, void *pvUser)
+{
+ PCLNXAPPLYPGRANGE pArgs = (PCLNXAPPLYPGRANGE)pvUser;
+ PRTR0MEMOBJLNX pMemLnx = pArgs->pMemLnx;
+ uint32_t idxPg = (uAddr - (unsigned long)pMemLnx->Core.pv) >> PAGE_SHIFT;
+
+ set_pte(pPte, mk_pte(pMemLnx->apPages[idxPg], pArgs->fPg));
+ return 0;
+}
+#endif
+
+
/**
* Maps the allocation into ring-0.
*
@@ -584,6 +623,11 @@ static int rtR0MemObjLinuxVMap(PRTR0MEMOBJLNX pMemLnx, bool fExecutable)
else
# endif
{
+# if defined(IPRT_USE_APPLY_TO_PAGE_RANGE_FOR_EXEC)
+ if (fExecutable)
+ pgprot_val(fPg) |= _PAGE_NX; /* Uses RTR0MemObjProtect to clear NX when memory ready, W^X fashion. */
+# endif
+
# ifdef VM_MAP
pMemLnx->Core.pv = vmap(&pMemLnx->apPages[0], pMemLnx->cPages, VM_MAP, fPg);
# else
@@ -1851,6 +1895,21 @@ DECLHIDDEN(int) rtR0MemObjNativeProtect(PRTR0MEMOBJINTERNAL pMem, size_t offSub,
preempt_enable();
return VINF_SUCCESS;
}
+# elif defined(IPRT_USE_APPLY_TO_PAGE_RANGE_FOR_EXEC)
+ PRTR0MEMOBJLNX pMemLnx = (PRTR0MEMOBJLNX)pMem;
+ if ( pMemLnx->fExecutable
+ && pMemLnx->fMappedToRing0)
+ {
+ LNXAPPLYPGRANGE Args;
+ Args.pMemLnx = pMemLnx;
+ Args.fPg = rtR0MemObjLinuxConvertProt(fProt, true /*fKernel*/);
+ int rcLnx = apply_to_page_range(current->active_mm, (unsigned long)pMemLnx->Core.pv + offSub, cbSub,
+ rtR0MemObjLinuxApplyPageRange, (void *)&Args);
+ if (rcLnx)
+ return VERR_NOT_SUPPORTED;
+
+ return VINF_SUCCESS;
+ }
# endif
NOREF(pMem);
From 3735d45f5ac89f436b7024de5558f5db6aa332b8 Mon Sep 17 00:00:00 2001
From: Christian Hesse <mail@eworm.de>
Date: Tue, 15 Dec 2020 23:09:24 +0100
Subject: [PATCH 2/3] linux-5.10-address-space-fixes.patch
---
src/VBox/Additions/linux/sharedfolders/regops.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/VBox/Additions/linux/sharedfolders/regops.c b/src/VBox/Additions/linux/sharedfolders/regops.c
index 3ad9c566..ec298a1b 100644
--- a/src/VBox/Additions/linux/sharedfolders/regops.c
+++ b/src/VBox/Additions/linux/sharedfolders/regops.c
@@ -1401,7 +1401,10 @@ static int vbsf_lock_user_pages_failed_check_kernel(uintptr_t uPtrFrom, size_t c
/*
* Check that this is valid user memory that is actually in the kernel range.
*/
-#if RTLNX_VER_MIN(5,0,0) || RTLNX_RHEL_MIN(8,1)
+#if RTLNX_VER_MIN(5,10,0)
+ if ( access_ok((void *)uPtrFrom, cPages << PAGE_SHIFT)
+ && uPtrFrom >= TASK_SIZE_MAX)
+#elif RTLNX_VER_MIN(5,0,0) || RTLNX_RHEL_MIN(8,1)
if ( access_ok((void *)uPtrFrom, cPages << PAGE_SHIFT)
&& uPtrFrom >= USER_DS.seg)
#else
From f8b4225c8deaac3d7528e0d8433c8360f792b4cc Mon Sep 17 00:00:00 2001
From: Christian Hesse <mail@eworm.de>
Date: Tue, 15 Dec 2020 23:12:38 +0100
Subject: [PATCH 3/3] linux-5.10-framebuffer-fixes.patch
---
src/VBox/Additions/linux/drm/vbox_drv.h | 10 ++-
src/VBox/Additions/linux/drm/vbox_fb.c | 2 +-
src/VBox/Additions/linux/drm/vbox_mode.c | 2 +-
src/VBox/Additions/linux/drm/vbox_ttm.c | 99 +++++++++++++++++++++---
4 files changed, 99 insertions(+), 14 deletions(-)
diff --git a/src/VBox/Additions/linux/drm/vbox_drv.h b/src/VBox/Additions/linux/drm/vbox_drv.h
index c680f3b4..d21d023c 100644
--- a/src/VBox/Additions/linux/drm/vbox_drv.h
+++ b/src/VBox/Additions/linux/drm/vbox_drv.h
@@ -175,6 +175,9 @@
#include <drm/ttm/ttm_placement.h>
#include <drm/ttm/ttm_memory.h>
#include <drm/ttm/ttm_module.h>
+#if RTLNX_VER_MIN(5,10,0)
+# include <drm/ttm/ttm_resource.h>
+#endif
#include "vboxvideo_guest.h"
#include "vboxvideo_vbe.h"
@@ -444,7 +447,10 @@ int vbox_bo_create(struct drm_device *dev, int size, int align,
int vbox_gem_create(struct drm_device *dev,
u32 size, bool iskernel, struct drm_gem_object **obj);
-int vbox_bo_pin(struct vbox_bo *bo, u32 pl_flag, u64 *gpu_addr);
+#define VBOX_MEM_TYPE_VRAM 0x1
+#define VBOX_MEM_TYPE_SYSTEM 0x2
+
+int vbox_bo_pin(struct vbox_bo *bo, u32 mem_type, u64 *gpu_addr);
int vbox_bo_unpin(struct vbox_bo *bo);
static inline int vbox_bo_reserve(struct vbox_bo *bo, bool no_wait)
@@ -469,7 +475,7 @@ static inline void vbox_bo_unreserve(struct vbox_bo *bo)
ttm_bo_unreserve(&bo->bo);
}
-void vbox_ttm_placement(struct vbox_bo *bo, int domain);
+void vbox_ttm_placement(struct vbox_bo *bo, u32 mem_type);
int vbox_bo_push_sysram(struct vbox_bo *bo);
int vbox_mmap(struct file *filp, struct vm_area_struct *vma);
diff --git a/src/VBox/Additions/linux/drm/vbox_fb.c b/src/VBox/Additions/linux/drm/vbox_fb.c
index 811d0040..44b1ef52 100644
--- a/src/VBox/Additions/linux/drm/vbox_fb.c
+++ b/src/VBox/Additions/linux/drm/vbox_fb.c
@@ -295,7 +295,7 @@ static int vboxfb_create(struct drm_fb_helper *helper,
if (ret)
return ret;
- ret = vbox_bo_pin(bo, TTM_PL_FLAG_VRAM, NULL);
+ ret = vbox_bo_pin(bo, VBOX_MEM_TYPE_VRAM, NULL);
if (ret) {
vbox_bo_unreserve(bo);
return ret;
diff --git a/src/VBox/Additions/linux/drm/vbox_mode.c b/src/VBox/Additions/linux/drm/vbox_mode.c
index 1e2691fd..52fd10fd 100644
--- a/src/VBox/Additions/linux/drm/vbox_mode.c
+++ b/src/VBox/Additions/linux/drm/vbox_mode.c
@@ -227,7 +227,7 @@ static int vbox_crtc_set_base(struct drm_crtc *crtc,
if (ret)
return ret;
- ret = vbox_bo_pin(bo, TTM_PL_FLAG_VRAM, &gpu_addr);
+ ret = vbox_bo_pin(bo, VBOX_MEM_TYPE_VRAM, &gpu_addr);
vbox_bo_unreserve(bo);
if (ret)
return ret;
diff --git a/src/VBox/Additions/linux/drm/vbox_ttm.c b/src/VBox/Additions/linux/drm/vbox_ttm.c
index 4e990843..ee2da4aa 100644
--- a/src/VBox/Additions/linux/drm/vbox_ttm.c
+++ b/src/VBox/Additions/linux/drm/vbox_ttm.c
@@ -41,6 +41,7 @@
#define PLACEMENT_FLAGS(placement) ((placement).flags)
#endif
+
static inline struct vbox_private *vbox_bdev(struct ttm_bo_device *bd)
{
return container_of(bd, struct vbox_private, ttm.bdev);
@@ -125,6 +126,7 @@ static bool vbox_ttm_bo_is_vbox_bo(struct ttm_buffer_object *bo)
return false;
}
+#if RTLNX_VER_MAX(5,10,0)
static int
vbox_bo_init_mem_type(struct ttm_bo_device *bdev, u32 type,
struct ttm_mem_type_manager *man)
@@ -148,6 +150,7 @@ vbox_bo_init_mem_type(struct ttm_bo_device *bdev, u32 type,
return 0;
}
+#endif
static void
vbox_bo_evict_flags(struct ttm_buffer_object *bo, struct ttm_placement *pl)
@@ -157,7 +160,7 @@ vbox_bo_evict_flags(struct ttm_buffer_object *bo, struct ttm_placement *pl)
if (!vbox_ttm_bo_is_vbox_bo(bo))
return;
- vbox_ttm_placement(vboxbo, TTM_PL_FLAG_SYSTEM);
+ vbox_ttm_placement(vboxbo, VBOX_MEM_TYPE_SYSTEM);
*pl = vboxbo->placement;
}
@@ -167,11 +170,12 @@ static int vbox_bo_verify_access(struct ttm_buffer_object *bo,
return 0;
}
+#if RTLNX_VER_MAX(5,10,0)
static int vbox_ttm_io_mem_reserve(struct ttm_bo_device *bdev,
struct ttm_mem_reg *mem)
{
- struct ttm_mem_type_manager *man = &bdev->man[mem->mem_type];
struct vbox_private *vbox = vbox_bdev(bdev);
+ struct ttm_mem_type_manager *man = &bdev->man[mem->mem_type];
mem->bus.addr = NULL;
mem->bus.offset = 0;
@@ -194,12 +198,53 @@ static int vbox_ttm_io_mem_reserve(struct ttm_bo_device *bdev,
}
return 0;
}
+#else
+static int vbox_ttm_io_mem_reserve(struct ttm_bo_device *bdev,
+ struct ttm_resource *mem)
+{
+ struct vbox_private *vbox = vbox_bdev(bdev);
+ mem->bus.addr = NULL;
+ mem->bus.offset = 0;
+ mem->size = mem->num_pages << PAGE_SHIFT;
+ mem->start = 0;
+ mem->bus.is_iomem = false;
+ switch (mem->mem_type) {
+ case TTM_PL_SYSTEM:
+ /* system memory */
+ return 0;
+ case TTM_PL_VRAM:
+ mem->bus.offset = mem->start << PAGE_SHIFT;
+ mem->start = pci_resource_start(vbox->dev->pdev, 0);
+ mem->bus.is_iomem = true;
+ break;
+ default:
+ return -EINVAL;
+ }
+ return 0;
+}
+#endif
+
+
+#if RTLNX_VER_MIN(5,10,0)
+static void vbox_ttm_io_mem_free(struct ttm_bo_device *bdev,
+ struct ttm_resource *mem)
+{
+}
+#else
static void vbox_ttm_io_mem_free(struct ttm_bo_device *bdev,
struct ttm_mem_reg *mem)
{
}
+#endif
+#if RTLNX_VER_MIN(5,10,0)
+static void vbox_ttm_tt_destroy(struct ttm_bo_device *bdev, struct ttm_tt *tt)
+{
+ ttm_tt_fini(tt);
+ kfree(tt);
+}
+#else
static void vbox_ttm_backend_destroy(struct ttm_tt *tt)
{
ttm_tt_fini(tt);
@@ -209,6 +254,7 @@ static void vbox_ttm_backend_destroy(struct ttm_tt *tt)
static struct ttm_backend_func vbox_tt_backend_func = {
.destroy = &vbox_ttm_backend_destroy,
};
+#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)
static struct ttm_tt *vbox_ttm_tt_create(struct ttm_bo_device *bdev,
@@ -226,7 +272,9 @@ static struct ttm_tt *vbox_ttm_tt_create(struct ttm_buffer_object *bo,
if (!tt)
return NULL;
+#if RTLNX_VER_MAX(5,10,0)
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)) {
#else
@@ -261,11 +309,16 @@ static void vbox_ttm_tt_unpopulate(struct ttm_tt *ttm)
static struct ttm_bo_driver vbox_bo_driver = {
.ttm_tt_create = vbox_ttm_tt_create,
+#if RTLNX_VER_MIN(5,10,0)
+ .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)
.init_mem_type = vbox_bo_init_mem_type,
+#endif
#if RTLNX_VER_MIN(4,10,0) || RTLNX_RHEL_MAJ_PREREQ(7,4)
.eviction_valuable = ttm_bo_eviction_valuable,
#endif
@@ -318,8 +371,13 @@ int vbox_mm_init(struct vbox_private *vbox)
#endif
}
+#if RTLNX_VER_MIN(5,10,0)
+ ret = ttm_range_man_init(bdev, TTM_PL_VRAM, false,
+ vbox->available_vram_size >> PAGE_SHIFT);
+#else
ret = ttm_bo_init_mm(bdev, TTM_PL_VRAM,
vbox->available_vram_size >> PAGE_SHIFT);
+#endif
if (ret) {
DRM_ERROR("Failed ttm VRAM init: %d\n", ret);
goto err_device_release;
@@ -359,7 +417,7 @@ void vbox_mm_fini(struct vbox_private *vbox)
#endif
}
-void vbox_ttm_placement(struct vbox_bo *bo, int domain)
+void vbox_ttm_placement(struct vbox_bo *bo, u32 mem_type)
{
u32 c = 0;
#if RTLNX_VER_MAX(3,18,0) && !RTLNX_RHEL_MAJ_PREREQ(7,2)
@@ -372,15 +430,36 @@ void vbox_ttm_placement(struct vbox_bo *bo, int domain)
bo->placement.placement = bo->placements;
bo->placement.busy_placement = bo->placements;
- if (domain & TTM_PL_FLAG_VRAM)
+ if (mem_type & VBOX_MEM_TYPE_VRAM) {
+#if RTLNX_VER_MIN(5,10,0)
+ bo->placements[c].mem_type = TTM_PL_VRAM;
+ PLACEMENT_FLAGS(bo->placements[c++]) =
+ TTM_PL_FLAG_WC | TTM_PL_FLAG_UNCACHED;
+#else
PLACEMENT_FLAGS(bo->placements[c++]) =
TTM_PL_FLAG_WC | TTM_PL_FLAG_UNCACHED | TTM_PL_FLAG_VRAM;
- if (domain & TTM_PL_FLAG_SYSTEM)
+#endif
+ }
+ if (mem_type & VBOX_MEM_TYPE_SYSTEM) {
+#if RTLNX_VER_MIN(5,10,0)
+ bo->placements[c].mem_type = TTM_PL_SYSTEM;
+ PLACEMENT_FLAGS(bo->placements[c++]) =
+ TTM_PL_MASK_CACHING;
+#else
PLACEMENT_FLAGS(bo->placements[c++]) =
TTM_PL_MASK_CACHING | TTM_PL_FLAG_SYSTEM;
- if (!c)
+#endif
+ }
+ if (!c) {
+#if RTLNX_VER_MIN(5,10,0)
+ bo->placements[c].mem_type = TTM_PL_SYSTEM;
+ PLACEMENT_FLAGS(bo->placements[c++]) =
+ TTM_PL_MASK_CACHING;
+#else
PLACEMENT_FLAGS(bo->placements[c++]) =
TTM_PL_MASK_CACHING | TTM_PL_FLAG_SYSTEM;
+#endif
+ }
bo->placement.num_placement = c;
bo->placement.num_busy_placement = c;
@@ -414,7 +493,7 @@ int vbox_bo_create(struct drm_device *dev, int size, int align,
vboxbo->bo.bdev->dev_mapping = dev->dev_mapping;
#endif
- vbox_ttm_placement(vboxbo, TTM_PL_FLAG_VRAM | TTM_PL_FLAG_SYSTEM);
+ vbox_ttm_placement(vboxbo, VBOX_MEM_TYPE_VRAM | VBOX_MEM_TYPE_SYSTEM);
acc_size = ttm_bo_dma_acc_size(&vbox->ttm.bdev, size,
sizeof(struct vbox_bo));
@@ -452,7 +531,7 @@ static inline u64 vbox_bo_gpu_offset(struct vbox_bo *bo)
#endif
}
-int vbox_bo_pin(struct vbox_bo *bo, u32 pl_flag, u64 *gpu_addr)
+int vbox_bo_pin(struct vbox_bo *bo, u32 mem_type, u64 *gpu_addr)
{
#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)
struct ttm_operation_ctx ctx = { false, false };
@@ -467,7 +546,7 @@ int vbox_bo_pin(struct vbox_bo *bo, u32 pl_flag, u64 *gpu_addr)
return 0;
}
- vbox_ttm_placement(bo, pl_flag);
+ vbox_ttm_placement(bo, mem_type);
for (i = 0; i < bo->placement.num_placement; i++)
PLACEMENT_FLAGS(bo->placements[i]) |= TTM_PL_FLAG_NO_EVICT;
@@ -540,7 +619,7 @@ int vbox_bo_push_sysram(struct vbox_bo *bo)
if (bo->kmap.virtual)
ttm_bo_kunmap(&bo->kmap);
- vbox_ttm_placement(bo, TTM_PL_FLAG_SYSTEM);
+ vbox_ttm_placement(bo, VBOX_MEM_TYPE_SYSTEM);
for (i = 0; i < bo->placement.num_placement; i++)
PLACEMENT_FLAGS(bo->placements[i]) |= TTM_PL_FLAG_NO_EVICT;
@@ -1,189 +0,0 @@
This patch file contains the changes needed to compile the VirtualBox
modules for kernel 5.9.0+.
The changes are as follows:
1. The kernel headers no longer define HAVE_UNLOCKED_IOCTL; however,
this symbol is needed for compilation of VB.
2. The calling sequence for get_user_pages_remote() is changed.
3. Routine sched_setscheduler() is replaced by sched_set_fifo_low().
4. The type of vbox_master_set() is changed from int to void.
5. Routine drm_gem_object_put_unlocked() is replaced by drm_gem_object_put().
6. Member offset is removed from struct ttm_buffer_object.
Index: VirtualBox-6.1.14/src/VBox/Runtime/r0drv/linux/the-linux-kernel.h
===================================================================
--- VirtualBox-6.1.14.orig/src/VBox/Runtime/r0drv/linux/the-linux-kernel.h
+++ VirtualBox-6.1.14/src/VBox/Runtime/r0drv/linux/the-linux-kernel.h
@@ -137,7 +137,10 @@
#include <linux/interrupt.h>
#include <linux/completion.h>
#include <linux/compiler.h>
-#ifndef HAVE_UNLOCKED_IOCTL /* linux/fs.h defines this */
+#if RTLNX_VER_MIN(5, 9, 0)
+#define HAVE_UNLOCKED_IOCTL 1 /* defined in linux/fs.h for kernels before 5.9 */
+#endif
+#ifndef HAVE_UNLOCKED_IOCTL
# include <linux/smp_lock.h>
#endif
/* For the shared folders module */
Index: VirtualBox-6.1.14/src/VBox/Runtime/r0drv/linux/memobj-r0drv-linux.c
===================================================================
--- VirtualBox-6.1.14.orig/src/VBox/Runtime/r0drv/linux/memobj-r0drv-linux.c
+++ VirtualBox-6.1.14/src/VBox/Runtime/r0drv/linux/memobj-r0drv-linux.c
@@ -1181,7 +1181,9 @@ DECLHIDDEN(int) rtR0MemObjNativeLockUser
*/
else
rc = get_user_pages_remote(
+#if RTLNX_VER_MAX(5, 9, 0)
pTask, /* Task for fault accounting. */
+#endif
pTask->mm, /* Whose pages. */
R3Ptr, /* Where from. */
cPages, /* How many pages. */
Index: VirtualBox-6.1.14/src/VBox/Runtime/r0drv/linux/thread2-r0drv-linux.c
===================================================================
--- VirtualBox-6.1.14.orig/src/VBox/Runtime/r0drv/linux/thread2-r0drv-linux.c
+++ VirtualBox-6.1.14/src/VBox/Runtime/r0drv/linux/thread2-r0drv-linux.c
@@ -92,8 +92,12 @@ DECLHIDDEN(int) rtThreadNativeSetPriorit
return VERR_INVALID_PARAMETER;
}
+#if RTLNX_VER_MAX(5, 9, 0)
sched_setscheduler(current, iSchedClass, &Param);
#else
+ sched_set_fifo_low(current);
+#endif
+#else
RT_NOREF_PV(enmType);
#endif
RT_NOREF_PV(pThread);
Index: VirtualBox-6.1.14/src/VBox/Additions/linux/drm/vbox_drv.c
===================================================================
--- VirtualBox-6.1.14.orig/src/VBox/Additions/linux/drm/vbox_drv.c
+++ VirtualBox-6.1.14/src/VBox/Additions/linux/drm/vbox_drv.c
@@ -262,8 +262,13 @@ static const struct file_operations vbox
.read = drm_read,
};
+#if RTLNX_VER_MAX(5, 9, 0)
static int vbox_master_set(struct drm_device *dev,
struct drm_file *file_priv, bool from_open)
+#else
+static void vbox_master_set(struct drm_device *dev,
+ struct drm_file *file_priv, bool from_open)
+#endif
{
struct vbox_private *vbox = dev->dev_private;
Index: VirtualBox-6.1.14/src/VBox/Additions/linux/drm/vbox_fb.c
===================================================================
--- VirtualBox-6.1.14.orig/src/VBox/Additions/linux/drm/vbox_fb.c
+++ VirtualBox-6.1.14/src/VBox/Additions/linux/drm/vbox_fb.c
@@ -405,7 +405,11 @@ void vbox_fbdev_fini(struct drm_device *
vbox_bo_unpin(bo);
vbox_bo_unreserve(bo);
}
+#if RTLNX_VER_MIN(5, 9, 0)
+ drm_gem_object_put(afb->obj);
+#else
drm_gem_object_put_unlocked(afb->obj);
+#endif
afb->obj = NULL;
}
drm_fb_helper_fini(&fbdev->helper);
Index: VirtualBox-6.1.14/src/VBox/Additions/linux/drm/vbox_main.c
===================================================================
--- VirtualBox-6.1.14.orig/src/VBox/Additions/linux/drm/vbox_main.c
+++ VirtualBox-6.1.14/src/VBox/Additions/linux/drm/vbox_main.c
@@ -40,14 +40,19 @@
#include <VBoxVideoVBE.h>
#include "hgsmi_channels.h"
+#include <linux/version.h>
+
static void vbox_user_framebuffer_destroy(struct drm_framebuffer *fb)
{
struct vbox_framebuffer *vbox_fb = to_vbox_framebuffer(fb);
if (vbox_fb->obj)
+#if RTLNX_VER_MAX(5, 9, 0)
drm_gem_object_put_unlocked(vbox_fb->obj);
-
+#else
+ drm_gem_object_put(vbox_fb->obj);
+#endif
drm_framebuffer_cleanup(fb);
kfree(fb);
}
@@ -221,7 +226,11 @@ static struct drm_framebuffer *vbox_user
err_free_vbox_fb:
kfree(vbox_fb);
err_unref_obj:
+#if RTLNX_VER_MAX(5, 9, 0)
drm_gem_object_put_unlocked(obj);
+#else
+ drm_gem_object_put(obj);
+#endif
return ERR_PTR(ret);
}
@@ -588,7 +597,11 @@ int vbox_dumb_create(struct drm_file *fi
return ret;
ret = drm_gem_handle_create(file, gobj, &handle);
+#if RTLNX_VER_MAX(5, 9, 0)
drm_gem_object_put_unlocked(gobj);
+#else
+ drm_gem_object_put(gobj);
+#endif
if (ret)
return ret;
Index: VirtualBox-6.1.14/src/VBox/Additions/linux/drm/vbox_drv.h
===================================================================
--- VirtualBox-6.1.14.orig/src/VBox/Additions/linux/drm/vbox_drv.h
+++ VirtualBox-6.1.14/src/VBox/Additions/linux/drm/vbox_drv.h
@@ -417,6 +417,9 @@ struct vbox_bo {
#else
struct ttm_place placements[3];
#endif
+#if RTLNX_VER_MIN(5, 9, 0)
+ uint64_t offset;
+#endif
int pin_count;
};
Index: VirtualBox-6.1.14/src/VBox/Additions/linux/drm/vbox_mode.c
===================================================================
--- VirtualBox-6.1.14.orig/src/VBox/Additions/linux/drm/vbox_mode.c
+++ VirtualBox-6.1.14/src/VBox/Additions/linux/drm/vbox_mode.c
@@ -885,8 +885,11 @@ out_unmap_bo:
out_unreserve_bo:
vbox_bo_unreserve(bo);
out_unref_obj:
+#if RTLNX_VER_MAX(5, 9, 0)
drm_gem_object_put_unlocked(obj);
-
+#else
+ drm_gem_object_put(obj);
+#endif
return ret;
}
Index: VirtualBox-6.1.14/src/VBox/Additions/linux/drm/vbox_ttm.c
===================================================================
--- VirtualBox-6.1.14.orig/src/VBox/Additions/linux/drm/vbox_ttm.c
+++ VirtualBox-6.1.14/src/VBox/Additions/linux/drm/vbox_ttm.c
@@ -445,7 +445,11 @@ err_free_vboxbo:
static inline u64 vbox_bo_gpu_offset(struct vbox_bo *bo)
{
+#if RTLNX_VER_MAX(5, 9, 0)
return bo->bo.offset;
+#else
+ return bo->offset;
+#endif
}
int vbox_bo_pin(struct vbox_bo *bo, u32 pl_flag, u64 *gpu_addr)
File diff suppressed because it is too large Load Diff
@@ -22,6 +22,11 @@ VBOX_JAVA_HOME = /usr/lib/jvm/java-8-openjdk
# disable experimental cloud infrastructure integration
VBOX_WITH_CLOUD_NET :=
# enable features
VBOX_WITH_VBOX_IMG = 1
VBOX_WITH_VBOXIMGMOUNT = 1
VBOX_WITH_VBOXSDL = 1
# do not fail on warning
VBOX_GCC_WERR =
VBOX_GCC_WARN =
@@ -29,9 +34,5 @@ VBOX_GCC_WARN =
# fix gsoap missing zlib include and produce errors with --as-needed
VBOX_GSOAP_CXX_LIBS := gsoapssl++ z
# use system xorg
VBOX_USE_SYSTEM_XORG_HEADERS = 1
VBOX_USE_SYSTEM_GL_HEADERS = 1
# no update request. update are handled via pisi
VBOX_WITH_UPDATE_REQUEST := 0
@@ -1,42 +0,0 @@
Index: trunk/configure
===================================================================
--- trunk/configure
+++ trunk/configure
@@ -1921,9 +1921,32 @@
else
if test_execute; then
- cnf_append "VBOX_LINUX_SRC" "`cd $LINUX ; pwd`"
- fi
- fi
-}
-
+ cat > $ODIR.tmp_src.c << EOF
+#include <linux/version.h>
+int printf(const char *format, ...);
+int main(void)
+{
+ return LINUX_VERSION_CODE > KERNEL_VERSION(4,8,0) ? 1 : 0;
+}
+EOF
+ echo "compiling the following source file:" >> $LOG
+ cat $ODIR.tmp_src.c >> $LOG
+ echo "using the following command line:" >> $LOG
+ echo "$CC -O -Wall -o $ODIR.tmp_out $ODIR.tmp_src.c -nostdinc -I$LINUX/include " \
+ "-I$LINUX/include/generated/uapi" >> $LOG
+ $CC -O -Wall -o $ODIR.tmp_out $ODIR.tmp_src.c -nostdinc -I$LINUX/include \
+ -I$LINUX/include/generated/uapi >> $LOG 2>&1
+ if [ $? -eq 0 ]; then
+ $ODIR.tmp_out
+ if [ $? -ne 0 ]; then
+ cnf_append "VBOX_WITH_VBOXDRV" ""
+ cnf_append "VBOX_WITH_ADDITION_DRIVERS" ""
+ echo "Detected Linux >= 4.8 -- disabling compiling of Linux kernel modules."
+ else
+ cnf_append "VBOX_LINUX_SRC" "`cd $LINUX ; pwd`"
+ fi
+ fi
+ fi
+ fi
+}
#
@@ -1,289 +0,0 @@
https://www.virtualbox.org/changeset/81586/vbox
https://www.virtualbox.org/changeset/81587/vbox
https://www.virtualbox.org/changeset/81649/vbox
diff -u -r VirtualBox-6.0.14/include/iprt/cdefs.h VirtualBox-6.0.14-5.4/include/iprt/cdefs.h
--- VirtualBox-6.0.14/include/iprt/cdefs.h 2019-10-10 18:25:42.000000000 +0000
+++ VirtualBox-6.0.14-5.4/include/iprt/cdefs.h 2019-11-26 10:08:56.314644140 +0000
@@ -1166,7 +1166,7 @@
* Tell the compiler that we're falling through to the next case in a switch.
* @sa RT_FALL_THRU */
#if RT_GNUC_PREREQ(7, 0)
-# define RT_FALL_THROUGH() __attribute__((fallthrough))
+# define RT_FALL_THROUGH() __attribute__((__fallthrough__))
#else
# define RT_FALL_THROUGH() (void)0
#endif
diff -u -r VirtualBox-6.0.14/src/VBox/Additions/linux/drm/vbox_drv.c VirtualBox-6.0.14-5.4/src/VBox/Additions/linux/drm/vbox_drv.c
--- VirtualBox-6.0.14/src/VBox/Additions/linux/drm/vbox_drv.c 2019-10-10 18:28:09.000000000 +0000
+++ VirtualBox-6.0.14-5.4/src/VBox/Additions/linux/drm/vbox_drv.c 2019-11-26 10:08:56.324644270 +0000
@@ -270,12 +270,16 @@
}
static struct drm_driver driver = {
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 4, 0)
.driver_features =
DRIVER_MODESET | DRIVER_GEM | DRIVER_HAVE_IRQ |
-#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 1, 0) && !defined(RHEL_81)
+# if LINUX_VERSION_CODE < KERNEL_VERSION(5, 1, 0) && !defined(RHEL_81)
DRIVER_IRQ_SHARED |
-#endif
+# endif /* < KERNEL_VERSION(5, 1, 0) && !defined(RHEL_81) */
DRIVER_PRIME,
+#else /* >= KERNEL_VERSION(5, 4, 0) */
+ .driver_features = DRIVER_MODESET | DRIVER_GEM | DRIVER_HAVE_IRQ,
+#endif /* < KERNEL_VERSION(5, 4, 0) */
.dev_priv_size = 0,
.load = vbox_driver_load,
diff -u -r VirtualBox-6.0.14/src/VBox/Additions/linux/drm/vbox_main.c VirtualBox-6.0.14-5.4/src/VBox/Additions/linux/drm/vbox_main.c
--- VirtualBox-6.0.14/src/VBox/Additions/linux/drm/vbox_main.c 2019-10-10 18:28:09.000000000 +0000
+++ VirtualBox-6.0.14-5.4/src/VBox/Additions/linux/drm/vbox_main.c 2019-11-26 10:08:56.324644270 +0000
@@ -616,11 +616,13 @@
static inline u64 vbox_bo_mmap_offset(struct vbox_bo *bo)
{
-#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 12, 0) && !defined(RHEL_70)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 4, 0)
+ return drm_vma_node_offset_addr(&bo->bo.base.vma_node);
+#elif LINUX_VERSION_CODE < KERNEL_VERSION(3, 12, 0) && !defined(RHEL_70)
return bo->bo.addr_space_offset;
#else
return drm_vma_node_offset_addr(&bo->bo.vma_node);
-#endif
+#endif /* >= KERNEL_VERSION(5, 4, 0) */
}
int
diff -u -r VirtualBox-6.0.14/src/VBox/HostDrivers/VBoxNetFlt/linux/VBoxNetFlt-linux.c VirtualBox-6.0.14-5.4/src/VBox/HostDrivers/VBoxNetFlt/linux/VBoxNetFlt-linux.c
--- VirtualBox-6.0.14/src/VBox/HostDrivers/VBoxNetFlt/linux/VBoxNetFlt-linux.c 2019-10-10 18:35:33.000000000 +0000
+++ VirtualBox-6.0.14-5.4/src/VBox/HostDrivers/VBoxNetFlt/linux/VBoxNetFlt-linux.c 2019-11-26 10:08:56.321310893 +0000
@@ -924,8 +924,13 @@
for (i = 0; i < skb_shinfo(pBuf)->nr_frags; i++)
{
skb_frag_t *pFrag = &skb_shinfo(pBuf)->frags[i];
+# if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 4, 0)
+ pSG->aSegs[iSeg].cb = pFrag->bv_len;
+ pSG->aSegs[iSeg].pv = VBOX_SKB_KMAP_FRAG(pFrag) + pFrag->bv_offset;
+# else /* < KERNEL_VERSION(5, 4, 0) */
pSG->aSegs[iSeg].cb = pFrag->size;
pSG->aSegs[iSeg].pv = VBOX_SKB_KMAP_FRAG(pFrag) + pFrag->page_offset;
+# endif /* >= KERNEL_VERSION(5, 4, 0) */
Log6((" %p", pSG->aSegs[iSeg].pv));
pSG->aSegs[iSeg++].Phys = NIL_RTHCPHYS;
Assert(iSeg <= pSG->cSegsAlloc);
@@ -940,8 +945,13 @@
for (i = 0; i < skb_shinfo(pFragBuf)->nr_frags; i++)
{
skb_frag_t *pFrag = &skb_shinfo(pFragBuf)->frags[i];
+# if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 4, 0)
+ pSG->aSegs[iSeg].cb = pFrag->bv_len;
+ pSG->aSegs[iSeg].pv = VBOX_SKB_KMAP_FRAG(pFrag) + pFrag->bv_offset;
+# else /* < KERNEL_VERSION(5, 4, 0) */
pSG->aSegs[iSeg].cb = pFrag->size;
pSG->aSegs[iSeg].pv = VBOX_SKB_KMAP_FRAG(pFrag) + pFrag->page_offset;
+# endif /* >= KERNEL_VERSION(5, 4, 0) */
Log6((" %p", pSG->aSegs[iSeg].pv));
pSG->aSegs[iSeg++].Phys = NIL_RTHCPHYS;
Assert(iSeg <= pSG->cSegsAlloc);
diff -u -r VirtualBox-6.0.14/src/VBox/Runtime/common/fs/ntfsvfs.cpp VirtualBox-6.0.14-5.4/src/VBox/Runtime/common/fs/ntfsvfs.cpp
--- VirtualBox-6.0.14/src/VBox/Runtime/common/fs/ntfsvfs.cpp 2019-10-10 18:36:03.000000000 +0000
+++ VirtualBox-6.0.14-5.4/src/VBox/Runtime/common/fs/ntfsvfs.cpp 2019-11-26 10:08:56.317977517 +0000
@@ -1052,7 +1052,7 @@
case 4: cClustersInRun |= (uint32_t)pbPairs[offPairs + 3] << 24; RT_FALL_THRU();
case 3: cClustersInRun |= (uint32_t)pbPairs[offPairs + 2] << 16; RT_FALL_THRU();
case 2: cClustersInRun |= (uint16_t)pbPairs[offPairs + 1] << 8; RT_FALL_THRU();
- case 1: cClustersInRun |= (uint16_t)pbPairs[offPairs + 0] << 0; RT_FALL_THRU();
+ case 1: cClustersInRun |= (uint16_t)pbPairs[offPairs + 0] << 0;
}
offPairs += cbRunField;
AssertBreakStmt(cClustersInRun <= cMaxClustersInRun,
diff -u -r VirtualBox-6.0.14/src/VBox/Runtime/r0drv/linux/alloc-r0drv-linux.c VirtualBox-6.0.14-5.4/src/VBox/Runtime/r0drv/linux/alloc-r0drv-linux.c
--- VirtualBox-6.0.14/src/VBox/Runtime/r0drv/linux/alloc-r0drv-linux.c 2019-10-10 18:36:16.000000000 +0000
+++ VirtualBox-6.0.14-5.4/src/VBox/Runtime/r0drv/linux/alloc-r0drv-linux.c 2019-11-26 10:24:51.692930759 +0000
@@ -443,9 +443,6 @@
}
SetPageReserved(&paPages[iPage]);
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 4, 20) /** @todo find the exact kernel where change_page_attr was introduced. */
- MY_SET_PAGES_EXEC(&paPages[iPage], 1);
-#endif
}
*pPhys = page_to_phys(paPages);
pvRet = phys_to_virt(page_to_phys(paPages));
@@ -491,9 +488,6 @@
for (iPage = 0; iPage < cPages; iPage++)
{
ClearPageReserved(&paPages[iPage]);
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 4, 20) /** @todo find the exact kernel where change_page_attr was introduced. */
- MY_SET_PAGES_NOEXEC(&paPages[iPage], 1);
-#endif
}
__free_pages(paPages, cOrder);
IPRT_LINUX_RESTORE_EFL_AC();
diff -u -r VirtualBox-6.0.14/src/VBox/Runtime/r0drv/linux/memobj-r0drv-linux.c VirtualBox-6.0.14-5.4/src/VBox/Runtime/r0drv/linux/memobj-r0drv-linux.c
--- VirtualBox-6.0.14/src/VBox/Runtime/r0drv/linux/memobj-r0drv-linux.c 2019-10-10 18:36:16.000000000 +0000
+++ VirtualBox-6.0.14-5.4/src/VBox/Runtime/r0drv/linux/memobj-r0drv-linux.c 2019-11-26 10:09:28.805069152 +0000
@@ -86,6 +86,8 @@
/** Set if the allocation is contiguous.
* This means it has to be given back as one chunk. */
bool fContiguous;
+ /** Set if executable allocation. */
+ bool fExecutable;
/** Set if we've vmap'ed the memory into ring-0. */
bool fMappedToRing0;
/** The pages in the apPages array. */
@@ -289,10 +291,11 @@
* Only valid if fContiguous == true, ignored otherwise.
* @param fFlagsLnx The page allocation flags (GPFs).
* @param fContiguous Whether the allocation must be contiguous.
+ * @param fExecutable Whether the memory must be executable.
* @param rcNoMem What to return when we're out of pages.
*/
static int rtR0MemObjLinuxAllocPages(PRTR0MEMOBJLNX *ppMemLnx, RTR0MEMOBJTYPE enmType, size_t cb,
- size_t uAlignment, gfp_t fFlagsLnx, bool fContiguous, int rcNoMem)
+ size_t uAlignment, gfp_t fFlagsLnx, bool fContiguous, bool fExecutable, int rcNoMem)
{
size_t iPage;
size_t const cPages = cb >> PAGE_SHIFT;
@@ -371,7 +374,8 @@
for (iPage = 0; iPage < cPages; iPage++)
{
pMemLnx->apPages[iPage] = &paPages[iPage];
- MY_SET_PAGES_EXEC(pMemLnx->apPages[iPage], 1);
+ if (fExecutable)
+ MY_SET_PAGES_EXEC(pMemLnx->apPages[iPage], 1);
if (PageHighMem(pMemLnx->apPages[iPage]))
BUG();
}
@@ -379,6 +383,7 @@
fContiguous = true;
#endif /* < 2.4.22 */
pMemLnx->fContiguous = fContiguous;
+ pMemLnx->fExecutable = fExecutable;
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 5, 0)
/*
@@ -409,7 +414,7 @@
* This should never happen!
*/
printk("rtR0MemObjLinuxAllocPages(cb=0x%lx, uAlignment=0x%lx): alloc_pages(..., %d) returned physical memory at 0x%lx!\n",
- (unsigned long)cb, (unsigned long)uAlignment, rtR0MemObjLinuxOrder(cPages), (unsigned long)page_to_phys(pMemLnx->apPages[0]));
+ (unsigned long)cb, (unsigned long)uAlignment, rtR0MemObjLinuxOrder(cPages), (unsigned long)page_to_phys(pMemLnx->apPages[0]));
rtR0MemObjLinuxFreePages(pMemLnx);
return rcNoMem;
}
@@ -438,14 +443,12 @@
while (iPage-- > 0)
{
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 5, 0)
- /*
- * See SetPageReserved() in rtR0MemObjLinuxAllocPages()
- */
+ /* See SetPageReserved() in rtR0MemObjLinuxAllocPages() */
ClearPageReserved(pMemLnx->apPages[iPage]);
#endif
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 4, 22)
-#else
- MY_SET_PAGES_NOEXEC(pMemLnx->apPages[iPage], 1);
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 4, 22)
+ if (pMemLnx->fExecutable)
+ MY_SET_PAGES_NOEXEC(pMemLnx->apPages[iPage], 1);
#endif
}
@@ -662,10 +665,10 @@
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 4, 22)
rc = rtR0MemObjLinuxAllocPages(&pMemLnx, RTR0MEMOBJTYPE_PAGE, cb, PAGE_SIZE, GFP_HIGHUSER,
- false /* non-contiguous */, VERR_NO_MEMORY);
+ false /* non-contiguous */, fExecutable, VERR_NO_MEMORY);
#else
rc = rtR0MemObjLinuxAllocPages(&pMemLnx, RTR0MEMOBJTYPE_PAGE, cb, PAGE_SIZE, GFP_USER,
- false /* non-contiguous */, VERR_NO_MEMORY);
+ false /* non-contiguous */, fExecutable, VERR_NO_MEMORY);
#endif
if (RT_SUCCESS(rc))
{
@@ -696,19 +699,19 @@
#if (defined(RT_ARCH_AMD64) || defined(CONFIG_X86_PAE)) && defined(GFP_DMA32)
/* ZONE_DMA32: 0-4GB */
rc = rtR0MemObjLinuxAllocPages(&pMemLnx, RTR0MEMOBJTYPE_LOW, cb, PAGE_SIZE, GFP_DMA32,
- false /* non-contiguous */, VERR_NO_LOW_MEMORY);
+ false /* non-contiguous */, fExecutable, VERR_NO_LOW_MEMORY);
if (RT_FAILURE(rc))
#endif
#ifdef RT_ARCH_AMD64
/* ZONE_DMA: 0-16MB */
rc = rtR0MemObjLinuxAllocPages(&pMemLnx, RTR0MEMOBJTYPE_LOW, cb, PAGE_SIZE, GFP_DMA,
- false /* non-contiguous */, VERR_NO_LOW_MEMORY);
+ false /* non-contiguous */, fExecutable, VERR_NO_LOW_MEMORY);
#else
# ifdef CONFIG_X86_PAE
# endif
/* ZONE_NORMAL: 0-896MB */
rc = rtR0MemObjLinuxAllocPages(&pMemLnx, RTR0MEMOBJTYPE_LOW, cb, PAGE_SIZE, GFP_USER,
- false /* non-contiguous */, VERR_NO_LOW_MEMORY);
+ false /* non-contiguous */, fExecutable, VERR_NO_LOW_MEMORY);
#endif
if (RT_SUCCESS(rc))
{
@@ -738,17 +741,17 @@
#if (defined(RT_ARCH_AMD64) || defined(CONFIG_X86_PAE)) && defined(GFP_DMA32)
/* ZONE_DMA32: 0-4GB */
rc = rtR0MemObjLinuxAllocPages(&pMemLnx, RTR0MEMOBJTYPE_CONT, cb, PAGE_SIZE, GFP_DMA32,
- true /* contiguous */, VERR_NO_CONT_MEMORY);
+ true /* contiguous */, fExecutable, VERR_NO_CONT_MEMORY);
if (RT_FAILURE(rc))
#endif
#ifdef RT_ARCH_AMD64
/* ZONE_DMA: 0-16MB */
rc = rtR0MemObjLinuxAllocPages(&pMemLnx, RTR0MEMOBJTYPE_CONT, cb, PAGE_SIZE, GFP_DMA,
- true /* contiguous */, VERR_NO_CONT_MEMORY);
+ true /* contiguous */, fExecutable, VERR_NO_CONT_MEMORY);
#else
/* ZONE_NORMAL (32-bit hosts): 0-896MB */
rc = rtR0MemObjLinuxAllocPages(&pMemLnx, RTR0MEMOBJTYPE_CONT, cb, PAGE_SIZE, GFP_USER,
- true /* contiguous */, VERR_NO_CONT_MEMORY);
+ true /* contiguous */, fExecutable, VERR_NO_CONT_MEMORY);
#endif
if (RT_SUCCESS(rc))
{
@@ -795,7 +798,7 @@
rc = rtR0MemObjLinuxAllocPages(&pMemLnx, enmType, cb, uAlignment, fGfp,
enmType == RTR0MEMOBJTYPE_PHYS /* contiguous / non-contiguous */,
- VERR_NO_PHYS_MEMORY);
+ false /*fExecutable*/, VERR_NO_PHYS_MEMORY);
if (RT_FAILURE(rc))
return rc;
diff -u -r VirtualBox-6.0.14/src/VBox/Runtime/r0drv/linux/the-linux-kernel.h VirtualBox-6.0.14-5.4/src/VBox/Runtime/r0drv/linux/the-linux-kernel.h
--- VirtualBox-6.0.14/src/VBox/Runtime/r0drv/linux/the-linux-kernel.h 2019-10-10 18:36:16.000000000 +0000
+++ VirtualBox-6.0.14-5.4/src/VBox/Runtime/r0drv/linux/the-linux-kernel.h 2019-11-26 10:09:39.218538652 +0000
@@ -337,8 +337,10 @@
#endif
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 25)
-# define MY_SET_PAGES_EXEC(pPages, cPages) set_pages_x(pPages, cPages)
-# define MY_SET_PAGES_NOEXEC(pPages, cPages) set_pages_nx(pPages, cPages)
+# if LINUX_VERSION_CODE < KERNEL_VERSION(5, 4, 0) /* The interface was removed, but we only need it for < 2.4.22, so who cares. */
+# define MY_SET_PAGES_EXEC(pPages, cPages) set_pages_x(pPages, cPages)
+# define MY_SET_PAGES_NOEXEC(pPages, cPages) set_pages_nx(pPages, cPages)
+# endif
#else
# define MY_SET_PAGES_EXEC(pPages, cPages) \
do { \
diff -u -r VirtualBox-6.0.14/src/VBox/Runtime/r0drv/linux/thread2-r0drv-linux.c VirtualBox-6.0.14-5.4/src/VBox/Runtime/r0drv/linux/thread2-r0drv-linux.c
--- VirtualBox-6.0.14/src/VBox/Runtime/r0drv/linux/thread2-r0drv-linux.c 2019-10-10 18:36:16.000000000 +0000
+++ VirtualBox-6.0.14-5.4/src/VBox/Runtime/r0drv/linux/thread2-r0drv-linux.c 2019-11-26 10:08:56.321310893 +0000
@@ -36,6 +36,9 @@
#include <iprt/errcore.h>
#include "internal/thread.h"
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
+ #include <uapi/linux/sched/types.h>
+#endif /* >= KERNEL_VERSION(4, 11, 0) */
RTDECL(RTTHREAD) RTThreadSelf(void)
{
@@ -1,11 +0,0 @@
--- VirtualBox-6.1.2/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.cpp.orig 2020-01-13 12:53:25.000000000 +0200
+++ VirtualBox-6.1.2/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.cpp 2020-01-15 22:34:18.352860666 +0200
@@ -2349,7 +2349,7 @@ QString UIExtraDataManager::preventBetaB
bool UIExtraDataManager::applicationUpdateEnabled()
{
/* 'True' unless 'restriction' feature allowed: */
- return !isFeatureAllowed(GUI_PreventApplicationUpdate);
+ return false;
}
QString UIExtraDataManager::applicationUpdateData()
@@ -0,0 +1,13 @@
diff --git a/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.cpp b/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.cpp
index da373c92..18fb69a7 100644
--- a/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.cpp
@@ -2349,7 +2349,7 @@ QString UIExtraDataManager::preventBetaBuildWarningForVersion()
bool UIExtraDataManager::applicationUpdateEnabled()
{
/* 'True' unless 'restriction' feature allowed: */
- return !isFeatureAllowed(GUI_PreventApplicationUpdate);
+ return false;
}
QString UIExtraDataManager::applicationUpdateData()
@@ -1,23 +1,24 @@
From ff59d7f89a64a9386b3b97a3e7b062df59474192 Mon Sep 17 00:00:00 2001
From 9736107f45a17f04e4a0f9ab14fe913660cde3ad Mon Sep 17 00:00:00 2001
From: Christian Hesse <mail@eworm.de>
Date: Tue, 18 Jan 2022 21:16:33 +0100
Subject: [PATCH 1/1] drop -Wno-format
Date: Mon, 17 Oct 2022 15:07:30 +0200
Subject: [PATCH] drop -Wno-format
---
src/VBox/Devices/EFI/Firmware/Config.kmk | 2 +-
.../EFI/Firmware/CryptoPkg/Library/OpensslLib/OpensslLib.inf | 4 ++--
.../CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf | 4 ++--
src/VBox/Devices/Makefile.kmk | 2 +-
src/VBox/Devices/PC/ipxe/Makefile.kmk | 2 +-
src/VBox/ExtPacks/VBoxDTrace/Makefile.kmk | 2 +-
src/VBox/Main/webservice/Makefile.kmk | 2 --
7 files changed, 8 insertions(+), 10 deletions(-)
src/VBox/Devices/EFI/Firmware/Config.kmk | 2 +-
.../Firmware/CryptoPkg/Library/OpensslLib/OpensslLib.inf | 6 +++---
.../CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf | 6 +++---
src/VBox/Devices/Makefile.kmk | 2 +-
src/VBox/Devices/PC/ipxe/Makefile.kmk | 2 +-
src/VBox/ExtPacks/VBoxDTrace/Makefile.kmk | 2 +-
src/VBox/Main/webservice/Makefile.kmk | 3 +--
src/libs/xpcom18a4/Config.kmk | 6 +++---
8 files changed, 14 insertions(+), 15 deletions(-)
diff --git a/src/VBox/Devices/EFI/Firmware/Config.kmk b/src/VBox/Devices/EFI/Firmware/Config.kmk
index a5affd4d..d8dd9ed0 100644
index e2e537f1..de640194 100644
--- a/src/VBox/Devices/EFI/Firmware/Config.kmk
+++ b/src/VBox/Devices/EFI/Firmware/Config.kmk
@@ -126,7 +126,7 @@ TEMPLATE_VBoxEfiBldProg_LIBS = \
@@ -155,7 +155,7 @@ TEMPLATE_VBoxEfiBldProg_LIBS = \
ifn1of ($(KBUILD_HOST),win) # This stuff isn't up to our standard at all! :/
TEMPLATE_VBoxEfiBldProg_CFLAGS = $(filter-out -pedantic,$(TEMPLATE_VBoxBldProg_CFLAGS)) \
-Wno-sign-compare -Wno-missing-prototypes -Wno-strict-prototypes \
@@ -27,10 +28,10 @@ index a5affd4d..d8dd9ed0 100644
TEMPLATE_VBoxEfiBldProg_CXXFLAGS = $(filter-out -pedantic,$(TEMPLATE_VBoxBldProg_CXXFLAGS)) \
-Wno-all -Wno-shadow -Wno-empty-body -Wno-unused-parameter -Wno-unused-variable \
diff --git a/src/VBox/Devices/EFI/Firmware/CryptoPkg/Library/OpensslLib/OpensslLib.inf b/src/VBox/Devices/EFI/Firmware/CryptoPkg/Library/OpensslLib/OpensslLib.inf
index 83831a1a..8b22fa0b 100644
index 5300ea32..e9485765 100644
--- a/src/VBox/Devices/EFI/Firmware/CryptoPkg/Library/OpensslLib/OpensslLib.inf
+++ b/src/VBox/Devices/EFI/Firmware/CryptoPkg/Library/OpensslLib/OpensslLib.inf
@@ -657,9 +657,9 @@
@@ -618,10 +618,10 @@
# -Werror=unused-but-set-variable: Warn whenever a local variable is assigned to, but otherwise unused (aside from its declaration).
#
GCC:*_*_IA32_CC_FLAGS = -U_WIN32 -U_WIN64 $(OPENSSL_FLAGS) -Wno-error=maybe-uninitialized -Wno-error=unused-but-set-variable
@@ -38,15 +39,17 @@ index 83831a1a..8b22fa0b 100644
+ GCC:*_*_X64_CC_FLAGS = -U_WIN32 -U_WIN64 $(OPENSSL_FLAGS) -Wno-error=maybe-uninitialized -Wno-error=format -Wno-error=unused-but-set-variable -DNO_MSABI_VA_FUNCS
GCC:*_*_ARM_CC_FLAGS = $(OPENSSL_FLAGS) -Wno-error=maybe-uninitialized -Wno-error=unused-but-set-variable
- GCC:*_*_AARCH64_CC_FLAGS = $(OPENSSL_FLAGS) -Wno-error=maybe-uninitialized -Wno-format -Wno-error=unused-but-set-variable
- GCC:*_*_RISCV64_CC_FLAGS = $(OPENSSL_FLAGS) -Wno-error=maybe-uninitialized -Wno-format -Wno-error=unused-but-set-variable
+ GCC:*_*_AARCH64_CC_FLAGS = $(OPENSSL_FLAGS) -Wno-error=maybe-uninitialized -Wno-error=unused-but-set-variable
+ GCC:*_*_RISCV64_CC_FLAGS = $(OPENSSL_FLAGS) -Wno-error=maybe-uninitialized -Wno-error=unused-but-set-variable
GCC:*_CLANG35_*_CC_FLAGS = -std=c99 -Wno-error=uninitialized
GCC:*_CLANG38_*_CC_FLAGS = -std=c99 -Wno-error=uninitialized
GCC:*_CLANGPDB_*_CC_FLAGS = -std=c99 -Wno-error=uninitialized -Wno-error=incompatible-pointer-types -Wno-error=pointer-sign -Wno-error=implicit-function-declaration -Wno-error=ignored-pragma-optimize
diff --git a/src/VBox/Devices/EFI/Firmware/CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf b/src/VBox/Devices/EFI/Firmware/CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf
index fe28ee67..de03e6df 100644
index 1b1d46b0..df9998a5 100644
--- a/src/VBox/Devices/EFI/Firmware/CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf
+++ b/src/VBox/Devices/EFI/Firmware/CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf
@@ -605,9 +605,9 @@
@@ -567,10 +567,10 @@
# -Werror=unused-but-set-variable: Warn whenever a local variable is assigned to, but otherwise unused (aside from its declaration).
#
GCC:*_*_IA32_CC_FLAGS = -U_WIN32 -U_WIN64 $(OPENSSL_FLAGS) -Wno-error=maybe-uninitialized -Wno-error=unused-but-set-variable
@@ -54,15 +57,17 @@ index fe28ee67..de03e6df 100644
+ GCC:*_*_X64_CC_FLAGS = -U_WIN32 -U_WIN64 $(OPENSSL_FLAGS) -Wno-error=maybe-uninitialized -Wno-error=format -Wno-error=unused-but-set-variable -DNO_MSABI_VA_FUNCS
GCC:*_*_ARM_CC_FLAGS = $(OPENSSL_FLAGS) -Wno-error=maybe-uninitialized -Wno-error=unused-but-set-variable
- GCC:*_*_AARCH64_CC_FLAGS = $(OPENSSL_FLAGS) -Wno-error=maybe-uninitialized -Wno-format -Wno-error=unused-but-set-variable
- GCC:*_*_RISCV64_CC_FLAGS = $(OPENSSL_FLAGS) -Wno-error=maybe-uninitialized -Wno-format -Wno-error=unused-but-set-variable
+ GCC:*_*_AARCH64_CC_FLAGS = $(OPENSSL_FLAGS) -Wno-error=maybe-uninitialized -Wno-error=unused-but-set-variable
+ GCC:*_*_RISCV64_CC_FLAGS = $(OPENSSL_FLAGS) -Wno-error=maybe-uninitialized -Wno-error=unused-but-set-variable
GCC:*_CLANG35_*_CC_FLAGS = -std=c99 -Wno-error=uninitialized
GCC:*_CLANG38_*_CC_FLAGS = -std=c99 -Wno-error=uninitialized
GCC:*_CLANGPDB_*_CC_FLAGS = -std=c99 -Wno-error=uninitialized -Wno-error=incompatible-pointer-types -Wno-error=pointer-sign -Wno-error=implicit-function-declaration -Wno-error=ignored-pragma-optimize
diff --git a/src/VBox/Devices/Makefile.kmk b/src/VBox/Devices/Makefile.kmk
index bd64e790..136e203b 100644
index 02da1255..c2cbbc1c 100644
--- a/src/VBox/Devices/Makefile.kmk
+++ b/src/VBox/Devices/Makefile.kmk
@@ -727,7 +727,7 @@ endif
@@ -836,7 +836,7 @@ VBOX_WITH_VMSVGA3D_DYNAMIC_LOAD = 1
ifeq ($(KBUILD_TARGET),win)
$(file)_CFLAGS = -wd4018
else
@@ -72,23 +77,23 @@ index bd64e790..136e203b 100644
endef
diff --git a/src/VBox/Devices/PC/ipxe/Makefile.kmk b/src/VBox/Devices/PC/ipxe/Makefile.kmk
index d35d50c0..64d0079b 100644
index 8a611f6d..c57f0454 100644
--- a/src/VBox/Devices/PC/ipxe/Makefile.kmk
+++ b/src/VBox/Devices/PC/ipxe/Makefile.kmk
@@ -358,7 +358,7 @@ endif
@@ -401,7 +401,7 @@ endif
#
BLDPROGS += ipxezbin
ipxezbin_TEMPLATE = VBoxBldProg
- ipxezbin_CFLAGS = -Wno-format -Wno-unused-function
+ ipxezbin_CFLAGS = -Wno-unused-function
- ipxezbin_CFLAGS = -Wno-format -Wno-unused-function -Wno-pointer-arith
+ ipxezbin_CFLAGS = -Wno-unused-function -Wno-pointer-arith
ipxezbin_SOURCES = src/util/zbin.c
ipxezbin_LIBS = lzma # @todo Can't assume liblzma on the build system
endif
diff --git a/src/VBox/ExtPacks/VBoxDTrace/Makefile.kmk b/src/VBox/ExtPacks/VBoxDTrace/Makefile.kmk
index 4c1a863f..c1af03f6 100644
index b2bd260b..133e7398 100644
--- a/src/VBox/ExtPacks/VBoxDTrace/Makefile.kmk
+++ b/src/VBox/ExtPacks/VBoxDTrace/Makefile.kmk
@@ -107,7 +107,7 @@ if defined(VBOX_WITH_EXTPACK_VBOXDTRACE) && defined(VBOX_WITH_EXTPACK)
@@ -118,7 +118,7 @@ if defined(VBOX_WITH_EXTPACK_VBOXDTRACE) && defined(VBOX_WITH_EXTPACK)
VBoxDTraceCmd_DEFS.win = YY_USE_PROTOS=1 YYENABLE_NLS=0 YYLTYPE_IS_TRIVIAL=0
VBoxDTraceCmd_SDKS = VBOX_ZLIB
ifn1of ($(KBUILD_TARGET), win)
@@ -98,25 +103,47 @@ index 4c1a863f..c1af03f6 100644
VBoxDTraceCmd_INCS = \
include \
diff --git a/src/VBox/Main/webservice/Makefile.kmk b/src/VBox/Main/webservice/Makefile.kmk
index 6e088b14..3c1d9fa7 100644
index 072d066e..d2feea75 100644
--- a/src/VBox/Main/webservice/Makefile.kmk
+++ b/src/VBox/Main/webservice/Makefile.kmk
@@ -273,7 +273,6 @@ ifdef VBOX_GSOAP_INSTALLED
$(VBOXWEB_OUT_DIR)/soapC-29.cpp
vboxsoap_CXXFLAGS += \
$(VBOX_GCC_Wno-vla) \
- $(if-expr $(KBUILD_TARGET) == "win",,-Wno-format) \
$(if-expr $(KBUILD_TARGET) == "win",,-Wno-deprecated-declarations)
endif
vboxsoap_CLEAN := $(vboxsoap_SOURCES) # lazy bird
@@ -284,7 +283,6 @@ ifdef VBOX_GSOAP_INSTALLED
@@ -260,7 +260,7 @@ ifdef VBOX_GSOAP_INSTALLED
ifn1of ($(KBUILD_TARGET), win)
vboxsoap_CXXFLAGS += -Wno-shadow -Wno-parentheses $(VBOX_GCC_Wno-literal-suffix) \
$(VBOX_GCC_Wno-stringop-overflow) $(VBOX_GCC_Wno-stringop-truncation) \
- $(VBOX_GCC_Wno-vla) -Wno-format -Wno-deprecated-declarations $(VBOX_GCC_fno-printf-return-value)
+ $(VBOX_GCC_Wno-vla) -Wno-deprecated-declarations $(VBOX_GCC_fno-printf-return-value)
ifn1of ($(KBUILD_TYPE), debug) # Save time+memory by using -O0 instead of -O2.
vboxsoap_CXXFLAGS += -O0 ## @todo this could be interesting for g++ (not clang++): -fcprop-registers
endif
@@ -331,7 +331,6 @@ ifdef VBOX_GSOAP_INSTALLED
$(VBOXWEB_OUT_DIR)/gsoap_copy_all_ts
ifn1of ($(KBUILD_TARGET), win)
$(VBOX_GSOAP_CXX_SOURCES)_CXXFLAGS = \
- -Wno-format \
$(VBOX_GCC_Wno-int-in-bool-context) \
$(if $(VBOX_GCC_Wlogical-op),-Wno-error=logical-op,)
$(VBOX_GCC_Wno-int-in-bool-context) \
$(VBOX_GCC_Wno-logical-op)
# currently necessary when compiling against OpenSSL 1.0 due to a missing
--
2.34.1
diff --git a/src/libs/xpcom18a4/Config.kmk b/src/libs/xpcom18a4/Config.kmk
index 3b0831e5..a83a080b 100644
--- a/src/libs/xpcom18a4/Config.kmk
+++ b/src/libs/xpcom18a4/Config.kmk
@@ -243,8 +243,8 @@ TEMPLATE_XPCOMEXE_LDFLAGS.darwin = -bind_at_load $(filter-out -current_version
#
TEMPLATE_XPCOMTSTEXE = XPCOM executable files (testcases)
TEMPLATE_XPCOMTSTEXE_EXTENDS = XPCOMEXE
-TEMPLATE_XPCOMTSTEXE_CXXFLAGS = $(TEMPLATE_XPCOMEXE_CXXFLAGS) -Wno-format
-TEMPLATE_XPCOMTSTEXE_CFLAGS = $(TEMPLATE_XPCOMEXE_CFLAGS) -Wno-format
+TEMPLATE_XPCOMTSTEXE_CXXFLAGS = $(TEMPLATE_XPCOMEXE_CXXFLAGS)
+TEMPLATE_XPCOMTSTEXE_CFLAGS = $(TEMPLATE_XPCOMEXE_CFLAGS)
TEMPLATE_XPCOMTSTEXE_INST = $(INST_TESTCASE)
ifdef VBOX_WITH_RUNPATH
TEMPLATE_XPCOMTSTEXE_LDFLAGS = '$(VBOX_GCC_RPATH_OPT)$(VBOX_WITH_RUNPATH)' $(TEMPLATE_XPCOMEXE_LDFLAGS)
@@ -277,7 +277,7 @@ TEMPLATE_XPCOMBLDPROG_INCS = \
$(VBOX_PATH_SDK)/bindings/xpcom/include/string \
$(VBOX_PATH_SDK)/bindings/xpcom/include/xpcom \
$(VBOX_PATH_SDK)/bindings/xpcom/include/ipcd
-TEMPLATE_XPCOMBLDPROG_CFLAGS = $(filter-out -pedantic -Wshadow, $(TEMPLATE_VBOX_BLDPROG_CFLAGS)) $(VBOX_GCC_Wno-int-to-pointer-cast) $(VBOX_GCC_Wno-pointer-to-int-cast) -Wno-format
+TEMPLATE_XPCOMBLDPROG_CFLAGS = $(filter-out -pedantic -Wshadow, $(TEMPLATE_VBOX_BLDPROG_CFLAGS)) $(VBOX_GCC_Wno-int-to-pointer-cast) $(VBOX_GCC_Wno-pointer-to-int-cast)
TEMPLATE_XPCOMBLDPROG_CXXFLAGS.darwin = $(TEMPLATE_VBoxBldProg_CXXFLAGS.darwin) -fpascal-strings -fshort-wchar -fno-common -fno-rtti
TEMPLATE_XPCOMBLDPROG_CXXFLAGS.solaris = $(TEMPLATE_VBoxBldProg_CXXFLAGS.solaris) -fno-omit-frame-pointer # for now anyway.
TEMPLATE_XPCOMBLDPROG_LDFLAGS.darwin = $(TEMPLATE_VBoxBldProg_LDFLAGS.darwin) -fpascal-strings -fshort-wchar -fno-rtti -fno-exceptions
@@ -1,5 +1,5 @@
Fix FTBFS by not compile X.org-1.19 drv, we don't use it, just need in el <= 7
--- ./src/VBox/Additions/x11/vboxvideo/Makefile.kmk.orig 2016-10-11 02:49:23.184986182 +0100
--- ./src/VBox/Additions/x11/vboxvideo/Makefile.kmk 2016-10-11 02:49:23.184986182 +0100
+++ ./src/VBox/Additions/x11/vboxvideo/Makefile.kmk 2016-10-11 02:49:39.879176964 +0100
@@ -376,7 +376,7 @@ vboxvideo_drv_118_SOURCES := $(vboxvideo
@@ -0,0 +1,77 @@
From 9284f5a37708ddf0108898a48eca5db0e5316a43 Mon Sep 17 00:00:00 2001
From: Christian Hesse <mail@eworm.de>
Date: Mon, 17 Oct 2022 16:35:53 +0200
Subject: [PATCH] properly handle i3wm
---
.../VirtualBox/src/globals/UIDesktopWidgetWatchdog.cpp | 4 ++--
.../Frontends/VirtualBox/src/platform/x11/VBoxUtils-x11.cpp | 3 +++
.../Frontends/VirtualBox/src/platform/x11/VBoxUtils-x11.h | 3 ++-
src/VBox/Frontends/VirtualBox/src/widgets/UIMiniToolBar.cpp | 4 ++++
4 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/src/VBox/Frontends/VirtualBox/src/globals/UIDesktopWidgetWatchdog.cpp b/src/VBox/Frontends/VirtualBox/src/globals/UIDesktopWidgetWatchdog.cpp
index 9c5faa42..5439e2a7 100644
--- a/src/VBox/Frontends/VirtualBox/src/globals/UIDesktopWidgetWatchdog.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/globals/UIDesktopWidgetWatchdog.cpp
@@ -443,8 +443,8 @@ const QRect UIDesktopWidgetWatchdog::availableGeometry(int iHostScreenIndex /* =
/* Get cached available-geometry: */
const QRect availableGeometry = m_availableGeometryData.value(iHostScreenIndex);
/* Return cached available-geometry if it's valid or screen-geometry otherwise: */
- return availableGeometry.isValid() ? availableGeometry :
- QApplication::desktop()->screenGeometry(iHostScreenIndex);
+ return availableGeometry.isValid() && NativeWindowSubsystem::X11WindowManagerType() != X11WMType_i3 ?
+ availableGeometry : QApplication::desktop()->screenGeometry(iHostScreenIndex);
# endif /* !VBOX_GUI_WITH_CUSTOMIZATIONS1 */
# else /* !VBOX_WS_X11 */
/* Redirect call to desktop-widget: */
diff --git a/src/VBox/Frontends/VirtualBox/src/platform/x11/VBoxUtils-x11.cpp b/src/VBox/Frontends/VirtualBox/src/platform/x11/VBoxUtils-x11.cpp
index 53927559..ea648da7 100644
--- a/src/VBox/Frontends/VirtualBox/src/platform/x11/VBoxUtils-x11.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/platform/x11/VBoxUtils-x11.cpp
@@ -117,6 +117,9 @@ X11WMType NativeWindowSubsystem::X11WindowManagerType()
else
if (QString((const char*)pcData).contains("Xfwm4", Qt::CaseInsensitive))
wmType = X11WMType_Xfwm4;
+ else
+ if (QString((const char*)pcData).contains("i3", Qt::CaseInsensitive))
+ wmType = X11WMType_i3;
if (pcData)
XFree(pcData);
}
diff --git a/src/VBox/Frontends/VirtualBox/src/platform/x11/VBoxUtils-x11.h b/src/VBox/Frontends/VirtualBox/src/platform/x11/VBoxUtils-x11.h
index bad78665..f2a0b462 100644
--- a/src/VBox/Frontends/VirtualBox/src/platform/x11/VBoxUtils-x11.h
+++ b/src/VBox/Frontends/VirtualBox/src/platform/x11/VBoxUtils-x11.h
@@ -49,6 +49,7 @@ enum X11WMType
X11WMType_Metacity,
X11WMType_Mutter,
X11WMType_Xfwm4,
+ X11WMType_i3,
};
/** X11: Screen-saver inhibit methods. */
@@ -95,7 +96,7 @@
/** X11: Determines and returns whether the compositing manager is running. */
bool X11IsCompositingManagerRunning();
/** X11: Determines and returns current Window Manager type. */
- X11WMType X11WindowManagerType();
+ SHARED_LIBRARY_STUFF X11WMType X11WindowManagerType();
#if 0 // unused for now?
/** X11: Inits the screen saver save/restore mechanism. */
diff --git a/src/VBox/Frontends/VirtualBox/src/widgets/UIMiniToolBar.cpp b/src/VBox/Frontends/VirtualBox/src/widgets/UIMiniToolBar.cpp
index 815db408..8cddb431 100644
--- a/src/VBox/Frontends/VirtualBox/src/widgets/UIMiniToolBar.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/widgets/UIMiniToolBar.cpp
@@ -888,6 +888,10 @@ void UIMiniToolBar::prepare()
/* Enable translucency through Qt API if supported: */
if (uiCommon().isCompositingManagerRunning())
setAttribute(Qt::WA_TranslucentBackground);
+
+ if (NativeWindowSubsystem::X11WindowManagerType() == X11WMType_i3)
+ setWindowFlags(Qt::FramelessWindowHint);
+
#endif /* VBOX_WS_X11 */
/* Make sure we have no focus: */
@@ -0,0 +1,54 @@
From eb9ded87d9d1a6755f2bb7258641c9c80c54c347 Mon Sep 17 00:00:00 2001
From: Christian Hesse <mail@eworm.de>
Date: Mon, 17 Oct 2022 16:30:32 +0200
Subject: [PATCH] support building from dkms
---
src/VBox/HostDrivers/linux/Makefile | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/src/VBox/HostDrivers/linux/Makefile b/src/VBox/HostDrivers/linux/Makefile
index badeb4f4..314281f3 100644
--- a/src/VBox/HostDrivers/linux/Makefile
+++ b/src/VBox/HostDrivers/linux/Makefile
@@ -33,25 +33,25 @@
# SPDX-License-Identifier: GPL-3.0-only OR CDDL-1.0
#
-ifneq ($(KERNELRELEASE),)
+ifneq ($(KBUILD_EXTMOD),)
-# Building from kBuild (make -C <kernel_directory> M=`pwd`),
-# or inside a kernel source tree.
+# Building from kBuild (make -C <kernel_directory> M=`pwd`).
+# KBUILD_EXTMOD is set to $(M) in this case.
obj-m = vboxdrv/
- ifneq ($(wildcard $(CURDIR)/vboxnetflt/Makefile),)
+ ifneq ($(wildcard $(KBUILD_EXTMOD)/vboxnetflt/Makefile),)
obj-m += vboxnetflt/
endif
- ifneq ($(wildcard $(CURDIR)/vboxnetadp/Makefile),)
+ ifneq ($(wildcard $(KBUILD_EXTMOD)/vboxnetadp/Makefile),)
obj-m += vboxnetadp/
endif
- ifneq ($(wildcard $(CURDIR)/vboxpci/Makefile),)
+ ifneq ($(wildcard $(KBUILD_EXTMOD)/vboxpci/Makefile),)
obj-m += vboxpci/
endif
-else # ! KERNELRELEASE
+else # ! KBUILD_EXTMOD
-# convenience Makefile without KERNELRELEASE
+# convenience Makefile without KBUILD_EXTMOD
ifndef SUDO
ifneq ($(shell id -u),0)
@@ -244,5 +244,5 @@ load: unload
fi; \
done
-endif # ! KERNELRELEASE
+endif # ! KBUILD_EXTMOD
@@ -1,9 +1,20 @@
From 12e0a15f8893187ee92fa5af8095b8bb33adefe5 Mon Sep 17 00:00:00 2001
From: Christian Hesse <mail@eworm.de>
Date: Mon, 17 Oct 2022 16:40:29 +0200
Subject: [PATCH] upate xclient script
---
src/VBox/Additions/x11/Installer/98vboxadd-xclient | 13 +++----------
1 file changed, 3 insertions(+), 10 deletions(-)
diff --git a/src/VBox/Additions/x11/Installer/98vboxadd-xclient b/src/VBox/Additions/x11/Installer/98vboxadd-xclient
index 7c9b5989..271261a4 100755
--- a/src/VBox/Additions/x11/Installer/98vboxadd-xclient
+++ b/src/VBox/Additions/x11/Installer/98vboxadd-xclient
@@ -21,18 +21,11 @@ for i in $HOME/.vboxclient-*.pid; do
@@ -31,18 +31,11 @@ for i in $HOME/.vboxclient-*.pid; do
test -w $i || rm -f $i
done
-if ! test -c /dev/vboxguest 2>/dev/null; then
- # Do not start if the kernel module is not present.
- # Execute notify-send in the back-ground to avoid racing with sddm,
@@ -20,5 +31,5 @@
/usr/bin/VBoxClient --checkhostversion
/usr/bin/VBoxClient --seamless
/usr/bin/VBoxClient --draganddrop
- /usr/bin/VBoxClient --vmsvga # In case VMSVGA emulation is enabled
- /usr/bin/VBoxClient --vmsvga-session # In case VMSVGA emulation is enabled
fi
@@ -0,0 +1,13 @@
Fix compiling with shared liblzf library by not mangling the needed symbols
--- a/src/VBox/Runtime/common/zip/zip.cpp 2022-10-07 01:11:55.000000000 +0800
+++ b/src/VBox/Runtime/common/zip/zip.cpp 2022-10-19 22:35:37.996450458 +0800
@@ -61,7 +61,9 @@
# include <zlib.h>
#endif
#ifdef RTZIP_USE_LZF
+extern "C" {
# include <lzf.h>
+}
# include <iprt/crc.h>
#endif
#ifdef RTZIP_USE_LZJB
@@ -1,17 +0,0 @@
Index: VirtualBox-2.2.0_OSE/src/VBox/Installer/freebsd/VirtualBox.desktop
===================================================================
--- VirtualBox-2.2.0_OSE.orig/src/VBox/Installer/freebsd/virtualbox.desktop
+++ VirtualBox-2.2.0_OSE/src/VBox/Installer/freebsd/virtualbox.desktop
@@ -3,6 +3,7 @@ Encoding=UTF-8
Version=1.0
Name=Oracle VM VirtualBox
GenericName=Virtual Machine
+GenericName[tr]=Sanal Makine
Type=Application
Exec=VirtualBox
TryExec=VirtualBox
@@ -14,3 +15,4 @@ Comment[de]=Windows und andere Betriebss
Comment[pl]=Uruchamianie wielu systemów wirtualnych na jednym komputerze gospodarza
Comment[sv]=Kör flera virtuella system på en enda värddator
Comment[ko]=가상 머신
+Comment[tr]=Tek bir sunucu bilgisayarda birden fazla sanal sistem çalıştırın
@@ -1,13 +0,0 @@
Index: VirtualBox-2.2.4_OSE/src/VBox/Frontends/Common/VBoxKeyboard/keyboard-layouts.h
===================================================================
--- VirtualBox-2.2.4_OSE.orig/src/VBox/Frontends/Common/VBoxKeyboard/keyboard-layouts.h
+++ VirtualBox-2.2.4_OSE/src/VBox/Frontends/Common/VBoxKeyboard/keyboard-layouts.h
@@ -1836,7 +1836,7 @@ static const char main_key_th_pat[MAIN_L
/* Turkey */
static const char main_key_tr[MAIN_LEN][2] =
{
-"\"\\","1!","2'","3^","4+","5%","6&","7/","8(","9)","0=","*?","-_",
+"\"\xe9","1!","2'","3^","4+","5%","6&","7/","8(","9)","0=","*?","-_",
"qQ","wW","eE","rR","tT","yY","uU","\xb9I","oO","pP","\xbb\xab","\xfc\xdc",
"aA","sS","dD","fF","gG","hH","jJ","kK","lL","\xba\xaa","i\xa9",",;",
"zZ","xX","cC","vV","bB","nN","mM","\xf6\xd6","\xe7\xc7",".:","<>","\x0\x0","\x0\x0"
@@ -1,229 +0,0 @@
Index: a/include/iprt/time.h
===================================================================
--- a/include/iprt/time.h (revision 82968)
+++ a/include/iprt/time.h (revision 83471)
@@ -359,6 +359,12 @@
/* PORTME: Add struct timeval guard macro here. */
#if defined(RTTIME_INCL_TIMEVAL) || defined(_STRUCT_TIMEVAL) || defined(_SYS__TIMEVAL_H_) || defined(_SYS_TIME_H) || defined(_TIMEVAL) || defined(_LINUX_TIME_H) \
|| (defined(RT_OS_NETBSD) && defined(_SYS_TIME_H_))
+/*
+ * Starting with Linux kernel version 5.6-rc3, the struct timeval is no longer
+ * available to kernel code and must not be used in kernel code.
+ * Only 64-bit time-interfaces are allowed into the kernel.
+ */
+# if defined(RT_OS_LINUX) && (!defined(__KERNEL__) || !defined(_LINUX_TIME64_H))
/**
* Gets the time as POSIX timeval.
*
@@ -392,6 +398,7 @@
{
return RTTimeSpecAddMicro(RTTimeSpecSetSeconds(pTime, pTimeval->tv_sec), pTimeval->tv_usec);
}
+# endif /* RT_OS_LINUX ... */
#endif /* various ways of detecting struct timeval */
@@ -431,15 +438,19 @@
{
return RTTimeSpecAddNano(RTTimeSpecSetSeconds(pTime, pTimespec->tv_sec), pTimespec->tv_nsec);
}
-
-
-# ifdef _LINUX_TIME64_H
+#endif /* various ways of detecting struct timespec */
+
+#if defined(RT_OS_LINUX) && defined(_LINUX_TIME64_H)
+/*
+ * Starting with Linux kernel version 5.6-rc3, the _STRUCT_TIMESPEC is only defined
+ * under !__KERNEL__ guard and _LINUX_TIME64_H does not define a corresponding
+ * _STRUCT_TIMESPEC64. Only 64-bit time-interfaces are now allowed into the kernel.
+ */
DECLINLINE(PRTTIMESPEC) RTTimeSpecSetTimespec64(PRTTIMESPEC pTime, const struct timespec64 *pTimeval)
{
return RTTimeSpecAddNano(RTTimeSpecSetSeconds(pTime, pTimeval->tv_sec), pTimeval->tv_nsec);
}
-# endif
-#endif /* various ways of detecting struct timespec */
+#endif /* RT_OS_LINUX && _LINUX_TIME64_H */
Index: a/src/VBox/Runtime/r0drv/linux/memobj-r0drv-linux.c
===================================================================
--- a/src/VBox/Runtime/r0drv/linux/memobj-r0drv-linux.c (revision 82968)
+++ a/src/VBox/Runtime/r0drv/linux/memobj-r0drv-linux.c (revision 83471)
@@ -1461,9 +1461,19 @@
* MMIO / physical memory.
*/
Assert(pMemLnxToMap->Core.enmType == RTR0MEMOBJTYPE_PHYS && !pMemLnxToMap->Core.u.Phys.fAllocated);
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 25)
+ /*
+ * ioremap() defaults to no caching since the 2.6 kernels.
+ * ioremap_nocache() has been removed finally in 5.6-rc1.
+ */
+ pMemLnx->Core.pv = pMemLnxToMap->Core.u.Phys.uCachePolicy == RTMEM_CACHE_POLICY_MMIO
+ ? ioremap(pMemLnxToMap->Core.u.Phys.PhysBase + offSub, cbSub)
+ : ioremap_cache(pMemLnxToMap->Core.u.Phys.PhysBase + offSub, cbSub);
+#else /* KERNEL_VERSION < 2.6.25 */
pMemLnx->Core.pv = pMemLnxToMap->Core.u.Phys.uCachePolicy == RTMEM_CACHE_POLICY_MMIO
? ioremap_nocache(pMemLnxToMap->Core.u.Phys.PhysBase + offSub, cbSub)
: ioremap(pMemLnxToMap->Core.u.Phys.PhysBase + offSub, cbSub);
+#endif /* KERNEL_VERSION < 2.6.25 */
if (pMemLnx->Core.pv)
{
/** @todo fix protection. */
Index: a/src/VBox/Runtime/r0drv/linux/time-r0drv-linux.c
===================================================================
--- a/src/VBox/Runtime/r0drv/linux/time-r0drv-linux.c (revision 82968)
+++ a/src/VBox/Runtime/r0drv/linux/time-r0drv-linux.c (revision 83471)
@@ -38,12 +38,24 @@
DECLINLINE(uint64_t) rtTimeGetSystemNanoTS(void)
{
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 16) /* This must match timer-r0drv-linux.c! */
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 6, 0)
+ /*
+ * Starting with kernel version 5.6-rc3 only 64-bit time interfaces
+ * are allowed in the kernel.
+ */
+ uint64_t u64;
+ struct timespec64 Ts = { 0, 0 };
+
+ ktime_get_ts64(&Ts);
+ u64 = Ts.tv_sec * RT_NS_1SEC_64 + Ts.tv_nsec;
+ return u64;
+
+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 16) /* This must match timer-r0drv-linux.c! */
/*
* Use ktime_get_ts, this is also what clock_gettime(CLOCK_MONOTONIC,) is using.
*/
uint64_t u64;
- struct timespec Ts;
+ struct timespec Ts = { 0, 0 };
ktime_get_ts(&Ts);
u64 = Ts.tv_sec * RT_NS_1SEC_64 + Ts.tv_nsec;
return u64;
Index: a/src/VBox/HostDrivers/VBoxPci/linux/VBoxPci-linux.c
===================================================================
--- a/src/VBox/HostDrivers/VBoxPci/linux/VBoxPci-linux.c (revision 82968)
+++ a/src/VBox/HostDrivers/VBoxPci/linux/VBoxPci-linux.c (revision 83471)
@@ -842,15 +842,27 @@
rcLnx = pci_request_region(pPciDev, iRegion, "vboxpci");
if (!rcLnx)
{
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 25)
+ /*
+ * ioremap() defaults to no caching since the 2.6 kernels.
+ * ioremap_nocache() has been removed finally in 5.6-rc1.
+ */
+ RTR0PTR R0PtrMapping = ioremap(pci_resource_start(pPciDev, iRegion),
+ pci_resource_len(pPciDev, iRegion));
+#else /* KERNEL_VERSION < 2.6.25 */
/* For now no caching, try to optimize later. */
RTR0PTR R0PtrMapping = ioremap_nocache(pci_resource_start(pPciDev, iRegion),
pci_resource_len(pPciDev, iRegion));
-
+#endif /* KERNEL_VERSION < 2.6.25 */
if (R0PtrMapping != NIL_RTR0PTR)
pIns->aRegionR0Mapping[iRegion] = R0PtrMapping;
else
{
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 25)
+ vbpci_printk(KERN_DEBUG, pPciDev, "ioremap() failed\n");
+#else
vbpci_printk(KERN_DEBUG, pPciDev, "ioremap_nocache() failed\n");
+#endif
pci_release_region(pPciDev, iRegion);
rc = VERR_MAP_FAILED;
}
Index: a/include/iprt/time.h
===================================================================
--- a/include/iprt/time.h (revision 83471)
+++ a/include/iprt/time.h (revision 83473)
@@ -357,14 +357,18 @@
/* PORTME: Add struct timeval guard macro here. */
-#if defined(RTTIME_INCL_TIMEVAL) || defined(_STRUCT_TIMEVAL) || defined(_SYS__TIMEVAL_H_) || defined(_SYS_TIME_H) || defined(_TIMEVAL) || defined(_LINUX_TIME_H) \
- || (defined(RT_OS_NETBSD) && defined(_SYS_TIME_H_))
/*
* Starting with Linux kernel version 5.6-rc3, the struct timeval is no longer
* available to kernel code and must not be used in kernel code.
* Only 64-bit time-interfaces are allowed into the kernel.
*/
-# if defined(RT_OS_LINUX) && (!defined(__KERNEL__) || !defined(_LINUX_TIME64_H))
+#if defined(RT_OS_LINUX) && (defined(__KERNEL__) || defined(_LINUX_TIME64_H))
+#define RTTIME_NO_TIMEVAL
+#endif
+#if !defined(RTTIME_NO_TIMEVAL) \
+ && (defined(RTTIME_INCL_TIMEVAL) || defined(_STRUCT_TIMEVAL) || defined(_SYS__TIMEVAL_H_) \
+ || defined(_SYS_TIME_H) || defined(_TIMEVAL) || defined(_LINUX_TIME_H) \
+ || (defined(RT_OS_NETBSD) && defined(_SYS_TIME_H_)))
/**
* Gets the time as POSIX timeval.
*
@@ -398,7 +402,6 @@
{
return RTTimeSpecAddMicro(RTTimeSpecSetSeconds(pTime, pTimeval->tv_sec), pTimeval->tv_usec);
}
-# endif /* RT_OS_LINUX ... */
#endif /* various ways of detecting struct timeval */
Index: a/include/iprt/time.h
===================================================================
--- a/include/iprt/time.h (revision 83473)
+++ a/include/iprt/time.h (revision 83484)
@@ -406,8 +406,20 @@
/* PORTME: Add struct timespec guard macro here. */
-#if defined(RTTIME_INCL_TIMESPEC) || defined(_STRUCT_TIMESPEC) || defined(_SYS__TIMESPEC_H_) || defined(TIMEVAL_TO_TIMESPEC) || defined(_TIMESPEC) \
- || (defined(RT_OS_NETBSD) && defined(_SYS_TIME_H_))
+/*
+ * Starting with Linux kernel version 5.6-rc3, the _STRUCT_TIMESPEC is only defined
+ * under !__KERNEL__ guard and _LINUX_TIME64_H does not define a corresponding
+ * _STRUCT_TIMESPEC64. Only 64-bit time-interfaces are now allowed into the kernel.
+ * We have to keep it for __KERNEL__ though to support older guest kernels (2.6.X)
+ * without _LINUX_TIME64_H.
+ */
+#if defined(RT_OS_LINUX) && defined(_LINUX_TIME64_H)
+#define RTTIME_NO_TIMESPEC
+#endif
+#if !defined(RTTIME_NO_TIMESPEC) \
+ && (defined(RTTIME_INCL_TIMESPEC) || defined(_STRUCT_TIMESPEC) || defined(_SYS__TIMESPEC_H_) \
+ || defined(TIMEVAL_TO_TIMESPEC) || defined(_TIMESPEC) \
+ || (defined(RT_OS_NETBSD) && defined(_SYS_TIME_H_)))
/**
* Gets the time as POSIX timespec.
*
@@ -443,12 +455,7 @@
}
#endif /* various ways of detecting struct timespec */
-#if defined(RT_OS_LINUX) && defined(_LINUX_TIME64_H)
-/*
- * Starting with Linux kernel version 5.6-rc3, the _STRUCT_TIMESPEC is only defined
- * under !__KERNEL__ guard and _LINUX_TIME64_H does not define a corresponding
- * _STRUCT_TIMESPEC64. Only 64-bit time-interfaces are now allowed into the kernel.
- */
+#if defined(RTTIME_NO_TIMESPEC)
DECLINLINE(PRTTIMESPEC) RTTimeSpecSetTimespec64(PRTTIMESPEC pTime, const struct timespec64 *pTimeval)
{
return RTTimeSpecAddNano(RTTimeSpecSetSeconds(pTime, pTimeval->tv_sec), pTimeval->tv_nsec);
Index: a/src/VBox/Runtime/r0drv/linux/time-r0drv-linux.c
===================================================================
--- a/src/VBox/Runtime/r0drv/linux/time-r0drv-linux.c (revision 83471)
+++ a/src/VBox/Runtime/r0drv/linux/time-r0drv-linux.c (revision 83484)
@@ -194,9 +194,9 @@
IPRT_LINUX_RESTORE_EFL_AC();
# ifdef _LINUX_TIME64_H
return RTTimeSpecSetTimespec64(pTime, &Ts);
-#else
+# else
return RTTimeSpecSetTimespec(pTime, &Ts);
-#endif
+# endif
#else /* < 2.6.16 */
struct timeval Tv;
do_gettimeofday(&Tv);
@@ -1,165 +0,0 @@
Description: upstream: 64269 64270
Index: virtualbox/src/VBox/Additions/common/crOpenGL/Makefile.kmk
===================================================================
--- virtualbox.orig/src/VBox/Additions/common/crOpenGL/Makefile.kmk
+++ virtualbox/src/VBox/Additions/common/crOpenGL/Makefile.kmk
@@ -71,7 +71,7 @@
/usr/include/x11 \
/usr/include/xorg \
/usr/include/pixman-1 \
- $(VBOX_MESA_INCS) \
+ $(VBOX_GL_INCS) \
/usr/include/drm \
/usr/include/libdrm
VBoxOGL_DEFS += VBOX_NO_NATIVEGL
@@ -439,7 +439,7 @@
array
if1of ($(KBUILD_TARGET), linux solaris freebsd)
VBoxOGLarrayspu_INCS += \
- $(VBOX_MESA_INCS)
+ $(VBOX_GL_INCS)
endif
if defined(VBOX_SIGNING_MODE) && defined(VBOX_WITH_WDDM)
VBoxOGLarrayspu_INSTTYPE.win = none
@@ -487,7 +487,7 @@
passthrough
if1of ($(KBUILD_TARGET), linux solaris freebsd)
VBoxOGLpassthroughspu_INCS += \
- $(VBOX_MESA_INCS)
+ $(VBOX_GL_INCS)
endif
if defined(VBOX_SIGNING_MODE) && defined(VBOX_WITH_WDDM)
VBoxOGLpassthroughspu_INSTTYPE.win = none
@@ -536,7 +536,7 @@
pack
if1of ($(KBUILD_TARGET), linux solaris freebsd)
VBoxOGLpackspu_INCS += \
- $(VBOX_MESA_INCS)
+ $(VBOX_GL_INCS)
endif
if defined(VBOX_SIGNING_MODE) && defined(VBOX_WITH_WDDM)
VBoxOGLpackspu_INSTTYPE.win = none
@@ -642,7 +642,7 @@
feedback
if1of ($(KBUILD_TARGET), linux solaris freebsd)
VBoxOGLfeedbackspu_INCS += \
- $(VBOX_MESA_INCS)
+ $(VBOX_GL_INCS)
endif
if defined(VBOX_SIGNING_MODE) && defined(VBOX_WITH_WDDM)
VBoxOGLfeedbackspu_INSTTYPE.win = none
Index: virtualbox/src/VBox/Additions/x11/Makefile.kmk
===================================================================
--- virtualbox.orig/src/VBox/Additions/x11/Makefile.kmk
+++ virtualbox/src/VBox/Additions/x11/Makefile.kmk
@@ -20,12 +20,18 @@
# Include sub-makefiles.
if1of ($(KBUILD_TARGET), freebsd linux netbsd openbsd solaris)
include $(PATH_SUB_CURRENT)/VBoxClient/Makefile.kmk
- include $(PATH_SUB_CURRENT)/vboxvideo/Makefile.kmk
- ifneq ($(KBUILD_TARGET), solaris)
- include $(PATH_SUB_CURRENT)/vboxmouse/Makefile.kmk
- endif
- ifndef VBOX_USE_SYSTEM_XORG_HEADERS
- include $(PATH_SUB_CURRENT)/x11stubs/Makefile.kmk
+ ifndef VBOX_NO_LEGACY_XORG_X11
+ include $(PATH_SUB_CURRENT)/vboxvideo/Makefile.kmk
+ ifneq ($(KBUILD_TARGET), solaris)
+ include $(PATH_SUB_CURRENT)/vboxmouse/Makefile.kmk
+ endif
+ # This should logically only be controlled by VBOX_NO_LEGACY_XORG_X11,
+ # as it is not used for drivers at all, but rather to build X11 clients
+ # on systems missing needed libraries.
+ ## @todo fix at some later point when it will not break people's workflows.
+ ifndef VBOX_USE_SYSTEM_XORG_HEADERS
+ include $(PATH_SUB_CURRENT)/x11stubs/Makefile.kmk
+ endif
endif
endif
Index: virtualbox/src/VBox/GuestHost/OpenGL/Makefile.kmk
===================================================================
--- virtualbox.orig/src/VBox/GuestHost/OpenGL/Makefile.kmk
+++ virtualbox/src/VBox/GuestHost/OpenGL/Makefile.kmk
@@ -54,7 +54,7 @@
VBoxOGLcrutil_INTERMEDIATES = $(VBOX_PATH_CROGL_GENFILES)/cr_opcodes.h
if1of ($(KBUILD_TARGET), linux solaris freebsd)
VBoxOGLcrutil_INCS += \
- $(VBOX_MESA_INCS)
+ $(VBOX_GL_INCS)
endif
VBoxOGLcrutil_SOURCES = \
util/bbox.c \
@@ -199,7 +199,7 @@
packer
if1of ($(KBUILD_TARGET), linux solaris freebsd)
VBoxOGLcrpacker_INCS += \
- $(VBOX_MESA_INCS)
+ $(VBOX_GL_INCS)
endif
VBoxOGLcrpacker_INTERMEDIATES = \
$(VBOX_PATH_CROGL_GENFILES)/cr_packfunctions.h \
@@ -350,7 +350,7 @@
$(VBOX_PATH_CROGL_GENFILES)/spu_dispatch_table.h
if1of ($(KBUILD_TARGET), linux solaris freebsd)
VBoxOGLspuload_INCS += \
- $(VBOX_MESA_INCS)
+ $(VBOX_GL_INCS)
endif
VBoxOGLspuload_SOURCES = \
spu_loader/spuinit.c \
@@ -423,7 +423,7 @@
state_tracker
if1of ($(KBUILD_TARGET), linux solaris freebsd)
VBoxOGLcrstate_INCS += \
- $(VBOX_MESA_INCS)
+ $(VBOX_GL_INCS)
endif
VBoxOGLcrstate_INTERMEDIATES = \
$(VBOX_PATH_CROGL_GENFILES)/state/cr_statefuncs.h \
@@ -624,7 +624,7 @@
$(VBOX_PATH_CROGL_GENFILES)/spu_dispatch_table.h
if1of ($(KBUILD_TARGET), linux solaris freebsd)
VBoxOGLerrorspu_INCS += \
- $(VBOX_MESA_INCS)
+ $(VBOX_GL_INCS)
endif
VBoxOGLerrorspu_SOURCES = \
$(VBOX_PATH_CROGL_GENFILES)/errorspu.c \
Index: virtualbox/src/VBox/Additions/x11/vboxvideo/helpers.c
===================================================================
--- virtualbox.orig/src/VBox/Additions/x11/vboxvideo/helpers.c
+++ virtualbox/src/VBox/Additions/x11/vboxvideo/helpers.c
@@ -82,7 +82,7 @@
property_name = MakeAtom(pszName, strlen(pszName), TRUE);
VBVXASSERT(property_name != BAD_RESOURCE, ("Failed to set atom \"%s\"\n", pszName));
- ChangeWindowProperty(ROOT_WINDOW(pScrn), property_name, XA_INTEGER, 32, PropModeReplace, cData, paData, fSendEvent);
+ dixChangeWindowProperty(serverClient, ROOT_WINDOW(pScrn), property_name, XA_INTEGER, 32, PropModeReplace, cData, paData, fSendEvent);
}
void vbvxReprobeCursor(ScrnInfoPtr pScrn)
Index: virtualbox/src/VBox/Additions/x11/vboxvideo/vboxvideo.c
===================================================================
--- virtualbox.orig/src/VBox/Additions/x11/vboxvideo/vboxvideo.c
+++ virtualbox/src/VBox/Additions/x11/vboxvideo/vboxvideo.c
@@ -1229,7 +1229,7 @@
updateGraphicsCapability(pScrn, TRUE);
/* Register block and wake-up handlers for getting new screen size hints. */
- RegisterBlockAndWakeupHandlers(vboxBlockHandler, (WakeupHandlerProcPtr)NoopDDA, (pointer)pScrn);
+ RegisterBlockAndWakeupHandlers(vboxBlockHandler, (ServerWakeupHandlerProcPtr)NoopDDA, (pointer)pScrn);
/* software cursor */
miDCInitialize(pScreen, xf86GetPointerScreenFuncs());
--- virtualbox-5.1.10-dfsg.orig/src/VBox/Additions/x11/vboxvideo/Makefile.kmk
+++ virtualbox-5.1.10-dfsg/src/VBox/Additions/x11/vboxvideo/Makefile.kmk
@@ -376,7 +376,7 @@ vboxvideo_drv_118_SOURCES := $(vboxvideo
ifdef VBOX_USE_SYSTEM_XORG_HEADERS
# Build using local X.Org headers. We assume X.Org Server 1.7 or later.
- DLLS := $(filter-out vboxvideo_drv_%,$(DLLS)) vboxvideo_drv_system
+ DLLS := $(filter-out vboxvideo_drv_%,$(DLLS))
SYSMODS := $(filter-out vboxvideo_drv%,$(SYSMODS))
vboxvideo_drv_system_TEMPLATE = VBOXGUESTR3XORGMOD
vboxvideo_drv_system_CFLAGS := \
@@ -1,10 +0,0 @@
--- VirtualBox-4.0.0_OSE/configure
+++ VirtualBox-4.0.0_OSE/configure
@@ -2527,7 +2527,6 @@
check_compiler_h
[ "$BUILD_MACHINE" = "amd64" -a $WITH_VMMRAW -eq 1 ] && check_32bit
# tools/common/makeself*
- [ $OSE -ge 1 ] && check_makeself
fi
[ -n "$SETUP_WINE" ] && setup_wine
@@ -1,56 +0,0 @@
Index: VirtualBox-5.1.2/src/VBox/Additions/common/crOpenGL/Makefile.kmk
===================================================================
--- VirtualBox-5.1.2.orig/src/VBox/Additions/common/crOpenGL/Makefile.kmk
+++ VirtualBox-5.1.2/src/VBox/Additions/common/crOpenGL/Makefile.kmk
@@ -68,18 +68,12 @@ VBoxOGL_TEMPLATE = VBOXCROGLR3GUES
VBoxOGL_INCS = .
if1of ($(KBUILD_TARGET), linux solaris freebsd)
VBoxOGL_INCS += \
- $(VBOX_PATH_X11_ROOT)/libXdamage-1.1 \
- $(VBOX_PATH_X11_ROOT)/libXcomposite-0.4.0 \
- $(VBOX_PATH_X11_ROOT)/libXext-1.3.1 \
- $(VBOX_PATH_X11_ROOT)/libXfixes-4.0.3 \
- $(VBOX_PATH_X11_ROOT)/damageproto-1.1.0 \
- $(VBOX_PATH_X11_ROOT)/compositeproto-0.4 \
- $(VBOX_PATH_X11_ROOT)/fixesproto-4.0 \
- $(VBOX_PATH_X11_ROOT)/libx11-1.1.5-other \
- $(VBOX_PATH_X11_ROOT)/xextproto-7.1.1 \
- $(VBOX_PATH_X11_ROOT)/xproto-7.0.18 \
+ /usr/include/x11 \
+ /usr/include/xorg \
+ /usr/include/pixman-1 \
$(VBOX_MESA_INCS) \
- $(PATH_ROOT)/src/VBox/Additions/x11/x11include/libdrm-2.4.13
+ /usr/include/drm \
+ /usr/include/libdrm
VBoxOGL_DEFS += VBOX_NO_NATIVEGL
endif
@@ -214,10 +208,10 @@ VBoxOGL_LIBS.win += \
if1of ($(KBUILD_TARGET), linux solaris freebsd)
VBoxOGL_LIBS += \
- $(PATH_STAGE_LIB)/libXcomposite.so \
- $(PATH_STAGE_LIB)/libXdamage.so \
- $(PATH_STAGE_LIB)/libXfixes.so \
- $(PATH_STAGE_LIB)/libXext.so
+ Xcomposite \
+ Xdamage \
+ Xfixes \
+ Xext
ifdef VBoxOGL_FAKEDRI
ifeq ($(KBUILD_TARGET), freebsd)
VBoxOGL_LIBS += \
Index: VirtualBox-5.1.2/src/VBox/Additions/common/VBoxGuestLib/Makefile.kmk
===================================================================
--- VirtualBox-5.1.2.orig/src/VBox/Additions/common/VBoxGuestLib/Makefile.kmk
+++ VirtualBox-5.1.2/src/VBox/Additions/common/VBoxGuestLib/Makefile.kmk
@@ -40,8 +40,6 @@ LIBRARIES += \
VBoxGuestR3LibShared
ifndef VBOX_ONLY_VALIDATIONKIT
if1of ($(KBUILD_TARGET), freebsd linux netbsd openbsd)
- LIBRARIES += \
- VBoxGuestR3LibXFree86
endif
if1of ($(KBUILD_TARGET), freebsd linux netbsd openbsd solaris)
LIBRARIES += \
+26 -13
View File
@@ -12,7 +12,7 @@
<IsA>app:gui</IsA>
<Summary>A powerful virtualization program</Summary>
<Description>VirtualBox is a family of powerful x86 virtualization products for enterprise as well as home use. This is the Open Source Edition which lacks USB support and some other things.</Description>
<Archive sha1sum="6d9ad6298fb9a40e91952d0462a4aae75f051e15" type="tarbz2">http://download.virtualbox.org/virtualbox/6.1.38/VirtualBox-6.1.38.tar.bz2</Archive>
<Archive sha1sum="5f3be30b408f73a35bada12f6b5d03c649846125" type="tarbz2">http://download.virtualbox.org/virtualbox/7.0.2/VirtualBox-7.0.2.tar.bz2</Archive>
<AdditionalFiles>
<AdditionalFile owner="root" permission="0644" target="dkms.conf">dkms.conf</AdditionalFile>
<AdditionalFile owner="root" permission="0644" target="dkms-guest.conf">dkms-guest.conf</AdditionalFile>
@@ -21,9 +21,12 @@
<Dependency>dev86</Dependency>
<Dependency>cdrkit</Dependency>
<Dependency>acpica</Dependency>
<Dependency>yasm-devel</Dependency>
<Dependency>mesa-devel</Dependency>
<Dependency>curl-devel</Dependency>
<Dependency>python-devel</Dependency>
<Dependency>libtpms-devel</Dependency>
<Dependency>glslang-devel</Dependency>
<Dependency>pam-devel</Dependency>
<Dependency>device-mapper-devel</Dependency>
<Dependency>libcap-devel</Dependency>
@@ -58,24 +61,22 @@
<Dependency>docbook-xml</Dependency>
<Dependency>libglvnd-devel</Dependency>
<Dependency>python3-devel</Dependency>
<Dependency>qt5-assistant-devel</Dependency>
</BuildDependencies>
<AdditionalFiles>
<AdditionalFile target="LocalConfig.kmk">LocalConfig.kmk</AdditionalFile>
</AdditionalFiles>
<Patches>
<Patch level="1">wrapper.patch</Patch>
<Patch level="1">004-drop-Wno-format.patch</Patch>
<Patch level="1">005-gsoap-build.patch</Patch>
<Patch level="1">006-rdesktop-vrdp-keymap-path.patch</Patch>
<Patch level="1">008-root-window.patch</Patch>
<Patch level="1">archlinux/001-disable-update.patch</Patch>
<Patch level="1">archlinux/004-drop-Wno-format.patch</Patch>
<Patch level="1">archlinux/005-gsoap-build.patch</Patch>
<Patch level="1">archlinux/008-no-vboxvideo.patch</Patch>
<Patch level="1">archlinux/009-properly-handle-i3wm.patch</Patch>
<Patch level="1">archlinux/012-vbglR3GuestCtrlDetectPeekGetCancelSupport.patch</Patch>
<Patch level="1">archlinux/013-support-building-from-dkms.patch</Patch>
<Patch level="1">archlinux/018-upate-xclient-script.patch</Patch>
<Patch level="1">archlinux/019-fix-liblzf-linkage.patch</Patch>
<Patch level="1">python.patch</Patch>
<Patch level="1">008-no-vboxvideo.patch</Patch>
<Patch level="1">VirtualBox-6.1.2-disable-update.patch</Patch>
<Patch level="1">012-vbglR3GuestCtrlDetectPeekGetCancelSupport.patch</Patch>
<Patch level="1">013-Makefile.patch</Patch>
<Patch level="1">017-fix-narrowing-conversion.patch</Patch>
<Patch level="1">018-xclient.patch</Patch>
<!-- <Patch level="1">019-vboxr0-cflags.patch</Patch> -->
</Patches>
</Source>
@@ -85,11 +86,13 @@
<Dependency>qt5-base</Dependency>
<Dependency>libxcb</Dependency>
<Dependency>mesa</Dependency>
<Dependency>liblzf</Dependency>
<Dependency>libXt</Dependency>
<Dependency>gsoap</Dependency>
<Dependency>libvpx</Dependency>
<Dependency>libXmu</Dependency>
<Dependency>libsdl</Dependency>
<Dependency>libtpms</Dependency>
<Dependency>libXext</Dependency>
<Dependency>libopus</Dependency>
<Dependency>libXcursor</Dependency>
@@ -108,6 +111,7 @@
<Dependency>qt5-x11extras</Dependency>
<Dependency>libglvnd</Dependency>
<Dependency>python3</Dependency>
<Dependency>qt5-assistant</Dependency>
<!-- <Dependency>virtualbox-guest-iso</Dependency> -->
<AnyDependency>
<Dependency version="current">module-virtualbox</Dependency>
@@ -142,7 +146,9 @@
<Summary>VirtualBox guest utilities and drivers</Summary>
<RuntimeDependencies>
<Dependency>pam</Dependency>
<Dependency>zlib</Dependency>
<Dependency>libXt</Dependency>
<Dependency>libX11</Dependency>
<Dependency>libXmu</Dependency>
<Dependency>libXext</Dependency>
<Dependency>libXfixes</Dependency>
@@ -204,6 +210,13 @@
</Package>
<History>
<Update release="55">
<Date>2022-10-23</Date>
<Version>7.0.2</Version>
<Comment>Version bump.</Comment>
<Name>Mustafa Cinasal</Name>
<Email>muscnsl@gmail.com</Email>
</Update>
<Update release="54">
<Date>2022-09-16</Date>
<Version>6.1.38</Version>