diff options
Diffstat (limited to 'src/VBox/VMM/VMMR3/MMHyper.cpp')
| -rw-r--r-- | src/VBox/VMM/VMMR3/MMHyper.cpp | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/src/VBox/VMM/VMMR3/MMHyper.cpp b/src/VBox/VMM/VMMR3/MMHyper.cpp index 86db83a8..9143d988 100644 --- a/src/VBox/VMM/VMMR3/MMHyper.cpp +++ b/src/VBox/VMM/VMMR3/MMHyper.cpp @@ -4,7 +4,7 @@ */ /* - * Copyright (C) 2006-2007 Oracle Corporation + * Copyright (C) 2006-2012 Oracle Corporation * * This file is part of VirtualBox Open Source Edition (OSE), as * available from http://www.virtualbox.org. This file is free software; @@ -22,6 +22,7 @@ #define LOG_GROUP LOG_GROUP_MM_HYPER #include <VBox/vmm/pgm.h> #include <VBox/vmm/mm.h> +#include <VBox/vmm/hm.h> #include <VBox/vmm/dbgf.h> #include "MMInternal.h" #include <VBox/vmm/vm.h> @@ -55,9 +56,6 @@ static uint32_t mmR3ComputeHyperHeapSize(PVM pVM) /* * Gather parameters. */ - bool const fHwVirtExtForced = VMMIsHwVirtExtForced(pVM) - || pVM->cCpus > 1; - bool fCanUseLargerHeap; int rc = CFGMR3QueryBoolDef(CFGMR3GetChild(CFGMR3GetRoot(pVM), "MM"), "CanUseLargerHeap", &fCanUseLargerHeap, false); AssertStmt(RT_SUCCESS(rc), fCanUseLargerHeap = false); @@ -71,7 +69,7 @@ static uint32_t mmR3ComputeHyperHeapSize(PVM pVM) * so lets filter out that case first. */ if ( !fCanUseLargerHeap - && !fHwVirtExtForced + && !HMIsEnabled(pVM) && cbRam < 16*_1G64) return 1280 * _1K; @@ -810,17 +808,14 @@ static int mmR3HyperHeapCreate(PVM pVM, const size_t cb, PMMHYPERHEAP *ppHeap, P 0 /*fFlags*/, &pv, #ifdef VBOX_WITH_2X_4GB_ADDR_SPACE - VMMIsHwVirtExtForced(pVM) ? &pvR0 : NULL, + &pvR0, #else NULL, #endif paPages); if (RT_SUCCESS(rc)) { -#ifdef VBOX_WITH_2X_4GB_ADDR_SPACE - if (!VMMIsHwVirtExtForced(pVM)) - pvR0 = NIL_RTR0PTR; -#else +#ifndef VBOX_WITH_2X_4GB_ADDR_SPACE pvR0 = (uintptr_t)pv; #endif memset(pv, 0, cbAligned); @@ -974,7 +969,7 @@ VMMR3DECL(int) MMR3HyperAllocOnceNoRelEx(PVM pVM, size_t cb, unsigned uAlignment /* * Set MMHYPER_AONR_FLAGS_KERNEL_MAPPING if we're in going to execute in ring-0. */ - if (VMMIsHwVirtExtForced(pVM)) + if (HMIsEnabled(pVM)) fFlags |= MMHYPER_AONR_FLAGS_KERNEL_MAPPING; #endif |
