- Timestamp:
- Feb 22, 2010 5:48:23 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/pgm.h
r26616 r26685 283 283 ( (enmProt) == PGMROMPROT_READ_ROM_WRITE_IGNORE \ 284 284 || (enmProt) == PGMROMPROT_READ_ROM_WRITE_RAM ) 285 286 285 287 286 288 VMMDECL(bool) PGMIsLocked(PVM pVM); … … 405 407 406 408 409 VMMDECL(void) PGMSetLargePageUsage(PVM pVM, bool fUseLargePages); 410 411 /** 412 * Query large page usage state 413 * 414 * @returns 0 - disabled, 1 - enabled 415 * @param pVM The VM to operate on. 416 */ 417 #define PGMIsUsingLargePages(pVM) (pVM->fUseLargePages) 418 419 407 420 #ifdef IN_RC 408 421 /** @defgroup grp_pgm_gc The PGM Guest Context API -
trunk/include/VBox/vm.h
r26066 r26685 784 784 /** PARAV enabled flag. */ 785 785 bool fPARAVEnabled; 786 /** Large page enabled flag. */ 787 bool fUseLargePages; 786 788 /** @} */ 787 789 -
trunk/src/VBox/VMM/HWACCM.cpp
r26176 r26685 1157 1157 if (pVM->hwaccm.s.vmx.fUnrestrictedGuest) 1158 1158 LogRel(("HWACCM: Unrestricted guest execution enabled!\n")); 1159 1160 #ifdef DEBUG_sandervl 1161 /* Use large (2 MB) pages for our EPT PDEs where possible. */ 1162 PGMSetLargePageUsage(pVM, true); 1163 #endif 1159 1164 } 1160 1165 else -
trunk/src/VBox/VMM/VMMAll/HWACCMAll.cpp
r26152 r26685 338 338 return !!pVCpu->hwaccm.s.Event.fPending; 339 339 } 340 -
trunk/src/VBox/VMM/VMMAll/PGMAll.cpp
r26277 r26685 2108 2108 2109 2109 /** 2110 * Enable or disable large page usage 2111 * 2112 * @param pVM The VM to operate on. 2113 * @param fUseLargePages Use/not use large pages 2114 */ 2115 VMMDECL(void) PGMSetLargePageUsage(PVM pVM, bool fUseLargePages) 2116 { 2117 pVM->fUseLargePages = fUseLargePages; 2118 } 2119 2120 /** 2110 2121 * Acquire the PGM lock. 2111 2122 * -
trunk/src/VBox/VMM/VMMAll/PGMAllBth.h
r26635 r26685 2937 2937 Assert(!PdeDst.n.u1Present); /* We're only supposed to call SyncPT on PDE!P and conflicts.*/ 2938 2938 2939 # if (PGM_SHW_TYPE == PGM_TYPE_EPT) && (HC_ARCH_BITS == 64) && defined(RT_OS_WINDOWS) && defined(DEBUG_sandervl) 2939 # if (PGM_SHW_TYPE == PGM_TYPE_EPT) && (HC_ARCH_BITS == 64) && defined(RT_OS_WINDOWS) 2940 if (PGMIsUsingLargePages(pVM)) 2940 2941 { 2941 2942 RTHCPHYS HCPhys; 2942 2943 rc = pgmPhysAllocLargePage(pVM, GCPtrPage & SHW_PDE_PG_MASK, &HCPhys); 2943 2944 if (RT_SUCCESS(rc)) 2944 { 2945 { 2945 2946 PdeDst.u &= X86_PDE_AVL_MASK; 2946 2947 PdeDst.u |= HCPhys; -
trunk/src/VBox/VMM/VMMAll/PGMAllPhys.cpp
r26679 r26685 368 368 Assert(!PGM_PAGE_IS_MMIO(pPage)); 369 369 370 if (PGMIsUsingLargePages(pVM)) 371 { 372 RTHCPHYS HCPhysDummy; 373 374 int rc = pgmPhysAllocLargePage(pVM, GCPhys, &HCPhysDummy); 375 if (rc == VINF_SUCCESS) 376 return rc; 377 378 /* fall back to 4kb pages. */ 379 } 370 380 371 381 /* … … 471 481 */ 472 482 Assert(PGMIsLocked(pVM)); 483 Assert(PGMIsUsingLargePages(pVM)); 473 484 Assert((GCPhys & X86_PD_PAE_MASK) == 0); 474 485 AssertPtr(pHCPhys); … … 540 551 } 541 552 LogFlow(("pgmPhysAllocLargePage failed with %Rrc\n", rc)); 553 554 /* If we fail once, it most likely means the host's memory is too fragmented; don't bother trying again. */ 555 PGMSetLargePageUsage(pVM, false); 542 556 return rc; 543 557 }
Note:
See TracChangeset
for help on using the changeset viewer.