VirtualBox

Changeset 9855 in vbox


Ignore:
Timestamp:
Jun 20, 2008 1:37:12 PM (17 years ago)
Author:
vboxsync
Message:

SyncPage fix for out of sync pde's.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMAll/PGMAllBth.h

    r9778 r9855  
    14861486     */
    14871487# 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];
    14901490# 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];
    14931495# 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;
    14951498    PX86PDPAE       pPDDst;
    14961499    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);
    15001503    AssertRCReturn(rc, rc);
    1501     Assert(pPDDst && pPdpt);
     1504    Assert(pPDDst && pPdptDst);
    15021505    PdeDst = pPDDst->a[iPDDst];
    15031506# endif
    15041507    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
    15061515
    15071516    /*
     
    17181727     * Yea, I'm lazy.
    17191728     */
    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
    17211736#  if PGM_SHW_TYPE == PGM_TYPE_32BIT
    17221737    pVM->pgm.s.CTXMID(p,32BitPD)->a[iPDDst].u    = 0;
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette