Changeset 31066 in vbox for trunk/src/VBox/VMM/VMMAll
- Timestamp:
- Jul 23, 2010 2:48:24 PM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 64001
- Location:
- trunk/src/VBox/VMM/VMMAll
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/PGMAll.cpp
r31054 r31066 70 70 DECLINLINE(int) pgmShwGetLongModePDPtr(PVMCPU pVCpu, RTGCPTR64 GCPtr, PX86PML4E *ppPml4e, PX86PDPT *ppPdpt, PX86PDPAE *ppPD); 71 71 DECLINLINE(int) pgmShwGetPaePoolPagePD(PPGMCPU pPGM, RTGCPTR GCPtr, PPGMPOOLPAGE *ppShwPde); 72 #ifndef IN_RC 73 static int pgmShwSyncLongModePDPtr(PVMCPU pVCpu, RTGCPTR64 GCPtr, PCX86PML4E pGstPml4e, PCX86PDPE pGstPdpe, PX86PDPAE *ppPD); 74 static int pgmShwGetEPTPDPtr(PVMCPU pVCpu, RTGCPTR64 GCPtr, PEPTPDPT *ppPdpt, PEPTPD *ppPD); 75 #endif 76 72 77 73 78 /* … … 623 628 } 624 629 625 if (!HWACCMIsNestedPagingActive(pVM)) 630 Assert(HWACCMIsNestedPagingActive(pVM) == pVM->pgm.s.fNestedPaging); 631 if (!pVM->pgm.s.fNestedPaging) 626 632 { 627 633 /* … … 912 918 * @param ppPD Receives address of page directory 913 919 */ 914 int pgmShwSyncPaePDPtr(PVMCPU pVCpu, RTGCPTR GCPtr, P X86PDPE pGstPdpe, PX86PDPAE *ppPD)920 int pgmShwSyncPaePDPtr(PVMCPU pVCpu, RTGCPTR GCPtr, PCX86PDPE pGstPdpe, PX86PDPAE *ppPD) 915 921 { 916 922 const unsigned iPdPt = (GCPtr >> X86_PDPT_SHIFT) & X86_PDPT_MASK_PAE; … … 930 936 RTGCPTR64 GCPdPt; 931 937 PGMPOOLKIND enmKind; 938 Assert(pGstPdpe); 939 X86PDPE GstPdpe = *pGstPdpe; 932 940 933 941 # if defined(IN_RC) … … 936 944 # endif 937 945 938 if (HWACCMIsNestedPagingActive(pVM) || !CPUMIsGuestPagingEnabled(pVCpu)) 946 Assert(HWACCMIsNestedPagingActive(pVM) == pVM->pgm.s.fNestedPaging); 947 if (pVM->pgm.s.fNestedPaging || !CPUMIsGuestPagingEnabled(pVCpu)) 939 948 { 940 949 /* AMD-V nested paging or real/protected mode without paging. */ … … 944 953 else 945 954 { 946 Assert(pGstPdpe);947 948 955 if (CPUMGetGuestCR4(pVCpu) & X86_CR4_PAE) 949 956 { 950 if (! pGstPdpe->n.u1Present)957 if (!GstPdpe.n.u1Present) 951 958 { 952 959 /* PD not present; guest must reload CR3 to change it. … … 955 962 Assert(!HWACCMIsEnabled(pVM)); 956 963 957 GCPdPt = pGstPdpe->u & X86_PDPE_PG_MASK;964 GCPdPt = GstPdpe.u & X86_PDPE_PG_MASK; 958 965 enmKind = PGMPOOLKIND_PAE_PD_PHYS; 959 pGstPdpe->n.u1Present = 1;966 GstPdpe.n.u1Present = 1; 960 967 } 961 968 else 962 969 { 963 GCPdPt = pGstPdpe->u & X86_PDPE_PG_MASK;970 GCPdPt = GstPdpe.u & X86_PDPE_PG_MASK; 964 971 enmKind = PGMPOOLKIND_PAE_PD_FOR_PAE_PD; 965 972 } … … 978 985 /* The PD was cached or created; hook it up now. */ 979 986 pPdpe->u |= pShwPage->Core.Key 980 | ( pGstPdpe->u & ~(X86_PDPE_PG_MASK | X86_PDPE_AVL_MASK | X86_PDPE_PCD | X86_PDPE_PWT));987 | (GstPdpe.u & ~(X86_PDPE_PG_MASK | X86_PDPE_AVL_MASK | X86_PDPE_PCD | X86_PDPE_PWT)); 981 988 982 989 # if defined(IN_RC) … … 1051 1058 * @param ppPD Receives address of page directory 1052 1059 */ 1053 int pgmShwSyncLongModePDPtr(PVMCPU pVCpu, RTGCPTR64 GCPtr, PX86PML4E pGstPml4e, PX86PDPE pGstPdpe, PX86PDPAE *ppPD)1060 static int pgmShwSyncLongModePDPtr(PVMCPU pVCpu, RTGCPTR64 GCPtr, PCX86PML4E pGstPml4e, PCX86PDPE pGstPdpe, PX86PDPAE *ppPD) 1054 1061 { 1055 1062 PPGMCPU pPGM = &pVCpu->pgm.s; … … 1058 1065 const unsigned iPml4 = (GCPtr >> X86_PML4_SHIFT) & X86_PML4_MASK; 1059 1066 PX86PML4E pPml4e = pgmShwGetLongModePML4EPtr(pPGM, iPml4); 1060 bool fNestedPagingOrNoGstPaging = HWACCMIsNestedPagingActive(pVM) || !CPUMIsGuestPagingEnabled(pVCpu); 1067 Assert(HWACCMIsNestedPagingActive(pVM) == pVM->pgm.s.fNestedPaging); 1068 bool fNestedPagingOrNoGstPaging = pVM->pgm.s.fNestedPaging || !CPUMIsGuestPagingEnabled(pVCpu); 1061 1069 PPGMPOOLPAGE pShwPage; 1062 1070 int rc; … … 1201 1209 * @param ppPD Receives address of page directory 1202 1210 */ 1203 int pgmShwGetEPTPDPtr(PVMCPU pVCpu, RTGCPTR64 GCPtr, PEPTPDPT *ppPdpt, PEPTPD *ppPD)1211 static int pgmShwGetEPTPDPtr(PVMCPU pVCpu, RTGCPTR64 GCPtr, PEPTPDPT *ppPdpt, PEPTPD *ppPD) 1204 1212 { 1205 1213 PPGMCPU pPGM = &pVCpu->pgm.s; … … 1212 1220 int rc; 1213 1221 1214 Assert(HWACCMIsNestedPagingActive(pVM)); 1222 Assert(HWACCMIsNestedPagingActive(pVM) == pVM->pgm.s.fNestedPaging); 1223 Assert(pVM->pgm.s.fNestedPaging); 1215 1224 Assert(PGMIsLockOwner(pVM)); 1216 1225 … … 1829 1838 1830 1839 /* We assume we're only called in nested paging mode. */ 1831 Assert(HWACCMIsNestedPagingActive(pVM) || pVCpu->pgm.s.enmShadowMode == PGMMODE_EPT); 1840 Assert(HWACCMIsNestedPagingActive(pVM) == pVM->pgm.s.fNestedPaging); 1841 Assert(pVM->pgm.s.fNestedPaging || pVCpu->pgm.s.enmShadowMode == PGMMODE_EPT); 1832 1842 Assert(pVM->pgm.s.fMappingsDisabled); 1833 1843 Assert(!(pVCpu->pgm.s.fSyncFlags & PGM_SYNC_MONITOR_CR3)); -
trunk/src/VBox/VMM/VMMAll/PGMAllBth.h
r30895 r31066 906 906 RTGCPHYS GCPhys2; 907 907 uint64_t fPageGst; 908 if (!HWACCMIsNestedPagingActive(pVM)) 908 Assert(HWACCMIsNestedPagingActive(pVM) == pVM->pgm.s.fNestedPaging); 909 if (!pVM->pgm.s.fNestedPaging) 909 910 { 910 911 rc = PGMGstGetPage(pVCpu, pvFault, &fPageGst, &GCPhys2); … … 1124 1125 unsigned iPDSrc = 0; 1125 1126 # if PGM_GST_TYPE == PGM_TYPE_PAE 1126 X86PDPE PdpeSrc ;1127 PX86PDPAE pPDSrc = pgmGstGetPaePDPtr(pVCpu, GCPtrPage, &iPDSrc, &PdpeSrc );1127 X86PDPE PdpeSrcIgn; 1128 PX86PDPAE pPDSrc = pgmGstGetPaePDPtr(pVCpu, GCPtrPage, &iPDSrc, &PdpeSrcIgn); 1128 1129 # else /* AMD64 */ 1129 PX86PML4E pPml4eSrc ;1130 X86PDPE PdpeSrc ;1131 PX86PDPAE pPDSrc = pgmGstGetLongModePDPtr(pVCpu, GCPtrPage, &pPml4eSrc , &PdpeSrc, &iPDSrc);1130 PX86PML4E pPml4eSrcIgn; 1131 X86PDPE PdpeSrcIgn; 1132 PX86PDPAE pPDSrc = pgmGstGetLongModePDPtr(pVCpu, GCPtrPage, &pPml4eSrcIgn, &PdpeSrcIgn, &iPDSrc); 1132 1133 # endif 1133 1134 GSTPDE PdeSrc; … … 2079 2080 if (PdeDst.n.u1Size) 2080 2081 { 2081 Assert(HWACCMIsNestedPagingActive(pVM)); 2082 Assert(HWACCMIsNestedPagingActive(pVM) == pVM->pgm.s.fNestedPaging); 2083 Assert(pVM->pgm.s.fNestedPaging); 2082 2084 Log(("CPU%d: SyncPage: Pde (big:%RX64) at %RGv changed behind our back!\n", pVCpu->idCpu, PdeDst.u, GCPtrPage)); 2083 2085 return VINF_SUCCESS; … … 3459 3461 LogFlow(("VerifyAccessSyncPage: GCPtrPage=%RGv fPage=%#x uErr=%#x\n", GCPtrPage, fPage, uErr)); 3460 3462 3461 Assert(!HWACCMIsNestedPagingActive(pVM)); 3463 Assert(HWACCMIsNestedPagingActive(pVM) == pVM->pgm.s.fNestedPaging); 3464 Assert(!pVM->pgm.s.fNestedPaging); 3462 3465 #if ( PGM_GST_TYPE == PGM_TYPE_32BIT \ 3463 3466 || PGM_GST_TYPE == PGM_TYPE_REAL \ … … 4651 4654 && PGM_GST_TYPE != PGM_TYPE_PROT)) 4652 4655 4653 Assert(!HWACCMIsNestedPagingActive(pVM)); 4656 Assert(HWACCMIsNestedPagingActive(pVM) == pVM->pgm.s.fNestedPaging); 4657 Assert(!pVM->pgm.s.fNestedPaging); 4654 4658 4655 4659 /* … … 4798 4802 4799 4803 # if PGM_GST_TYPE != PGM_TYPE_REAL 4800 Assert(!HWACCMIsNestedPagingActive(pVM)); 4804 Assert(HWACCMIsNestedPagingActive(pVM) == pVM->pgm.s.fNestedPaging); 4805 Assert(!pVM->pgm.s.fNestedPaging); 4801 4806 # endif 4802 4807 -
trunk/src/VBox/VMM/VMMAll/PGMAllPool.cpp
r30372 r31066 3124 3124 case PGMPOOLKIND_EPT_PD_FOR_PHYS: 3125 3125 { 3126 Assert( HWACCMIsNestedPagingActive(pVM));3126 Assert(pVM->pgm.s.fNestedPaging); 3127 3127 3128 3128 const uint64_t u64 = PGM_PAGE_GET_HCPHYS(pPhysPage) | X86_PDE4M_P | X86_PDE4M_PS; … … 3158 3158 case PGMPOOLKIND_PAE_PD_PHYS: 3159 3159 { 3160 Assert( HWACCMIsNestedPagingActive(pVM));3160 Assert(pVM->pgm.s.fNestedPaging); 3161 3161 3162 3162 const uint64_t u64 = PGM_PAGE_GET_HCPHYS(pPhysPage) | X86_PDE4M_P | X86_PDE4M_PS;
Note:
See TracChangeset
for help on using the changeset viewer.