Changeset 9855 in vbox
- Timestamp:
- Jun 20, 2008 1:37:12 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/PGMAllBth.h
r9778 r9855 1486 1486 */ 1487 1487 # if PGM_SHW_TYPE == PGM_TYPE_32BIT 1488 const unsigned iPDDst = GCPtrPage >> SHW_PD_SHIFT;1489 X86PDE PdeDst = pVM->pgm.s.CTXMID(p,32BitPD)->a[iPDDst];1488 const unsigned iPDDst = GCPtrPage >> SHW_PD_SHIFT; 1489 X86PDE PdeDst = pVM->pgm.s.CTXMID(p,32BitPD)->a[iPDDst]; 1490 1490 # elif PGM_SHW_TYPE == PGM_TYPE_PAE 1491 const unsigned iPDDst = GCPtrPage >> SHW_PD_SHIFT; 1492 X86PDEPAE PdeDst = pVM->pgm.s.CTXMID(ap,PaePDs)[0]->a[iPDDst]; 1491 const unsigned iPDDst = GCPtrPage >> SHW_PD_SHIFT; 1492 const unsigned iPdPte = (GCPtrPage >> X86_PDPT_SHIFT); /* no mask; flat index into the 2048 entry array. */ 1493 PX86PDPT pPdptDst = pVM->pgm.s.CTXMID(p,PaePDPT); 1494 X86PDEPAE PdeDst = pVM->pgm.s.CTXMID(ap,PaePDs)[0]->a[iPDDst]; 1493 1495 # elif PGM_SHW_TYPE == PGM_TYPE_AMD64 1494 const unsigned iPDDst = ((GCPtrPage >> SHW_PD_SHIFT) & SHW_PD_MASK); 1496 const unsigned iPDDst = ((GCPtrPage >> SHW_PD_SHIFT) & SHW_PD_MASK); 1497 const unsigned iPdPte = (GCPtrPage >> X86_PDPT_SHIFT) & X86_PDPT_MASK_AMD64; 1495 1498 PX86PDPAE pPDDst; 1496 1499 X86PDEPAE PdeDst; 1497 PX86PDPT pPdpt ;1498 1499 int rc = PGMShwGetLongModePDPtr(pVM, GCPtrPage, &pPdpt , &pPDDst);1500 PX86PDPT pPdptDst; 1501 1502 int rc = PGMShwGetLongModePDPtr(pVM, GCPtrPage, &pPdptDst, &pPDDst); 1500 1503 AssertRCReturn(rc, rc); 1501 Assert(pPDDst && pPdpt );1504 Assert(pPDDst && pPdptDst); 1502 1505 PdeDst = pPDDst->a[iPDDst]; 1503 1506 # endif 1504 1507 Assert(PdeDst.n.u1Present); 1505 PPGMPOOLPAGE pShwPage = pgmPoolGetPageByHCPhys(pVM, PdeDst.u & SHW_PDE_PG_MASK); 1508 PPGMPOOLPAGE pShwPage = pgmPoolGetPageByHCPhys(pVM, PdeDst.u & SHW_PDE_PG_MASK); 1509 1510 # if PGM_GST_TYPE == PGM_TYPE_PAE || PGM_GST_TYPE == PGM_TYPE_AMD64 1511 /* Fetch the pgm pool shadow descriptor. */ 1512 PPGMPOOLPAGE pShwPde = pgmPoolGetPageByHCPhys(pVM, pPdptDst->a[iPdPte].u & X86_PDPE_PG_MASK); 1513 Assert(pShwPde); 1514 # endif 1506 1515 1507 1516 /* … … 1718 1727 * Yea, I'm lazy. 1719 1728 */ 1720 pgmPoolFree(pVM, PdeDst.u & SHW_PDE_PG_MASK, SHW_POOL_ROOT_IDX, iPDDst); 1729 PPGMPOOL pPool = pVM->pgm.s.CTXSUFF(pPool); 1730 # if PGM_GST_TYPE == PGM_TYPE_PAE || PGM_GST_TYPE == PGM_TYPE_AMD64 1731 pgmPoolFreeByPage(pPool, pShwPage, pShwPde->idx, iPDDst); 1732 # else 1733 pgmPoolFreeByPage(pPool, pShwPage, SHW_POOL_ROOT_IDX, iPDDst); 1734 # endif 1735 1721 1736 # if PGM_SHW_TYPE == PGM_TYPE_32BIT 1722 1737 pVM->pgm.s.CTXMID(p,32BitPD)->a[iPDDst].u = 0;
Note:
See TracChangeset
for help on using the changeset viewer.