diff options
Diffstat (limited to 'emulators/virtualbox-ose-70')
11 files changed, 219 insertions, 108 deletions
diff --git a/emulators/virtualbox-ose-70/Makefile b/emulators/virtualbox-ose-70/Makefile index 7b6efa0001d2..29a8b2eb4963 100644 --- a/emulators/virtualbox-ose-70/Makefile +++ b/emulators/virtualbox-ose-70/Makefile @@ -1,6 +1,6 @@ PORTNAME= virtualbox-ose DISTVERSION= 7.0.26 -PORTREVISION?= 4 +PORTREVISION?= 5 CATEGORIES= emulators MASTER_SITES= https://download.virtualbox.org/virtualbox/${DISTVERSION}/:src \ LOCAL/vvd:docs @@ -17,6 +17,9 @@ WWW= https://www.virtualbox.org/ LICENSE= GPLv2 LICENSE_FILE= ${WRKSRC}/COPYING +DEPRECATED= Upstream EOL reaches on 2025-04-15, use emulators/virtualbox-ose${PKGNAMESUFFIX:S|0|2|} instead +EXPIRATION_DATE= 2026-12-31 + ONLY_FOR_ARCHS= amd64 BUILD_DEPENDS= gtar:archivers/gtar \ @@ -45,7 +48,9 @@ CONFLICTS_INSTALL= virtualbox-ose-legacy \ virtualbox-ose \ virtualbox-ose-nox11 \ virtualbox-ose-71 \ - virtualbox-ose-nox11-71 + virtualbox-ose-nox11-71 \ + virtualbox-ose-72 \ + virtualbox-ose-nox11-72 PORTSCOUT= limit:^7\.0\. SUB_FILES= pkg-message @@ -77,10 +82,10 @@ PLIST_SUB= GUEST_VER=${DISTVERSION} \ SLAVE_PORT?= no -OPTIONS_DEFINE= AIO ALSA DBUS DEBUG DOCS GUESTADDITIONS NLS OGG PULSEAUDIO \ - PYTHON QT5 R0LOGGING UDPTUNNEL VBOXIMG VDE VNC VORBIS VPX \ - WEBSERVICE X11 -OPTIONS_DEFAULT= AIO DBUS QT5 UDPTUNNEL VNC WEBSERVICE X11 +OPTIONS_DEFINE= AIO ALSA DBUS DEBUG DOCS GUESTADDITIONS NLS OGG \ + PULSEAUDIO PYTHON QT5 R0LOGGING TPM UDPTUNNEL VBOXIMG \ + VDE VNC VORBIS VPX WEBSERVICE X11 +OPTIONS_DEFAULT= AIO DBUS QT5 TPM UDPTUNNEL VNC WEBSERVICE X11 .if ${SLAVE_PORT} == no OPTIONS_DEFAULT+= PYTHON .endif @@ -94,8 +99,9 @@ DEBUG_DESC= Debug symbols, additional logs and assertions GUESTADDITIONS_DESC= Build with Guest Additions NLS_DESC= Native language support (requires QT5) OGG_DESC= Use libogg from audio/libogg instead of bundled one -QT5_DESC= Build with QT5 frontend (requires X11) +QT5_DESC= Build with Qt5 frontend (requires X11) R0LOGGING_DESC= Enable R0 logging (requires DEBUG) +TPM_DESC= Enable TPM device emulation using sysutils/libtpms UDPTUNNEL_DESC= Build with UDP tunnel support VBOXIMG_DESC= Build vboximg-mount (requires fuse-libs) VDE_DESC= Build with VDE support @@ -120,12 +126,14 @@ PYTHON_USE= PYTHON=distutils,noegginfo,noflavors PYTHON_CONFIGURE_OFF= --disable-python PYTHON_VARS= pydistutils_pkgname=vboxapi pydistutils_pkgversion=1.0 QT5_IMPLIES= X11 -QT5_USES= gl qmake:no_env qt:5 xorg +QT5_USES= gl qmake:no_env xorg QT5_USE= QT=buildtools:build,core,dbus,gui,linguisttools:build,opengl \ QT=printsupport,widgets,x11extras,xml XORG=xcb GL=gl QT5_CONFIGURE_ON= --enable-qt5 QT5_CONFIGURE_OFF= --disable-qt R0LOGGING_IMPLIES= DEBUG +TPM_LIB_DEPENDS= libtpms.so:sysutils/libtpms +TPM_CONFIGURE_OFF= --disable-libtpms UDPTUNNEL_CONFIGURE_OFF= --disable-udptunnel VBOXIMG_LIB_DEPENDS= libfuse.so.2:filesystems/fusefs-libs VDE_RUN_DEPENDS= vde_switch:net/vde2 @@ -315,6 +323,8 @@ post-patch: @${REINPLACE_CMD} \ -e 's|^versions =.*|versions = ["${PYTHON_VER}${PYTHON_ABIVER}"]|' \ ${WRKSRC}/src/libs/xpcom18a4/python/gen_python_deps.py + @${REINPLACE_CMD} -e 's|curl_proxytype|long|g' \ + ${WRKSRC}/src/VBox/Runtime/generic/http-curl.cpp post-patch-AIO-off: @${REINPLACE_CMD} 's|r3/freebsd/fileaio-freebsd.cpp|r3/posix/fileaio-posix.cpp|' \ diff --git a/emulators/virtualbox-ose-70/files/patch-Config.kmk b/emulators/virtualbox-ose-70/files/patch-Config.kmk index 9fe5ecdc458d..007f50ebdc98 100644 --- a/emulators/virtualbox-ose-70/files/patch-Config.kmk +++ b/emulators/virtualbox-ose-70/files/patch-Config.kmk @@ -1,6 +1,6 @@ ---- Config.kmk.orig 2024-10-10 20:19:24.000000000 +0200 -+++ Config.kmk 2024-12-27 17:28:48.466891000 +0100 -@@ -579,11 +579,11 @@ +--- Config.kmk.orig 2025-10-02 22:44:57 UTC ++++ Config.kmk +@@ -579,11 +579,11 @@ endif # Enable OSS audio support. VBOX_WITH_AUDIO_OSS = 1 endif @@ -14,7 +14,7 @@ # Enable PulseAudio audio support. VBOX_WITH_AUDIO_PULSE = 1 endif -@@ -596,11 +596,11 @@ +@@ -596,11 +596,11 @@ VBOX_WITH_PCI_PASSTHROUGH = # (disabled with 6.1, since it's not complete/useful enough) VBOX_WITH_PCI_PASSTHROUGH = # Enable statically linked dbus support. @@ -28,7 +28,7 @@ VBOX_WITH_PAM = 1 endif # Enable internal networking. -@@ -608,7 +608,7 @@ +@@ -608,7 +608,7 @@ VBOX_WITH_VMSVGA = 1 # Enable vmsvga (svga2) graphics device variant, 2D part VBOX_WITH_VMSVGA = 1 # Enable vmsvga (svga2) graphics device variant, 3D part @@ -37,7 +37,16 @@ VBOX_WITH_VMSVGA3D = 1 endif # Enable vmsvga (svga2) graphics device variant, 3D part, VGPU10 DX commands -@@ -787,7 +787,7 @@ +@@ -735,7 +735,7 @@ VBOX_WITH_TPM = 1 + # Enable TPM device emulation support. + VBOX_WITH_TPM = 1 + # Enable libtpms, required for the in process TPM emulation. +-if1of ($(KBUILD_TARGET), linux darwin win solaris) ++if1of ($(KBUILD_TARGET), freebsd linux darwin win solaris) + VBOX_WITH_LIBTPMS = 1 + endif + ## @} +@@ -787,7 +787,7 @@ VBOX_WITH_VBOXMANAGE_NLS = 1 #endif # Set this to prefix all C symbols in XPCOM, to avoid dynamic linking problems # caused by our XPCOM library polluting the symbol namespace for system libs. @@ -46,7 +55,7 @@ VBOX_WITH_XPCOM_NAMESPACE_CLEANUP = 1 endif # The webservices api. -@@ -1295,10 +1295,6 @@ +@@ -1295,10 +1295,6 @@ endif endif endif @@ -57,7 +66,7 @@ ifeq ($(KBUILD_TARGET),haiku) VBOX_WITH_VRDP_RDESKTOP = # Permanent (no working SDL). -@@ -1457,7 +1453,7 @@ +@@ -1457,7 +1453,7 @@ ifdef VBOX_OSE # not yet VBOX_WITH_PLUGIN_CRYPT = VBOX_WITH_DRAG_AND_DROP_PROMISES = @@ -66,7 +75,7 @@ VBOX_WITH_DOCS = VBOX_WITH_DOCS_PACKING = endif -@@ -3518,19 +3514,7 @@ +@@ -3517,19 +3513,7 @@ ifndef VBOX_GCC_std # ## @todo consider maxing this out. ifndef VBOX_GCC_std @@ -86,7 +95,7 @@ endif ifndef VBOX_VCC_std if $(VBOX_VCC_TOOL_STEM) >= VCC141 # since 2017 15.3 -@@ -5484,11 +5468,11 @@ +@@ -5483,11 +5467,11 @@ ifeq ($(VBOX_LDR_FMT),elf) # Solaris driver signing. TEMPLATE_VBoxR0_POST_CMDS = $(VBOX_SIGN_DRIVER_CMDS) else @@ -100,7 +109,7 @@ VBOX_WITH_VBOXR0_AS_DLL = 1 TEMPLATE_VBoxR0_DLLSUFF = .r0 TEMPLATE_VBoxR0_CFLAGS += -fPIC -@@ -5499,7 +5483,7 @@ +@@ -5498,7 +5482,7 @@ ifeq ($(VBOX_LDR_FMT),elf) else TEMPLATE_VBoxR0_CFLAGS.amd64 += -mcmodel=kernel TEMPLATE_VBoxR0_CXXFLAGS.amd64 += -mcmodel=kernel @@ -109,7 +118,7 @@ ifdef VBOX_WITH_KMOD_WRAPPED_R0_MODS # For BTF/pahold issue we use -g1 TEMPLATE_VBoxR0_DEFS += VBOX_WITH_KMOD_WRAPPED_R0_MODS TEMPLATE_VBoxR0_LDFLAGS.linux += $(PATH_ROOT)/src/VBox/HostDrivers/Support/linux/VBoxR0-wrapped.lds -@@ -5880,7 +5864,7 @@ +@@ -5879,7 +5863,7 @@ ifeq ($(KBUILD_TARGET),freebsd) # x86 FreeBSD (6.2 or something): # cc -O2 -fno-strict-aliasing -pipe -Werror -D_KERNEL -DKLD_MODULE \ # -nostdinc -I- -I. -I@ -I@/contrib/altq -I@/../include -I/usr/include \ @@ -118,7 +127,7 @@ # -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -ffreestanding -Wall -Wredundant-decls -Wnested-externs \ # -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -fformat-extensions \ # -std=c99 -c ../my.c -@@ -5891,7 +5875,7 @@ +@@ -5890,7 +5874,7 @@ ifeq ($(KBUILD_TARGET),freebsd) # # AMD64 FreeBSD (7.1): # cc -O2 -fno-strict-aliasing -pipe -D_KERNEL -DKLD_MODULE -std=c99 -nostdinc -I. -I@ -I@/contrib/altq \ @@ -127,7 +136,7 @@ # -fno-omit-frame-pointer -mcmodel=kernel -mno-red-zone -mfpmath=387 -mno-sse -mno-sse2 -mno-mmx \ # -mno-3dnow -msoft-float -fno-asynchronous-unwind-tables -ffreestanding \ # -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign \ -@@ -5973,7 +5957,7 @@ +@@ -5972,7 +5956,7 @@ ifeq ($(KBUILD_TARGET),freebsd) | xargs -J% objcopy % $(outbase).kld # Link the final .ko (a shared object). @@ -136,7 +145,7 @@ endef endif # x86 -@@ -6008,7 +5992,7 @@ +@@ -6007,7 +5991,7 @@ ifeq ($(KBUILD_TARGET),netbsd) $(VBOX_GCC_fdiagnostics-show-option) \ -Wstrict-prototypes -Wmissing-prototypes -Wstrict-prototypes \ -Wimplicit-function-declaration -Werror-implicit-function-declaration \ @@ -145,7 +154,7 @@ $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) \ -nostdinc -std=c99 -msoft-float TEMPLATE_VBoxR0Drv_CFLAGS.x86 = -m32 -mno-mmx -mno-sse -mno-avx \ -@@ -6019,7 +6003,7 @@ +@@ -6018,7 +6002,7 @@ ifeq ($(KBUILD_TARGET),netbsd) -fno-asynchronous-unwind-tables -mno-fp-ret-in-387 TEMPLATE_VBoxR0Drv_CXXFLAGS = -fno-exceptions -fno-rtti \ $(VBOX_GCC_WARN) -Wpointer-arith -Winline \ @@ -154,7 +163,7 @@ $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) \ -nostdinc -msoft-float TEMPLATE_VBoxR0Drv_CXXFLAGS.x86 = $(TEMPLATE_VBoxR0Drv_CFLAGS.x86) -@@ -6318,11 +6302,11 @@ +@@ -6317,11 +6301,11 @@ else # the gcc guys TEMPLATE_VBoxR3Exe_LIBS = pthread m rt dl else ifeq ($(KBUILD_TARGET),os2) TEMPLATE_VBoxR3Exe_TOOL = GXX3OMF @@ -168,7 +177,7 @@ TEMPLATE_VBoxR3Exe_SDKS.darwin = $(VBOX_DARWIN_DEF_SDK_SDKS) TEMPLATE_VBoxR3Exe_DEFS.darwin = $(VBOX_DARWIN_DEF_SDK_DEFS) TEMPLATE_VBoxR3Exe_CFLAGS.darwin = $(VBOX_DARWIN_DEF_SDK_CFLAGS) -fno-common -@@ -6339,17 +6323,26 @@ +@@ -6338,17 +6322,26 @@ else # the gcc guys else ifeq ($(KBUILD_TARGET),haiku) TEMPLATE_VBoxR3Exe_TOOL = GXX3 TEMPLATE_VBoxR3Exe_POST_CMDS = $(VBOX_HAIKU_XRES_SETVER_CMDS) @@ -197,7 +206,7 @@ /usr/include \ /usr/X11R6/include \ /usr/local/include -@@ -6368,7 +6361,7 @@ +@@ -6367,7 +6360,7 @@ else # the gcc guys /usr/X11R7/lib else ifeq ($(KBUILD_TARGET),solaris) TEMPLATE_VBoxR3Exe_TOOL = GXX3PLAIN @@ -206,7 +215,7 @@ if $(VBOX_GCC_VERSION_CC) < 30500 TEMPLATE_VBoxR3Exe_CFLAGS += -std=gnu99 endif -@@ -6384,6 +6377,7 @@ +@@ -6383,6 +6376,7 @@ else # the gcc guys TEMPLATE_VBoxR3Exe_LDFLAGS += '$(VBOX_GCC_RPATH_OPT)$(VBOX_WITH_RELATIVE_RUNPATH)' endif ifdef VBOX_WITH_ORIGIN @@ -214,7 +223,7 @@ TEMPLATE_VBoxR3Exe_LDFLAGS.linux += $(VBOX_GCC_ORIGIN_OPT) endif endif -@@ -6590,7 +6584,7 @@ +@@ -6589,7 +6583,7 @@ else ifdef VBOX_WITH_NOCRT_STATIC TEMPLATE_VBoxR3StaticBase_DEFS += RT_WITH_NOCRT_WRAPPERS endif @@ -223,7 +232,7 @@ # The gcc guys sans darwin, linux and solaris (don't depend on statically compiled system libs there) TEMPLATE_VBoxR3StaticBase_CFLAGS = $(TEMPLATE_VBoxR3Exe_CFLAGS) -static TEMPLATE_VBoxR3StaticBase_CXXFLAGS = $(TEMPLATE_VBoxR3Exe_CXXFLAGS) -static -@@ -6656,7 +6650,7 @@ +@@ -6655,7 +6649,7 @@ else $(SDK_VBoxLzf_LIBS) \ $(SDK_VBoxZlib_LIBS) if1of ($(KBUILD_TARGET), darwin freebsd) @@ -232,7 +241,7 @@ else ifeq ($(KBUILD_TARGET),solaris) TEMPLATE_VBoxR3Static_LIBS += kstat endif -@@ -6830,6 +6824,7 @@ +@@ -6829,6 +6823,7 @@ else ifn1of ($(KBUILD_TARGET), os2) else ifn1of ($(KBUILD_TARGET), os2) ifneq ($(KBUILD_TYPE),asan) # Keep RPATH in asan builds so we can find libasan.so.X and libubsan.so.Y. TEMPLATE_VBoxR3HardenedExe_LDFLAGS = $(filter-out '$(VBOX_GCC_RPATH_OPT)%,$(TEMPLATE_VBoxR3Exe_LDFLAGS)) @@ -240,7 +249,7 @@ TEMPLATE_VBoxR3HardenedExe_LDFLAGS.linux = $(filter-out $(VBOX_GCC_ORIGIN_OPT),$(TEMPLATE_VBoxR3Exe_LDFLAGS.linux)) endif endif -@@ -6861,6 +6856,7 @@ +@@ -6860,6 +6855,7 @@ ifn1of ($(KBUILD_TARGET), win os2) $(if-expr !defined(VBOX_WITHOUT_WINDOWS_KERNEL_CODE_SIGNING_CERT),-IntegrityCheck,) ifn1of ($(KBUILD_TARGET), win os2) TEMPLATE_VBoxR3HardenedTstDll_LDFLAGS = $(filter-out '$(VBOX_GCC_RPATH_OPT)%,$(TEMPLATE_VBoxR3TstDll_LDFLAGS)) @@ -248,7 +257,7 @@ TEMPLATE_VBoxR3HardenedTstDll_LDFLAGS.linux = $(filter-out $(VBOX_GCC_ORIGIN_OPT),$(TEMPLATE_VBoxR3TstDll_LDFLAGS.linux)) endif -@@ -6884,6 +6880,7 @@ +@@ -6883,6 +6879,7 @@ ifndef VBOX_WITH_HARDENING TEMPLATE_VBoxR3SetUidToRoot_LDFLAGS += '$(VBOX_GCC_RPATH_OPT)$(VBOX_WITH_RELATIVE_RUNPATH)' endif ifdef VBOX_WITH_ORIGIN @@ -256,7 +265,7 @@ TEMPLATE_VBoxR3SetUidToRoot_LDFLAGS.linux += $(VBOX_GCC_ORIGIN_OPT) endif endif -@@ -7208,7 +7205,7 @@ +@@ -7207,7 +7204,7 @@ else # the GCC guys: endif TEMPLATE_VBoxMainExe_CXXFLAGS = -g $(VBOX_GCC_pipe) \ $(VBOX_GCC_PEDANTIC_CXX) $(VBOX_GCC_Wno-variadic-macros) $(VBOX_GCC_Wno-multistatement-macros) $(VBOX_GCC_Wno-class-memaccess) -Wshadow \ @@ -265,7 +274,7 @@ $(VBOX_GCC_fvisibility-inlines-hidden) $(VBOX_GCC_fvisibility-hidden) $(VBOX_GCC_std) $(VBOX_GCC_IPRT_FMT_CHECK) \ $(VBOX_GCC_SANITIZER_FLAGS) if !defined("VBOX_GCC_Wno-delete-non-virtual-dtor") && defined("VBOX_GCC_Wno-non-virtual-dtor") -@@ -7272,10 +7269,19 @@ +@@ -7271,10 +7268,19 @@ else # the GCC guys: else ifeq ($(KBUILD_TARGET),haiku) TEMPLATE_VBoxMainExe_TOOL = GXX3 TEMPLATE_VBoxMainExe_LIBS = $(LIB_RUNTIME) network stdc++ supc++ @@ -286,7 +295,7 @@ /usr/include \ /usr/X11R6/include \ /usr/local/include -@@ -7307,6 +7313,7 @@ +@@ -7306,6 +7312,7 @@ else # the GCC guys: TEMPLATE_VBoxMainExe_LDFLAGS += '$(VBOX_GCC_RPATH_OPT)$(VBOX_WITH_RELATIVE_RUNPATH)' endif ifdef VBOX_WITH_ORIGIN @@ -294,7 +303,7 @@ TEMPLATE_VBoxMainExe_LDFLAGS.linux += $(VBOX_GCC_ORIGIN_OPT) endif -@@ -7943,13 +7950,11 @@ +@@ -7942,13 +7949,11 @@ ifdef VBOX_WITH_QTGUI TEMPLATE_VBoxQtGuiExe_LIBPATH += \ $(VBOX_LIBPATH_X11) ifeq ($(KBUILD_TARGET),freebsd) @@ -310,7 +319,7 @@ /usr/local/lib endif ifeq ($(KBUILD_TARGET),solaris) -@@ -8231,7 +8236,7 @@ +@@ -8230,7 +8235,7 @@ else TEMPLATE_VBoxBldProg_LIBS = pthread m rt dl else ifeq ($(KBUILD_HOST),os2) TEMPLATE_VBoxBldProg_TOOL = GXX3OMF @@ -319,7 +328,7 @@ else ifeq ($(KBUILD_HOST),darwin) TEMPLATE_VBoxBldProg_TOOL = $(VBOX_GCC_TOOL) if "$(VBOX_DEF_MACOSX_VERSION_MIN)" == "10.7" || "$(VBOX_DARWIN_HOST_VERSION_MAJOR)" == "7" -@@ -8271,13 +8276,20 @@ +@@ -8270,13 +8275,20 @@ else TEMPLATE_VBoxBldProg_LIBS = else ifeq ($(KBUILD_HOST),haiku) TEMPLATE_VBoxBldProg_TOOL = GXX3 @@ -342,7 +351,7 @@ /usr/include \ /usr/X11R6/include \ /usr/local/include -@@ -8324,11 +8336,11 @@ +@@ -8323,11 +8335,11 @@ TEMPLATE_VBoxAdvBldProg_LIBS.darwin = \ $(TEMPLATE_VBoxBldProg_LIBS) TEMPLATE_VBoxAdvBldProg_LIBS.darwin = \ $(TEMPLATE_VBoxAdvBldProg_LIBS) \ @@ -356,7 +365,7 @@ rt \ $(TEMPLATE_VBoxBldProg_LIBS.freebsd) TEMPLATE_VBoxAdvBldProg_LIBS.linux = \ -@@ -8419,6 +8431,7 @@ +@@ -8418,6 +8430,7 @@ else # the gcc guys # Do not inherit sanitizer flags from VBoxR3Exe in guest executables. Deal with them separately. TEMPLATE_VBoxGuestR3ExeBase_CXXFLAGS.debug = $(NO_SUCH_VARIABLE) TEMPLATE_VBoxGuestR3ExeBase_CFLAGS.debug = $(NO_SUCH_VARIABLE) @@ -364,7 +373,7 @@ TEMPLATE_VBoxGuestR3ExeBase_LDFLAGS.linux = $(filter-out $(VBOX_GCC_ORIGIN_OPT),$(TEMPLATE_$(TEMPLATE_VBoxGuestR3ExeBase_EXTENDS)_LDFLAGS.linux)) TEMPLATE_VBoxGuestR3ExeBase_LDFLAGS.debug = $(NO_SUCH_VARIABLE) TEMPLATE_VBoxGuestR3ExeBase_LDFLAGS = $(filter-out '$(VBOX_GCC_RPATH_OPT)%,$(TEMPLATE_$(TEMPLATE_VBoxGuestR3ExeBase_EXTENDS)_LDFLAGS)) -@@ -8442,7 +8455,7 @@ +@@ -8441,7 +8454,7 @@ else if1of ($(KBUILD_TARGET), darwin freebsd openbsd) ifeq ($(KBUILD_TARGET),linux) # As few libs as possible on linux. TEMPLATE_VBoxGuestR3ExeBase_LIBS = pthread rt m dl else if1of ($(KBUILD_TARGET), darwin freebsd openbsd) @@ -373,7 +382,7 @@ else ifeq ($(KBUILD_TARGET),solaris) TEMPLATE_VBoxGuestR3ExeBase_LIBS = $(TEMPLATE_$(TEMPLATE_VBoxGuestR3ExeBase_EXTENDS)_LIBS) nsl endif -@@ -8455,6 +8468,7 @@ +@@ -8454,6 +8467,7 @@ TEMPLATE_VBoxGuestR3ExeBase_CFLAGS.linux = $(TEMP $(VBOX_GCC_fno-stack-protector) TEMPLATE_VBoxGuestR3ExeBase_CFLAGS.linux = $(TEMPLATE_VBoxGuestR3ExeBase_CXXFLAGS.linux) # The GNU_HASH ELF tag is not supported by older systems. @@ -381,7 +390,7 @@ TEMPLATE_VBoxGuestR3ExeBase_LDFLAGS.linux += $(VBOX_LD_hash_style_sysv) -@@ -8684,6 +8698,7 @@ +@@ -8683,6 +8697,7 @@ TEMPLATE_VBoxGuestR3XFree86Mod_LDFLAGS.$(KBUILD_TARGET TEMPLATE_VBoxGuestR3XFree86Mod_CXXFLAGS.linux = $(VBOX_GCC_fno-stack-protector) # Remove symvers.h TEMPLATE_VBoxGuestR3XFree86Mod_LDFLAGS.$(KBUILD_TARGET) = $(NO_SUCH_VARIABLE) # The GNU_HASH ELF tag is not supported by older glibc dynamic linkers. @@ -389,7 +398,7 @@ TEMPLATE_VBoxGuestR3XFree86Mod_LDFLAGS.linux = $(subst -Wl$(COMMA),,$(VBOX_LD_hash_style_sysv)) TEMPLATE_VBoxGuestR3XFree86Mod_LDFLAGS.$(KBUILD_TYPE) = $(NO_SUCH_VARIABLE) TEMPLATE_VBoxGuestR3XFree86Mod_LDFLAGS := -r -@@ -8725,7 +8740,7 @@ +@@ -8724,7 +8739,7 @@ TEMPLATE_VBoxGuestR3XOrgMod_LIBS.$(KBUILD_TARGET) = TEMPLATE_VBoxGuestR3XOrgMod_LIBS = $(VBOX_LIB_VBGL_R3_XORG) TEMPLATE_VBoxGuestR3XOrgMod_LIBS.$(KBUILD_TYPE) = $(NO_SUCH_VARIABLE) TEMPLATE_VBoxGuestR3XOrgMod_LIBS.$(KBUILD_TARGET) = $(NO_SUCH_VARIABLE) diff --git a/emulators/virtualbox-ose-70/files/patch-src-VBox-Additions-common-VBoxGuest-VBoxGuest-freebsd.c b/emulators/virtualbox-ose-70/files/patch-src-VBox-Additions-common-VBoxGuest-VBoxGuest-freebsd.c index e790f372f95f..5ac0dc7e17c8 100644 --- a/emulators/virtualbox-ose-70/files/patch-src-VBox-Additions-common-VBoxGuest-VBoxGuest-freebsd.c +++ b/emulators/virtualbox-ose-70/files/patch-src-VBox-Additions-common-VBoxGuest-VBoxGuest-freebsd.c @@ -1,5 +1,5 @@ ---- src/VBox/Additions/common/VBoxGuest/VBoxGuest-freebsd.c.orig 2022-10-06 19:03:06.000000000 +0200 -+++ src/VBox/Additions/common/VBoxGuest/VBoxGuest-freebsd.c 2024-12-26 15:28:38.066230000 +0100 +--- src/VBox/Additions/common/VBoxGuest/VBoxGuest-freebsd.c.orig 2025-04-11 12:02:54 UTC ++++ src/VBox/Additions/common/VBoxGuest/VBoxGuest-freebsd.c @@ -55,6 +55,7 @@ #include <sys/uio.h> #include <sys/bus.h> @@ -16,7 +16,7 @@ #include <iprt/initterm.h> #include <iprt/process.h> #include <iprt/string.h> -@@ -112,8 +114,6 @@ +@@ -112,8 +114,6 @@ struct VBoxGuestDeviceState struct resource *pIrqRes; /** Pointer to the IRQ handler. */ void *pfnIrqHandler; @@ -25,7 +25,7 @@ }; -@@ -123,8 +123,7 @@ +@@ -123,8 +123,7 @@ struct VBoxGuestDeviceState /* * Character device file handlers. */ @@ -35,7 +35,7 @@ static d_ioctl_t vgdrvFreeBSDIOCtl; static int vgdrvFreeBSDIOCtlSlow(PVBOXGUESTSESSION pSession, u_long ulCmd, caddr_t pvData, struct thread *pTd); static d_write_t vgdrvFreeBSDWrite; -@@ -155,8 +154,7 @@ +@@ -155,8 +154,7 @@ static struct cdevsw g_vgdrvFreeBSDChrDevSW = { .d_version = D_VERSION, .d_flags = D_TRACKCLOSE | D_NEEDMINOR, @@ -45,7 +45,7 @@ .d_ioctl = vgdrvFreeBSDIOCtl, .d_read = vgdrvFreeBSDRead, .d_write = vgdrvFreeBSDWrite, -@@ -164,81 +162,28 @@ +@@ -164,81 +162,28 @@ static struct cdevsw g_vgdrvFreeBSDChrDevSW = .d_name = "vboxguest" }; @@ -134,7 +134,7 @@ { int rc; PVBOXGUESTSESSION pSession; -@@ -250,12 +195,6 @@ +@@ -250,12 +195,6 @@ static int vgdrvFreeBSDOpen(struct cdev *pDev, int fOp LogFlow(("vgdrvFreeBSDOpen:\n")); /* @@ -147,7 +147,7 @@ * Create a new session. */ fRequestor = VMMDEV_REQUESTOR_USERMODE | VMMDEV_REQUESTOR_TRUST_NOT_GIVEN; -@@ -272,47 +211,20 @@ +@@ -272,14 +211,13 @@ static int vgdrvFreeBSDOpen(struct cdev *pDev, int fOp rc = VGDrvCommonCreateUserSession(&g_DevExt, fRequestor, &pSession); if (RT_SUCCESS(rc)) { @@ -168,10 +168,10 @@ } LogRel(("vgdrvFreeBSDOpen: failed. rc=%d\n", rc)); - return RTErrConvertToErrno(rc); +@@ -287,33 +225,6 @@ static int vgdrvFreeBSDOpen(struct cdev *pDev, int fOp } --/** + /** - * File close handler - * - */ @@ -179,7 +179,7 @@ -{ - PVBOXGUESTSESSION pSession = (PVBOXGUESTSESSION)pDev->si_drv1; - Log(("vgdrvFreeBSDClose: fFile=%#x pSession=%p\n", fFile, pSession)); - +- - /* - * Close the session if it's still hanging on to the device... - */ @@ -198,10 +198,11 @@ -} - - - /** +-/** * I/O control request. * -@@ -326,8 +238,12 @@ + * @returns depends... +@@ -326,8 +237,12 @@ static int vgdrvFreeBSDIOCtl(struct cdev *pDev, u_long static int vgdrvFreeBSDIOCtl(struct cdev *pDev, u_long ulCmd, caddr_t pvData, int fFile, struct thread *pTd) { PVBOXGUESTSESSION pSession; @@ -215,20 +216,25 @@ /* * Deal with the fast ioctl path first. */ -@@ -526,8 +442,10 @@ +@@ -522,12 +437,14 @@ static int vgdrvFreeBSDPoll(struct cdev *pDev, int fEv + + static int vgdrvFreeBSDPoll(struct cdev *pDev, int fEvents, struct thread *td) + { +- int fEventsProcessed; ++ PVBOXGUESTSESSION pSession; ++ int fEventsProcessed, rc; LogFlow(("vgdrvFreeBSDPoll: fEvents=%d\n", fEvents)); - PVBOXGUESTSESSION pSession = (PVBOXGUESTSESSION)pDev->si_drv1; - if (RT_UNLIKELY(!RT_VALID_PTR(pSession))) { -+ + rc = devfs_get_cdevpriv((void **)&pSession); + if (rc) -+ { ++ { Log(("vgdrvFreeBSDPoll: no state data for %s\n", devtoname(pDev))); return (fEvents & (POLLHUP|POLLIN|POLLRDNORM|POLLOUT|POLLWRNORM)); } -@@ -568,11 +486,8 @@ +@@ -568,11 +485,8 @@ static int vgdrvFreeBSDDetach(device_t pDevice) /* * Reverse what we did in vgdrvFreeBSDAttach. */ @@ -241,7 +247,7 @@ vgdrvFreeBSDRemoveIRQ(pDevice, pState); if (pState->pVMMDevMemRes) -@@ -737,18 +652,21 @@ +@@ -737,18 +651,21 @@ static int vgdrvFreeBSDAttach(device_t pDevice) VGDrvCommonProcessOptionsFromHost(&g_DevExt); /* @@ -269,7 +275,7 @@ vgdrvFreeBSDRemoveIRQ(pDevice, pState); } else -@@ -792,8 +710,12 @@ +@@ -792,8 +709,12 @@ static driver_t vgdrvFreeBSDDriver = sizeof(struct VBoxGuestDeviceState), }; diff --git a/emulators/virtualbox-ose-70/files/patch-src-VBox-Additions-common-VBoxGuest-freebsd-Makefile b/emulators/virtualbox-ose-70/files/patch-src-VBox-Additions-common-VBoxGuest-freebsd-Makefile index 476346a59b13..37c1596cfe87 100644 --- a/emulators/virtualbox-ose-70/files/patch-src-VBox-Additions-common-VBoxGuest-freebsd-Makefile +++ b/emulators/virtualbox-ose-70/files/patch-src-VBox-Additions-common-VBoxGuest-freebsd-Makefile @@ -1,15 +1,17 @@ ---- src/VBox/Additions/common/VBoxGuest/freebsd/Makefile.orig 2019-04-16 10:09:09 UTC +--- src/VBox/Additions/common/VBoxGuest/freebsd/Makefile.orig 2025-10-16 14:25:29 UTC +++ src/VBox/Additions/common/VBoxGuest/freebsd/Makefile -@@ -25,7 +25,7 @@ +@@ -34,9 +34,8 @@ KMOD = vboxguest + # SPDX-License-Identifier: GPL-3.0-only OR CDDL-1.0 # KMOD = vboxguest - --CFLAGS += -DRT_OS_FREEBSD -DIN_RING0 -DIN_RT_R0 -DIN_SUP_R0 -DVBOX -DRT_WITH_VBOX -Iinclude -I. -Ir0drv -w -DVBGL_VBOXGUEST -DVBOX_WITH_HGCM -DVBOX_WITH_64_BITS_GUESTS +CFLAGS += -DRT_OS_FREEBSD -DIN_RING0 -DIN_RT_R0 -DIN_GUEST -DIN_GUEST_R0 -DIN_SUP_R0 -DVBOX -DRT_WITH_VBOX -Iinclude -I. -Ir0drv -w -DVBGL_VBOXGUEST -DVBOX_WITH_HGCM -DVBOX_WITH_64_BITS_GUESTS +-CFLAGS += -DRT_OS_FREEBSD -DIN_RING0 -DIN_RT_R0 -DIN_SUP_R0 -DVBOX -DRT_WITH_VBOX -Iinclude -I. -Ir0drv -w -DVBGL_VBOXGUEST -DVBOX_WITH_HGCM -DVBOX_WITH_64_BITS_GUESTS +- .if (${MACHINE_ARCH} == "i386") CFLAGS += -DRT_ARCH_X86 -@@ -80,6 +80,7 @@ SRCS += \ + .elif (${MACHINE_ARCH} == "amd64") +@@ -91,6 +90,7 @@ SRCS += \ handletable.c \ handletablectx.c \ once.c \ @@ -17,7 +19,7 @@ thread.c .PATH: ${.CURDIR}/common/string -@@ -147,6 +148,7 @@ SRCS += \ +@@ -163,6 +163,7 @@ SRCS += \ .PATH: ${.CURDIR}/r0drv SRCS += \ @@ -25,3 +27,12 @@ alloc-r0drv.c \ initterm-r0drv.c \ memobj-r0drv.c \ +@@ -196,7 +197,7 @@ SRCS += \ + SRCS += \ + log-vbox.c \ + logbackdoor.c \ +- RTLogWriteVmm-amd64-x86. ++ RTLogWriteVmm-amd64-x86.c + + .include <bsd.kmod.mk> + diff --git a/emulators/virtualbox-ose-70/files/patch-src_VBox_Additions_freebsd_mount__vboxvfs_Makefile.kmk b/emulators/virtualbox-ose-70/files/patch-src_VBox_Additions_freebsd_mount__vboxvfs_Makefile.kmk index 270472c045e3..796aecabac8f 100644 --- a/emulators/virtualbox-ose-70/files/patch-src_VBox_Additions_freebsd_mount__vboxvfs_Makefile.kmk +++ b/emulators/virtualbox-ose-70/files/patch-src_VBox_Additions_freebsd_mount__vboxvfs_Makefile.kmk @@ -1,4 +1,4 @@ ---- src/VBox/Additions/freebsd/mount_vboxvfs/Makefile.kmk.orig 2025-05-11 03:54:13 UTC +--- src/VBox/Additions/freebsd/mount_vboxvfs/Makefile.kmk.orig 2025-10-24 13:49:31 UTC +++ src/VBox/Additions/freebsd/mount_vboxvfs/Makefile.kmk @@ -0,0 +1,28 @@ +# $Id: Makefile.kmk $ @@ -18,7 +18,7 @@ +CFLAGS+=-I$(MOUNT) + +PROGRAMS += mount_vboxvfs -+mount_vboxvfs_TEMPLATE = NewVBoxGuestR3Exe ++mount_vboxvfs_TEMPLATE = VBoxGuestR3Exe +mount_vboxvfs_SOURCES = mount_vboxvfs.c + +ifdef HAVE_MNTOPTS_IN_LIBUTIL diff --git a/emulators/virtualbox-ose-70/files/patch-src_VBox_Additions_freebsd_vboxvfs_Makefile.kmk b/emulators/virtualbox-ose-70/files/patch-src_VBox_Additions_freebsd_vboxvfs_Makefile.kmk new file mode 100644 index 000000000000..679778e60181 --- /dev/null +++ b/emulators/virtualbox-ose-70/files/patch-src_VBox_Additions_freebsd_vboxvfs_Makefile.kmk @@ -0,0 +1,50 @@ +--- src/VBox/Additions/freebsd/vboxvfs/Makefile.kmk.orig 2025-10-22 19:18:12 UTC ++++ src/VBox/Additions/freebsd/vboxvfs/Makefile.kmk +@@ -43,32 +43,37 @@ vboxvfs_SOURCES = \ + $(vboxvfs_0_OUTDIR) + vboxvfs_SOURCES = \ + vboxvfs_vfsops.c \ +- vboxvfs_vnops.c ++ bcmp.c \ ++ vboxvfs_vnops.c \ ++ vboxvfs_prov.c + vboxvfs_LIBS = \ + $(VBOX_LIB_VBGL_R0) \ + $(VBOX_LIB_IPRT_GUEST_R0) + vboxvfs_DEPS = \ +- $$(vboxvfs_0_OUTDIR)/vnode_if.h \ +- $$(vboxvfs_0_OUTDIR)/vnode_if_newproto.h \ +- $$(vboxvfs_0_OUTDIR)/vnode_if_typedef.h ++ $(vboxvfs_0_OUTDIR)/vnode_if.h \ ++ $(vboxvfs_0_OUTDIR)/vnode_if_newproto.h \ ++ $(vboxvfs_0_OUTDIR)/vnode_if_typedef.h + vboxvfs_CLEAN += $(vboxvfs_DEPS) + + VBOX_AWK := /usr/bin/awk + +-$$(vboxvfs_0_OUTDIR)/vnode_if.h: $(VBOX_FREEBSD_SRC)/kern/vnode_if.src ++$$(vboxvfs_0_OUTDIR): ++ $(QUIET)$(MKDIR) -p $(vboxvfs_0_OUTDIR) ++ ++$$(vboxvfs_0_OUTDIR)/vnode_if.h: $$(vboxvfs_0_OUTDIR) $(VBOX_FREEBSD_SRC)/kern/vnode_if.src + $(call MSG_TOOL,awk,VBoxGuest,$<,$@) + $(QUIET)$(VBOX_AWK) -f $(VBOX_FREEBSD_SRC)/tools/vnode_if.awk $(VBOX_FREEBSD_SRC)/kern/vnode_if.src -h +- $(QUIET)$(MV) $(vboxvfs_0_OUTDIR)/vnode_if.h $(vboxvfs_0_OUTDIR)/vnode_if.h ++ $(QUIET)$(MV) vnode_if.h $(vboxvfs_0_OUTDIR)/vnode_if.h + +-$$(vboxvfs_0_OUTDIR)/vnode_if_newproto.h: $(VBOX_FREEBSD_SRC)/kern/vnode_if.src ++$$(vboxvfs_0_OUTDIR)/vnode_if_newproto.h: $$(vboxvfs_0_OUTDIR) $(VBOX_FREEBSD_SRC)/kern/vnode_if.src + $(call MSG_TOOL,awk,VBoxGuest,$<,$@) + $(QUIET)$(VBOX_AWK) -f $(VBOX_FREEBSD_SRC)/tools/vnode_if.awk $(VBOX_FREEBSD_SRC)/kern/vnode_if.src -p +- $(QUIET)$(MV) $(vboxvfs_0_OUTDIR)/vnode_if_newproto.h $(vboxvfs_0_OUTDIR)/vnode_if_newproto.h ++ $(QUIET)$(MV) vnode_if_newproto.h $(vboxvfs_0_OUTDIR)/vnode_if_newproto.h + +-$$(vboxvfs_0_OUTDIR)/vnode_if_typedef.h: $(VBOX_FREEBSD_SRC)/kern/vnode_if.src ++$$(vboxvfs_0_OUTDIR)/vnode_if_typedef.h: $$(vboxvfs_0_OUTDIR) $(VBOX_FREEBSD_SRC)/kern/vnode_if.src + $(call MSG_TOOL,awk,VBoxGuest,$<,$@) + $(QUIET)$(VBOX_AWK) -f $(VBOX_FREEBSD_SRC)/tools/vnode_if.awk $(VBOX_FREEBSD_SRC)/kern/vnode_if.src -q +- $(QUIET)$(MV) $(vboxvfs_0_OUTDIR)/vnode_if_typedef.h $(vboxvfs_0_OUTDIR)/vnode_if_typedef.h ++ $(QUIET)$(MV) vnode_if_typedef.h $(vboxvfs_0_OUTDIR)/vnode_if_typedef.h + + include $(FILE_KBUILD_SUB_FOOTER) + diff --git a/emulators/virtualbox-ose-70/files/patch-src_VBox_Additions_freebsd_vboxvfs_vboxvfs__vnops.c b/emulators/virtualbox-ose-70/files/patch-src_VBox_Additions_freebsd_vboxvfs_vboxvfs__vnops.c index edd43c7c03c7..1b0463711195 100644 --- a/emulators/virtualbox-ose-70/files/patch-src_VBox_Additions_freebsd_vboxvfs_vboxvfs__vnops.c +++ b/emulators/virtualbox-ose-70/files/patch-src_VBox_Additions_freebsd_vboxvfs_vboxvfs__vnops.c @@ -1382,7 +1382,7 @@ + int lkflags = cnp->cn_lkflags; + char *fullpath = NULL; + -+ *vpp = NULLVP; ++ *vpp = NULL; + error = ENOENT; + if (cnp->cn_flags & ISDOTDOT) { + error = vn_vget_ino_gen(dvp, vboxfs_vn_get_ino_alloc, @@ -1392,7 +1392,7 @@ + goto out; + + } else if (cnp->cn_namelen == 1 && cnp->cn_nameptr[0] == '.') { -+ VREF(dvp); ++ vref(dvp); + *vpp = dvp; + error = 0; + } else { diff --git a/emulators/virtualbox-ose-70/files/patch-src_VBox_Additions_x11_vboxmouse_Makefile.kmk b/emulators/virtualbox-ose-70/files/patch-src_VBox_Additions_x11_vboxmouse_Makefile.kmk index afb19c804d7a..2d0377fb3e40 100644 --- a/emulators/virtualbox-ose-70/files/patch-src_VBox_Additions_x11_vboxmouse_Makefile.kmk +++ b/emulators/virtualbox-ose-70/files/patch-src_VBox_Additions_x11_vboxmouse_Makefile.kmk @@ -1,6 +1,6 @@ ---- src/VBox/Additions/x11/vboxmouse/Makefile.kmk.orig 2019-01-25 18:24:30 UTC +--- src/VBox/Additions/x11/vboxmouse/Makefile.kmk.orig 2025-10-16 14:25:37 UTC +++ src/VBox/Additions/x11/vboxmouse/Makefile.kmk -@@ -227,10 +227,22 @@ endif # neq ($(KBUILD_TARGET),linux) +@@ -237,10 +237,22 @@ ifdef VBOX_USE_SYSTEM_XORG_HEADERS ifdef VBOX_USE_SYSTEM_XORG_HEADERS @@ -10,7 +10,7 @@ - SYSMODS := $(filter-out vboxmouse_drv%,$(SYSMODS)) + ifeq ($(KBUILD_TARGET),freebsd) + DLLS += vboxmouse_drv_system -+ vboxmouse_drv_system_TEMPLATE = VBOXGUESTR3XORGMOD ++ vboxmouse_drv_system_TEMPLATE = VBoxGuestR3XOrgMod + vboxmouse_drv_system_DEFS := $(vboxmouse_drv_70_DEFS) NO_ANSIC + vboxmouse_drv_system_INCS := \ + /usr/local/include/pixman-1 \ diff --git a/emulators/virtualbox-ose-70/files/patch-src_VBox_Additions_x11_vboxvideo_Makefile.kmk b/emulators/virtualbox-ose-70/files/patch-src_VBox_Additions_x11_vboxvideo_Makefile.kmk new file mode 100644 index 000000000000..38ef1ac68f9e --- /dev/null +++ b/emulators/virtualbox-ose-70/files/patch-src_VBox_Additions_x11_vboxvideo_Makefile.kmk @@ -0,0 +1,15 @@ +--- src/VBox/Additions/x11/vboxvideo/Makefile.kmk.orig 2025-10-22 19:22:45 UTC ++++ src/VBox/Additions/x11/vboxvideo/Makefile.kmk +@@ -415,9 +415,10 @@ ifdef VBOX_USE_SYSTEM_XORG_HEADERS + vboxvideo_drv_system_INCS += \ + $(PATH_ROOT)/src/VBox/Runtime/include \ + $(VBOX_GRAPHICS_INCS) \ +- /usr/include/xorg \ +- /usr/include/pixman-1 ++ /usr/local/include/xorg \ ++ /usr/local/include/pixman-1 + vboxvideo_drv_system_SOURCES := $(vboxvideo_drv_17_SOURCES) ++ vboxvideo_drv_system_LIBS += $(vboxvideo_drv_70_LIBS) + endif + + diff --git a/emulators/virtualbox-ose-70/files/patch-src_VBox_Runtime_r0drv_freebsd_memobj-r0drv-freebsd.c b/emulators/virtualbox-ose-70/files/patch-src_VBox_Runtime_r0drv_freebsd_memobj-r0drv-freebsd.c index cbdcb490764f..86e5984d6b82 100644 --- a/emulators/virtualbox-ose-70/files/patch-src_VBox_Runtime_r0drv_freebsd_memobj-r0drv-freebsd.c +++ b/emulators/virtualbox-ose-70/files/patch-src_VBox_Runtime_r0drv_freebsd_memobj-r0drv-freebsd.c @@ -11,16 +11,26 @@ switch (pMemFreeBSD->Core.enmType) { -@@ -155,8 +157,6 @@ DECLHIDDEN(int) rtR0MemObjNativeFree(RTR0MEMOBJ pMem) +@@ -155,9 +157,7 @@ DECLHIDDEN(int) rtR0MemObjNativeFree(RTR0MEMOBJ pMem) case RTR0MEMOBJTYPE_LOCK: { - vm_map_t pMap = kernel_map; - - if (pMemFreeBSD->Core.u.Lock.R0Process != NIL_RTR0PROCESS) +- if (pMemFreeBSD->Core.u.Lock.R0Process != NIL_RTR0PROCESS) ++ if (pMemFreeBSD->Core.u.Lock.R0Process != NIL_RTR0PROCESS) { pMap = &((struct proc *)pMemFreeBSD->Core.u.Lock.R0Process)->p_vmspace->vm_map; -@@ -197,6 +197,7 @@ DECLHIDDEN(int) rtR0MemObjNativeFree(RTR0MEMOBJ pMem) + rc = vm_map_unwire(pMap, +@@ -165,6 +165,7 @@ DECLHIDDEN(int) rtR0MemObjNativeFree(RTR0MEMOBJ pMem) + (vm_offset_t)pMemFreeBSD->Core.pv + pMemFreeBSD->Core.cb, + VM_MAP_WIRE_SYSTEM | VM_MAP_WIRE_NOHOLES); + AssertMsg(rc == KERN_SUCCESS, ("%#x", rc)); ++ } + break; + } + +@@ -197,6 +198,7 @@ DECLHIDDEN(int) rtR0MemObjNativeFree(RTR0MEMOBJ pMem) case RTR0MEMOBJTYPE_PHYS_NC: { VM_OBJECT_WLOCK(pMemFreeBSD->pObject); @@ -28,7 +38,7 @@ vm_page_t pPage = vm_page_find_least(pMemFreeBSD->pObject, 0); #if __FreeBSD_version < 1000000 vm_page_lock_queues(); -@@ -210,6 +211,14 @@ DECLHIDDEN(int) rtR0MemObjNativeFree(RTR0MEMOBJ pMem) +@@ -210,6 +212,14 @@ DECLHIDDEN(int) rtR0MemObjNativeFree(RTR0MEMOBJ pMem) #if __FreeBSD_version < 1000000 vm_page_unlock_queues(); #endif @@ -43,7 +53,7 @@ VM_OBJECT_WUNLOCK(pMemFreeBSD->pObject); vm_object_deallocate(pMemFreeBSD->pObject); break; -@@ -220,6 +229,7 @@ DECLHIDDEN(int) rtR0MemObjNativeFree(RTR0MEMOBJ pMem) +@@ -220,6 +230,7 @@ DECLHIDDEN(int) rtR0MemObjNativeFree(RTR0MEMOBJ pMem) return VERR_INTERNAL_ERROR; } @@ -51,7 +61,7 @@ return VINF_SUCCESS; } -@@ -329,7 +339,8 @@ static int rtR0MemObjFreeBSDAllocHelper(PRTR0MEMOBJFRE +@@ -329,7 +340,8 @@ static int rtR0MemObjFreeBSDAllocHelper(PRTR0MEMOBJFRE size_t cPages = atop(pMemFreeBSD->Core.cb); int rc; @@ -61,7 +71,7 @@ /* No additional object reference for auto-deallocation upon unmapping. */ #if __FreeBSD_version >= 1000055 -@@ -371,6 +382,7 @@ DECLHIDDEN(int) rtR0MemObjNativeAllocPage(PPRTR0MEMOBJ +@@ -371,6 +383,7 @@ DECLHIDDEN(int) rtR0MemObjNativeAllocPage(PPRTR0MEMOBJ DECLHIDDEN(int) rtR0MemObjNativeAllocPage(PPRTR0MEMOBJINTERNAL ppMem, size_t cb, bool fExecutable, const char *pszTag) { @@ -69,7 +79,7 @@ PRTR0MEMOBJFREEBSD pMemFreeBSD = (PRTR0MEMOBJFREEBSD)rtR0MemObjNew(sizeof(*pMemFreeBSD), RTR0MEMOBJTYPE_PAGE, NULL, cb, pszTag); if (pMemFreeBSD) -@@ -380,8 +392,10 @@ DECLHIDDEN(int) rtR0MemObjNativeAllocPage(PPRTR0MEMOBJ +@@ -380,8 +393,10 @@ DECLHIDDEN(int) rtR0MemObjNativeAllocPage(PPRTR0MEMOBJ *ppMem = &pMemFreeBSD->Core; else rtR0MemObjDelete(&pMemFreeBSD->Core); @@ -80,7 +90,7 @@ return VERR_NO_MEMORY; } -@@ -395,6 +409,7 @@ DECLHIDDEN(int) rtR0MemObjNativeAllocLow(PPRTR0MEMOBJI +@@ -395,6 +410,7 @@ DECLHIDDEN(int) rtR0MemObjNativeAllocLow(PPRTR0MEMOBJI DECLHIDDEN(int) rtR0MemObjNativeAllocLow(PPRTR0MEMOBJINTERNAL ppMem, size_t cb, bool fExecutable, const char *pszTag) { @@ -88,7 +98,7 @@ PRTR0MEMOBJFREEBSD pMemFreeBSD = (PRTR0MEMOBJFREEBSD)rtR0MemObjNew(sizeof(*pMemFreeBSD), RTR0MEMOBJTYPE_LOW, NULL, cb, pszTag); if (pMemFreeBSD) { -@@ -403,14 +418,17 @@ DECLHIDDEN(int) rtR0MemObjNativeAllocLow(PPRTR0MEMOBJI +@@ -403,14 +419,17 @@ DECLHIDDEN(int) rtR0MemObjNativeAllocLow(PPRTR0MEMOBJI *ppMem = &pMemFreeBSD->Core; else rtR0MemObjDelete(&pMemFreeBSD->Core); @@ -106,7 +116,7 @@ PRTR0MEMOBJFREEBSD pMemFreeBSD = (PRTR0MEMOBJFREEBSD)rtR0MemObjNew(sizeof(*pMemFreeBSD), RTR0MEMOBJTYPE_CONT, NULL, cb, pszTag); if (pMemFreeBSD) -@@ -423,8 +441,10 @@ DECLHIDDEN(int) rtR0MemObjNativeAllocCont(PPRTR0MEMOBJ +@@ -423,8 +442,10 @@ DECLHIDDEN(int) rtR0MemObjNativeAllocCont(PPRTR0MEMOBJ } else rtR0MemObjDelete(&pMemFreeBSD->Core); @@ -117,7 +127,7 @@ return VERR_NO_MEMORY; } -@@ -432,6 +452,7 @@ static int rtR0MemObjFreeBSDAllocPhysPages(PPRTR0MEMOB +@@ -432,6 +453,7 @@ static int rtR0MemObjFreeBSDAllocPhysPages(PPRTR0MEMOB static int rtR0MemObjFreeBSDAllocPhysPages(PPRTR0MEMOBJINTERNAL ppMem, RTR0MEMOBJTYPE enmType, size_t cb, RTHCPHYS PhysHighest, size_t uAlignment, bool fContiguous, int rcNoMem, const char *pszTag) { @@ -125,7 +135,7 @@ /* create the object. */ PRTR0MEMOBJFREEBSD pMemFreeBSD = (PRTR0MEMOBJFREEBSD)rtR0MemObjNew(sizeof(*pMemFreeBSD), enmType, NULL, cb, pszTag); if (pMemFreeBSD) -@@ -439,7 +460,8 @@ static int rtR0MemObjFreeBSDAllocPhysPages(PPRTR0MEMOB +@@ -439,7 +461,8 @@ static int rtR0MemObjFreeBSDAllocPhysPages(PPRTR0MEMOB vm_paddr_t const VmPhysAddrHigh = PhysHighest != NIL_RTHCPHYS ? PhysHighest : ~(vm_paddr_t)0; u_long const cPages = atop(cb); @@ -135,7 +145,7 @@ int rc = rtR0MemObjFreeBSDPhysAllocHelper(pMemFreeBSD->pObject, cPages, VmPhysAddrHigh, uAlignment, fContiguous, true, rcNoMem); -@@ -449,7 +471,7 @@ static int rtR0MemObjFreeBSDAllocPhysPages(PPRTR0MEMOB +@@ -449,7 +472,7 @@ static int rtR0MemObjFreeBSDAllocPhysPages(PPRTR0MEMOB { Assert(enmType == RTR0MEMOBJTYPE_PHYS); VM_OBJECT_WLOCK(pMemFreeBSD->pObject); @@ -144,7 +154,7 @@ VM_OBJECT_WUNLOCK(pMemFreeBSD->pObject); pMemFreeBSD->Core.u.Phys.fAllocated = true; } -@@ -462,8 +484,10 @@ static int rtR0MemObjFreeBSDAllocPhysPages(PPRTR0MEMOB +@@ -462,8 +485,10 @@ static int rtR0MemObjFreeBSDAllocPhysPages(PPRTR0MEMOB vm_object_deallocate(pMemFreeBSD->pObject); rtR0MemObjDelete(&pMemFreeBSD->Core); } @@ -155,7 +165,7 @@ return VERR_NO_MEMORY; } -@@ -486,6 +510,7 @@ DECLHIDDEN(int) rtR0MemObjNativeEnterPhys(PPRTR0MEMOBJ +@@ -486,6 +511,7 @@ DECLHIDDEN(int) rtR0MemObjNativeEnterPhys(PPRTR0MEMOBJ const char *pszTag) { AssertReturn(uCachePolicy == RTMEM_CACHE_POLICY_DONT_CARE, VERR_NOT_SUPPORTED); @@ -163,7 +173,7 @@ /* create the object. */ PRTR0MEMOBJFREEBSD pMemFreeBSD = (PRTR0MEMOBJFREEBSD)rtR0MemObjNew(sizeof(*pMemFreeBSD), RTR0MEMOBJTYPE_PHYS, -@@ -497,8 +522,10 @@ DECLHIDDEN(int) rtR0MemObjNativeEnterPhys(PPRTR0MEMOBJ +@@ -497,8 +523,10 @@ DECLHIDDEN(int) rtR0MemObjNativeEnterPhys(PPRTR0MEMOBJ pMemFreeBSD->Core.u.Phys.PhysBase = Phys; pMemFreeBSD->Core.u.Phys.uCachePolicy = uCachePolicy; *ppMem = &pMemFreeBSD->Core; @@ -174,7 +184,7 @@ return VERR_NO_MEMORY; } -@@ -510,6 +537,7 @@ static int rtR0MemObjNativeLockInMap(PPRTR0MEMOBJINTER +@@ -510,6 +538,7 @@ static int rtR0MemObjNativeLockInMap(PPRTR0MEMOBJINTER vm_offset_t AddrStart, size_t cb, uint32_t fAccess, RTR0PROCESS R0Process, int fFlags, const char *pszTag) { @@ -182,7 +192,7 @@ int rc; NOREF(fAccess); -@@ -519,21 +547,28 @@ static int rtR0MemObjNativeLockInMap(PPRTR0MEMOBJINTER +@@ -519,21 +548,28 @@ static int rtR0MemObjNativeLockInMap(PPRTR0MEMOBJINTER if (!pMemFreeBSD) return VERR_NO_MEMORY; @@ -219,7 +229,7 @@ return VERR_NO_MEMORY;/** @todo fix mach -> vbox error conversion for freebsd. */ } -@@ -573,6 +608,7 @@ static int rtR0MemObjNativeReserveInMap(PPRTR0MEMOBJIN +@@ -573,6 +609,7 @@ static int rtR0MemObjNativeReserveInMap(PPRTR0MEMOBJIN static int rtR0MemObjNativeReserveInMap(PPRTR0MEMOBJINTERNAL ppMem, void *pvFixed, size_t cb, size_t uAlignment, RTR0PROCESS R0Process, vm_map_t pMap, const char *pszTag) { @@ -227,7 +237,7 @@ int rc; /* -@@ -631,11 +667,13 @@ static int rtR0MemObjNativeReserveInMap(PPRTR0MEMOBJIN +@@ -631,11 +668,13 @@ static int rtR0MemObjNativeReserveInMap(PPRTR0MEMOBJIN pMemFreeBSD->Core.pv = (void *)MapAddress; pMemFreeBSD->Core.u.ResVirt.R0Process = R0Process; *ppMem = &pMemFreeBSD->Core; @@ -241,7 +251,7 @@ return rc; } -@@ -659,6 +697,8 @@ DECLHIDDEN(int) rtR0MemObjNativeMapKernel(PPRTR0MEMOBJ +@@ -659,6 +698,8 @@ DECLHIDDEN(int) rtR0MemObjNativeMapKernel(PPRTR0MEMOBJ DECLHIDDEN(int) rtR0MemObjNativeMapKernel(PPRTR0MEMOBJINTERNAL ppMem, RTR0MEMOBJ pMemToMap, void *pvFixed, size_t uAlignment, unsigned fProt, size_t offSub, size_t cbSub, const char *pszTag) { @@ -250,7 +260,7 @@ // AssertMsgReturn(!offSub && !cbSub, ("%#x %#x\n", offSub, cbSub), VERR_NOT_SUPPORTED); AssertMsgReturn(pvFixed == (void *)-1, ("%p\n", pvFixed), VERR_NOT_SUPPORTED); -@@ -713,6 +753,7 @@ DECLHIDDEN(int) rtR0MemObjNativeMapKernel(PPRTR0MEMOBJ +@@ -713,6 +754,7 @@ DECLHIDDEN(int) rtR0MemObjNativeMapKernel(PPRTR0MEMOBJ Assert((vm_offset_t)pMemFreeBSD->Core.pv == Addr); pMemFreeBSD->Core.u.Mapping.R0Process = NIL_RTR0PROCESS; *ppMem = &pMemFreeBSD->Core; @@ -258,7 +268,7 @@ return VINF_SUCCESS; } rc = vm_map_remove(kernel_map, Addr, Addr + cbSub); -@@ -721,6 +762,7 @@ DECLHIDDEN(int) rtR0MemObjNativeMapKernel(PPRTR0MEMOBJ +@@ -721,6 +763,7 @@ DECLHIDDEN(int) rtR0MemObjNativeMapKernel(PPRTR0MEMOBJ else vm_object_deallocate(pMemToMapFreeBSD->pObject); @@ -266,7 +276,7 @@ return VERR_NO_MEMORY; } -@@ -728,6 +770,8 @@ DECLHIDDEN(int) rtR0MemObjNativeMapUser(PPRTR0MEMOBJIN +@@ -728,6 +771,8 @@ DECLHIDDEN(int) rtR0MemObjNativeMapUser(PPRTR0MEMOBJIN DECLHIDDEN(int) rtR0MemObjNativeMapUser(PPRTR0MEMOBJINTERNAL ppMem, RTR0MEMOBJ pMemToMap, RTR3PTR R3PtrFixed, size_t uAlignment, unsigned fProt, RTR0PROCESS R0Process, size_t offSub, size_t cbSub, const char *pszTag) { @@ -275,7 +285,7 @@ /* * Check for unsupported stuff. */ -@@ -785,44 +829,50 @@ DECLHIDDEN(int) rtR0MemObjNativeMapUser(PPRTR0MEMOBJIN +@@ -785,44 +830,50 @@ DECLHIDDEN(int) rtR0MemObjNativeMapUser(PPRTR0MEMOBJIN if (rc == KERN_SUCCESS) { @@ -330,7 +340,7 @@ if ((fProt & RTMEM_PROT_NONE) == RTMEM_PROT_NONE) ProtectionFlags = VM_PROT_NONE; -@@ -833,7 +883,12 @@ DECLHIDDEN(int) rtR0MemObjNativeProtect(PRTR0MEMOBJINT +@@ -833,7 +884,12 @@ DECLHIDDEN(int) rtR0MemObjNativeProtect(PRTR0MEMOBJINT if ((fProt & RTMEM_PROT_EXEC) == RTMEM_PROT_EXEC) ProtectionFlags |= VM_PROT_EXECUTE; @@ -343,7 +353,7 @@ if (krc == KERN_SUCCESS) return VINF_SUCCESS; -@@ -858,11 +913,19 @@ DECLHIDDEN(RTHCPHYS) rtR0MemObjNativeGetPagePhysAddr(P +@@ -858,11 +914,19 @@ DECLHIDDEN(RTHCPHYS) rtR0MemObjNativeGetPagePhysAddr(P vm_offset_t pb = (vm_offset_t)pMemFreeBSD->Core.pv + ptoa(iPage); @@ -367,7 +377,7 @@ } case RTR0MEMOBJTYPE_MAPPING: -@@ -871,11 +934,15 @@ DECLHIDDEN(RTHCPHYS) rtR0MemObjNativeGetPagePhysAddr(P +@@ -871,11 +935,15 @@ DECLHIDDEN(RTHCPHYS) rtR0MemObjNativeGetPagePhysAddr(P if (pMemFreeBSD->Core.u.Mapping.R0Process != NIL_RTR0PROCESS) { @@ -384,7 +394,7 @@ } return vtophys(pb); } -@@ -886,9 +953,11 @@ DECLHIDDEN(RTHCPHYS) rtR0MemObjNativeGetPagePhysAddr(P +@@ -886,9 +954,11 @@ DECLHIDDEN(RTHCPHYS) rtR0MemObjNativeGetPagePhysAddr(P { RTHCPHYS addr; diff --git a/emulators/virtualbox-ose-70/files/vboxinit.in b/emulators/virtualbox-ose-70/files/vboxinit.in index 9895da9e362e..9574d7d6295e 100644 --- a/emulators/virtualbox-ose-70/files/vboxinit.in +++ b/emulators/virtualbox-ose-70/files/vboxinit.in @@ -16,7 +16,7 @@ # vboxinit_stop (str): Default stop cmd for VBoxManage controlvm. # (default: savestate) # vboxinit_start_delay (int): Default startup delay in seconds. -# (default: 0) +# (default: 1) # vboxinit_stop_delay (int): Default shutdown delay in seconds. # (default: 0) # |
