From nobody Wed Oct 20 21:04:24 2021 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 50EAB17FFB89; Wed, 20 Oct 2021 21:04:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HZNQd09Qyz3QxR; Wed, 20 Oct 2021 21:04:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DA7366B45; Wed, 20 Oct 2021 21:04:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 19KL4Ofa075215; Wed, 20 Oct 2021 21:04:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 19KL4OYr075214; Wed, 20 Oct 2021 21:04:24 GMT (envelope-from git) Date: Wed, 20 Oct 2021 21:04:24 GMT Message-Id: <202110202104.19KL4OYr075214@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Guido Falsi Subject: git: a3db7da59f94 - main - emulators/virtualbox-ose*: Update to 6.1.28 List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: madpilot X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a3db7da59f9498e712de23d755ad9f2bdc5b6871 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by madpilot: URL: https://cgit.FreeBSD.org/ports/commit/?id=a3db7da59f9498e712de23d755ad9f2bdc5b6871 commit a3db7da59f9498e712de23d755ad9f2bdc5b6871 Author: Guido Falsi AuthorDate: 2021-10-20 21:03:37 +0000 Commit: Guido Falsi CommitDate: 2021-10-20 21:03:37 +0000 emulators/virtualbox-ose*: Update to 6.1.28 Changelog: https://www.virtualbox.org/wiki/Changelog --- emulators/virtualbox-ose-additions/Makefile | 3 +- emulators/virtualbox-ose-additions/distinfo | 6 +-- emulators/virtualbox-ose-kmod/Makefile | 2 +- emulators/virtualbox-ose-kmod/distinfo | 8 ++-- emulators/virtualbox-ose/Makefile | 3 +- emulators/virtualbox-ose/distinfo | 10 ++--- emulators/virtualbox-ose/files/patch-configure | 23 +++++------ ...-src_VBox_HostDrivers_Support_freebsd_Makefile} | 6 ++- ...ox_HostDrivers_Support_freebsd_SUPDrv-freebsd.c | 46 ++++++++++------------ ...Box_HostDrivers_Support_freebsd_files__vboxdrv} | 6 ++- ...ox_Runtime_r0drv_freebsd_memobj-r0drv-freebsd.c | 45 +++++++++++---------- 11 files changed, 79 insertions(+), 79 deletions(-) diff --git a/emulators/virtualbox-ose-additions/Makefile b/emulators/virtualbox-ose-additions/Makefile index a049d0b9704a..2a299c107389 100644 --- a/emulators/virtualbox-ose-additions/Makefile +++ b/emulators/virtualbox-ose-additions/Makefile @@ -1,8 +1,7 @@ # Created by: Bernhard Froehlich PORTNAME= virtualbox-ose -PORTVERSION= 6.1.26 -PORTREVISION= 1 +PORTVERSION= 6.1.28 CATEGORIES= emulators MASTER_SITES= https://download.virtualbox.org/virtualbox/${PORTVERSION}/ PKGNAMESUFFIX?= -additions diff --git a/emulators/virtualbox-ose-additions/distinfo b/emulators/virtualbox-ose-additions/distinfo index 9e49d8389835..9b64acc08463 100644 --- a/emulators/virtualbox-ose-additions/distinfo +++ b/emulators/virtualbox-ose-additions/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1627588776 -SHA256 (VirtualBox-6.1.26.tar.bz2) = 0212602eea878d6c9fd7f4a3e0182da3e4505f31d25f5539fb8f7b1fbe366195 -SIZE (VirtualBox-6.1.26.tar.bz2) = 165690074 +TIMESTAMP = 1634671287 +SHA256 (VirtualBox-6.1.28.tar.bz2) = 8d34993d8e9c0cf35e7bd44dd26c8c757f17a3b7d5a64052f945d00fd798ebfe +SIZE (VirtualBox-6.1.28.tar.bz2) = 165774255 diff --git a/emulators/virtualbox-ose-kmod/Makefile b/emulators/virtualbox-ose-kmod/Makefile index 1d442019323d..aff77a142130 100644 --- a/emulators/virtualbox-ose-kmod/Makefile +++ b/emulators/virtualbox-ose-kmod/Makefile @@ -1,7 +1,7 @@ # Created by: Bernhard Froehlich PORTNAME= virtualbox-ose -PORTVERSION= 6.1.26 +PORTVERSION= 6.1.28 CATEGORIES= emulators MASTER_SITES= https://download.virtualbox.org/virtualbox/${PORTVERSION}/ PKGNAMESUFFIX= -kmod diff --git a/emulators/virtualbox-ose-kmod/distinfo b/emulators/virtualbox-ose-kmod/distinfo index d454993893c9..2fd3d03e15f9 100644 --- a/emulators/virtualbox-ose-kmod/distinfo +++ b/emulators/virtualbox-ose-kmod/distinfo @@ -1,3 +1,5 @@ -TIMESTAMP = 1627588696 -SHA256 (VirtualBox-6.1.26.tar.bz2) = 0212602eea878d6c9fd7f4a3e0182da3e4505f31d25f5539fb8f7b1fbe366195 -SIZE (VirtualBox-6.1.26.tar.bz2) = 165690074 +TIMESTAMP = 1634671287 +SHA256 (VirtualBox-6.1.28.tar.bz2) = 8d34993d8e9c0cf35e7bd44dd26c8c757f17a3b7d5a64052f945d00fd798ebfe +SIZE (VirtualBox-6.1.28.tar.bz2) = 165774255 +SHA256 (VBoxGuestAdditions_6.1.28.iso) = eab85206cfb9d7087982deb2635d19a4244a3c6783622a4817fb1a31e48e98e5 +SIZE (VBoxGuestAdditions_6.1.28.iso) = 62226432 diff --git a/emulators/virtualbox-ose/Makefile b/emulators/virtualbox-ose/Makefile index d332bd1baaa6..55e26ad90f58 100644 --- a/emulators/virtualbox-ose/Makefile +++ b/emulators/virtualbox-ose/Makefile @@ -1,8 +1,7 @@ # Created by: Bernhard Froehlich PORTNAME= virtualbox-ose -PORTVERSION= 6.1.26 -PORTREVISION= 3 +PORTVERSION= 6.1.28 CATEGORIES= emulators MASTER_SITES= https://download.virtualbox.org/virtualbox/${PORTVERSION}/ DISTFILES= VirtualBox-${PORTVERSION}${EXTRACT_SUFX} ${GUESTADDITIONS} diff --git a/emulators/virtualbox-ose/distinfo b/emulators/virtualbox-ose/distinfo index 249c55653f84..2fd3d03e15f9 100644 --- a/emulators/virtualbox-ose/distinfo +++ b/emulators/virtualbox-ose/distinfo @@ -1,5 +1,5 @@ -TIMESTAMP = 1627588510 -SHA256 (VirtualBox-6.1.26.tar.bz2) = 0212602eea878d6c9fd7f4a3e0182da3e4505f31d25f5539fb8f7b1fbe366195 -SIZE (VirtualBox-6.1.26.tar.bz2) = 165690074 -SHA256 (VBoxGuestAdditions_6.1.26.iso) = 22d02ec417cd7723d7269dbdaa71c48815f580c0ca7a0606c42bd623f84873d7 -SIZE (VBoxGuestAdditions_6.1.26.iso) = 61073408 +TIMESTAMP = 1634671287 +SHA256 (VirtualBox-6.1.28.tar.bz2) = 8d34993d8e9c0cf35e7bd44dd26c8c757f17a3b7d5a64052f945d00fd798ebfe +SIZE (VirtualBox-6.1.28.tar.bz2) = 165774255 +SHA256 (VBoxGuestAdditions_6.1.28.iso) = eab85206cfb9d7087982deb2635d19a4244a3c6783622a4817fb1a31e48e98e5 +SIZE (VBoxGuestAdditions_6.1.28.iso) = 62226432 diff --git a/emulators/virtualbox-ose/files/patch-configure b/emulators/virtualbox-ose/files/patch-configure index c0e7aa3f0d8a..3880fbe51577 100644 --- a/emulators/virtualbox-ose/files/patch-configure +++ b/emulators/virtualbox-ose/files/patch-configure @@ -1,4 +1,4 @@ ---- configure.orig 2021-07-28 16:13:45 UTC +--- configure.orig 2021-10-18 17:47:25 UTC +++ configure @@ -139,10 +139,14 @@ CXX_FLAGS="" if [ "$OS" = "freebsd" ]; then @@ -25,7 +25,7 @@ fi } @@ -1564,6 +1568,7 @@ EOF - FLGQT5=`pkg-config Qt5Core Qt5Gui --cflags` + FLGQT5=`pkg-config Qt5Core --cflags` # gcc 4.8 is able to compile with C++11 (see also VBOX_GCC_std in Config.kmk) [ $(($cc_maj * 100 + $cc_min)) -ge 408 ] && FLGQT5="$FLGQT5 -std=c++11" + FLGQT5="$FLGQT5 -std=c++11" @@ -61,27 +61,25 @@ gsoap_version=`pkg-config gsoapssl++ --modversion` log_success "found version $gsoap_version" return -@@ -2510,7 +2515,7 @@ for option in "$@"; do +@@ -2519,7 +2524,7 @@ for option in "$@"; do --with-openssl-dir=*) OPENSSLDIR=`echo $option | cut -d'=' -f2` INCCRYPTO="-I${OPENSSLDIR}/include" -- LIBCRYPTO="${OPENSSLDIR}/lib/libcrypto.a ${OPENSSLDIR}/lib/libssl.a" +- LIBCRYPTO="${OPENSSLDIR}/lib/libssl.a ${OPENSSLDIR}/lib/libcrypto.a" + LIBCRYPTO="-L${OPENSSLDIR}/lib -lssl -lcrypto" + # On Linux static OpenSSL typically needs a few additional libraries. + [ "$OS" = "linux" ] && LIBCRYPTO="-ldl $LIBPTHREAD -lm" ;; - --with-ow-dir=*) - WATCOM=`echo $option | cut -d'=' -f2` -@@ -2853,14 +2858,23 @@ if [ $ONLY_ADDITIONS -eq 0 ]; then - [ $WITH_PYTHON -eq 1 ] && check_python +@@ -2865,12 +2870,22 @@ if [ $ONLY_ADDITIONS -eq 0 ]; then [ $WITH_JAVA -eq 1 ] && check_java -- # PulseAudio + # PulseAudio - if [ $WITH_PULSE -eq 1 ]; then - check_pulse - elif [ $WITH_PULSE -eq 0 ]; then # Force disabling PulseAudio. - cnf_append "VBOX_WITH_AUDIO_PULSE" "" - elif [ $WITH_PULSE -eq 2 ]; then # --enable-pulse was passed, force PulseAudio. - cnf_append "VBOX_WITH_AUDIO_PULSE" "1" -- fi + if [ "$OS" = "linux" -o "$OS" = "freebsd" -o "$OS" = "netbsd" ]; then + if [ $WITH_ALSA -eq 1 ]; then + check_alsa @@ -98,11 +96,10 @@ + if [ $WITH_DBUS -eq 0 ]; then + cnf_append "VBOX_WITH_DBUS" "" + fi -+ fi + fi fi - # Linux-specific -@@ -2875,14 +2889,6 @@ if [ "$OS" = "linux" ]; then +@@ -2886,14 +2901,6 @@ if [ "$OS" = "linux" ]; then cnf_append "VBOX_WITHOUT_LINUX_TEST_BUILDS" "1" fi if [ $ONLY_ADDITIONS -eq 0 ]; then diff --git a/emulators/virtualbox-ose/files/patch-src-VBox-HostDrivers-Support-freebsd-Makefile b/emulators/virtualbox-ose/files/patch-src_VBox_HostDrivers_Support_freebsd_Makefile similarity index 75% rename from emulators/virtualbox-ose/files/patch-src-VBox-HostDrivers-Support-freebsd-Makefile rename to emulators/virtualbox-ose/files/patch-src_VBox_HostDrivers_Support_freebsd_Makefile index 331bb4462b63..e41829d41114 100644 --- a/emulators/virtualbox-ose/files/patch-src-VBox-HostDrivers-Support-freebsd-Makefile +++ b/emulators/virtualbox-ose/files/patch-src_VBox_HostDrivers_Support_freebsd_Makefile @@ -1,4 +1,4 @@ ---- src/VBox/HostDrivers/Support/freebsd/Makefile.orig 2019-01-25 18:19:55 UTC +--- src/VBox/HostDrivers/Support/freebsd/Makefile.orig 2021-10-18 17:58:03 UTC +++ src/VBox/HostDrivers/Support/freebsd/Makefile @@ -82,6 +82,7 @@ SRCS += \ assert.c \ @@ -8,17 +8,19 @@ once.c \ term.c \ thread.c -@@ -94,14 +95,15 @@ SRCS += \ +@@ -94,16 +95,17 @@ SRCS += \ RTStrCopy.c \ RTStrCopyEx.c \ RTStrCopyP.c \ + memchr.c \ strformat.c \ + RTStrFormat.c \ strformatnum.c \ strformatrt.c \ strformattype.c \ + stringalloc.c \ strprintf.c \ + strprintf-ellipsis.c \ strtonum.c \ - memchr.c \ - stringalloc.c diff --git a/emulators/virtualbox-ose/files/patch-src_VBox_HostDrivers_Support_freebsd_SUPDrv-freebsd.c b/emulators/virtualbox-ose/files/patch-src_VBox_HostDrivers_Support_freebsd_SUPDrv-freebsd.c index 6afc3a695bc9..a7851ac20503 100644 --- a/emulators/virtualbox-ose/files/patch-src_VBox_HostDrivers_Support_freebsd_SUPDrv-freebsd.c +++ b/emulators/virtualbox-ose/files/patch-src_VBox_HostDrivers_Support_freebsd_SUPDrv-freebsd.c @@ -1,4 +1,4 @@ ---- src/VBox/HostDrivers/Support/freebsd/SUPDrv-freebsd.c.orig 2021-01-07 15:41:26 UTC +--- src/VBox/HostDrivers/Support/freebsd/SUPDrv-freebsd.c.orig 2021-10-18 17:58:03 UTC +++ src/VBox/HostDrivers/Support/freebsd/SUPDrv-freebsd.c @@ -44,8 +44,10 @@ #include @@ -50,10 +50,11 @@ /* * Configure character devices. Add symbolic links for compatibility. */ -@@ -324,6 +342,45 @@ static int VBoxDrvFreeBSDIOCtl(struct cdev *pDev, u_lo - +@@ -322,7 +340,45 @@ static int VBoxDrvFreeBSDIOCtl(struct cdev *pDev, u_lo + return VBoxDrvFreeBSDIOCtlSlow(pSession, ulCmd, pvData, pTd); + } - /** ++ /** + * Alternative Device I/O Control entry point on hosts with SMAP support. + * + * @returns depends... @@ -70,7 +71,7 @@ + * SMAP check. + */ + RTCCUINTREG fSavedEfl = ASMAddFlags(X86_EFL_AC); -+ + + int rc = VBoxDrvFreeBSDIOCtl(pDev, ulCmd, pvData, fFile, pTd); + +#ifdef VBOX_WITH_EFLAGS_AC_SET_IN_VBOXDRV @@ -92,11 +93,10 @@ +} + + -+/** + /** * Deal with the 'slow' I/O control requests. * - * @returns 0 on success, appropriate errno on failure. -@@ -372,11 +429,10 @@ static int VBoxDrvFreeBSDIOCtlSlow(PSUPDRVSESSION pSes +@@ -372,11 +428,10 @@ static int VBoxDrvFreeBSDIOCtlSlow(PSUPDRVSESSION pSes */ SUPREQHDR Hdr; pvUser = *(void **)pvData; @@ -111,7 +111,7 @@ } if (RT_UNLIKELY((Hdr.fFlags & SUPREQHDR_FLAGS_MAGIC_MASK) != SUPREQHDR_FLAGS_MAGIC)) { -@@ -401,13 +457,12 @@ static int VBoxDrvFreeBSDIOCtlSlow(PSUPDRVSESSION pSes +@@ -401,13 +456,12 @@ static int VBoxDrvFreeBSDIOCtlSlow(PSUPDRVSESSION pSes OSDBGPRINT(("VBoxDrvFreeBSDIOCtlSlow: failed to allocate buffer of %d bytes; ulCmd=%#lx\n", cbReq, ulCmd)); return ENOMEM; } @@ -129,11 +129,10 @@ } if (Hdr.cbIn < cbReq) RT_BZERO((uint8_t *)pHdr + Hdr.cbIn, cbReq - Hdr.cbIn); -@@ -435,9 +490,8 @@ static int VBoxDrvFreeBSDIOCtlSlow(PSUPDRVSESSION pSes - OSDBGPRINT(("VBoxDrvFreeBSDIOCtlSlow: too much output! %#x > %#x; uCmd=%#lx!\n", cbOut, cbReq, ulCmd)); +@@ -436,8 +490,8 @@ static int VBoxDrvFreeBSDIOCtlSlow(PSUPDRVSESSION pSes cbOut = cbReq; } -- rc = copyout(pHdr, pvUser, cbOut); + rc = copyout(pHdr, pvUser, cbOut); - if (RT_UNLIKELY(rc)) - OSDBGPRINT(("VBoxDrvFreeBSDIOCtlSlow: copyout(%p,%p,%#x) -> %d; uCmd=%#lx!\n", pHdr, pvUser, cbOut, rc, ulCmd)); + if (RT_FAILURE(RTR0MemUserCopyTo(pvUser, pHdr, cbOut))) @@ -151,9 +150,9 @@ } -@@ -624,11 +677,25 @@ int VBOXCALL supdrvOSMsrProberModify(RTCPUID idCpu, - #endif /* SUPDRV_WITH_MSR_PROBER */ +@@ -623,20 +676,43 @@ int VBOXCALL supdrvOSMsrProberModify(RTCPUID idCpu, + #endif /* SUPDRV_WITH_MSR_PROBER */ +/** + * Check if the CPU has SMAP support. @@ -166,23 +165,20 @@ +#endif + return false; +} + + -+ - SUPR0DECL(int) SUPR0Printf(const char *pszFormat, ...) + SUPR0DECL(int) SUPR0PrintfV(const char *pszFormat, va_list va) { - va_list va; char szMsg[256]; - int cch; + IPRT_FREEBSD_SAVE_EFL_AC(); - - va_start(va, pszFormat); - cch = RTStrPrintfV(szMsg, sizeof(szMsg), pszFormat, va); -@@ -636,12 +703,19 @@ SUPR0DECL(int) SUPR0Printf(const char *pszFormat, ...) ++ + RTStrPrintfV(szMsg, sizeof(szMsg), pszFormat, va); + szMsg[sizeof(szMsg) - 1] = '\0'; printf("%s", szMsg); - ++ + IPRT_FREEBSD_RESTORE_EFL_AC(); - return cch; + return 0; } @@ -198,4 +194,4 @@ +#endif + return fFlags; } -- + diff --git a/emulators/virtualbox-ose/files/patch-src-VBox-HostDrivers-Support-freebsd-files_vboxdrv b/emulators/virtualbox-ose/files/patch-src_VBox_HostDrivers_Support_freebsd_files__vboxdrv similarity index 87% rename from emulators/virtualbox-ose/files/patch-src-VBox-HostDrivers-Support-freebsd-files_vboxdrv rename to emulators/virtualbox-ose/files/patch-src_VBox_HostDrivers_Support_freebsd_files__vboxdrv index 3c805d5ee92b..6a6ac9839efc 100644 --- a/emulators/virtualbox-ose/files/patch-src-VBox-HostDrivers-Support-freebsd-files_vboxdrv +++ b/emulators/virtualbox-ose/files/patch-src_VBox_HostDrivers_Support_freebsd_files__vboxdrv @@ -1,4 +1,4 @@ ---- src/VBox/HostDrivers/Support/freebsd/files_vboxdrv.orig 2019-01-25 18:19:55 UTC +--- src/VBox/HostDrivers/Support/freebsd/files_vboxdrv.orig 2021-10-18 17:58:03 UTC +++ src/VBox/HostDrivers/Support/freebsd/files_vboxdrv @@ -119,6 +119,7 @@ FILES_VBOXDRV_NOBIN=" \ ${PATH_ROOT}/src/VBox/Runtime/common/misc/handletable.cpp=>common/misc/handletable.c \ @@ -8,17 +8,19 @@ ${PATH_ROOT}/src/VBox/Runtime/common/misc/once.cpp=>common/misc/once.c \ ${PATH_ROOT}/src/VBox/Runtime/common/misc/term.cpp=>common/misc/term.c \ ${PATH_ROOT}/src/VBox/Runtime/common/misc/thread.cpp=>common/misc/thread.c \ -@@ -128,14 +129,15 @@ FILES_VBOXDRV_NOBIN=" \ +@@ -128,16 +129,17 @@ FILES_VBOXDRV_NOBIN=" \ ${PATH_ROOT}/src/VBox/Runtime/common/string/RTStrCopyEx.cpp=>common/string/RTStrCopyEx.c \ ${PATH_ROOT}/src/VBox/Runtime/common/string/RTStrNCmp.cpp=>common/string/RTStrNCmp.c \ ${PATH_ROOT}/src/VBox/Runtime/common/string/RTStrNLen.cpp=>common/string/RTStrNLen.c \ + ${PATH_ROOT}/src/VBox/Runtime/common/string/memchr.cpp=>common/string/memchr.c \ ${PATH_ROOT}/src/VBox/Runtime/common/string/strformat.cpp=>common/string/strformat.c \ + ${PATH_ROOT}/src/VBox/Runtime/common/string/RTStrFormat.cpp=>common/string/RTStrFormat.c \ ${PATH_ROOT}/src/VBox/Runtime/common/string/strformatnum.cpp=>common/string/strformatnum.c \ ${PATH_ROOT}/src/VBox/Runtime/common/string/strformatrt.cpp=>common/string/strformatrt.c \ ${PATH_ROOT}/src/VBox/Runtime/common/string/strformattype.cpp=>common/string/strformattype.c \ + ${PATH_ROOT}/src/VBox/Runtime/common/string/stringalloc.cpp=>common/string/stringalloc.c \ ${PATH_ROOT}/src/VBox/Runtime/common/string/strprintf.cpp=>common/string/strprintf.c \ + ${PATH_ROOT}/src/VBox/Runtime/common/string/strprintf-ellipsis.cpp=>common/string/strprintf-ellipsis.c \ ${PATH_ROOT}/src/VBox/Runtime/common/string/strtonum.cpp=>common/string/strtonum.c \ - ${PATH_ROOT}/src/VBox/Runtime/common/string/memchr.cpp=>common/string/memchr.c \ - ${PATH_ROOT}/src/VBox/Runtime/common/string/stringalloc.cpp=>common/string/stringalloc.c \ diff --git a/emulators/virtualbox-ose/files/patch-src_VBox_Runtime_r0drv_freebsd_memobj-r0drv-freebsd.c b/emulators/virtualbox-ose/files/patch-src_VBox_Runtime_r0drv_freebsd_memobj-r0drv-freebsd.c index 069b50bb877a..7e0f92ad6468 100644 --- a/emulators/virtualbox-ose/files/patch-src_VBox_Runtime_r0drv_freebsd_memobj-r0drv-freebsd.c +++ b/emulators/virtualbox-ose/files/patch-src_VBox_Runtime_r0drv_freebsd_memobj-r0drv-freebsd.c @@ -1,4 +1,4 @@ ---- src/VBox/Runtime/r0drv/freebsd/memobj-r0drv-freebsd.c.orig 2020-10-16 16:38:10 UTC +--- src/VBox/Runtime/r0drv/freebsd/memobj-r0drv-freebsd.c.orig 2021-10-18 17:58:41 UTC +++ src/VBox/Runtime/r0drv/freebsd/memobj-r0drv-freebsd.c @@ -129,6 +129,7 @@ static vm_map_t rtR0MemObjFreeBSDGetMap(PRTR0MEMOBJINT @@ -38,7 +38,7 @@ return VINF_SUCCESS; } -@@ -320,7 +321,8 @@ static int rtR0MemObjFreeBSDAllocHelper(PRTR0MEMOBJFRE +@@ -320,8 +321,10 @@ static int rtR0MemObjFreeBSDAllocHelper(PRTR0MEMOBJFRE size_t cPages = atop(pMemFreeBSD->Core.cb); int rc; @@ -46,9 +46,11 @@ + pMemFreeBSD->pObject = vm_pager_allocate(OBJT_PHYS, NULL, + pMemFreeBSD->Core.cb, VM_PROT_ALL, 0, curthread->td_ucred); ++ /* No additional object reference for auto-deallocation upon unmapping. */ #if __FreeBSD_version >= 1000055 -@@ -361,58 +363,77 @@ static int rtR0MemObjFreeBSDAllocHelper(PRTR0MEMOBJFRE + rc = vm_map_find(kernel_map, pMemFreeBSD->pObject, 0, +@@ -361,19 +364,25 @@ static int rtR0MemObjFreeBSDAllocHelper(PRTR0MEMOBJFRE } DECLHIDDEN(int) rtR0MemObjNativeAllocPage(PPRTR0MEMOBJINTERNAL ppMem, size_t cb, bool fExecutable) { @@ -74,6 +76,7 @@ return rc; } +@@ -387,39 +396,51 @@ DECLHIDDEN(int) rtR0MemObjNativeAllocLarge(PPRTR0MEMOB DECLHIDDEN(int) rtR0MemObjNativeAllocLow(PPRTR0MEMOBJINTERNAL ppMem, size_t cb, bool fExecutable) { @@ -103,7 +106,6 @@ DECLHIDDEN(int) rtR0MemObjNativeAllocCont(PPRTR0MEMOBJINTERNAL ppMem, size_t cb, bool fExecutable) { + IPRT_FREEBSD_SAVE_EFL_AC(); -+ PRTR0MEMOBJFREEBSD pMemFreeBSD = (PRTR0MEMOBJFREEBSD)rtR0MemObjNew(sizeof(*pMemFreeBSD), RTR0MEMOBJTYPE_CONT, NULL, cb); if (!pMemFreeBSD) @@ -126,7 +128,7 @@ return rc; } -@@ -422,6 +443,7 @@ static int rtR0MemObjFreeBSDAllocPhysPages(PPRTR0MEMOB +@@ -429,6 +450,7 @@ static int rtR0MemObjFreeBSDAllocPhysPages(PPRTR0MEMOB RTHCPHYS PhysHighest, size_t uAlignment, bool fContiguous, int rcNoMem) { @@ -134,7 +136,7 @@ uint32_t cPages = atop(cb); vm_paddr_t VmPhysAddrHigh; -@@ -429,9 +451,13 @@ static int rtR0MemObjFreeBSDAllocPhysPages(PPRTR0MEMOB +@@ -436,9 +458,13 @@ static int rtR0MemObjFreeBSDAllocPhysPages(PPRTR0MEMOB PRTR0MEMOBJFREEBSD pMemFreeBSD = (PRTR0MEMOBJFREEBSD)rtR0MemObjNew(sizeof(*pMemFreeBSD), enmType, NULL, cb); if (!pMemFreeBSD) @@ -149,7 +151,7 @@ if (PhysHighest != NIL_RTHCPHYS) VmPhysAddrHigh = PhysHighest; -@@ -459,6 +485,7 @@ static int rtR0MemObjFreeBSDAllocPhysPages(PPRTR0MEMOB +@@ -466,6 +492,7 @@ static int rtR0MemObjFreeBSDAllocPhysPages(PPRTR0MEMOB rtR0MemObjDelete(&pMemFreeBSD->Core); } @@ -157,7 +159,7 @@ return rc; } -@@ -478,17 +505,22 @@ DECLHIDDEN(int) rtR0MemObjNativeAllocPhysNC(PPRTR0MEMO +@@ -485,17 +512,22 @@ DECLHIDDEN(int) rtR0MemObjNativeAllocPhysNC(PPRTR0MEMO DECLHIDDEN(int) rtR0MemObjNativeEnterPhys(PPRTR0MEMOBJINTERNAL ppMem, RTHCPHYS Phys, size_t cb, uint32_t uCachePolicy) { AssertReturn(uCachePolicy == RTMEM_CACHE_POLICY_DONT_CARE, VERR_NOT_SUPPORTED); @@ -180,7 +182,7 @@ return VINF_SUCCESS; } -@@ -500,6 +532,7 @@ static int rtR0MemObjNativeLockInMap(PPRTR0MEMOBJINTER +@@ -507,6 +539,7 @@ static int rtR0MemObjNativeLockInMap(PPRTR0MEMOBJINTER vm_offset_t AddrStart, size_t cb, uint32_t fAccess, RTR0PROCESS R0Process, int fFlags) { @@ -188,7 +190,7 @@ int rc; NOREF(fAccess); -@@ -508,21 +541,28 @@ static int rtR0MemObjNativeLockInMap(PPRTR0MEMOBJINTER +@@ -515,21 +548,28 @@ static int rtR0MemObjNativeLockInMap(PPRTR0MEMOBJINTER if (!pMemFreeBSD) return VERR_NO_MEMORY; @@ -225,7 +227,7 @@ return VERR_NO_MEMORY;/** @todo fix mach -> vbox error conversion for freebsd. */ } -@@ -558,6 +598,7 @@ DECLHIDDEN(int) rtR0MemObjNativeLockKernel(PPRTR0MEMOB +@@ -565,6 +605,7 @@ DECLHIDDEN(int) rtR0MemObjNativeLockKernel(PPRTR0MEMOB */ static int rtR0MemObjNativeReserveInMap(PPRTR0MEMOBJINTERNAL ppMem, void *pvFixed, size_t cb, size_t uAlignment, RTR0PROCESS R0Process, vm_map_t pMap) { @@ -233,7 +235,7 @@ int rc; /* -@@ -615,11 +656,13 @@ static int rtR0MemObjNativeReserveInMap(PPRTR0MEMOBJIN +@@ -622,11 +663,13 @@ static int rtR0MemObjNativeReserveInMap(PPRTR0MEMOBJIN pMemFreeBSD->Core.pv = (void *)MapAddress; pMemFreeBSD->Core.u.ResVirt.R0Process = R0Process; *ppMem = &pMemFreeBSD->Core; @@ -247,7 +249,7 @@ return rc; } -@@ -641,6 +684,8 @@ DECLHIDDEN(int) rtR0MemObjNativeReserveUser(PPRTR0MEMO +@@ -648,6 +691,8 @@ DECLHIDDEN(int) rtR0MemObjNativeReserveUser(PPRTR0MEMO DECLHIDDEN(int) rtR0MemObjNativeMapKernel(PPRTR0MEMOBJINTERNAL ppMem, RTR0MEMOBJ pMemToMap, void *pvFixed, size_t uAlignment, unsigned fProt, size_t offSub, size_t cbSub) { @@ -256,7 +258,7 @@ // AssertMsgReturn(!offSub && !cbSub, ("%#x %#x\n", offSub, cbSub), VERR_NOT_SUPPORTED); AssertMsgReturn(pvFixed == (void *)-1, ("%p\n", pvFixed), VERR_NOT_SUPPORTED); -@@ -697,6 +742,7 @@ DECLHIDDEN(int) rtR0MemObjNativeMapKernel(PPRTR0MEMOBJ +@@ -704,6 +749,7 @@ DECLHIDDEN(int) rtR0MemObjNativeMapKernel(PPRTR0MEMOBJ Assert((vm_offset_t)pMemFreeBSD->Core.pv == Addr); pMemFreeBSD->Core.u.Mapping.R0Process = NIL_RTR0PROCESS; *ppMem = &pMemFreeBSD->Core; @@ -264,7 +266,7 @@ return VINF_SUCCESS; } rc = vm_map_remove(kernel_map, Addr, Addr + cbSub); -@@ -705,6 +751,7 @@ DECLHIDDEN(int) rtR0MemObjNativeMapKernel(PPRTR0MEMOBJ +@@ -712,6 +758,7 @@ DECLHIDDEN(int) rtR0MemObjNativeMapKernel(PPRTR0MEMOBJ else vm_object_deallocate(pMemToMapFreeBSD->pObject); @@ -272,7 +274,7 @@ return VERR_NO_MEMORY; } -@@ -712,6 +759,8 @@ DECLHIDDEN(int) rtR0MemObjNativeMapKernel(PPRTR0MEMOBJ +@@ -719,6 +766,8 @@ DECLHIDDEN(int) rtR0MemObjNativeMapKernel(PPRTR0MEMOBJ DECLHIDDEN(int) rtR0MemObjNativeMapUser(PPRTR0MEMOBJINTERNAL ppMem, RTR0MEMOBJ pMemToMap, RTR3PTR R3PtrFixed, size_t uAlignment, unsigned fProt, RTR0PROCESS R0Process, size_t offSub, size_t cbSub) { @@ -281,7 +283,7 @@ /* * Check for unsupported stuff. */ -@@ -768,47 +817,53 @@ DECLHIDDEN(int) rtR0MemObjNativeMapUser(PPRTR0MEMOBJIN +@@ -775,47 +824,53 @@ DECLHIDDEN(int) rtR0MemObjNativeMapUser(PPRTR0MEMOBJIN 0); /* copy-on-write and similar flags */ if (rc == KERN_SUCCESS) @@ -341,7 +343,7 @@ if ((fProt & RTMEM_PROT_NONE) == RTMEM_PROT_NONE) ProtectionFlags = VM_PROT_NONE; -@@ -819,7 +874,12 @@ DECLHIDDEN(int) rtR0MemObjNativeProtect(PRTR0MEMOBJINT +@@ -826,7 +881,12 @@ DECLHIDDEN(int) rtR0MemObjNativeProtect(PRTR0MEMOBJINT if ((fProt & RTMEM_PROT_EXEC) == RTMEM_PROT_EXEC) ProtectionFlags |= VM_PROT_EXECUTE; @@ -354,7 +356,7 @@ if (krc == KERN_SUCCESS) return VINF_SUCCESS; -@@ -844,11 +904,19 @@ DECLHIDDEN(RTHCPHYS) rtR0MemObjNativeGetPagePhysAddr(P +@@ -851,11 +911,19 @@ DECLHIDDEN(RTHCPHYS) rtR0MemObjNativeGetPagePhysAddr(P vm_offset_t pb = (vm_offset_t)pMemFreeBSD->Core.pv + ptoa(iPage); @@ -378,7 +380,7 @@ } case RTR0MEMOBJTYPE_MAPPING: -@@ -857,11 +925,15 @@ DECLHIDDEN(RTHCPHYS) rtR0MemObjNativeGetPagePhysAddr(P +@@ -864,11 +932,16 @@ DECLHIDDEN(RTHCPHYS) rtR0MemObjNativeGetPagePhysAddr(P if (pMemFreeBSD->Core.u.Mapping.R0Process != NIL_RTR0PROCESS) { @@ -392,10 +394,11 @@ + addr = pmap_extract(pPhysicalMap, pb); + IPRT_FREEBSD_RESTORE_EFL_AC(); + return addr; ++ } return vtophys(pb); } -@@ -872,9 +944,11 @@ DECLHIDDEN(RTHCPHYS) rtR0MemObjNativeGetPagePhysAddr(P +@@ -879,9 +952,11 @@ DECLHIDDEN(RTHCPHYS) rtR0MemObjNativeGetPagePhysAddr(P { RTHCPHYS addr;