Changeset 7668 in vbox
- Timestamp:
- Mar 31, 2008 3:30:28 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/PGMAllBth.h
r7667 r7668 864 864 PPGMPOOLPAGE pShwPage = pgmPoolGetPageByHCPhys(pVM, PdeDst.u & SHW_PDE_PG_MASK); 865 865 RTGCPHYS GCPhys = PdeSrc.u & GST_PDE_PG_MASK; 866 # if PGM_SHW_TYPE != PGM_TYPE_32BIT \ 867 && PGM_GST_TYPE == PGM_TYPE_32BIT 868 /* Select the right PDE as we're emulating a 4kb page table with 2 shadow page tables. (32 bits guest; PAE shadow) */ 866 # if PGM_SHW_TYPE == PGM_TYPE_PAE && PGM_GST_TYPE == PGM_TYPE_32BIT 867 /* Select the right PDE as we're emulating a 4kb page table with 2 shadow page tables. */ 869 868 GCPhys |= (iPDDst & 1) * (PAGE_SIZE/2); 870 869 # endif … … 911 910 PPGMPOOLPAGE pShwPage = pgmPoolGetPageByHCPhys(pVM, PdeDst.u & SHW_PDE_PG_MASK); 912 911 RTGCPHYS GCPhys = PdeSrc.u & GST_PDE_BIG_PG_MASK; 913 # if PGM_SHW_TYPE != PGM_TYPE_32BIT \ 914 && PGM_GST_TYPE == PGM_TYPE_32BIT 915 /* Select the right PDE as we're emulating a 4MB page directory with two 2 MB shadow PDEs. (32 bits guest; PAE shadow)*/ 912 # if PGM_SHW_TYPE == PGM_TYPE_PAE && PGM_GST_TYPE == PGM_TYPE_32BIT 913 /* Select the right PDE as we're emulating a 4MB page directory with two 2 MB shadow PDEs.*/ 916 914 GCPhys |= GCPtrPage & (1 << X86_PD_PAE_SHIFT); 917 915 # endif … … 1271 1269 { 1272 1270 GCPhys = PdeSrc.u & GST_PDE_PG_MASK; 1273 # if PGM_SHW_TYPE != PGM_TYPE_32BIT \ 1274 && PGM_GST_TYPE == PGM_TYPE_32BIT 1275 /* Select the right PDE as we're emulating a 4kb page table with 2 shadow page tables. (32 bits guest; PAE shadow) */ 1271 # if PGM_SHW_TYPE == PGM_TYPE_PAE && PGM_GST_TYPE == PGM_TYPE_32BIT 1272 /* Select the right PDE as we're emulating a 4kb page table with 2 shadow page tables. */ 1276 1273 GCPhys |= (iPDDst & 1) * (PAGE_SIZE/2); 1277 1274 # endif … … 1280 1277 { 1281 1278 GCPhys = PdeSrc.u & GST_PDE_BIG_PG_MASK; 1282 # if PGM_SHW_TYPE != PGM_TYPE_32BIT \ 1283 && PGM_GST_TYPE == PGM_TYPE_32BIT 1284 /* Select the right PDE as we're emulating a 4MB page directory with two 2 MB shadow PDEs. (32 bits guest; PAE shadow)*/ 1279 # if PGM_SHW_TYPE == PGM_TYPE_PAE && PGM_GST_TYPE == PGM_TYPE_32BIT 1280 /* Select the right PDE as we're emulating a 4MB page directory with two 2 MB shadow PDEs.*/ 1285 1281 GCPhys |= GCPtrPage & (1 << X86_PD_PAE_SHIFT); 1286 1282 # endif … … 1326 1322 */ 1327 1323 unsigned iPTDst = (GCPtrPage >> SHW_PT_SHIFT) & SHW_PT_MASK; 1328 # if PGM_SHW_TYPE == PGM_TYPE_32BIT \ 1329 || PGM_GST_TYPE != PGM_TYPE_32BIT 1324 # if PGM_SHW_TYPE == PGM_TYPE_PAE && PGM_GST_TYPE == PGM_TYPE_32BIT 1325 /* Select the right PDE as we're emulating a 4kb page table with 2 shadow page tables. */ 1326 const unsigned offPTSrc = ((GCPtrPage >> SHW_PD_SHIFT) & 1) * 512; 1327 # else 1330 1328 const unsigned offPTSrc = 0; 1331 # else1332 /* Select the right PDE as we're emulating a 4kb page table with 2 shadow page tables. (32 bits guest; PAE shadow) */1333 const unsigned offPTSrc = ((GCPtrPage >> SHW_PD_SHIFT) & 1) * 512;1334 1329 # endif 1335 1330 const unsigned iPTDstEnd = RT_MIN(iPTDst + PGM_SYNC_NR_PAGES / 2, ELEMENTS(pPTDst->a)); … … 1504 1499 PSHWPT pPTDst = (PSHWPT)PGMPOOL_PAGE_2_PTR(pVM, pShwPage); 1505 1500 1506 # if PGM_SHW_TYPE == PGM_TYPE_32BIT \ 1507 || PGM_GST_TYPE != PGM_TYPE_32BIT 1501 # if PGM_SHW_TYPE == PGM_TYPE_PAE && PGM_GST_TYPE == PGM_TYPE_32BIT 1502 /* Select the right PDE as we're emulating a 4kb page table with 2 shadow page tables. */ 1503 const unsigned offPTSrc = ((GCPtrPage >> SHW_PD_SHIFT) & 1) * 512; 1504 # else 1508 1505 const unsigned offPTSrc = 0; 1509 # else1510 /* Select the right PDE as we're emulating a 4kb page table with 2 shadow page tables. (32 bits guest; PAE shadow) */1511 const unsigned offPTSrc = ((GCPtrPage >> SHW_PD_SHIFT) & 1) * 512;1512 1506 # endif 1513 1507 … … 2011 2005 const unsigned iPTDstEnd = ELEMENTS(pPTDst->a); 2012 2006 # endif /* !PGM_SYNC_N_PAGES */ 2013 # if PGM_SHW_TYPE == PGM_TYPE_32BIT \ 2014 || PGM_GST_TYPE != PGM_TYPE_32BIT 2007 # if PGM_SHW_TYPE == PGM_TYPE_PAE && PGM_GST_TYPE == PGM_TYPE_32BIT 2008 /* Select the right PDE as we're emulating a 4kb page table with 2 shadow page tables. */ 2009 const unsigned offPTSrc = ((GCPtrPage >> SHW_PD_SHIFT) & 1) * 512; 2010 # else 2015 2011 const unsigned offPTSrc = 0; 2016 # else2017 /* Select the right PDE as we're emulating a 4kb page table with 2 shadow page tables. (32 bits guest; PAE shadow) */2018 const unsigned offPTSrc = ((GCPtrPage >> SHW_PD_SHIFT) & 1) * 512;2019 2012 # endif 2020 2013 for (; iPTDst < iPTDstEnd; iPTDst++) … … 3075 3068 3076 3069 /* iterate the page table. */ 3077 # if PGM_SHW_TYPE == PGM_TYPE_32BIT \ 3078 || PGM_GST_TYPE != PGM_TYPE_32BIT 3070 # if PGM_SHW_TYPE == PGM_TYPE_PAE && PGM_GST_TYPE == PGM_TYPE_32BIT 3071 /* Select the right PDE as we're emulating a 4kb page table with 2 shadow page tables. */ 3072 const unsigned offPTSrc = ((GCPtr >> SHW_PD_SHIFT) & 1) * 512; 3073 # else 3079 3074 const unsigned offPTSrc = 0; 3080 # else3081 /* Select the right PDE as we're emulating a 4kb page table with 2 shadow page tables. (32 bits guest; PAE shadow) */3082 const unsigned offPTSrc = ((GCPtr >> SHW_PD_SHIFT) & 1) * 512;3083 3075 # endif 3084 3076 for (unsigned iPT = 0, off = 0;
Note:
See TracChangeset
for help on using the changeset viewer.