mirror of
https://github.com/void-linux/void-packages.git
synced 2025-08-02 10:52:57 +02:00
virtualbox-ose: update to 6.1.34.
This commit is contained in:
parent
1d9eababda
commit
de98312e61
9 changed files with 462 additions and 15 deletions
|
@ -1,6 +1,6 @@
|
||||||
--- a/src/VBox/Main/webservice/Makefile.kmk 2016-08-16 22:00:21.000000000 +0200
|
--- a/src/VBox/Main/webservice/Makefile.kmk
|
||||||
+++ b/src/VBox/Main/webservice/Makefile.kmk 2016-08-18 10:05:45.548857031 +0200
|
+++ b/src/VBox/Main/webservice/Makefile.kmk
|
||||||
@@ -724,7 +724,7 @@
|
@@ -771,7 +771,7 @@ $(VBOXWEB_OUT_DIR)/gsoap_generate_all_ts
|
||||||
$(RECOMPILE_ON_MAKEFILE_CURRENT) | $$(dir $$@)
|
$(RECOMPILE_ON_MAKEFILE_CURRENT) | $$(dir $$@)
|
||||||
$(call MSG_GENERATE,,lots of files,$(GSOAPH_RELEVANT))
|
$(call MSG_GENERATE,,lots of files,$(GSOAPH_RELEVANT))
|
||||||
$(RM) -f $@
|
$(RM) -f $@
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
--- a/src/VBox/Additions/x11/vboxvideo/Makefile.kmk 2016-10-11 02:49:23.184986182 +0100
|
--- a/src/VBox/Additions/x11/vboxvideo/Makefile.kmk
|
||||||
+++ b/src/VBox/Additions/x11/vboxvideo/Makefile.kmk 2016-10-11 02:49:39.879176964 +0100
|
+++ b/src/VBox/Additions/x11/vboxvideo/Makefile.kmk
|
||||||
@@ -376,7 +376,7 @@ vboxvideo_drv_118_SOURCES := $(vboxvideo
|
@@ -397,7 +397,7 @@ vboxvideo_drv_118_LIBS += $(vboxvideo_dr
|
||||||
|
|
||||||
ifdef VBOX_USE_SYSTEM_XORG_HEADERS
|
ifdef VBOX_USE_SYSTEM_XORG_HEADERS
|
||||||
# Build using local X.Org headers. We assume X.Org Server 1.7 or later.
|
# Build using local X.Org headers. We assume X.Org Server 1.7 or later.
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
diff --git a/src/VBox/HostDrivers/linux/Makefile b/src/VBox/HostDrivers/linux/Makefile
|
|
||||||
index 18466b48..7c7de4e5 100644
|
|
||||||
--- a/src/VBox/HostDrivers/linux/Makefile
|
--- a/src/VBox/HostDrivers/linux/Makefile
|
||||||
+++ b/src/VBox/HostDrivers/linux/Makefile
|
+++ b/src/VBox/HostDrivers/linux/Makefile
|
||||||
@@ -23,25 +23,25 @@
|
@@ -23,25 +23,25 @@
|
||||||
|
@ -36,7 +34,7 @@ index 18466b48..7c7de4e5 100644
|
||||||
|
|
||||||
KBUILD_VERBOSE ?=
|
KBUILD_VERBOSE ?=
|
||||||
KERN_VER ?= $(shell uname -r)
|
KERN_VER ?= $(shell uname -r)
|
||||||
@@ -146,4 +146,4 @@ load: unload
|
@@ -167,4 +167,4 @@ load: unload
|
||||||
fi; \
|
fi; \
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
|
@ -9,4 +9,3 @@
|
||||||
## @}
|
## @}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -2,8 +2,6 @@ Description: Revert http://www.virtualbox.org/changeset/36310
|
||||||
The libvdeplug.so symlink is only shipped in the -dev package.
|
The libvdeplug.so symlink is only shipped in the -dev package.
|
||||||
Author: Felix Geyer <fgeyer@debian.org>
|
Author: Felix Geyer <fgeyer@debian.org>
|
||||||
|
|
||||||
Index: virtualbox/include/VBox/VDEPlugSymDefs.h
|
|
||||||
===================================================================
|
|
||||||
--- a/include/VBox/VDEPlugSymDefs.h
|
--- a/include/VBox/VDEPlugSymDefs.h
|
||||||
+++ b/include/VBox/VDEPlugSymDefs.h
|
+++ b/include/VBox/VDEPlugSymDefs.h
|
||||||
@@ -1,5 +1,5 @@
|
@@ -1,5 +1,5 @@
|
||||||
|
@ -22,4 +20,3 @@ Index: virtualbox/include/VBox/VDEPlugSymDefs.h
|
||||||
#define RT_RUNTIME_LOADER_LIB_NAME VBOX_LIB_VDE_PLUG_NAME
|
#define RT_RUNTIME_LOADER_LIB_NAME VBOX_LIB_VDE_PLUG_NAME
|
||||||
|
|
||||||
/** The name of the loader function */
|
/** The name of the loader function */
|
||||||
|
|
||||||
|
|
20
srcpkgs/virtualbox-ose/patches/ffreestanding.patch
Normal file
20
srcpkgs/virtualbox-ose/patches/ffreestanding.patch
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
diff --git a/Config.kmk b/Config.kmk
|
||||||
|
index 3df197404..4c6bd76bb 100644
|
||||||
|
--- a/Config.kmk
|
||||||
|
+++ b/Config.kmk
|
||||||
|
@@ -4503,11 +4504,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
|
254
srcpkgs/virtualbox-ose/patches/vbox-linux-5.18.patch
Normal file
254
srcpkgs/virtualbox-ose/patches/vbox-linux-5.18.patch
Normal file
|
@ -0,0 +1,254 @@
|
||||||
|
Source: https://www.virtualbox.org/ticket/20914
|
||||||
|
--- a/include/VBox/sup.h
|
||||||
|
+++ b/include/VBox/sup.h
|
||||||
|
@@ -2142,6 +2142,26 @@ RT_IPRT_FORMAT_ATTR(1, 2) SUPR0Printf(co
|
||||||
|
*/
|
||||||
|
SUPR0DECL(uint32_t) SUPR0GetKernelFeatures(void);
|
||||||
|
|
||||||
|
+/**
|
||||||
|
+ * Notification from R0 VMM prior to loading the guest-FPU register state.
|
||||||
|
+ *
|
||||||
|
+ * @returns Whether the host-FPU register state has been saved by the host kernel.
|
||||||
|
+ * @param fCtxHook Whether thread-context hooks are enabled.
|
||||||
|
+ *
|
||||||
|
+ * @remarks Called with preemption disabled.
|
||||||
|
+ */
|
||||||
|
+SUPR0DECL(bool) SUPR0FpuBegin(bool fCtxHook);
|
||||||
|
+
|
||||||
|
+/**
|
||||||
|
+ * Notification from R0 VMM prior to saving the guest-FPU register state (and
|
||||||
|
+ * potentially restoring the host-FPU register state) in ring-0.
|
||||||
|
+ *
|
||||||
|
+ * @param fCtxHook Whether thread-context hooks are enabled.
|
||||||
|
+ *
|
||||||
|
+ * @remarks Called with preemption disabled.
|
||||||
|
+ */
|
||||||
|
+SUPR0DECL(void) SUPR0FpuEnd(bool fCtxHook);
|
||||||
|
+
|
||||||
|
/** @copydoc RTLogGetDefaultInstanceEx
|
||||||
|
* @remarks To allow overriding RTLogGetDefaultInstanceEx locally. */
|
||||||
|
SUPR0DECL(struct RTLOGGER *) SUPR0GetDefaultLogInstanceEx(uint32_t fFlagsAndGroup);
|
||||||
|
--- a/src/VBox/Additions/linux/sharedfolders/regops.c
|
||||||
|
+++ b/src/VBox/Additions/linux/sharedfolders/regops.c
|
||||||
|
@@ -3823,7 +3823,9 @@ struct address_space_operations vbsf_reg
|
||||||
|
.readpage = vbsf_readpage,
|
||||||
|
.writepage = vbsf_writepage,
|
||||||
|
/** @todo Need .writepages if we want msync performance... */
|
||||||
|
-#if RTLNX_VER_MIN(2,5,12)
|
||||||
|
+#if RTLNX_VER_MIN(5,18,0)
|
||||||
|
+ .dirty_folio = filemap_dirty_folio,
|
||||||
|
+#elif RTLNX_VER_MIN(2,5,12)
|
||||||
|
.set_page_dirty = __set_page_dirty_buffers,
|
||||||
|
#endif
|
||||||
|
#if RTLNX_VER_MIN(5,14,0)
|
||||||
|
--- a/src/VBox/HostDrivers/Support/SUPDrv.cpp
|
||||||
|
+++ b/src/VBox/HostDrivers/Support/SUPDrv.cpp
|
||||||
|
@@ -98,6 +98,18 @@
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
+#if defined(RT_OS_LINUX) && !defined(__NO_FORTIFY) && defined(__OPTIMIZE__) && defined(CONFIG_FORTIFY_SOURCE)
|
||||||
|
+/* In Linux 5.18-rc1, memcpy became a wrapper which does fortify checks
|
||||||
|
+ * before triggering __underlying_memcpy() call. We do not pass these checks here,
|
||||||
|
+ * so bypass them for now. */
|
||||||
|
+# if RTLNX_VER_MIN(5,18,0)
|
||||||
|
+# define SUPDRV_MEMCPY __underlying_memcpy
|
||||||
|
+# else
|
||||||
|
+# define SUPDRV_MEMCPY memcpy
|
||||||
|
+# endif
|
||||||
|
+#else
|
||||||
|
+# define SUPDRV_MEMCPY memcpy
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Logging assignments:
|
||||||
|
@@ -266,6 +278,8 @@ static SUPFUNC g_aFunctions[] =
|
||||||
|
SUPEXP_STK_BACK( 2, SUPR0ContFree),
|
||||||
|
SUPEXP_STK_BACK( 2, SUPR0ChangeCR4),
|
||||||
|
SUPEXP_STK_BACK( 1, SUPR0EnableVTx),
|
||||||
|
+ SUPEXP_STK_OKAY( 1, SUPR0FpuBegin),
|
||||||
|
+ SUPEXP_STK_OKAY( 1, SUPR0FpuEnd),
|
||||||
|
SUPEXP_STK_BACK( 0, SUPR0SuspendVTxOnCpu),
|
||||||
|
SUPEXP_STK_BACK( 1, SUPR0ResumeVTxOnCpu),
|
||||||
|
SUPEXP_STK_OKAY( 1, SUPR0GetCurrentGdtRw),
|
||||||
|
@@ -1742,7 +1756,7 @@ static int supdrvIOCtlInnerUnrestricted(
|
||||||
|
|
||||||
|
/* execute */
|
||||||
|
pReq->u.Out.cFunctions = RT_ELEMENTS(g_aFunctions);
|
||||||
|
- memcpy(&pReq->u.Out.aFunctions[0], g_aFunctions, sizeof(g_aFunctions));
|
||||||
|
+ SUPDRV_MEMCPY(&pReq->u.Out.aFunctions[0], g_aFunctions, sizeof(g_aFunctions));
|
||||||
|
pReq->Hdr.rc = VINF_SUCCESS;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
--- a/src/VBox/HostDrivers/Support/darwin/SUPDrv-darwin.cpp
|
||||||
|
+++ b/src/VBox/HostDrivers/Support/darwin/SUPDrv-darwin.cpp
|
||||||
|
@@ -2002,6 +2002,18 @@ SUPR0DECL(uint32_t) SUPR0GetKernelFeatur
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
+SUPR0DECL(bool) SUPR0FpuBegin(bool fCtxHook)
|
||||||
|
+{
|
||||||
|
+ RT_NOREF(fCtxHook);
|
||||||
|
+ return false;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+SUPR0DECL(void) SUPR0FpuEnd(bool fCtxHook)
|
||||||
|
+{
|
||||||
|
+ RT_NOREF(fCtxHook);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
* org_virtualbox_SupDrv
|
||||||
|
--- a/src/VBox/HostDrivers/Support/freebsd/SUPDrv-freebsd.c
|
||||||
|
+++ b/src/VBox/HostDrivers/Support/freebsd/SUPDrv-freebsd.c
|
||||||
|
@@ -640,3 +640,16 @@ SUPR0DECL(uint32_t) SUPR0GetKernelFeatur
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
+
|
||||||
|
+SUPR0DECL(bool) SUPR0FpuBegin(bool fCtxHook)
|
||||||
|
+{
|
||||||
|
+ RT_NOREF(fCtxHook);
|
||||||
|
+ return false;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+SUPR0DECL(void) SUPR0FpuEnd(bool fCtxHook)
|
||||||
|
+{
|
||||||
|
+ RT_NOREF(fCtxHook);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
--- a/src/VBox/HostDrivers/Support/linux/SUPDrv-linux.c
|
||||||
|
+++ b/src/VBox/HostDrivers/Support/linux/SUPDrv-linux.c
|
||||||
|
@@ -1454,6 +1454,31 @@ SUPR0DECL(uint32_t) SUPR0GetKernelFeatur
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
+SUPR0DECL(bool) SUPR0FpuBegin(bool fCtxHook)
|
||||||
|
+{
|
||||||
|
+ RT_NOREF(fCtxHook);
|
||||||
|
+#if RTLNX_VER_MIN(5,18,0)
|
||||||
|
+ kernel_fpu_begin();
|
||||||
|
+ /* if (fCtxHook) */
|
||||||
|
+ preempt_enable(); /* HACK ALERT! undo the implicit preempt_disable() in kernel_fpu_begin(). */
|
||||||
|
+ return true;
|
||||||
|
+#else
|
||||||
|
+ return false;
|
||||||
|
+#endif
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+SUPR0DECL(void) SUPR0FpuEnd(bool fCtxHook)
|
||||||
|
+{
|
||||||
|
+ RT_NOREF(fCtxHook);
|
||||||
|
+#if RTLNX_VER_MIN(5,18,0)
|
||||||
|
+ /* if (fCtxHook) */
|
||||||
|
+ preempt_disable(); /* HACK ALERT! undo the implicit preempt_enable() in SUPR0FpuBegin(). */
|
||||||
|
+ kernel_fpu_end();
|
||||||
|
+#endif
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+
|
||||||
|
int VBOXCALL supdrvOSGetCurrentGdtRw(RTHCUINTPTR *pGdtRw)
|
||||||
|
{
|
||||||
|
#if RTLNX_VER_MIN(4,12,0)
|
||||||
|
--- a/src/VBox/HostDrivers/Support/os2/SUPDrv-os2.cpp
|
||||||
|
+++ b/src/VBox/HostDrivers/Support/os2/SUPDrv-os2.cpp
|
||||||
|
@@ -541,3 +541,16 @@ SUPR0DECL(uint32_t) SUPR0GetKernelFeatur
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
+
|
||||||
|
+SUPR0DECL(bool) SUPR0FpuBegin(bool fCtxHook)
|
||||||
|
+{
|
||||||
|
+ RT_NOREF(fCtxHook);
|
||||||
|
+ return false;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+SUPR0DECL(void) SUPR0FpuEnd(bool fCtxHook)
|
||||||
|
+{
|
||||||
|
+ RT_NOREF(fCtxHook);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
--- a/src/VBox/HostDrivers/Support/solaris/SUPDrv-solaris.c
|
||||||
|
+++ b/src/VBox/HostDrivers/Support/solaris/SUPDrv-solaris.c
|
||||||
|
@@ -1309,3 +1309,16 @@ SUPR0DECL(uint32_t) SUPR0GetKernelFeatur
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
+
|
||||||
|
+SUPR0DECL(bool) SUPR0FpuBegin(bool fCtxHook)
|
||||||
|
+{
|
||||||
|
+ RT_NOREF(fCtxHook);
|
||||||
|
+ return false;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+SUPR0DECL(void) SUPR0FpuEnd(bool fCtxHook)
|
||||||
|
+{
|
||||||
|
+ RT_NOREF(fCtxHook);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
--- a/src/VBox/HostDrivers/Support/win/SUPDrv-win.cpp
|
||||||
|
+++ b/src/VBox/HostDrivers/Support/win/SUPDrv-win.cpp
|
||||||
|
@@ -2704,6 +2704,19 @@ SUPR0DECL(uint32_t) SUPR0GetKernelFeatur
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
+SUPR0DECL(bool) SUPR0FpuBegin(bool fCtxHook)
|
||||||
|
+{
|
||||||
|
+ RT_NOREF(fCtxHook);
|
||||||
|
+ return false;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+SUPR0DECL(void) SUPR0FpuEnd(bool fCtxHook)
|
||||||
|
+{
|
||||||
|
+ RT_NOREF(fCtxHook);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+
|
||||||
|
SUPR0DECL(int) SUPR0IoCtlSetupForHandle(PSUPDRVSESSION pSession, intptr_t hHandle, uint32_t fFlags, PSUPR0IOCTLCTX *ppCtx)
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
--- a/src/VBox/HostDrivers/VBoxNetFlt/linux/VBoxNetFlt-linux.c
|
||||||
|
+++ b/src/VBox/HostDrivers/VBoxNetFlt/linux/VBoxNetFlt-linux.c
|
||||||
|
@@ -2311,7 +2311,13 @@ int vboxNetFltPortOsXmit(PVBOXNETFLTINS
|
||||||
|
vboxNetFltDumpPacket(pSG, true, "host", (fDst & INTNETTRUNKDIR_WIRE) ? 0 : 1);
|
||||||
|
Log6(("vboxNetFltPortOsXmit: pBuf->cb dump:\n%.*Rhxd\n", sizeof(pBuf->cb), pBuf->cb));
|
||||||
|
Log6(("vboxNetFltPortOsXmit: netif_rx_ni(%p)\n", pBuf));
|
||||||
|
+#if RTLNX_VER_MIN(5,18,0)
|
||||||
|
+ local_bh_disable();
|
||||||
|
+ err = netif_rx(pBuf);
|
||||||
|
+ local_bh_enable();
|
||||||
|
+#else
|
||||||
|
err = netif_rx_ni(pBuf);
|
||||||
|
+#endif
|
||||||
|
if (err)
|
||||||
|
rc = RTErrConvertFromErrno(err);
|
||||||
|
}
|
||||||
|
--- a/src/VBox/VMM/VMMR0/CPUMR0.cpp
|
||||||
|
+++ b/src/VBox/VMM/VMMR0/CPUMR0.cpp
|
||||||
|
@@ -440,6 +440,9 @@ VMMR0_INT_DECL(int) CPUMR0LoadGuestFPU(P
|
||||||
|
Assert(!(pVCpu->cpum.s.fUseFlags & CPUM_USED_FPU_GUEST));
|
||||||
|
Assert(!(pVCpu->cpum.s.fUseFlags & CPUM_SYNC_FPU_STATE));
|
||||||
|
|
||||||
|
+ /* Notify the support driver prior to loading the guest-FPU register state. */
|
||||||
|
+ SUPR0FpuBegin(false /* unused */);
|
||||||
|
+
|
||||||
|
if (!pVM->cpum.s.HostFeatures.fLeakyFxSR)
|
||||||
|
{
|
||||||
|
Assert(!(pVCpu->cpum.s.fUseFlags & CPUM_USED_MANUAL_XMM_RESTORE));
|
||||||
|
@@ -484,6 +487,9 @@ VMMR0_INT_DECL(bool) CPUMR0FpuStateMaybe
|
||||||
|
Assert(ASMGetCR4() & X86_CR4_OSFXSR);
|
||||||
|
if (pVCpu->cpum.s.fUseFlags & (CPUM_USED_FPU_GUEST | CPUM_USED_FPU_HOST))
|
||||||
|
{
|
||||||
|
+ /* Notify the support driver prior to loading the host-FPU register state. */
|
||||||
|
+ SUPR0FpuEnd(false /* unused */);
|
||||||
|
+
|
||||||
|
fSavedGuest = RT_BOOL(pVCpu->cpum.s.fUseFlags & CPUM_USED_FPU_GUEST);
|
||||||
|
if (!(pVCpu->cpum.s.fUseFlags & CPUM_USED_MANUAL_XMM_RESTORE))
|
||||||
|
cpumR0SaveGuestRestoreHostFPUState(&pVCpu->cpum.s);
|
179
srcpkgs/virtualbox-ose/patches/vbox-linux-5.19.patch
Normal file
179
srcpkgs/virtualbox-ose/patches/vbox-linux-5.19.patch
Normal file
|
@ -0,0 +1,179 @@
|
||||||
|
Source: https://www.virtualbox.org/ticket/20914
|
||||||
|
--- a/src/VBox/Additions/linux/drm/vbox_fb.c
|
||||||
|
+++ b/src/VBox/Additions/linux/drm/vbox_fb.c
|
||||||
|
@@ -362,6 +362,9 @@ static int vboxfb_create(struct drm_fb_h
|
||||||
|
info->screen_size = size;
|
||||||
|
|
||||||
|
#ifdef CONFIG_FB_DEFERRED_IO
|
||||||
|
+# if RTLNX_VER_MIN(5,19,0)
|
||||||
|
+ info->fix.smem_len = info->screen_size;
|
||||||
|
+# endif
|
||||||
|
info->fbdefio = &vbox_defio;
|
||||||
|
fb_deferred_io_init(info);
|
||||||
|
#endif
|
||||||
|
--- a/src/VBox/Additions/linux/drm/vbox_ttm.c
|
||||||
|
+++ b/src/VBox/Additions/linux/drm/vbox_ttm.c
|
||||||
|
@@ -320,8 +320,10 @@ static struct ttm_tt *vbox_ttm_tt_create
|
||||||
|
if (ttm_tt_init(tt, bdev, size, page_flags, dummy_read_page)) {
|
||||||
|
#elif RTLNX_VER_MAX(5,11,0) && !RTLNX_RHEL_RANGE(8,5, 8,99)
|
||||||
|
if (ttm_tt_init(tt, bo, page_flags)) {
|
||||||
|
-#else
|
||||||
|
+#elif RTLNX_VER_MAX(5,19,0)
|
||||||
|
if (ttm_tt_init(tt, bo, page_flags, ttm_write_combined)) {
|
||||||
|
+#else
|
||||||
|
+ if (ttm_tt_init(tt, bo, page_flags, ttm_write_combined, 0)) {
|
||||||
|
#endif
|
||||||
|
kfree(tt);
|
||||||
|
return NULL;
|
||||||
|
--- a/src/VBox/Additions/linux/sharedfolders/regops.c
|
||||||
|
+++ b/src/VBox/Additions/linux/sharedfolders/regops.c
|
||||||
|
@@ -3581,8 +3581,14 @@ struct inode_operations vbsf_reg_iops =
|
||||||
|
* Needed for mmap and reads+writes when the file is mmapped in a
|
||||||
|
* shared+writeable fashion.
|
||||||
|
*/
|
||||||
|
+#if RTLNX_VER_MIN(5,19,0)
|
||||||
|
+static int vbsf_read_folio(struct file *file, struct folio *folio)
|
||||||
|
+{
|
||||||
|
+ struct page *page = &folio->page;
|
||||||
|
+#else
|
||||||
|
static int vbsf_readpage(struct file *file, struct page *page)
|
||||||
|
{
|
||||||
|
+#endif
|
||||||
|
struct inode *inode = VBSF_GET_F_DENTRY(file)->d_inode;
|
||||||
|
int err;
|
||||||
|
|
||||||
|
@@ -3728,8 +3734,7 @@ static int vbsf_writepage(struct page *p
|
||||||
|
/**
|
||||||
|
* Called when writing thru the page cache (which we shouldn't be doing).
|
||||||
|
*/
|
||||||
|
-int vbsf_write_begin(struct file *file, struct address_space *mapping, loff_t pos,
|
||||||
|
- unsigned len, unsigned flags, struct page **pagep, void **fsdata)
|
||||||
|
+static inline void vbsf_write_begin_warn(loff_t pos, unsigned len, unsigned flags)
|
||||||
|
{
|
||||||
|
/** @todo r=bird: We shouldn't ever get here, should we? Because we don't use
|
||||||
|
* the page cache for any writes AFAIK. We could just as well use
|
||||||
|
@@ -3745,8 +3750,24 @@ int vbsf_write_begin(struct file *file,
|
||||||
|
WARN_ON(1);
|
||||||
|
# endif
|
||||||
|
}
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+# if RTLNX_VER_MIN(5,19,0)
|
||||||
|
+int vbsf_write_begin(struct file *file, struct address_space *mapping, loff_t pos,
|
||||||
|
+ unsigned len, struct page **pagep, void **fsdata)
|
||||||
|
+{
|
||||||
|
+ vbsf_write_begin_warn(pos, len, 0);
|
||||||
|
+ return simple_write_begin(file, mapping, pos, len, pagep, fsdata);
|
||||||
|
+}
|
||||||
|
+# else
|
||||||
|
+int vbsf_write_begin(struct file *file, struct address_space *mapping, loff_t pos,
|
||||||
|
+ unsigned len, unsigned flags, struct page **pagep, void **fsdata)
|
||||||
|
+{
|
||||||
|
+ vbsf_write_begin_warn(pos, len, flags);
|
||||||
|
return simple_write_begin(file, mapping, pos, len, flags, pagep, fsdata);
|
||||||
|
}
|
||||||
|
+# endif
|
||||||
|
+
|
||||||
|
#endif /* KERNEL_VERSION >= 2.6.24 */
|
||||||
|
|
||||||
|
#if RTLNX_VER_MIN(5,14,0)
|
||||||
|
@@ -3820,7 +3841,11 @@ static int vbsf_direct_IO(int rw, struct
|
||||||
|
* @todo the FsPerf touch/flush (mmap) test fails on 4.4.0 (ubuntu 16.04 lts).
|
||||||
|
*/
|
||||||
|
struct address_space_operations vbsf_reg_aops = {
|
||||||
|
+#if RTLNX_VER_MIN(5,19,0)
|
||||||
|
+ .read_folio = vbsf_read_folio,
|
||||||
|
+#else
|
||||||
|
.readpage = vbsf_readpage,
|
||||||
|
+#endif
|
||||||
|
.writepage = vbsf_writepage,
|
||||||
|
/** @todo Need .writepages if we want msync performance... */
|
||||||
|
#if RTLNX_VER_MIN(5,18,0)
|
||||||
|
@@ -3842,4 +3867,3 @@ struct address_space_operations vbsf_reg
|
||||||
|
.direct_IO = vbsf_direct_IO,
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
-
|
||||||
|
--- a/src/VBox/HostDrivers/Support/linux/SUPDrv-linux.c
|
||||||
|
+++ b/src/VBox/HostDrivers/Support/linux/SUPDrv-linux.c
|
||||||
|
@@ -40,6 +40,7 @@
|
||||||
|
#include <iprt/semaphore.h>
|
||||||
|
#include <iprt/initterm.h>
|
||||||
|
#include <iprt/process.h>
|
||||||
|
+#include <iprt/thread.h>
|
||||||
|
#include <VBox/err.h>
|
||||||
|
#include <iprt/mem.h>
|
||||||
|
#include <VBox/log.h>
|
||||||
|
@@ -1457,11 +1458,37 @@ SUPR0DECL(uint32_t) SUPR0GetKernelFeatur
|
||||||
|
SUPR0DECL(bool) SUPR0FpuBegin(bool fCtxHook)
|
||||||
|
{
|
||||||
|
RT_NOREF(fCtxHook);
|
||||||
|
-#if RTLNX_VER_MIN(5,18,0)
|
||||||
|
+#if RTLNX_VER_MIN(4,19,0) /* Going back to 4.19.0 for better coverage, we
|
||||||
|
+ probably only need 5.17.7+ in the end. */
|
||||||
|
+ /*
|
||||||
|
+ * HACK ALERT!
|
||||||
|
+ *
|
||||||
|
+ * We'd like to use the old __kernel_fpu_begin() API which was removed in
|
||||||
|
+ * early 2019, because we typically run with preemption enabled and have an
|
||||||
|
+ * preemption hook installed which will call kernel_fpu_end() in case we're
|
||||||
|
+ * scheduled out after getting in here. The preemption hook is almost
|
||||||
|
+ * useless if we run with preemption disabled.
|
||||||
|
+ *
|
||||||
|
+ * For the case where the kernel does not have preemption hooks, we get here
|
||||||
|
+ * with preemption already disabled and one more count doesn't make any
|
||||||
|
+ * difference.
|
||||||
|
+ *
|
||||||
|
+ * So, after the kernel_fpu_begin() call we undo the implicit preempt_disable()
|
||||||
|
+ * call it does, so the preemption hook can do its work and the VBox user has
|
||||||
|
+ * a more responsive system.
|
||||||
|
+ *
|
||||||
|
+ * See @bugref{10209#c12} and onwards for more details.
|
||||||
|
+ */
|
||||||
|
+ Assert(fCtxHook || !RTThreadPreemptIsEnabled(NIL_RTTHREAD));
|
||||||
|
kernel_fpu_begin();
|
||||||
|
- /* if (fCtxHook) */
|
||||||
|
- preempt_enable(); /* HACK ALERT! undo the implicit preempt_disable() in kernel_fpu_begin(). */
|
||||||
|
- return true;
|
||||||
|
+# if 0 /* Always do it for now for better test coverage. */
|
||||||
|
+ if (fCtxHook)
|
||||||
|
+# endif
|
||||||
|
+ preempt_enable();
|
||||||
|
+ return false; /** @todo Not sure if we have license to use any extended state, or
|
||||||
|
+ * if we're limited to the SSE & x87 FPU. If it's the former,
|
||||||
|
+ * we should return @a true and the caller can skip
|
||||||
|
+ * saving+restoring the host state and save some time. */
|
||||||
|
#else
|
||||||
|
return false;
|
||||||
|
#endif
|
||||||
|
@@ -1471,9 +1498,13 @@ SUPR0DECL(bool) SUPR0FpuBegin(bool fCtxH
|
||||||
|
SUPR0DECL(void) SUPR0FpuEnd(bool fCtxHook)
|
||||||
|
{
|
||||||
|
RT_NOREF(fCtxHook);
|
||||||
|
-#if RTLNX_VER_MIN(5,18,0)
|
||||||
|
- /* if (fCtxHook) */
|
||||||
|
- preempt_disable(); /* HACK ALERT! undo the implicit preempt_enable() in SUPR0FpuBegin(). */
|
||||||
|
+#if RTLNX_VER_MIN(4,19,0)
|
||||||
|
+ /* HACK ALERT! See SUPR0FpuBegin for an explanation of this. */
|
||||||
|
+ Assert(!RTThreadPreemptIsEnabled(NIL_RTTHREAD));
|
||||||
|
+# if 0 /* Always do it for now for better test coverage. */
|
||||||
|
+ if (fCtxHook)
|
||||||
|
+# endif
|
||||||
|
+ preempt_disable();
|
||||||
|
kernel_fpu_end();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
--- a/src/VBox/Runtime/r0drv/linux/the-linux-kernel.h
|
||||||
|
+++ b/src/VBox/Runtime/r0drv/linux/the-linux-kernel.h
|
||||||
|
@@ -184,6 +184,11 @@
|
||||||
|
# include <asm/tlbflush.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
+/* for kernel_fpu_begin / kernel_fpu_end() */
|
||||||
|
+#if RTLNX_VER_MIN(4,2,0)
|
||||||
|
+# include <asm/fpu/api.h>
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
#if RTLNX_VER_MIN(3,7,0)
|
||||||
|
# include <asm/smap.h>
|
||||||
|
#else
|
|
@ -1,6 +1,6 @@
|
||||||
# Template file for 'virtualbox-ose'
|
# Template file for 'virtualbox-ose'
|
||||||
pkgname=virtualbox-ose
|
pkgname=virtualbox-ose
|
||||||
version=6.1.32
|
version=6.1.34
|
||||||
revision=1
|
revision=1
|
||||||
wrksrc="VirtualBox-${version}"
|
wrksrc="VirtualBox-${version}"
|
||||||
short_desc="General-purpose full virtualizer for x86 hardware"
|
short_desc="General-purpose full virtualizer for x86 hardware"
|
||||||
|
@ -9,7 +9,7 @@ license="GPL-2.0-only, CDDL-1.0"
|
||||||
homepage="https://www.virtualbox.org"
|
homepage="https://www.virtualbox.org"
|
||||||
changelog="https://www.virtualbox.org/wiki/Changelog"
|
changelog="https://www.virtualbox.org/wiki/Changelog"
|
||||||
distfiles="http://download.virtualbox.org/virtualbox/${version}/VirtualBox-${version}.tar.bz2"
|
distfiles="http://download.virtualbox.org/virtualbox/${version}/VirtualBox-${version}.tar.bz2"
|
||||||
checksum=5d11384200b4e943ad0056d2cf75980ae4bee852c89650e2914e1b34eedc2d2c
|
checksum=9c3ce1829432e5b8374f950698587038f45fb0492147dc200e59edb9bb75eb49
|
||||||
|
|
||||||
nopie=yes
|
nopie=yes
|
||||||
lib32disabled=yes
|
lib32disabled=yes
|
||||||
|
|
Loading…
Add table
Reference in a new issue