diff --git a/repos/ports/lib/mk/virtualbox-common.inc b/repos/ports/lib/mk/virtualbox-common.inc
index e3611d6730..d18bd14c89 100644
--- a/repos/ports/lib/mk/virtualbox-common.inc
+++ b/repos/ports/lib/mk/virtualbox-common.inc
@@ -34,6 +34,9 @@ VBOX_CC_OPT += -DVBOXBFE_WITHOUT_COM
VBOX_CC_OPT += -DVBOX_WITHOUT_TESTING_FEATURES
VBOX_CC_OPT += -DUSE_SDL
+VBOX_CC_OPT += -DVBOX_WITH_VIDEOHWACCEL
+
+VBOX_CC_OPT += -DVBOX_WITH_XPCOM
VBOX_CC_OPT += -DRTLOG_REL_ENABLED -DRT_STRICT -DVBOX_STRICT
@@ -44,10 +47,19 @@ VIRTUALBOX_VERSION_MAJOR := $(shell cat $(VIRTUALBOX_DIR)/Config.kmk | grep "VBO
VIRTUALBOX_VERSION_MINOR := $(shell cat $(VIRTUALBOX_DIR)/Config.kmk | grep "VBOX_VERSION_MINOR = " | grep -v "'VBOX_VERSION_MINOR" | sed "s/^.*= //")
VIRTUALBOX_VERSION_BUILD := $(shell cat $(VIRTUALBOX_DIR)/Config.kmk | grep "VBOX_VERSION_BUILD = " | grep -v "'VBOX_VERSION_BUILD" | sed "s/^.*= //")
+ifeq ($(VBOX_MACH),x86_32)
+VIRTUALBOX_PACKAGE_STRING = GenodeOS_32BIT_GENERIC
+else
+VIRTUALBOX_PACKAGE_STRING = GenodeOS_64BIT_GENERIC
+endif
+
VBOX_CC_OPT += -DVBOX_VERSION_MAJOR=$(VIRTUALBOX_VERSION_MAJOR) \
-DVBOX_VERSION_MINOR=$(VIRTUALBOX_VERSION_MINOR) \
-DVBOX_VERSION_BUILD=$(VIRTUALBOX_VERSION_BUILD) \
- -DVBOX_VERSION_STRING=\"$(VIRTUALBOX_VERSION_MAJOR).$(VIRTUALBOX_VERSION_MINOR).$(VIRTUALBOX_VERSION_BUILD)_OSE\"
+ -DVBOX_VERSION_STRING=\"$(VIRTUALBOX_VERSION_MAJOR).$(VIRTUALBOX_VERSION_MINOR).$(VIRTUALBOX_VERSION_BUILD)_OSE\" \
+ -DVBOX_PACKAGE_STRING=\"$(VIRTUALBOX_PACKAGE_STRING)\" \
+ -DVBOX_API_VERSION_STRING=\"$(VIRTUALBOX_VERSION_MAJOR)_$(VIRTUALBOX_VERSION_MINOR)\" \
+ -DIPRT_BLDCFG_VERSION_STRING=\"$(VIRTUALBOX_VERSION_MAJOR).$(VIRTUALBOX_VERSION_MINOR).$(VIRTUALBOX_VERSION_BUILD)_OSE\"
VBOX_CC_OPT += -DVBOX_HDD_NO_DYNAMIC_BACKENDS
diff --git a/repos/ports/lib/mk/virtualbox-devices.mk b/repos/ports/lib/mk/virtualbox-devices.mk
index 76b72c5940..4856db8c3f 100644
--- a/repos/ports/lib/mk/virtualbox-devices.mk
+++ b/repos/ports/lib/mk/virtualbox-devices.mk
@@ -16,12 +16,14 @@ SRC_CC += Devices/PC/DevAPIC.cpp
SRC_CC += Devices/Graphics/DevVGA.cpp
SRC_CC += Devices/Graphics/DevVGA_VBVA.cpp
SRC_CC += Devices/Graphics/DevVGA_VDMA.cpp
+SRC_CC += Devices/Graphics/DevVGA-SVGA.cpp
SRC_CC += Devices/Graphics/HGSMI/HGSMIHost.cpp
SRC_CC += Devices/Graphics/HGSMI/HGSMIHostHlp.cpp
SRC_CC += Devices/Graphics/HGSMI/SHGSMIHost.cpp
+SRC_CC += Devices/Storage/ATAPIPassthrough.cpp
SRC_CC += Devices/Storage/DevATA.cpp
SRC_CC += Devices/Storage/Debug.cpp
-SRC_CC += Devices/Storage/fdc.c
+SRC_CC += Devices/Storage/DevFdc.c
SRC_CC += Devices/Storage/DrvRawImage.cpp
SRC_CC += Devices/Network/DevE1000.cpp
SRC_CC += Devices/Network/DevE1000Phy.cpp
@@ -39,14 +41,9 @@ INC_DIR += $(VBOX_DIR)/Devices/Bus
CC_WARN += -Wno-unused-but-set-variable
-#
-# Definitions needed to compile DevVGA.cpp
-#
-# VBOX_WITH_VDMA is needed because otherwise, the alignment of the
-# VGASTATE::lock member would violate the assertion
-# '!((uintptr_t)pvSample & 7)' in 'stamR3RegisterU'.
-#
-CC_OPT += -DVBOX_WITH_WDDM -DVBOX_WITH_VDMA
+CC_OPT += -DVBOX_WITH_WDDM -DVBOX_WITH_WDDM_W8 -DVBOXWDDM_WITH_VBVA
+CC_OPT += -DVBOX_WITH_VDMA
+CC_OPT += -DVBOX_WITH_VMSVGA
Devices/Graphics/DevVGA.o: vbetables.h
diff --git a/repos/ports/lib/mk/virtualbox-drivers.mk b/repos/ports/lib/mk/virtualbox-drivers.mk
index 591cea5ea1..8129c2aeca 100644
--- a/repos/ports/lib/mk/virtualbox-drivers.mk
+++ b/repos/ports/lib/mk/virtualbox-drivers.mk
@@ -9,12 +9,12 @@ SRC_CC += Devices/PC/DrvACPI.cpp
SRC_CC += Devices/Serial/DrvChar.cpp
SRC_CC += Devices/Serial/DrvRawFile.cpp
SRC_CC += Devices/Serial/DrvHostSerial.cpp
-SRC_CC += Main/src-client/MouseImpl.cpp
+#SRC_CC += Main/src-client/MouseImpl.cpp
SRC_CC += network.cpp
vpath network.cpp $(REP_DIR)/src/virtualbox
# includes needed by 'MouseImpl.cpp'
-INC_DIR += $(VBOX_DIR)/Main/include
-INC_DIR += $(VBOX_DIR)/Frontends/VBoxBFE
+#INC_DIR += $(VBOX_DIR)/Main/include
+#INC_DIR += $(VBOX_DIR)/Frontends/VBoxBFE
diff --git a/repos/ports/lib/mk/virtualbox-main.mk b/repos/ports/lib/mk/virtualbox-main.mk
new file mode 100644
index 0000000000..0dd546d30c
--- /dev/null
+++ b/repos/ports/lib/mk/virtualbox-main.mk
@@ -0,0 +1,67 @@
+include $(REP_DIR)/lib/mk/virtualbox-common.inc
+
+VBOX_CC_OPT += -DVBOX_COM_INPROC_API_CLIENT
+
+LIBS += stdcxx
+
+SRC_CC += Main/xml/Settings.cpp
+
+SRC_CC += Main/src-all/EventImpl.cpp
+SRC_CC += Main/src-all/DisplayResampleImage.cpp
+SRC_CC += Main/src-all/DisplayUtils.cpp
+SRC_CC += Main/src-all/Global.cpp
+SRC_CC += Main/src-all/HashedPw.cpp
+SRC_CC += Main/src-all/PCIDeviceAttachmentImpl.cpp
+SRC_CC += Main/src-all/ProgressImpl.cpp
+SRC_CC += Main/src-all/SharedFolderImpl.cpp
+SRC_CC += Main/src-all/VirtualBoxBase.cpp
+
+SRC_CC += Main/src-client/AdditionsFacilityImpl.cpp
+SRC_CC += Main/src-client/BusAssignmentManager.cpp
+SRC_CC += Main/src-client/ConsoleImpl.cpp
+SRC_CC += Main/src-client/ConsoleImpl2.cpp
+SRC_CC += Main/src-client/DisplayImpl.cpp
+SRC_CC += Main/src-client/GuestImpl.cpp
+SRC_CC += Main/src-client/HGCM.cpp
+SRC_CC += Main/src-client/HGCMObjects.cpp
+SRC_CC += Main/src-client/HGCMThread.cpp
+SRC_CC += Main/src-client/KeyboardImpl.cpp
+SRC_CC += Main/src-client/MouseImpl.cpp
+SRC_CC += Main/src-client/VBoxDriversRegister.cpp
+SRC_CC += Main/src-client/VMMDevInterface.cpp
+SRC_CC += Main/src-client/SessionImpl.cpp
+
+SRC_CC += Main/src-server/AudioAdapterImpl.cpp
+SRC_CC += Main/src-server/BandwidthControlImpl.cpp
+SRC_CC += Main/src-server/BandwidthGroupImpl.cpp
+SRC_CC += Main/src-server/BIOSSettingsImpl.cpp
+SRC_CC += Main/src-server/DHCPServerImpl.cpp
+SRC_CC += Main/src-server/GuestOSTypeImpl.cpp
+SRC_CC += Main/src-server/MachineImpl.cpp
+SRC_CC += Main/src-server/MachineImplCloneVM.cpp
+SRC_CC += Main/src-server/MediumAttachmentImpl.cpp
+SRC_CC += Main/src-server/MediumImpl.cpp
+SRC_CC += Main/src-server/MediumFormatImpl.cpp
+SRC_CC += Main/src-server/MediumLock.cpp
+SRC_CC += Main/src-server/NATEngineImpl.cpp
+SRC_CC += Main/src-server/NetworkAdapterImpl.cpp
+SRC_CC += Main/src-server/NetworkServiceRunner.cpp
+SRC_CC += Main/src-server/ParallelPortImpl.cpp
+SRC_CC += Main/src-server/SerialPortImpl.cpp
+SRC_CC += Main/src-server/SnapshotImpl.cpp
+SRC_CC += Main/src-server/StorageControllerImpl.cpp
+SRC_CC += Main/src-server/SystemPropertiesImpl.cpp
+SRC_CC += Main/src-server/TokenImpl.cpp
+SRC_CC += Main/src-server/USBControllerImpl.cpp
+SRC_CC += Main/src-server/USBDeviceFiltersImpl.cpp
+SRC_CC += Main/src-server/VirtualBoxImpl.cpp
+SRC_CC += Main/src-server/VRDEServerImpl.cpp
+
+SRC_CC += Main/glue/AutoLock.cpp
+SRC_CC += Main/glue/EventQueue.cpp
+SRC_CC += Main/glue/string.cpp
+SRC_CC += Main/glue/xpcom/helpers.cpp
+
+INC_DIR += $(VBOX_DIR)/Main/xml
+INC_DIR += $(VBOX_DIR)/Main/include
+INC_DIR += $(REP_DIR)/src/virtualbox/frontend
diff --git a/repos/ports/lib/mk/virtualbox-runtime.mk b/repos/ports/lib/mk/virtualbox-runtime.mk
index 3101fe9797..7a8b336e81 100644
--- a/repos/ports/lib/mk/virtualbox-runtime.mk
+++ b/repos/ports/lib/mk/virtualbox-runtime.mk
@@ -12,6 +12,7 @@ FILTERED_OUT_SRC_CC = RTLogDefaultInit-generic.cpp \
RTTimeLocalExplode-generic.cpp \
semrw-lockless-generic.cpp \
tls-generic.cpp \
+ fs-stubs-generic.cpp \
RTSemEventMultiWait-2-ex-generic.cpp \
RTLogWriteStdErr-generic.cpp \
RTLogWriteStdOut-generic.cpp \
@@ -34,15 +35,18 @@ SRC_CC += Runtime/common/log/logrel.cpp \
SRC_CC += Runtime/common/err/RTErrConvertFromErrno.cpp
SRC_CC += Runtime/common/alloc/memcache.cpp
SRC_CC += Runtime/common/alloc/heapoffset.cpp
+SRC_CC += Runtime/common/checksum/alt-md5.cpp
+SRC_CC += Runtime/common/checksum/alt-sha512.cpp
SRC_CC += Runtime/common/checksum/crc32.cpp
-SRC_CC += Runtime/common/checksum/md5.cpp
SRC_CC += Runtime/common/checksum/ipv4.cpp
+SRC_CC += Runtime/common/checksum/sha512str.cpp
SRC_CC += Runtime/common/log/log.cpp
SRC_CC += Runtime/common/log/log.cpp
SRC_CC += Runtime/common/log/logellipsis.cpp
SRC_CC += Runtime/common/log/logrelellipsis.cpp
SRC_CC += Runtime/common/log/logformat.cpp
SRC_CC += Runtime/common/misc/assert.cpp
+SRC_CC += Runtime/common/misc/buildconfig.cpp
SRC_CC += Runtime/common/misc/lockvalidator.cpp
SRC_CC += Runtime/common/misc/once.cpp
SRC_CC += Runtime/common/misc/sg.cpp
@@ -52,29 +56,36 @@ SRC_CC += Runtime/common/misc/RTAssertMsg2AddWeak.cpp
SRC_CC += Runtime/common/misc/RTAssertMsg2AddWeakV.cpp
SRC_CC += Runtime/common/misc/RTAssertMsg2Weak.cpp
SRC_CC += Runtime/common/misc/RTAssertMsg2WeakV.cpp
+SRC_CC += Runtime/common/misc/RTMemWipeThoroughly.cpp
+SRC_CC += Runtime/common/path/comparepaths.cpp
SRC_CC += Runtime/common/path/RTPathAbsDup.cpp
SRC_CC += Runtime/common/path/RTPathAbsEx.cpp
+SRC_CC += Runtime/common/path/RTPathAppendEx.cpp
SRC_CC += Runtime/common/path/RTPathCalcRelative.cpp
SRC_CC += Runtime/common/path/RTPathExt.cpp
SRC_CC += Runtime/common/path/RTPathFilename.cpp
SRC_CC += Runtime/common/path/RTPathHasPath.cpp
SRC_CC += Runtime/common/path/RTPathJoinA.cpp
+SRC_CC += Runtime/common/path/RTPathJoinEx.cpp
SRC_CC += Runtime/common/path/RTPathParse.cpp
+SRC_CC += Runtime/common/path/RTPathParseSimple.cpp
SRC_CC += Runtime/common/path/RTPathRealDup.cpp
+SRC_CC += Runtime/common/path/RTPathStartsWithRoot.cpp
SRC_CC += Runtime/common/path/RTPathStripExt.cpp
SRC_CC += Runtime/common/path/RTPathStripFilename.cpp
SRC_CC += Runtime/common/path/RTPathStripTrailingSlash.cpp
SRC_CC += Runtime/common/path/rtPathVolumeSpecLen.cpp
+SRC_CC += Runtime/common/path/rtPathRootSpecLen.cpp
SRC_CC += Runtime/common/rand/rand.cpp
SRC_CC += Runtime/common/rand/randadv.cpp
SRC_CC += Runtime/common/rand/randparkmiller.cpp
-SRC_CC += Runtime/common/zip/zip.cpp
SRC_CC += Runtime/common/string/base64.cpp
SRC_CC += Runtime/common/string/RTStrCmp.cpp
SRC_CC += Runtime/common/string/RTStrCopy.cpp
SRC_CC += Runtime/common/string/RTStrCopyEx.cpp
SRC_CC += Runtime/common/string/RTStrNCmp.cpp
SRC_CC += Runtime/common/string/RTStrNLen.cpp
+SRC_CC += Runtime/common/string/RTStrPrintHexBytes.cpp
SRC_CC += Runtime/common/string/simplepattern.cpp
SRC_CC += Runtime/common/string/straprintf.cpp
SRC_CC += Runtime/common/string/strformat.cpp
@@ -84,10 +95,12 @@ SRC_CC += Runtime/common/string/stringalloc.cpp
SRC_CC += Runtime/common/string/strprintf.cpp
SRC_CC += Runtime/common/string/strstrip.cpp
SRC_CC += Runtime/common/string/strtonum.cpp
-SRC_CC += Runtime/common/string/unidata.cpp
-SRC_CC += Runtime/common/string/utf-16.cpp
-SRC_CC += Runtime/common/string/utf-8-case.cpp
+SRC_CC += Runtime/common/string/unidata-lower.cpp
+SRC_CC += Runtime/common/string/unidata-upper.cpp
SRC_CC += Runtime/common/string/utf-8.cpp
+SRC_CC += Runtime/common/string/utf-8-case.cpp
+SRC_CC += Runtime/common/string/utf-16.cpp
+SRC_CC += Runtime/common/string/utf-16-case.cpp
SRC_CC += Runtime/common/table/avlpv.cpp
SRC_CC += Runtime/common/table/avlroioport.cpp
SRC_CC += Runtime/common/table/avlrogcphys.cpp
@@ -96,6 +109,8 @@ SRC_CC += Runtime/common/time/time.cpp
SRC_CC += Runtime/common/time/timeprog.cpp
SRC_CC += Runtime/common/time/timesup.cpp
SRC_CC += Runtime/common/time/timesupref.cpp
+SRC_CC += Runtime/common/vfs/vfsbase.cpp
+SRC_CC += Runtime/common/zip/zip.cpp
SRC_CC += Runtime/r3/alloc.cpp
SRC_CC += Runtime/r3/dir.cpp
SRC_CC += Runtime/r3/fileio.cpp
@@ -106,12 +121,12 @@ SRC_CC += Runtime/r3/posix/dir-posix.cpp
SRC_CC += Runtime/r3/posix/env-posix.cpp
SRC_CC += Runtime/r3/posix/fileio-posix.cpp
SRC_CC += Runtime/r3/posix/fileio2-posix.cpp
+SRC_CC += Runtime/r3/posix/fs-posix.cpp
SRC_CC += Runtime/r3/posix/fs2-posix.cpp
SRC_CC += Runtime/r3/posix/fs3-posix.cpp
SRC_CC += Runtime/r3/posix/path-posix.cpp
SRC_CC += Runtime/r3/posix/path2-posix.cpp
SRC_CC += Runtime/r3/posix/pipe-posix.cpp
-SRC_CC += Runtime/r3/posix/poll-posix.cpp
SRC_CC += Runtime/r3/posix/RTTimeNow-posix.cpp
SRC_CC += Runtime/r3/posix/semeventmulti-posix.cpp
SRC_CC += Runtime/r3/posix/semevent-posix.cpp
@@ -128,6 +143,7 @@ SRC_S += Runtime/common/asm/ASMAtomicCmpXchgU64.asm
SRC_S += Runtime/common/asm/ASMAtomicReadU64.asm
SRC_S += Runtime/common/asm/ASMAtomicUoReadU64.as
SRC_S += Runtime/common/asm/ASMAtomicXchgU64.asm
+SRC_S += Runtime/common/asm/ASMCpuIdExSlow.asm
SRC_CC += Runtime/common/err/errmsg.cpp
Runtime/common/err/errmsg.o: errmsgdata.h
diff --git a/repos/ports/lib/mk/virtualbox-storage.mk b/repos/ports/lib/mk/virtualbox-storage.mk
index cebc44eeaf..5797d8f413 100644
--- a/repos/ports/lib/mk/virtualbox-storage.mk
+++ b/repos/ports/lib/mk/virtualbox-storage.mk
@@ -11,6 +11,7 @@ SRC_CC += Storage/QED.cpp
SRC_CC += Storage/RAW.cpp
SRC_CC += Storage/VD.cpp
SRC_CC += Storage/VDI.cpp
+SRC_CC += Storage/VDIfVfs.cpp
SRC_CC += Storage/VHD.cpp
SRC_CC += Storage/VHDX.cpp
SRC_CC += Storage/VMDK.cpp
diff --git a/repos/ports/lib/mk/virtualbox-vmm.mk b/repos/ports/lib/mk/virtualbox-vmm.mk
index 33f241999b..219707a6af 100644
--- a/repos/ports/lib/mk/virtualbox-vmm.mk
+++ b/repos/ports/lib/mk/virtualbox-vmm.mk
@@ -17,6 +17,7 @@ SRC_CC += VMM/VMMR3/PDMCritSect.cpp
SRC_CC += VMM/VMMAll/PDMAll.cpp
SRC_CC += VMM/VMMAll/PDMAllQueue.cpp
SRC_CC += VMM/VMMAll/PDMAllCritSect.cpp
+SRC_CC += VMM/VMMAll/PDMAllCritSectRw.cpp
SRC_CC += VMM/VMMR3/TM.cpp
SRC_CC += VMM/VMMAll/TMAll.cpp
@@ -32,33 +33,26 @@ SRC_CC += VMM/VMMR3/PDMDevMiscHlp.cpp
SRC_CC += VMM/VMMR3/PDMDriver.cpp
SRC_CC += VMM/VMMR3/PDMThread.cpp
+SRC_CC += VMM/VMMAll/CPUMAllMsrs.cpp
SRC_CC += VMM/VMMAll/CPUMAllRegs.cpp
SRC_CC += VMM/VMMR3/VMEmt.cpp
SRC_CC += VMM/VMMR3/VMReq.cpp
+SRC_CC += VMM/VMMAll/DBGFAll.cpp
SRC_CC += VMM/VMMR3/DBGFInfo.cpp
SRC_CC += VMM/VMMR3/CPUM.cpp
+SRC_CC += VMM/VMMR3/CPUMR3CpuId.cpp
+SRC_CC += VMM/VMMR3/CPUMR3Db.cpp
SRC_CC += VMM/VMMAll/EMAll.cpp
SRC_CC += VMM/VMMR3/EM.cpp
+SRC_CC += VMM/VMMR3/EMHM.cpp
SRC_CC += VMM/VMMR3/TRPM.cpp
SRC_CC += VMM/VMMAll/SELMAll.cpp
-SRC_CC += VMM/VMMAll/PATMAll.cpp
-SRC_CC += VMM/VMMR3/PATM.cpp
-SRC_CC += VMM/VMMR3/PATMPatch.cpp
-SRC_CC += VMM/VMMR3/PATMA.asm
-SRC_CC += VMM/VMMR3/PATMSSM.cpp
-SRC_CC += VMM/VMMR3/PATMGuest.cpp
-
-SRC_CC += VMM/VMMAll/CSAMAll.cpp
-SRC_CC += VMM/VMMR3/CSAM.cpp
-
-SRC_CC += VMM/VMMR3/EMHwaccm.cpp
-
SRC_CC += VMM/VMMAll/REMAll.cpp
CC_OPT += -DVBOX_IN_VMM
diff --git a/repos/ports/lib/mk/virtualbox-xml.mk b/repos/ports/lib/mk/virtualbox-xml.mk
new file mode 100644
index 0000000000..e192ff0092
--- /dev/null
+++ b/repos/ports/lib/mk/virtualbox-xml.mk
@@ -0,0 +1,23 @@
+include $(REP_DIR)/lib/mk/virtualbox-common.inc
+
+ZLIB_DIR = $(VIRTUALBOX_DIR)/src/libs/zlib-1.2.6
+LIBXML_DIR = $(VIRTUALBOX_DIR)/src/libs/libxml2-2.6.31
+
+INC_DIR += $(ZLIB_DIR)
+INC_DIR += $(LIBXML_DIR)/include
+INC_DIR += $(call select_from_ports,libiconv)/include/iconv
+
+LIBS += stdcxx
+
+VBOX_CC_OPT += -DLIBXML_THREAD_ENABLED
+
+SRC_C += catalog.c chvalid.c debugXML.c dict.c encoding.c error.c entities.c
+SRC_C += globals.c hash.c list.c parser.c parserInternals.c pattern.c
+SRC_C += relaxng.c threads.c tree.c uri.c valid.c HTMLtree.c HTMLparser.c
+SRC_C += SAX.c SAX2.c xmlIO.c xmlmemory.c xmlreader.c xmlregexp.c xmlschemas.c
+SRC_C += xmlschemastypes.c xmlsave.c xmlstring.c xmlunicode.c xpath.c xpointer.c
+
+SRC_CC += Runtime/r3/xml.cpp
+SRC_CC += Runtime/common/string/ministring.cpp
+
+vpath %.c $(LIBXML_DIR)
diff --git a/repos/ports/ports/virtualbox.hash b/repos/ports/ports/virtualbox.hash
index bda6f9ae8f..c3cd2e976b 100644
--- a/repos/ports/ports/virtualbox.hash
+++ b/repos/ports/ports/virtualbox.hash
@@ -1 +1 @@
-cc82990bfeded59df2befde90f20004f2a5a331d
+fd1a0bb3692bfb4448f3b3f8978fc1c5d037e2c4
diff --git a/repos/ports/ports/virtualbox.port b/repos/ports/ports/virtualbox.port
index 992b945502..9bb9bfe44a 100644
--- a/repos/ports/ports/virtualbox.port
+++ b/repos/ports/ports/virtualbox.port
@@ -1,52 +1,96 @@
LICENSE := GPLv2
-VERSION := 4.2.24
+VERSION := 4.3.16
DOWNLOADS := virtualbox.archive
VIRTUALBOX_TBZ2 := VirtualBox-$(VERSION).tar.bz2
URL(virtualbox) := http://download.virtualbox.org/virtualbox/$(VERSION)/$(VIRTUALBOX_TBZ2)
DIR(virtualbox) := src/app/virtualbox
-SHA(virtualbox) := 4685a898fb426ae59081a3b3adf3f5b8c5cfd34e
+SHA(virtualbox) := e4c23b713e8715b8e0172fa066f2197756e901fe
-PATCHES := src/virtualbox/*.patch
+PATCHES_LIST := acpi_drv dev_e1000 eminternal fake_pci_vendor iconv mouse
+PATCHES_LIST += pdm_driver pdm_queue_irqs sharedfolder_pagelist timer
+PATCHES_LIST += time-log-deadlock vbetables-gen vbox_inc vbox_main network
+PATCHES_LIST += vga_fb vga_vbva vmdk vmmdev avoid_yield
+
+PATCHES := $(addsuffix .patch, $(PATCHES_LIST))
+PATCHES := $(addprefix src/virtualbox/patches/, $(PATCHES))
+
+$(call check_tool,xsltproc)
+
+VBOX_MAIN_GLUE := AutoLock EventQueue string xpcom/helpers
+
+VBOX_MAIN_ALL := DisplayResampleImage DisplayUtils EventImpl Global HashedPw
+VBOX_MAIN_ALL += PCIDeviceAttachmentImpl ProgressImpl SharedFolderImpl
+VBOX_MAIN_ALL += VirtualBoxBase
+
+VBOX_MAIN_CLI := AdditionsFacilityImpl ConsoleImpl2 DisplayImpl HGCM HGCMThread
+VBOX_MAIN_CLI += HGCMObjects
+VBOX_MAIN_CLI += KeyboardImpl SessionImpl VMMDevInterface BusAssignmentManager
+VBOX_MAIN_CLI += ConsoleImpl GuestImpl MouseImpl VBoxDriversRegister
+
+VBOX_MAIN_SRV := AudioAdapterImpl DHCPServerImpl MediumAttachmentImpl
+VBOX_MAIN_SRV += NATEngineImpl SerialPortImpl USBControllerImpl
+VBOX_MAIN_SRV += BandwidthControlImpl GuestOSTypeImpl MediumFormatImpl
+VBOX_MAIN_SRV += NetworkAdapterImpl SnapshotImpl USBDeviceFiltersImpl
+VBOX_MAIN_SRV += BandwidthGroupImpl MachineImplCloneVM MediumImpl
+VBOX_MAIN_SRV += NetworkServiceRunner StorageControllerImpl VirtualBoxImpl
+VBOX_MAIN_SRV += BIOSSettingsImpl MachineImpl MediumLock ParallelPortImpl
+VBOX_MAIN_SRV += SystemPropertiesImpl VRDEServerImpl TokenImpl
+
+VBOX_MAIN_INC := AdditionsFacilityImpl AudioAdapterImpl AudioSnifferInterface
+VBOX_MAIN_INC += AutoCaller AutostartDb AutoStateDep BandwidthControlImpl
+VBOX_MAIN_INC += BandwidthGroupImpl BIOSSettingsImpl BusAssignmentManager Nvram
+VBOX_MAIN_INC += ConsoleEvents ConsoleImpl DHCPServerImpl DisplayImpl HostImpl
+VBOX_MAIN_INC += DisplayUtils EventImpl FramebufferImpl Global
+VBOX_MAIN_INC += GuestCtrlImplPrivate GuestDirectoryImpl GuestDnDImpl Logging
+VBOX_MAIN_INC += GuestFileImpl GuestFsObjInfoImpl GuestImpl GuestOSTypeImpl
+VBOX_MAIN_INC += GuestSessionImpl HashedPw KeyboardImpl MachineImplCloneVM
+VBOX_MAIN_INC += HGCM HGCMThread HGCMObjects
+VBOX_MAIN_INC += MachineImpl MediumAttachmentImpl MediumFormatImpl MediumImpl
+VBOX_MAIN_INC += MediumLock MouseImpl NATEngineImpl NATNetworkImpl objectslist
+VBOX_MAIN_INC += NetworkAdapterImpl NetworkServiceRunner ParallelPortImpl
+VBOX_MAIN_INC += PCIDeviceAttachmentImpl Performance ProgressImpl SnapshotImpl
+VBOX_MAIN_INC += ProgressProxyImpl SerialPortImpl SessionImpl SharedFolderImpl
+VBOX_MAIN_INC += StorageControllerImpl SystemPropertiesImpl TokenImpl VMMDev
+VBOX_MAIN_INC += USBControllerImpl USBDeviceFilterImpl USBDeviceFiltersImpl
+VBOX_MAIN_INC += VirtualBoxImpl VRDEServerImpl GuestProcessImpl
+
+VBOX_SRC_VBOX := VMM Devices Runtime GuestHost/HGSMI Storage Disassembler
+VBOX_SRC_VBOX += HostServices/SharedFolders Main/xml/Settings.cpp
+VBOX_SRC_VBOX += Main/xml/VirtualBox-settings.xsd Main/xml/SchemaDefs.xsl
+VBOX_SRC_VBOX += $(addsuffix .h, $(addprefix Main/include/, $(VBOX_MAIN_INC)))
+VBOX_SRC_VBOX += $(addsuffix .cpp, $(addprefix Main/src-client/, $(VBOX_MAIN_CLI)))
+VBOX_SRC_VBOX += $(addsuffix .cpp, $(addprefix Main/src-server/, $(VBOX_MAIN_SRV)))
+VBOX_SRC_VBOX += $(addsuffix .cpp, $(addprefix Main/src-all/, $(VBOX_MAIN_ALL)))
+VBOX_SRC_VBOX += $(addsuffix .cpp, $(addprefix Main/glue/, $(VBOX_MAIN_GLUE)))
+
+VBOX_INC += types.h cdefs.h hgcmsvc.h err.h dis.h disopcode.h log.h sup.h pci.h
+VBOX_INC += param.h ostypes.h VMMDev.h VMMDev2.h vusb.h dbg.h version.h HGSMI
+VBOX_INC += VBoxVideo.h Hardware bioslogo.h scsi.h shflsvc.h VBoxGuest2.h vd.h
+VBOX_INC += vd-plugin.h vd-ifs.h vd-ifs-internal.h vd-image-backend.h
+VBOX_INC += vd-cache-backend.h vd-filter-backend.h msi.h asmdefs.mac err.mac
+VBOX_INC += VBoxVideoHost3D.h VBoxVideo3D.h settings.h VBoxAuth.h
+
+VBOX_INC_COM := array.h assert.h AutoLock.h ErrorInfo.h EventQueue.h Guid.h
+VBOX_INC_COM += list.h MultiResult.h string.h
+
+VBOX_CONTENT += $(addprefix src/VBox/, $(VBOX_SRC_VBOX))
+VBOX_CONTENT += $(addprefix include/VBox/, $(VBOX_INC))
+VBOX_CONTENT += $(addprefix include/VBox/com/, $(VBOX_INC_COM))
+
+VBOX_CONTENT += src/libs/zlib-1.2.6 src/libs/liblzf-3.4 src/libs/libxml2-2.6.31
+VBOX_CONTENT += src/recompiler include/VBox/vmm include/iprt Config.kmk
-VIRTUALBOX_CONTENT = src/VBox/VMM \
- src/VBox/Devices \
- src/VBox/Runtime \
- src/VBox/GuestHost/HGSMI \
- src/VBox/Frontends/VBoxBFE \
- src/VBox/Storage \
- src/VBox/Disassembler \
- src/VBox/HostServices/SharedFolders \
- src/recompiler \
- src/VBox/Main/include/MouseImpl.h \
- src/VBox/Main/include/ConsoleEvents.h \
- src/VBox/Main/src-client/MouseImpl.cpp \
- src/libs/zlib-1.2.6 \
- src/libs/liblzf-3.4 \
- include/VBox/vmm \
- include/iprt \
- $(addprefix include/VBox/,types.h cdefs.h hgcmsvc.h \
- err.h dis.h disopcode.h \
- log.h sup.h pci.h param.h \
- ostypes.h VMMDev.h VMMDev2.h \
- vusb.h dbg.h version.h \
- VBoxVideo.h Hardware bioslogo.h \
- scsi.h shflsvc.h VBoxGuest2.h \
- HGSMI) \
- include/VBox/msi.h \
- include/VBox/DevPCNet.h \
- include/VBox/asmdefs.mac \
- include/VBox/err.mac \
- include/VBox/vd.h \
- include/VBox/vd-ifs.h \
- include/VBox/vd-plugin.h \
- include/VBox/vd-ifs-internal.h \
- include/VBox/vd-cache-plugin.h \
- Config.kmk \
- include/VBox/VBoxVideo3D.h
TAR_OPT(virtualbox) := \
--strip-components 1 \
- $(addprefix $(VIRTUALBOX_TBZ2:.tar.bz2=)/,$(VIRTUALBOX_CONTENT)) \
- --exclude SDLConsole.h --exclude SDLFramebuffer.h
+ $(addprefix $(VIRTUALBOX_TBZ2:.tar.bz2=)/,$(VBOX_CONTENT))
+
+
+default : additional_steps
+additional_steps : $(DOWNLOADS)
+ xsltproc --stringparam mode declare \
+ -o src/app/virtualbox/src/VBox/Main/xml/SchemaDefs.h \
+ src/app/virtualbox/src/VBox/Main/xml/SchemaDefs.xsl \
+ src/app/virtualbox/src/VBox/Main/xml/VirtualBox-settings.xsd
diff --git a/repos/ports/run/test.vbox b/repos/ports/run/test.vbox
new file mode 100644
index 0000000000..3130b51669
--- /dev/null
+++ b/repos/ports/run/test.vbox
@@ -0,0 +1,161 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/repos/ports/run/virtualbox.run b/repos/ports/run/virtualbox.run
index 3c66a40781..a1c24e3f71 100644
--- a/repos/ports/run/virtualbox.run
+++ b/repos/ports/run/virtualbox.run
@@ -98,20 +98,17 @@ append_if [expr $use_net] config {
append config {
-
-
-
-
-}
-
-append_if [expr $use_net] config {
- }
-
-append config {
+
+
-
+
+
+
+
+
+
@@ -121,7 +118,9 @@ append config {
install_config $config
-set boot_modules { core init timer virtualbox test.iso }
+exec cp ${genode_dir}/repos/ports/run/test.vbox bin/.
+
+set boot_modules { core init timer virtualbox test.iso test.vbox }
# platform-specific modules
lappend_if [have_spec ps2] boot_modules ps2_drv
@@ -132,9 +131,10 @@ lappend_if [have_spec linux] boot_modules fb_sdl
lappend_if [have_spec nova] boot_modules pci_device_pd
lappend_if [have_spec x86] boot_modules rtc_drv
-append boot_modules { ld.lib.so libc.lib.so libm.lib.so pthread.lib.so
- libc_lock_pipe.lib.so libc_terminal.lib.so
- libiconv.lib.so }
+append boot_modules {
+ ld.lib.so libc.lib.so libm.lib.so pthread.lib.so libc_lock_pipe.lib.so
+ libc_terminal.lib.so libiconv.lib.so stdcxx.lib.so
+}
append_if [expr $use_net] boot_modules { nic_drv }
diff --git a/repos/ports/run/virtualbox_auto.inc b/repos/ports/run/virtualbox_auto.inc
index 4943378818..e2671beaa4 100644
--- a/repos/ports/run/virtualbox_auto.inc
+++ b/repos/ports/run/virtualbox_auto.inc
@@ -15,9 +15,10 @@ append build_components {
drivers/timer
}
-lappend_if [have_spec acpi] build_components drivers/acpi
-lappend_if [have_spec pci] build_components drivers/pci
-lappend_if [have_spec x86] build_components drivers/rtc
+lappend_if [have_spec acpi] build_components drivers/acpi
+lappend_if [have_spec pci] build_components drivers/pci
+lappend_if [have_spec x86] build_components drivers/rtc
+lappend_if [expr $use_ram_fs] build_components server/ram_fs
build $build_components
@@ -73,6 +74,21 @@ set config {
}
+append_if [expr $use_ram_fs] config {
+
+
+
+
+
+
+
+
+
+
+
+
+ }
+
append_if [have_spec acpi] config {
@@ -127,9 +143,9 @@ append boot_modules {
part_blk ahci
ld.lib.so libc.lib.so libm.lib.so pthread.lib.so
libc_lock_pipe.lib.so libc_terminal.lib.so
- libiconv.lib.so
+ libiconv.lib.so stdcxx.lib.so
rump.lib.so rump_fs.lib.so rump_fs
- virtualbox vbox-auto-test-helper
+ virtualbox
}
#
@@ -162,6 +178,9 @@ append boot_modules {
# }
#}
+lappend_if [expr $use_ram_fs] boot_modules ram_fs
+lappend_if [expr $use_ram_fs] boot_modules overlay.vdi
+
# platform-specific modules
lappend_if [have_spec ps2] boot_modules ps2_drv
lappend_if [have_spec acpi] boot_modules acpi_drv
@@ -169,5 +188,3 @@ lappend_if [have_spec pci] boot_modules pci_drv
lappend_if [have_spec framebuffer] boot_modules fb_drv
lappend_if [have_spec nova] boot_modules pci_device_pd
lappend_if [have_spec x86] boot_modules rtc_drv
-
-build_boot_image $boot_modules
diff --git a/repos/ports/run/virtualbox_auto_disk.run b/repos/ports/run/virtualbox_auto_disk.run
index 3e8b30401e..296a228f8b 100644
--- a/repos/ports/run/virtualbox_auto_disk.run
+++ b/repos/ports/run/virtualbox_auto_disk.run
@@ -1,62 +1,45 @@
# Tested for nova.
assert_spec nova
-set use_vdi 1
-set use_iso 0
-set vdi_image "win7.vdi"
-
-set config_of_app {
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+if {[is_qemu_available]} {
+ puts "\nRun script does not support Qemu.\n"
+ exit
}
-source ${genode_dir}/repos/ports/run/virtualbox_auto.inc
+set vdi_image "win7.vdi"
+# Write overlay back to harddisk if set to 0
+set use_ram_fs 0
-run_genode_until "vbox_auto_test_helper is done." 20
-exec kill [exp_pid −i $spawn_id]
-
-# reset values used before
set build_components { }
-set boot_modules { }
+set boot_modules { vm_auto_disk.vbox }
set config_of_app {
-
- }
+
+
+
+ }
-if {$use_iso} {
-append config_of_app "
- "
-}
-
-if {$use_vdi} {
-append config_of_app "
- "
-}
+append_if [expr $use_ram_fs] config_of_app {
+ }
append config_of_app {
-
-
-
+
+
-
+ }
+
+append_if [expr $use_ram_fs] config_of_app {
+
+
+
+ }
+
+append config_of_app {
@@ -65,10 +48,18 @@ append config_of_app {
source ${genode_dir}/repos/ports/run/virtualbox_auto.inc
+# copy vbox configuration to bin directory
+exec cp ${genode_dir}/repos/ports/run/vm_auto_disk.vbox bin/.
-run_genode_until "ignore resize request to 720x400" 20
-run_genode_until "ignore resize request to 640x480" 25 $spawn_id
-run_genode_until "ignore resize request to 800x600" 35 $spawn_id
-run_genode_until {\[init -\> vbox\].*Guest Additions capability report:.*seamless: yes, hostWindowMapping: no, graphics: yes} 60 $spawn_id
+build_boot_image $boot_modules
+
+run_genode_until "fb resize : 1024x768@16 -> 720x400@0" 40
+run_genode_until "fb resize : 720x400@16 -> 640x480@0" 25 $spawn_id
+run_genode_until "fb resize : 640x480@16 -> 800x600@16" 45 $spawn_id
+
+run_genode_until {\[init -\> vbox\].*Guest Additions capability report:.*seamless: yes, hostWindowMapping: no, graphics: yes} 180 $spawn_id
+
+# cleanup bin directory - remove vbox file
+exec rm bin/vm_auto_disk.vbox
puts "\nTest succeeded"
diff --git a/repos/ports/run/virtualbox_auto_share.run b/repos/ports/run/virtualbox_auto_share.run
index a7952c69d5..85f0bd8c16 100644
--- a/repos/ports/run/virtualbox_auto_share.run
+++ b/repos/ports/run/virtualbox_auto_share.run
@@ -57,7 +57,6 @@
# beforehand. test.bat contains the actual instructions to be performed by
# the VM - for this script to copy the test.bin file from D: to E:.
-
if {[is_qemu_available]} {
puts "\nRun script does not support Qemu.\n"
exit
@@ -66,11 +65,8 @@ if {[is_qemu_available]} {
# Tested for nova.
assert_spec nova
-#
-# Build Noux packages only once
-#
-foreach pkg {bash coreutils} {
- lappend_if [expr ![file exists bin/$pkg]] build_components noux-pkg/$pkg }
+# Write overlay back to harddisk if set to 0
+set use_ram_fs 0
#
# Create .bat file to be executed by Win VM
@@ -96,52 +92,28 @@ catch { exec unix2dos bin/template.bat }
#
catch { exec dd if=/dev/urandom of=bin/test.bin bs=4096 count=8160 }
-
-#
-# Step 0: prepare overlay.vdi for a clean run of the VM
-#
-set config_of_app {
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-}
-
-source ${genode_dir}/repos/ports/run/virtualbox_auto.inc
-
-run_genode_until "vbox_auto_test_helper is done." 20
-exec kill [exp_pid −i $spawn_id]
-
-
-
#
# Step 1: prepare and start the actual VM
#
-exec tar cfv bin/bash.tar -h -C bin/bash .
-exec tar cfv bin/coreutils.tar -h -C bin/coreutils .
-
set build_components {
- server/ram_fs
- server/tcp_terminal drivers/nic
- noux/minimal
+ server/ram_fs
+ server/tcp_terminal drivers/nic
+ lib/libc_noux
+ noux/minimal
}
+#
+# Build Noux packages only once
+#
+foreach pkg {bash coreutils} {
+ lappend_if [expr ![file exists bin/$pkg]] build_components noux-pkg/$pkg }
+
set boot_modules {
ram_fs
noux libc_noux.lib.so bash.tar coreutils.tar
tcp_terminal lwip.lib.so nic_drv
test.bin template.bat
+ vm_auto_share.vbox
}
set config_of_app {
@@ -213,21 +185,32 @@ set config_of_app {
-
-
-
-
-
+
+
+ }
+
+append_if [expr $use_ram_fs] config_of_app {
+ }
+
+append config_of_app {
-
+ }
+
+append_if [expr $use_ram_fs] config_of_app {
+
+
+
+ }
+
+append config_of_app {
@@ -244,6 +227,12 @@ set config_of_app {
source ${genode_dir}/repos/ports/run/virtualbox_auto.inc
+exec tar cfv bin/bash.tar -h -C bin/bash .
+exec tar cfv bin/coreutils.tar -h -C bin/coreutils .
+exec cp ${genode_dir}/repos/ports/run/vm_auto_share.vbox bin/.
+
+build_boot_image $boot_modules
+
#
# Step 2: Read out TCP/IP address of tcp_terminal running on Genode target
#
@@ -256,6 +245,8 @@ regexp {[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+} $serial_ip_addr serial_ip_addr
#
# Step 3: Wait until Windows is up for sure
#
+
+
run_genode_until {\[init -\> vbox\].*Guest Additions capability report:.*seamless: yes, hostWindowMapping: no, graphics: yes} 300 $serial_id
@@ -292,7 +283,7 @@ puts $noux_id "sleep 5"
puts $noux_id "done"
# Wait until VM signaled shutdown state
-run_genode_until {\[init -\> vbox\].*Changing the VM state from 'POWERING_OFF' to 'OFF'} 120 $serial_id
+run_genode_until {\[init -\> vbox\] EMT PDMR3PowerOff: .* ns run time} 120 $serial_id
# SHA1 of copied file
puts $noux_id "sha1sum to/test.bin"
@@ -305,6 +296,7 @@ run_genode_until {[[:xdigit:]]+ to/test\.bin} 50 $noux_id
foreach pkg {bash coreutils} { exec rm -f bin/$pkg.tar }
exec rm -f bin/test.bin
exec rm -f bin/template.bat
+exec rm -f bin/vm_auto_share.vbox
#
diff --git a/repos/ports/run/vm_auto_disk.vbox b/repos/ports/run/vm_auto_disk.vbox
new file mode 100644
index 0000000000..ad7ca024d7
--- /dev/null
+++ b/repos/ports/run/vm_auto_disk.vbox
@@ -0,0 +1,185 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/repos/ports/run/vm_auto_share.vbox b/repos/ports/run/vm_auto_share.vbox
new file mode 100644
index 0000000000..9c27e60bbe
--- /dev/null
+++ b/repos/ports/run/vm_auto_share.vbox
@@ -0,0 +1,188 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/repos/ports/src/virtualbox/autotest/main.cc b/repos/ports/src/virtualbox/autotest/main.cc
deleted file mode 100644
index d4c16d6155..0000000000
--- a/repos/ports/src/virtualbox/autotest/main.cc
+++ /dev/null
@@ -1,45 +0,0 @@
-#include
-#include
-
-#include
-#include
-#include
-
-static char buf[128 * 1024];
-
-int main(int argc, char **argv)
-{
- using Genode::printf;
-
- int res = unlink("/ram/overlay.vdi");
- printf("unlink result %d\n", res);
-
- int fd_src = open("/ram/overlay-original.vdi", O_RDONLY);
- int fd_dst = creat("/ram/overlay.vdi", O_CREAT);
- size_t len, sum = 0;
-
- printf("fd_src %d fd_dst %d\n", fd_src, fd_dst);
- if (fd_src < 0 || fd_dst < 0)
- return 1;
-
- while ((len = read(fd_src, buf, sizeof(buf))) > 0) {
- while (len) {
- ssize_t written = write(fd_dst, buf, len);
- len -= written;
- sum += written;
-
- if (written > 0 && len >= 0)
- continue;
-
- PERR("could not write whole file - %zu %zu %d\n",
- sum, written, errno);
- return -1;
- }
- }
- close(fd_src);
- close(fd_dst);
-
- printf("wrote %zu bytes to overlay.vdi - res=%zu\n", sum, len);
- printf("vbox_auto_test_helper is done.\n");
- return 0;
-}
diff --git a/repos/ports/src/virtualbox/autotest/target.mk b/repos/ports/src/virtualbox/autotest/target.mk
deleted file mode 100644
index 7bd7872327..0000000000
--- a/repos/ports/src/virtualbox/autotest/target.mk
+++ /dev/null
@@ -1,3 +0,0 @@
-TARGET = vbox-auto-test-helper
-SRC_CC = main.cc
-LIBS = libc
diff --git a/repos/ports/src/virtualbox/cxx_dummies.cc b/repos/ports/src/virtualbox/cxx_dummies.cc
deleted file mode 100644
index 317dfdd121..0000000000
--- a/repos/ports/src/virtualbox/cxx_dummies.cc
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * \brief Dummy implementations of symbols needed by VirtualBox
- * \author Norman Feske
- * \date 2013-08-22
- */
-
-/*
- * Copyright (C) 2013 Genode Labs GmbH
- *
- * This file is distributed under the terms of the GNU General Public License
- * version 2.
- */
-
-/* Genode includes */
-#include
-
-/* VirtualBox includes */
-#include
-
-#define CXX_DUMMY(retval, signature) \
-int signature { \
- PDBG( #signature " called, not implemented"); \
- for (;;); \
- return retval; \
-}
-
-#define CHECKED_CXX_DUMMY(retval, signature) \
-int signature { \
- PINF( #signature " called, not implemented"); \
- return retval; \
-}
-
-CXX_DUMMY(-1, VMMR3InitCompleted(VM*, VMINITCOMPLETED))
-CXX_DUMMY(-1, VMMR3InitR0(VM*))
-CXX_DUMMY(-1, VMMR3InitRC(VM*))
-CXX_DUMMY(-1, VMMR3Init(VM*))
-CXX_DUMMY(-1, VMMR3Relocate(VM*, long long))
-CXX_DUMMY(-1, VMMR3Term(VM*))
-CXX_DUMMY(-1, PGMR3InitCompleted(VM*, VMINITCOMPLETED))
-CXX_DUMMY(-1, PGMNotifyNxeChanged(VMCPU*, bool))
-CXX_DUMMY(-1, VMMR3SendSipi(VM*, unsigned int, unsigned int))
-CXX_DUMMY(-1, VMMR3SendInitIpi(VM*, unsigned int))
-CXX_DUMMY(-1, VMMR3EmtRendezvousFF(VM*, VMCPU*))
-CXX_DUMMY(-1, VMMR3YieldStop(VM*))
-CXX_DUMMY(-1, VMMR3EmtRendezvousSetDisabled(VMCPU*, bool))
diff --git a/repos/ports/src/virtualbox/devices.cc b/repos/ports/src/virtualbox/devices.cc
index f219d3e4ff..ecef667d83 100644
--- a/repos/ports/src/virtualbox/devices.cc
+++ b/repos/ports/src/virtualbox/devices.cc
@@ -21,8 +21,6 @@
extern "C" int VBoxDevicesRegister(PPDMDEVREGCB pCallbacks, uint32_t u32Version)
{
- PDBG("VBoxDevicesRegister called");
-
int rc = 0;
/* pcarch */
diff --git a/repos/ports/src/virtualbox/drivers.cc b/repos/ports/src/virtualbox/drivers.cc
index 2b7f393c29..3e8314f069 100644
--- a/repos/ports/src/virtualbox/drivers.cc
+++ b/repos/ports/src/virtualbox/drivers.cc
@@ -20,8 +20,6 @@
extern "C" int VBoxDriversRegister(PCPDMDRVREGCB pCallbacks, uint32_t u32Version)
{
- PDBG("VBoxDriversRegister called");
-
PDMDRVREG const *drvs[] = {
&g_DrvKeyboardQueue,
&g_DrvMouseQueue,
diff --git a/repos/ports/src/virtualbox/dummies.cc b/repos/ports/src/virtualbox/dummies.cc
index 93b26b4b20..22d6177679 100644
--- a/repos/ports/src/virtualbox/dummies.cc
+++ b/repos/ports/src/virtualbox/dummies.cc
@@ -5,295 +5,188 @@
*/
/*
- * Copyright (C) 2013 Genode Labs GmbH
+ * Copyright (C) 2013-2014 Genode Labs GmbH
*
* This file is distributed under the terms of the GNU General Public License
* version 2.
*/
#include
-#include
-#include
+#include /* libc memcpy */
-#include
-#include
+#include "VMMInternal.h"
+#include "EMInternal.h"
+#include "PDMInternal.h"
-extern "C" {
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
-#define DUMMY(retval, name) \
-int name(void) { \
- PDBG( #name " called, not implemented, eip=%p", __builtin_return_address(0)); \
- for (;;); \
- return retval; \
+#include "util.h"
+
+static const bool trace = false;
+
+#define TRACE(retval) \
+ { \
+ if (trace) \
+ PDBG("called, return dummy, eip=%p", \
+ __builtin_return_address(0)); \
+ return retval; \
+ }
+
+
+RT_C_DECLS_BEGIN
+
+RTDECL(int) RTMemProtect(void *pv, size_t cb, unsigned fProtect) RT_NO_THROW
+{
+ if (!trace)
+ return VINF_SUCCESS;
+
+ char type[4];
+
+ if (fProtect & RTMEM_PROT_READ)
+ type[0] = 'r';
+ else
+ type[0] = '-';
+
+ if (fProtect & RTMEM_PROT_WRITE)
+ type[1] = 'w';
+ else
+ type[1] = '-';
+
+ if (fProtect & RTMEM_PROT_EXEC)
+ type[2] = 'x';
+ else
+ type[2] = '-';
+
+ type[3] = 0;
+
+ PDBG("called - not implemented - 0x%p+%0zx protect %x - '%s'",
+ pv, cb, fProtect, type);
+
+ return VINF_SUCCESS;
}
-#define CHECKED_DUMMY(TYPE, retval, name) \
-TYPE name(void) { \
- PINF( #name " called, not implemented, eip=%p", __builtin_return_address(0)); \
- return retval; \
+
+static_assert(sizeof(RTR0PTR) == sizeof(RTR3PTR), "pointer transformation bug");
+static_assert(sizeof(RTR0PTR) == sizeof(void *) , "pointer transformation bug");
+static_assert(sizeof(RTR3PTR) == sizeof(RTR0PTR), "pointer transformation bug");
+
+RTR0PTR MMHyperR3ToR0(PVM pVM, RTR3PTR R3Ptr) { return (RTR0PTR)R3Ptr; }
+RTRCPTR MMHyperR3ToRC(PVM pVM, RTR3PTR R3Ptr) { return to_rtrcptr(R3Ptr); }
+RTR0PTR MMHyperCCToR0(PVM pVM, void *pv) { return (RTR0PTR)pv; }
+RTRCPTR MMHyperCCToRC(PVM pVM, void *pv) { return to_rtrcptr(pv); }
+RTR3PTR MMHyperR0ToR3(PVM pVM, RTR0PTR R0Ptr) { return (RTR3PTR*)(R0Ptr | 0UL); }
+RTR3PTR MMHyperRCToR3(PVM pVM, RTRCPTR RCPtr)
+{
+ static_assert(sizeof(RCPtr) <= sizeof(RTR3PTR), "ptr transformation bug");
+ return reinterpret_cast(0UL | RCPtr);
}
-CHECKED_DUMMY(int, 0, cpumR3DbgInit)
-CHECKED_DUMMY(int, 0, DBGFR3Init) /* debugger */
-DUMMY(-1, DBGFR3CoreWrite)
-CHECKED_DUMMY(int, 0, FTMR3Init) /* fault tolerance manager */
-CHECKED_DUMMY(int, 0, pdmR3LdrInitU) /* module loader of pluggable device manager */
-CHECKED_DUMMY(int, 0, PDMR3LdrLoadVMMR0U) /* pretend to have successfully loaded the r0 module */
-CHECKED_DUMMY(int, 0, pdmR3LoadR3U)
-CHECKED_DUMMY(int, 0, pthread_atfork)
-CHECKED_DUMMY(int, 0, pthread_attr_setdetachstate)
-CHECKED_DUMMY(int, 0, pthread_attr_setstacksize)
-CHECKED_DUMMY(int, 0, RTMemProtect)
-CHECKED_DUMMY(int, 0, SELMR3Init) /* selector manager - GDT handling */
-CHECKED_DUMMY(int, 0, sigfillset)
-CHECKED_DUMMY(int, 0, vmmR3SwitcherInit) /* world switcher */
-CHECKED_DUMMY(int, -1, atexit)
-CHECKED_DUMMY(pid_t, -1, getpid)
-CHECKED_DUMMY(char *, (char *)-1, pdmR3FileR3)
-CHECKED_DUMMY(char *, nullptr, setlocale)
-CHECKED_DUMMY(int, -1, sigaddset)
-CHECKED_DUMMY(int, -1, sigemptyset)
-CHECKED_DUMMY(int, -1, siginterrupt)
-CHECKED_DUMMY(int, -1, sysctl)
-DUMMY( 0, RTErrCOMGet)
-void CPUMPushHyper() { } /* called by 'VMMR3InitRC', but we don't use GC */
-DUMMY(-1, DBGCRegisterCommands)
-DUMMY(-1, DBGFR3Event)
-DUMMY(-1, DBGFR3EventAssertion)
-DUMMY(-1, DBGFR3EventBreakpoint)
-DUMMY(-1, DBGFR3EventSrc)
-CHECKED_DUMMY(int, 0, DBGFR3EventSrcV)
-void DBGFR3Relocate() { }
-DUMMY(-1, DBGFR3Term)
-DUMMY(-1, DBGFR3VMMForcedAction)
-
-CHECKED_DUMMY(int, -4, DBGFR3AsSymbolByAddr) /* -4 == VERR_INVALID_HANDLE */
-
-DUMMY(-1, _flockfile)
-
-int FTMR3SetCheckpoint() { return -1; }
-DUMMY(-1, FTMR3Term)
-int FTMSetCheckpoint() { return 0; }
-DUMMY(-1, _funlockfile)
-DUMMY(-1, _fwalk)
-
-DUMMY(-1, HWACCMInvalidatePage)
-DUMMY(-1, HWACCMFlushTLB)
-DUMMY(-1, HWACCMR3EmulateIoBlock)
-DUMMY(-1, HWACCMR3PatchTprInstr)
-DUMMY(-1, HWACCMR3CheckError)
-DUMMY(-1, HWACCMR3RestartPendingIOInstr)
-void HWACCMR3Relocate() { }
-void HWACCMR3Reset() { }
-DUMMY(-1, HWACCMR3Term)
-DUMMY(-1, HWACMMR3EnablePatching)
-DUMMY(-1, HWACMMR3DisablePatching)
-
-CHECKED_DUMMY(int, 0, IEMR3Init) /* interpreted execution manager (seems to be just a skeleton) */
-void IEMR3Relocate() { }
-DUMMY(-1, IEMR3Term)
-
-DUMMY(-1, MMHyperR0ToCC)
-DUMMY(-1, MMHyperR0ToR3)
-DUMMY(-1, MMHyperRCToCC)
-DUMMY(-1, MMHyperRCToR3)
-CHECKED_DUMMY(RTGCPTR, 0, MMHyperGetArea)
-
-DUMMY(-1, MMR3HeapAPrintfV)
-CHECKED_DUMMY(int, 0, MMR3HyperInitFinalize)
-CHECKED_DUMMY(int, 0, MMR3HyperSetGuard)
-DUMMY(-1, MMR3LockCall)
-DUMMY(-1, MMR3Term)
-DUMMY(-1, MMR3TermUVM)
-DUMMY(-1, PDMR3AsyncCompletionTemplateCreateDriver)
-DUMMY(-1, PDMR3LdrGetInterfaceSymbols)
-void PDMR3LdrRelocateU() { }
-DUMMY(-1, pdmR3LdrTermU)
-
-DUMMY(-1, PGMNotifyNxeChanged)
-DUMMY(-1, PGMPhysGCPtr2GCPhys)
-DUMMY(-1, PGMPhysSimpleReadGCPhys)
-DUMMY(-1, PGMPhysSimpleReadGCPtr)
-DUMMY(-1, PGMPhysSimpleWriteGCPtr)
-DUMMY(-1, PGMSyncCR3)
-
-CHECKED_DUMMY(int, 0, PGMR3CheckIntegrity)
-CHECKED_DUMMY(int, 0, PGMR3FinalizeMappings)
-CHECKED_DUMMY(int, 0, PGMR3InitCompleted)
-CHECKED_DUMMY(int, 0, PGMR3InitDynMap) /* reserve space for "dynamic mappings" */
-CHECKED_DUMMY(int, 0, PGMR3InitFinalize)
-
-DUMMY(-1, PGMR3SharedModuleCheckAll)
-DUMMY(-1, PGMR3SharedModuleUnregister)
-DUMMY(-1, PGMR3SharedModuleRegister)
-DUMMY(-1, PGMR3MappingsUnfix)
-DUMMY(-1, PGMR3PhysChangeMemBalloon)
-DUMMY(-1, PGMR3MappingsFix)
-DUMMY(-1, PGMR3MappingsDisable)
-DUMMY(-1, PGMR3LockCall)
-DUMMY(-1, PGMR3PhysAllocateHandyPages)
-DUMMY(-1, PGMR3PhysAllocateLargeHandyPage)
-DUMMY(-1, PGMR3PhysChunkMap)
-DUMMY(-1, PGMR3PhysGCPhys2CCPtrExternal)
-DUMMY(-1, PGMR3PhysGCPhys2CCPtrReadOnlyExternal)
-DUMMY(-1, PGMR3PhysMMIO2Deregister)
-DUMMY(-1, PGMR3PhysMMIO2MapKernel)
-DUMMY(-1, PGMR3PhysReadU16)
-DUMMY(-1, PGMR3PhysReadU64)
-DUMMY(-1, PGMR3PhysRomProtect)
-DUMMY(-1, PGMR3PoolGrow)
-void PGMR3Relocate() {}
-DUMMY(-1, PGMR3ResetCpu)
-DUMMY(-1, PGMR3Term)
-
-DUMMY(-1, PGMPrefetchPage)
-DUMMY(-1, PGMGstGetPage)
-DUMMY(-1, PGMGstIsPagePresent)
-DUMMY(-1, PGMShwMakePageReadonly)
-DUMMY(-1, PGMShwMakePageNotPresent)
-DUMMY(-1, PGMPhysIsGCPhysNormal)
-DUMMY(-1, PGMHandlerVirtualChangeInvalidateCallback)
-DUMMY(-1, PGMSetLargePageUsage)
-DUMMY(-1, PGMPhysSimpleDirtyWriteGCPtr)
-DUMMY(-1, PGMGetShadowMode)
-DUMMY(-1, PGMGetHostMode)
-CHECKED_DUMMY(int, 0, PGMGetGuestMode) /* PGMMODE_INVALID == 0 */
-int PGMChangeMode() { return 0; }
-
-CHECKED_DUMMY(int, 0, poll) /* needed by 'DrvHostSerial.cpp' */
-DUMMY(-1, pthread_key_delete)
-DUMMY(-1, RTMemExecFree)
-DUMMY(-1, RTMemPageFree)
-DUMMY(-1, RTPathAppend)
-DUMMY(-1, RTSemEventWaitEx)
-
-CHECKED_DUMMY(int, 0, SELMR3InitFinalize)
-void SELMR3Relocate() { }
-void SELMR3DisableMonitoring () { }
-void SELMR3Reset() { }
-DUMMY(-1, SELMR3Term)
-DUMMY(-1, SELMR3GetSelectorInfo)
-
-DUMMY(-1, libc_select_notify) /* needed for libc_terminal plugin */
-DUMMY(-1, DISInstrToStrEx)
-
-DUMMY(-1, strcat)
-DUMMY(-1, strerror)
-DUMMY(-1, strpbrk)
-
-CHECKED_DUMMY(int, 0, SUPR3SetVMForFastIOCtl)
-DUMMY(-1, SUPR3HardenedLdrLoadPlugIn)
-DUMMY(-1, SUPR3Term)
-
-uint32_t SUPSemEventMultiGetResolution()
-{ return 100000*10; /* called by 'vmR3HaltGlobal1Init' */ }
-
-DUMMY(-1, VMMR3FatalDump)
-void vmmR3SwitcherRelocate() { }
-DUMMY(-1, VMMR3GetHostToGuestSwitcher)
-
-DUMMY(-1, pthread_kill)
-DUMMY(-1, sscanf)
-DUMMY(-1, RTHeapSimpleRelocate)
-DUMMY(-1, RTHeapSimpleAlloc)
-DUMMY(-1, RTHeapSimpleInit)
-DUMMY(-1, RTHeapSimpleFree)
-DUMMY(-1, RTAvloU32Get)
-DUMMY(-1, RTAvloU32Remove)
-DUMMY(-1, RTAvloU32GetBestFit)
-CHECKED_DUMMY(void *, nullptr, RTAvloU32RemoveBestFit)
-DUMMY(-1, RTAvlU32Destroy)
-DUMMY(-1, RTAvlU32GetBestFit)
-DUMMY(-1, RTAvloU32DoWithAll)
-DUMMY(-1, RTAvloU32Insert)
-DUMMY(-1, RTAvlU32Get)
-DUMMY(-1, RTAvlU32DoWithAll)
-DUMMY(-1, RTAvlU32Insert)
-
-CHECKED_DUMMY(int, 0, IOMR3Init)
-int IOMR3IOPortRegisterR0() { return 0; }
-int IOMR3IOPortRegisterRC() { return 0; }
-CHECKED_DUMMY(int, 0, IOMR3MmioRegisterR0)
-CHECKED_DUMMY(int, 0, IOMR3MmioRegisterRC)
-void IOMR3Relocate() { }
-void IOMR3Reset() { }
-DUMMY(-1, IOMR3Term)
-
-DUMMY(-1, IOMInterpretOUT)
-DUMMY(-1, IOMInterpretOUTS)
-DUMMY(-1, IOMInterpretIN)
-DUMMY(-1, IOMInterpretINS)
+/* debugger */
+int DBGFR3Init(PVM) TRACE(VINF_SUCCESS)
+int DBGFR3EventSrcV(PVM, DBGFEVENTTYPE, const char *, unsigned, const char *,
+ const char *, va_list) TRACE(VINF_SUCCESS)
+void DBGFR3Relocate(PVM, RTGCINTPTR) TRACE()
+int DBGFR3RegRegisterDevice(PVM, PCDBGFREGDESC, PPDMDEVINS, const char*,
+ uint32_t) TRACE(VINF_SUCCESS)
+int DBGFR3AsSymbolByAddr(PUVM, RTDBGAS, PCDBGFADDRESS, uint32_t, PRTGCINTPTR,
+ PRTDBGSYMBOL, PRTDBGMOD) TRACE(VERR_INVALID_HANDLE)
+int DBGFR3Term(PVM) TRACE(VINF_SUCCESS)
-DUMMY(-1, DISInstrToStrWithReader)
+/* called by 'VMMR3InitRC', but we don't use GC */
+int cpumR3DbgInit(PVM) TRACE(VINF_SUCCESS)
+void CPUMPushHyper(PVMCPU, uint32_t) TRACE()
-DUMMY(-1, RTFileQueryFsSizes)
+int PGMFlushTLB(PVMCPU, uint64_t, bool) TRACE(VINF_SUCCESS)
+int PGMInvalidatePage(PVMCPU, RTGCPTR) TRACE(VINF_SUCCESS)
+int PGMHandlerPhysicalPageTempOff(PVM, RTGCPHYS, RTGCPHYS) TRACE(VINF_SUCCESS)
+void PGMPhysReleasePageMappingLock(PVM, PPGMPAGEMAPLOCK) TRACE()
+int PGMR3CheckIntegrity(PVM) TRACE(VINF_SUCCESS)
+int PGMR3FinalizeMappings(PVM) TRACE(VINF_SUCCESS)
+int PGMR3InitCompleted(PVM, VMINITCOMPLETED) TRACE(VINF_SUCCESS)
+int PGMR3InitDynMap(PVM) TRACE(VINF_SUCCESS)
+int PGMR3InitFinalize(PVM) TRACE(VINF_SUCCESS)
+int PGMR3HandlerVirtualRegister(PVM, PGMVIRTHANDLERTYPE, RTGCPTR, RTGCPTR,
+ PFNPGMR3VIRTINVALIDATE, PFNPGMR3VIRTHANDLER,
+ const char*, const char*, const char*) TRACE(VINF_SUCCESS)
+int PGMHandlerVirtualDeregister(PVM, RTGCPTR) TRACE(VINF_SUCCESS)
+void PGMR3Relocate(PVM, RTGCINTPTR) TRACE()
+int PGMChangeMode(PVMCPU, uint64_t, uint64_t, uint64_t) TRACE(VINF_SUCCESS)
+int PGMR3ChangeMode(PVM, PVMCPU, PGMMODE) TRACE(VINF_SUCCESS)
+/* required for Netware */
+void PGMCr0WpEnabled(PVMCPU pVCpu) TRACE()
-DUMMY(-1, pthread_mutex_timedlock)
+/* debugger */
+void DBGFR3PowerOff(PVM pVM) TRACE()
+int DBGFR3DisasInstrCurrent(PVMCPU, char *, uint32_t) TRACE(VINF_SUCCESS)
-CHECKED_DUMMY(int, 0, PGMHandlerVirtualDeregister) /* XXX */
-CHECKED_DUMMY(int, 0, PGMR3HandlerVirtualRegister) /* XXX */
+int vmmR3SwitcherInit(PVM pVM) TRACE(VINF_SUCCESS)
+void vmmR3SwitcherRelocate(PVM, RTGCINTPTR) TRACE()
+int VMMR3DisableSwitcher(PVM) TRACE(VINF_SUCCESS)
-/*
- * Dummies added for storage
- */
-DUMMY(-1, RTAvlrFileOffsetDestroy)
-DUMMY(-1, RTAvlrFileOffsetGet)
-DUMMY(-1, RTAvlrFileOffsetGetBestFit)
-DUMMY(-1, RTAvlrFileOffsetInsert)
-DUMMY(-1, RTAvlrFileOffsetRemove)
-DUMMY(-1, RTAvlrU64Destroy)
-DUMMY(-1, RTAvlrU64DoWithAll)
-DUMMY(-1, RTAvlrU64GetBestFit)
-DUMMY(-1, RTAvlrU64Insert)
-DUMMY(-1, RTAvlrU64RangeGet)
-DUMMY(-1, RTAvlrU64RangeRemove)
-DUMMY(-1, RTAvlrU64Remove)
-DUMMY(-1, RTLdrClose)
-DUMMY(-1, RTMemDupExTag)
-DUMMY(-1, rtPathRootSpecLen)
-DUMMY(-1, RTPathStartsWithRoot)
-DUMMY(-1, RTSocketToNative)
-DUMMY(-1, RTStrCatP)
-DUMMY(-1, RTTcpClientCloseEx)
-DUMMY(-1, RTTcpClientConnect)
-DUMMY(-1, RTTcpFlush)
-DUMMY(-1, RTTcpGetLocalAddress)
-DUMMY(-1, RTTcpGetPeerAddress)
-DUMMY(-1, RTTcpRead)
-DUMMY(-1, RTTcpReadNB)
-DUMMY(-1, RTTcpSelectOne)
-DUMMY(-1, RTTcpSelectOneEx)
-DUMMY(-1, RTTcpSetSendCoalescing)
-DUMMY(-1, RTTcpSgWrite)
-DUMMY(-1, RTTcpSgWriteNB)
-DUMMY(-1, RTTcpWrite)
-DUMMY(-1, RTTcpWriteNB)
-DUMMY(-1, RTTimeLocalExplode)
+int emR3InitDbg(PVM pVM) TRACE(VINF_SUCCESS)
-DUMMY(-1, RTSymlinkCreate)
-DUMMY(-1, RTSymlinkRead)
-DUMMY(-1, RTSymlinkDelete)
+int FTMR3Init(PVM) TRACE(VINF_SUCCESS)
+int FTMR3SetCheckpoint(PVM, FTMCHECKPOINTTYPE) TRACE(-1)
+int FTMSetCheckpoint(PVM, FTMCHECKPOINTTYPE) TRACE(VINF_SUCCESS)
+int FTMR3Term(PVM) TRACE(VINF_SUCCESS)
-DUMMY(-1, RTNetIPv6PseudoChecksumEx)
+int IEMR3Init(PVM) TRACE(VINF_SUCCESS)
+int IEMR3Term(PVM) TRACE(VINF_SUCCESS)
+void IEMR3Relocate(PVM) TRACE()
-CHECKED_DUMMY(int, 0, futimes)
-CHECKED_DUMMY(int, 0, lutimes)
+void HMR3Relocate(PVM) TRACE()
+void HMR3Reset(PVM pVM) TRACE()
-int __isthreaded;
+int SELMR3Init(PVM) TRACE(VINF_SUCCESS)
+int SELMR3Term(PVM) TRACE(VINF_SUCCESS)
+int SELMR3InitFinalize(PVM) TRACE(VINF_SUCCESS)
+void SELMR3Relocate(PVM) TRACE()
+void SELMR3Reset(PVM) TRACE()
+void SELMR3DisableMonitoring(PVM) TRACE()
-int sigprocmask() { return 0; }
-int _sigprocmask() { return 0; }
+int IOMR3IOPortRegisterRC(PVM, PPDMDEVINS, RTIOPORT, RTUINT, RTRCPTR, RTRCPTR,
+ RTRCPTR, RTRCPTR, RTRCPTR, const char*) TRACE(VINF_SUCCESS)
+int IOMR3IOPortRegisterR0(PVM, PPDMDEVINS, RTIOPORT, RTUINT, RTR0PTR,
+ RTHCUINTPTR, RTHCUINTPTR, RTHCUINTPTR, RTHCUINTPTR,
+ const char*) TRACE(VINF_SUCCESS)
+int IOMR3MmioRegisterR0(PVM, PPDMDEVINS, RTGCPHYS, uint32_t, RTR0PTR,
+ RTHCUINTPTR, RTHCUINTPTR, RTHCUINTPTR) TRACE(VINF_SUCCESS)
+int IOMR3MmioRegisterRC(PVM, PPDMDEVINS, RTGCPHYS, uint32_t, RTGCPTR, RTRCPTR,
+ RTRCPTR, RTRCPTR) TRACE(VINF_SUCCESS)
+void IOMR3Relocate(PVM, RTGCINTPTR) TRACE()
+void IOMR3Reset(PVM) TRACE()
-int PGMFlushTLB() { return 0; }
-int PGMInvalidatePage() { return 0; } /* seems to be needed on raw mode only */
-int PGMHandlerPhysicalPageTempOff() { return 0; }
+int SUPR3SetVMForFastIOCtl(PVMR0) TRACE(VINF_SUCCESS)
-bool PGMIsLockOwner() { return false; } /* assertion in EMRemLock */
-bool IOMIsLockOwner() { return false; } /* XXX */
+_AVLOU32NodeCore* RTAvloU32RemoveBestFit(PAVLOU32TREE, AVLOU32KEY, bool) TRACE(VINF_SUCCESS)
+int RTAvlrFileOffsetDestroy(PAVLRFOFFTREE, PAVLRFOFFCALLBACK, void*) TRACE(VINF_SUCCESS)
-int MMHyperIsInsideArea() { return 0; } /* used by dbgfR3DisasInstrRead */
-void PGMPhysReleasePageMappingLock() { }
-} /* extern "C" */
+/* module loader of pluggable device manager */
+int pdmR3LdrInitU(PUVM) TRACE(VINF_SUCCESS)
+int PDMR3LdrLoadVMMR0U(PUVM) TRACE(VINF_SUCCESS)
+void PDMR3LdrRelocateU(PUVM, RTGCINTPTR) TRACE()
+int pdmR3LoadR3U(PUVM, const char *, const char *) TRACE(VINF_SUCCESS)
+void pdmR3LdrTermU(PUVM) TRACE()
+char *pdmR3FileR3(const char * file, bool)
+{
+ char * pv = reinterpret_cast(RTMemTmpAllocZ(1));
+
+ if (trace)
+ PDBG("file %s %s %p", file, pv, __builtin_return_address(0));
+
+ TRACE(pv)
+}
+
+RT_C_DECLS_END
diff --git a/repos/ports/src/virtualbox/dynlib.cc b/repos/ports/src/virtualbox/dynlib.cc
index 2aff8f9dd7..ad846b59c3 100644
--- a/repos/ports/src/virtualbox/dynlib.cc
+++ b/repos/ports/src/virtualbox/dynlib.cc
@@ -29,7 +29,7 @@ static struct shared {
const char * name;
const char * symbol;
void * func;
-} shared[] = { "/VBoxSharedFolders", VBOX_HGCM_SVCLOAD_NAME, (void *)VBoxHGCMSvcLoad };
+} shared[] = {{ "VBoxSharedFolders", VBOX_HGCM_SVCLOAD_NAME, (void *)VBoxHGCMSvcLoad }};
int RTLdrLoad(const char *pszFilename, PRTLDRMOD phLdrMod)
@@ -73,4 +73,9 @@ int RTLdrGetSymbol(RTLDRMOD hLdrMod, const char *pszSymbol, void **ppvValue)
return VINF_SUCCESS;
}
+int RTLdrClose(RTLDRMOD hLdrMod)
+{
+ return VINF_SUCCESS;
+}
+
}
diff --git a/repos/ports/src/virtualbox/fake_pci_vendor.patch b/repos/ports/src/virtualbox/fake_pci_vendor.patch
deleted file mode 100644
index 6a69b45f70..0000000000
--- a/repos/ports/src/virtualbox/fake_pci_vendor.patch
+++ /dev/null
@@ -1,10 +0,0 @@
-+++ src/app/virtualbox/src/VBox/Devices/Graphics/DevVGA.cpp 2013-12-09 10:33:02.168894689 +0100
-@@ -5885,7 +5889,7 @@
- vgaR3Reset(pDevIns);
-
- /* The PCI devices configuration. */
-- PCIDevSetVendorId( &pThis->Dev, 0x80ee); /* PCI vendor, just a free bogus value */
-+ PCIDevSetVendorId( &pThis->Dev, 0x80ef); /* PCI vendor, just a free bogus value */
- PCIDevSetDeviceId( &pThis->Dev, 0xbeef);
- PCIDevSetClassSub( &pThis->Dev, 0x00); /* VGA controller */
- PCIDevSetClassBase( &pThis->Dev, 0x03);
diff --git a/repos/ports/src/virtualbox/frontend/ClientToken.h b/repos/ports/src/virtualbox/frontend/ClientToken.h
new file mode 100644
index 0000000000..ce707b49bb
--- /dev/null
+++ b/repos/ports/src/virtualbox/frontend/ClientToken.h
@@ -0,0 +1,19 @@
+
+#ifndef ____H_CLIENTTOKEN
+#define ____H_CLIENTTOKEN
+
+#include
+#include
+
+#include "MachineImpl.h"
+
+class Machine::ClientToken
+{
+ public:
+ ClientToken(const ComObjPtr &pMachine, SessionMachine *pSessionMachine);
+
+ bool isReady();
+ bool release();
+ void getId(Utf8Str &strId);
+};
+#endif /* !____H_CLIENTTOKEN */
diff --git a/repos/ports/src/virtualbox/frontend/ClientWatcher.h b/repos/ports/src/virtualbox/frontend/ClientWatcher.h
new file mode 100644
index 0000000000..92707ddfec
--- /dev/null
+++ b/repos/ports/src/virtualbox/frontend/ClientWatcher.h
@@ -0,0 +1,14 @@
+#ifndef ____H_CLIENTWATCHER
+#define ____H_CLIENTWATCHER
+
+class VirtualBox::ClientWatcher
+{
+ public:
+
+ ClientWatcher(VirtualBox* const) { }
+
+ bool isReady() { return true; }
+ void update() { }
+ void addProcess(RTPROCESS pid);
+};
+#endif /* !____H_CLIENTWATCHER */
diff --git a/repos/ports/src/virtualbox/frontend/GenodeImpl.h b/repos/ports/src/virtualbox/frontend/GenodeImpl.h
new file mode 100644
index 0000000000..da9ff15f0b
--- /dev/null
+++ b/repos/ports/src/virtualbox/frontend/GenodeImpl.h
@@ -0,0 +1,285 @@
+#ifndef ____H_GENODEIMPL
+#define ____H_GENODEIMPL
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+class Progress;
+typedef Progress IProgress;
+
+class VirtualBoxErrorInfo;
+typedef VirtualBoxErrorInfo IVirtualBoxErrorInfo;
+
+class IUnknown;
+#include
+
+
+#include
+#include
+
+#include
+#include
+#include
+#include
+
+class Console;
+
+#include "AutoCaller.h"
+#include "VMMDev.h"
+
+#include