- Timestamp:
- Feb 18, 2010 6:24:40 PM (15 years ago)
- Location:
- trunk/src/VBox/VMM/VMMAll
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/CPUMAllRegs.cpp
r26026 r26635 1721 1721 VMMDECL(bool) CPUMIsGuestPageSizeExtEnabled(PVMCPU pVCpu) 1722 1722 { 1723 /* PAE or AMD64 implies support for big pages regardless of CR4.PSE */ 1724 if (pVCpu->cpum.s.Guest.cr4 & X86_CR4_PAE) 1725 return true; 1726 1723 1727 return !!(pVCpu->cpum.s.Guest.cr4 & X86_CR4_PSE); 1724 1728 } -
trunk/src/VBox/VMM/VMMAll/PGMAllBth.h
r26625 r26635 376 376 # if PGM_WITH_PAGING(PGM_GST_TYPE, PGM_SHW_TYPE) 377 377 if ( PdeSrc.b.u1Size 378 # if PGM_GST_TYPE != PGM_TYPE_AMD64378 # if PGM_GST_TYPE == PGM_TYPE_32BIT 379 379 && CPUMIsGuestPageSizeExtEnabled(pVCpu) 380 380 # endif … … 1095 1095 # endif /* PGM_GST_TYPE != PGM_TYPE_32BIT */ 1096 1096 1097 # if PGM_GST_TYPE == PGM_TYPE_AMD64 1097 # if PGM_GST_TYPE == PGM_TYPE_32BIT 1098 const bool fIsBigPage = PdeSrc.b.u1Size && CPUMIsGuestPageSizeExtEnabled(pVCpu); 1099 # else 1098 1100 const bool fIsBigPage = PdeSrc.b.u1Size; 1099 # else1100 const bool fIsBigPage = PdeSrc.b.u1Size && CPUMIsGuestPageSizeExtEnabled(pVCpu);1101 1101 # endif 1102 1102 … … 1639 1639 * Check that the page is present and that the shadow PDE isn't out of sync. 1640 1640 */ 1641 # if PGM_GST_TYPE == PGM_TYPE_AMD64 1641 # if PGM_GST_TYPE == PGM_TYPE_32BIT 1642 const bool fBigPage = PdeSrc.b.u1Size && CPUMIsGuestPageSizeExtEnabled(pVCpu); 1643 # else 1642 1644 const bool fBigPage = PdeSrc.b.u1Size; 1643 # else1644 const bool fBigPage = PdeSrc.b.u1Size && CPUMIsGuestPageSizeExtEnabled(pVCpu);1645 1645 # endif 1646 1646 RTGCPHYS GCPhys; … … 2099 2099 */ 2100 2100 if ( pPdeSrc->b.u1Size 2101 # if PGM_GST_TYPE != PGM_TYPE_AMD642101 # if PGM_GST_TYPE == PGM_TYPE_32BIT 2102 2102 && CPUMIsGuestPageSizeExtEnabled(pVCpu) 2103 2103 # endif … … 2206 2206 /* Check the present bit as the shadow tables can cause different error codes by being out of sync. */ 2207 2207 if ( pPdeSrc->b.u1Size 2208 # if PGM_GST_TYPE != PGM_TYPE_AMD642208 # if PGM_GST_TYPE == PGM_TYPE_32BIT 2209 2209 && CPUMIsGuestPageSizeExtEnabled(pVCpu) 2210 2210 # endif … … 2244 2244 PGM_BTH_DECL(int, CheckDirtyPageFault)(PVMCPU pVCpu, uint32_t uErr, PSHWPDE pPdeDst, PGSTPDE pPdeSrc, RTGCPTR GCPtrPage) 2245 2245 { 2246 # if PGM_GST_TYPE == PGM_TYPE_AMD64 2246 # if PGM_GST_TYPE == PGM_TYPE_32BIT 2247 const bool fBigPagesSupported = CPUMIsGuestPageSizeExtEnabled(pVCpu); 2248 # else 2247 2249 const bool fBigPagesSupported = true; 2248 # else2249 const bool fBigPagesSupported = !!(CPUMGetGuestCR4(pVCpu) & X86_CR4_PSE);2250 2250 # endif 2251 2251 PVM pVM = pVCpu->CTX_SUFF(pVM); … … 2526 2526 */ 2527 2527 PSHWPT pPTDst; 2528 # if PGM_GST_TYPE == PGM_TYPE_AMD64 2528 # if PGM_GST_TYPE == PGM_TYPE_32BIT 2529 const bool fPageTable = !PdeSrc.b.u1Size || !CPUMIsGuestPageSizeExtEnabled(pVCpu); 2530 # else 2529 2531 const bool fPageTable = !PdeSrc.b.u1Size; 2530 # else2531 const bool fPageTable = !PdeSrc.b.u1Size || !CPUMIsGuestPageSizeExtEnabled(pVCpu);2532 2532 # endif 2533 2533 PPGMPOOLPAGE pShwPage; … … 3478 3478 || PGM_GST_TYPE == PGM_TYPE_AMD64 3479 3479 3480 # if PGM_GST_TYPE == PGM_TYPE_AMD64 3480 # if PGM_GST_TYPE == PGM_TYPE_32BIT 3481 bool fBigPagesSupported = CPUMIsGuestPageSizeExtEnabled(pVCpu); 3482 # else 3481 3483 bool fBigPagesSupported = true; 3482 # else3483 bool fBigPagesSupported = CPUMIsGuestPageSizeExtEnabled(pVCpu);3484 3484 # endif 3485 3485 PPGMCPU pPGM = &pVCpu->pgm.s; -
trunk/src/VBox/VMM/VMMAll/PGMAllGst.h
r25866 r26635 104 104 105 105 if ( !Pde.b.u1Size 106 # if PGM_GST_TYPE != PGM_TYPE_AMD64106 # if PGM_GST_TYPE == PGM_TYPE_32BIT 107 107 || !CPUMIsGuestPageSizeExtEnabled(pVCpu) 108 108 # endif … … 221 221 222 222 if ( !Pde.b.u1Size 223 # if PGM_GST_TYPE != PGM_TYPE_AMD64223 # if PGM_GST_TYPE == PGM_TYPE_32BIT 224 224 || !CPUMIsGuestPageSizeExtEnabled(pVCpu) 225 225 # endif … … 362 362 { 363 363 if ( !Pde.b.u1Size 364 # if PGM_GST_TYPE != PGM_TYPE_AMD64364 # if PGM_GST_TYPE == PGM_TYPE_32BIT 365 365 || !(pState->cr4 & X86_CR4_PSE) 366 366 # endif
Note:
See TracChangeset
for help on using the changeset viewer.