vbox5: update to 5.1.22

Issue #2338
This commit is contained in:
Alexander Boettcher 2017-05-03 14:02:42 +02:00 committed by Christian Helmuth
parent f7d80a9bf9
commit 106a0db664
17 changed files with 138 additions and 101 deletions

View File

@ -167,6 +167,7 @@ SRC_S += Runtime/common/asm/ASMAtomicUoReadU64.as
SRC_S += Runtime/common/asm/ASMAtomicXchgU64.asm
SRC_S += Runtime/common/asm/ASMCpuIdExSlow.asm
SRC_S += Runtime/common/asm/ASMGetXcr0.asm
SRC_S += Runtime/common/asm/ASMFxSave.asm
SRC_S += Runtime/common/asm/ASMMemFirstMismatchingU8.asm
SRC_CC += Runtime/common/err/errmsg.cpp

View File

@ -93,6 +93,7 @@ SRC_CC += VMM/VMMAll/APICAll.cpp
endif
SRC_CC += VMM/VMMR3/MM.cpp
SRC_CC += VMM/VMMR3/MMHeap.cpp
CC_OPT += -DVBOX_IN_VMM

View File

@ -1 +1 @@
e64afa88d6d63dea8d07b6d01316dcf18905b999
63197fb01f1442acf40937798b78d036450296bd

View File

@ -1,17 +1,17 @@
LICENSE := GPLv2
VERSION := 5.1.20
VERSION := 5.1.22
DOWNLOADS := virtualbox.archive virtualbox_sdk.archive
VIRTUALBOX_TBZ2 := VirtualBox-$(VERSION).tar.bz2
VIRTUALBOX_SDK_ZIP := VirtualBoxSDK-$(VERSION)-114628.zip
VIRTUALBOX_SDK_ZIP := VirtualBoxSDK-$(VERSION)-115126.zip
URL(virtualbox) := http://download.virtualbox.org/virtualbox/$(VERSION)/$(VIRTUALBOX_TBZ2)
DIR(virtualbox) := src/app/virtualbox
SHA(virtualbox) := 13eb1890c6315c2e3f25cc9a00e7671549592452
SHA(virtualbox) := 57e6f73f62af7d5ddb670972ba0417b6fcb43950
URL(virtualbox_sdk) := http://download.virtualbox.org/virtualbox/$(VERSION)/$(VIRTUALBOX_SDK_ZIP)
DIR(virtualbox_sdk) := src/app/virtualbox_sdk
SHA(virtualbox_sdk) := 2e733662fef8580bb501825da89d7e9858540533
SHA(virtualbox_sdk) := 21b45da69214b32cf7f7115ef53e0c1d77ae2434
PATCHES_DIR := src/virtualbox5/patches
PATCHES_DIR_VBOX4 := src/virtualbox/patches
@ -64,7 +64,7 @@ VBOX_MAIN_INC += MediumLock MouseImpl NATEngineImpl NATNetworkImpl
VBOX_MAIN_INC += NetworkAdapterImpl NetworkServiceRunner
VBOX_MAIN_INC += objectslist ObjectState
VBOX_MAIN_INC += ParallelPortImpl PCIDeviceAttachmentImpl Performance
VBOX_MAIN_INC += ProgressImpl ProgressProxyImpl SnapshotImpl
VBOX_MAIN_INC += ProgressImpl ProgressProxyImpl QMTranslator SnapshotImpl
VBOX_MAIN_INC += SecretKeyStore SerialPortImpl SessionImpl SharedFolderImpl
VBOX_MAIN_INC += StorageControllerImpl SystemPropertiesImpl TokenImpl VMMDev
VBOX_MAIN_INC += UsbWebcamInterface

View File

@ -3,7 +3,6 @@
#
assert_spec nova
assert_spec 64bit
set flavor "win7"

View File

@ -135,7 +135,6 @@ HRESULT setupmachine(Genode::Env &env)
/* handle input of Genode and forward it to VMM layer */
static ComPtr<GenodeConsole> genodeConsole = gConsole;
RTLogPrintf("genodeConsole = %p\n", genodeConsole);
genodeConsole->init_clipboard();

View File

@ -44,15 +44,6 @@ class ComPtr {
return operator=((T*)that);
}
template <class T2>
ComPtr& operator=(T2 *p)
{
_obj = dynamic_cast<T*>(p);
if (!_obj)
Genode::log(__func__, ": dynamic cast failed");
return *this;
}
ComPtr& operator=(T *p)
{
_obj = p;

View File

@ -384,7 +384,7 @@ HRESULT genode_check_memory_config(ComObjPtr<Machine> machine)
if (memory_vbox + memory_vmm > memory_genode) {
using Genode::error;
error("Configured memory ", memory_vmm, " MB (vbox file) is insufficient.");
error("Configured memory ", memory_vbox, " MB (vbox file) is insufficient.");
error(memory_genode, " MB (1) - ",
memory_vmm, " MB (2) = ",
memory_genode - memory_vmm, " MB (3)");

View File

@ -151,7 +151,6 @@ HRESULT setupmachine(Genode::Env &env)
/* handle input of Genode and forward it to VMM layer */
static ComPtr<GenodeConsole> genodeConsole = gConsole;
RTLogPrintf("genodeConsole = %p\n", genodeConsole);
genodeConsole->init_clipboard();

View File

@ -168,14 +168,12 @@ int MMR3HeapAllocZEx(PVM pVM, MMTAG enmTag, size_t cbSize, void **ppv)
int MMR3HyperInitFinalize(PVM)
{
Genode::log(__func__, " called");
return VINF_SUCCESS;
}
int MMR3HyperSetGuard(PVM, void* ptr, size_t, bool)
{
Genode::log(__func__, " called ", ptr);
return VINF_SUCCESS;
}
@ -297,47 +295,6 @@ int MMR3HyperMapMMIO2(PVM pVM, PPDMDEVINS pDevIns, uint32_t iSubDev,
}
char * MMR3HeapStrDupU(PUVM pUVM, MMTAG enmTag, const char *string)
{
if (!string)
return NULL;
size_t len = strlen(string) + 1;
char *dup = reinterpret_cast<char *>(MMR3HeapAllocU(pUVM, enmTag, len));
if (dup)
memcpy(dup, string, len);
return dup;
}
char * MMR3HeapStrDup(PVM pVM, MMTAG enmTag, const char *string)
{
Assert(pVM);
Assert(pVM->pUVM);
return MMR3HeapStrDupU(pVM->pUVM, enmTag, string);
}
char * MMR3HeapAPrintfVU(PUVM pUVM, MMTAG enmTag, const char *pszFormat, va_list va)
{
/*
* The lazy bird way.
*/
char *psz;
int cch = RTStrAPrintfV(&psz, pszFormat, va);
if (cch < 0)
return NULL;
Assert(psz[cch] == '\0');
char *pszRet = (char *)MMR3HeapAllocU(pUVM, enmTag, cch + 1);
if (pszRet)
memcpy(pszRet, psz, cch + 1);
RTStrFree(psz);
Genode::log(__func__, " called ", Genode::Cstring(pszRet), " ", Genode::Cstring(pszFormat));
return pszRet;
}
VMMR3DECL(RTHCPHYS) MMR3HyperHCVirt2HCPhys(PVM pVM, void *pvR3) {
return (RTHCPHYS)(uintptr_t)pvR3; }
@ -360,7 +317,8 @@ VMMR3DECL(void *) MMR3PageAllocLow(PVM pVM) { return MMR3PageAlloc(pVM); }
int MMR3ReserveHandyPages(PVM pVM, uint32_t cHandyPages)
{
Genode::log(__func__, " called");
if (VERBOSE_MM)
Genode::log(__func__, " called");
return VINF_SUCCESS;
}
@ -384,17 +342,3 @@ VMMDECL(uint32_t) MMHyperHeapPtrToOffset(PVM pVM, void *pv)
return offset;
}
extern "C" {
char * MMR3HeapAPrintf(PVM pVM, MMTAG enmTag, const char *pszFormat, ...)
{
va_list va;
va_start(va, pszFormat);
char *psz = MMR3HeapAPrintfVU(pVM->pUVM, enmTag, pszFormat, va);
va_end(va);
return psz;
}
}

View File

@ -137,3 +137,51 @@
break;
}
if (pVM->pgm.s.aHandyPages[i].idSharedPage == idPage)
--- a/src/app/virtualbox/src/VBox/VMM/VMMR3/IEMR3.cpp
+++ b/src/app/virtualbox/src/VBox/VMM/VMMR3/IEMR3.cpp
@@ -195,8 +195,10 @@
for (VMCPUID idCpu = 0; idCpu < pVM->cCpus; idCpu++)
{
pVM->aCpus[idCpu].iem.s.pCtxRC = VM_RC_ADDR(pVM, pVM->aCpus[idCpu].iem.s.pCtxR3);
+#if defined(VBOX_WITH_STATISTICS)
if (pVM->aCpus[idCpu].iem.s.pStatsRC)
pVM->aCpus[idCpu].iem.s.pStatsRC = MMHyperR3ToRC(pVM, pVM->aCpus[idCpu].iem.s.pStatsCCR3);
+#endif
}
}
--- a/src/app/virtualbox/src/VBox/VMM/include/IEMInternal.h
+++ b/src/app/virtualbox/src/VBox/VMM/include/IEMInternal.h
@@ -83,7 +83,7 @@
//#define IEM_WITH_CODE_TLB// - work in progress
-
+#if defined(VBOX_WITH_STATISTICS)
#if !defined(IN_TSTVMSTRUCT) && !defined(DOXYGEN_RUNNING)
/** Instruction statistics. */
typedef struct IEMINSTRSTATS
@@ -98,6 +98,7 @@
#endif
/** Pointer to IEM instruction statistics. */
typedef IEMINSTRSTATS *PIEMINSTRSTATS;
+#endif
/** Finish and move to types.h */
typedef union
@@ -727,6 +728,7 @@
/** Pointer to the CPU context - raw-mode context. */
RCPTRTYPE(PCPUMCTX) pCtxRC;
+#if defined(VBOX_WITH_STATISTICS)
/** Pointer to instruction statistics for raw-mode context (same as R0). */
RCPTRTYPE(PIEMINSTRSTATS) pStatsRC;
/** Pointer to instruction statistics for ring-0 context (same as RC). */
@@ -735,6 +737,7 @@
R3PTRTYPE(PIEMINSTRSTATS) pStatsCCR3;
/** Pointer to instruction statistics for ring-3 context. */
R3PTRTYPE(PIEMINSTRSTATS) pStatsR3;
+#endif
#ifdef IEM_VERIFICATION_MODE_FULL
/** The event verification records for what IEM did (LIFO). */

View File

@ -96,3 +96,35 @@
/**
--- a/src/app/virtualbox/src/VBox/VMM/VMMR3/MMHeap.cpp
+++ b/src/app/virtualbox/src/VBox/VMM/VMMR3/MMHeap.cpp
@@ -34,6 +34,7 @@
#include <iprt/assert.h>
#include <iprt/string.h>
+#if 0
/*********************************************************************************************************************************
* Internal Functions *
@@ -510,6 +511,7 @@
return pHdrNew + 1;
}
+#endif /*#if 0 */
/**
* Duplicates the specified string.
@@ -632,6 +634,7 @@
return pszRet;
}
+#if 0
/**
* Releases memory allocated with MMR3HeapAlloc() or MMR3HeapRealloc().
@@ -693,4 +696,4 @@
*/
RTMemFree(pHdr);
}
-
+#endif /* #if 0 */

View File

@ -493,15 +493,6 @@ index a717aff..3d52b9f 100644
#include <algorithm>
#include <set>
@@ -76,7 +76,7 @@
#include "AutoCaller.h"
#include "Logging.h"
-#include <QMTranslator.h>
+//#include <QMTranslator.h>
#ifdef RT_OS_WINDOWS
# include "win/svchlp.h"
@@ -4069,6 +4069,9 @@
*/
HRESULT VirtualBox::i_saveSettings()
@ -559,18 +550,32 @@ index a717aff..3d52b9f 100644
#include "SchemaDefs.h"
--- a/src/app/virtualbox/src/VBox/Main/src-server/MachineImpl.cpp
+++ b/src/app/virtualbox/src/VBox/Main/src-server/MachineImpl.cpp
@@ -8227,8 +8227,14 @@
@@ -1371,6 +1372,17 @@
}
}
+ if (*aParavirtProvider != ParavirtProvider_None)
+ {
+ HRESULT rc = setError(S_OK, tr("ParavirtProvider '%s'(%d) not supported on VBox@Genode."),
+ *aParavirtProvider == ParavirtProvider_Minimal ? "Minimal" :
+ *aParavirtProvider == ParavirtProvider_HyperV ? "HyperV" :
+ *aParavirtProvider == ParavirtProvider_KVM ? "KVM" : "unknown",
+ *aParavirtProvider);
+ *aParavirtProvider = ParavirtProvider_None;
+ return rc;
+ }
+
Assert( *aParavirtProvider == ParavirtProvider_None
|| *aParavirtProvider == ParavirtProvider_Minimal
|| *aParavirtProvider == ParavirtProvider_HyperV
@@ -8338,8 +8338,8 @@
{
AutoCaller autoCaller(this);
AssertComRCReturnRC(autoCaller.rc());
+#if 0
AssertComRCReturn( getObjectState().getState() == ObjectState::InInit
|| getObjectState().getState() == ObjectState::Limited, E_FAIL);
+#else
+ if (getObjectState().getState() == ObjectState::InInit ||
+ getObjectState().getState() == ObjectState::Limited, E_FAIL)
+ Genode::log(__func__, " skip assertion");
+#endif
- AssertComRCReturn( getObjectState().getState() == ObjectState::InInit
- || getObjectState().getState() == ObjectState::Limited, E_FAIL);
+ AssertReturn( getObjectState().getState() == ObjectState::InInit
+ || getObjectState().getState() == ObjectState::Limited, E_FAIL);
AssertReturn(!mData->mAccessible, E_FAIL);

View File

@ -16,6 +16,7 @@
#include <util/string.h>
/* VirtualBox includes */
#include "PGMInternal.h"
#include <VBox/vmm/pgm.h>
static bool verbose = false;
@ -56,3 +57,19 @@ int PGMR3MappingsSize(PVM pVM, uint32_t *pcb)
return 0;
}
int pgmMapActivateCR3(PVM, PPGMPOOLPAGE)
{
if (verbose)
Genode::log(__func__, ": not implemented ", __builtin_return_address(0));
return VINF_SUCCESS;
}
int pgmMapDeactivateCR3(PVM, PPGMPOOLPAGE)
{
if (verbose)
Genode::log(__func__, ": not implemented ", __builtin_return_address(0));
return VINF_SUCCESS;
}

View File

@ -174,9 +174,12 @@ int SUPR3PageAllocEx(::size_t cPages, uint32_t fFlags, void **ppvPages,
Attached_ram_dataspace * ds = new Attached_ram_dataspace(genode_env().ram(),
genode_env().rm(),
cPages * ONE_PAGE_SIZE);
Genode::addr_t const vmm_local = reinterpret_cast<Genode::addr_t>(ds->local_addr<void>());
*ppvPages = ds->local_addr<void>();
if (pR0Ptr)
*pR0Ptr = reinterpret_cast<RTR0PTR>(*ppvPages);
*pR0Ptr = vmm_local;
Genode::log(__func__, " cPages ", cPages, " alloc=", *ppvPages, " done");
@ -186,7 +189,7 @@ int SUPR3PageAllocEx(::size_t cPages, uint32_t fFlags, void **ppvPages,
for (unsigned iPage = 0; iPage < cPages; iPage++)
{
paPages[iPage].uReserved = 0;
paPages[iPage].Phys = reinterpret_cast<RTHCPHYS>(ds->local_addr<void>()) + iPage * ONE_PAGE_SIZE;
paPages[iPage].Phys = vmm_local + iPage * ONE_PAGE_SIZE;
}
return VINF_SUCCESS;

View File

@ -387,7 +387,7 @@ HRESULT genode_check_memory_config(ComObjPtr<Machine> machine)
if (memory_vbox + memory_vmm > memory_genode) {
using Genode::error;
error("Configured memory ", memory_vmm, " MB (vbox file) is insufficient.");
error("Configured memory ", memory_vbox, " MB (vbox file) is insufficient.");
error(memory_genode, " MB (1) - ",
memory_vmm, " MB (2) = ",
memory_genode - memory_vmm, " MB (3)");

View File

@ -60,7 +60,6 @@ DUMMY(HMR3PatchTprInstr)
DUMMY(MMHyperR0ToCC)
DUMMY(MMHyperRCToCC)
DUMMY(MMR3HeapAPrintfV)
DUMMY(MMR3HyperRealloc)
DUMMY(MMR3LockCall)
DUMMY(MMR3PageDummyHCPhys)
@ -71,8 +70,6 @@ DUMMY(PDMR3LdrGetInterfaceSymbols)
DUMMY(PDMR3LdrQueryRCModFromPC)
DUMMY(PDMCritSectBothFF)
DUMMY(pgmMapActivateCR3)
DUMMY(pgmMapDeactivateCR3)
DUMMY(pgmMapResolveConflicts)
DUMMY(pgmR3SyncPTResolveConflict)
DUMMY(pgmR3SyncPTResolveConflictPAE)
@ -80,6 +77,7 @@ DUMMY(pgmR3SyncPTResolveConflictPAE)
DUMMY(PGMR3HandlerVirtualRegister)
DUMMY(MMPagePhys2PageEx)
DUMMY(PGMR3DbgReadGCPtr)
DUMMY(PGMR3DbgR3Ptr2GCPhys)
DUMMY(PGMR3MappingsUnfix)