VirtualBox

Changeset 32027 in vbox for trunk/src


Ignore:
Timestamp:
Aug 27, 2010 9:17:42 AM (14 years ago)
Author:
vboxsync
Message:

PGM/SyncPage: To be on the safe side, always sync the target page when doing multiple pages.

File:
1 edited

Legend:

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

    r32009 r32027  
    18121812    if (!PdeDst.n.u1Present)
    18131813    {
     1814        LogAlways(("CPU%d: SyncPage: Pde at %RGv changed behind our back! (pPdeDst=%p/%RX64)\n", pVCpu->idCpu, GCPtrPage, pPdeDst, (uint64_t)PdeDst.u));
    18141815        AssertMsg(pVM->cCpus > 1, ("Unexpected missing PDE p=%p/%RX64\n", pPdeDst, (uint64_t)PdeDst.u));
    1815         Log(("CPU%d: SyncPage: Pde at %RGv changed behind our back!\n", pVCpu->idCpu, GCPtrPage));
    18161816        return VINF_SUCCESS;    /* force the instruction to be executed again. */
    18171817    }
     
    18891889                         * deal with locality.
    18901890                         */
    1891                         unsigned        iPTDst    = (GCPtrPage >> SHW_PT_SHIFT) & SHW_PT_MASK;
     1891                        unsigned        iPTDst      = (GCPtrPage >> SHW_PT_SHIFT) & SHW_PT_MASK;
     1892                        const unsigned  iPTDstPage  = iPTDst;
    18921893#  if PGM_SHW_TYPE == PGM_TYPE_PAE && PGM_GST_TYPE == PGM_TYPE_32BIT
    18931894                        /* Select the right PDE as we're emulating a 4kb page table with 2 shadow page tables. */
    1894                         const unsigned  offPTSrc  = ((GCPtrPage >> SHW_PD_SHIFT) & 1) * 512;
     1895                        const unsigned  offPTSrc    = ((GCPtrPage >> SHW_PD_SHIFT) & 1) * 512;
    18951896#  else
    1896                         const unsigned  offPTSrc  = 0;
     1897                        const unsigned  offPTSrc    = 0;
    18971898#  endif
    1898                         const unsigned  iPTDstEnd = RT_MIN(iPTDst + PGM_SYNC_NR_PAGES / 2, RT_ELEMENTS(pPTDst->a));
     1899                        const unsigned  iPTDstEnd   = RT_MIN(iPTDst + PGM_SYNC_NR_PAGES / 2, RT_ELEMENTS(pPTDst->a));
    18991900                        if (iPTDst < PGM_SYNC_NR_PAGES / 2)
    19001901                            iPTDst = 0;
     
    19031904                        for (; iPTDst < iPTDstEnd; iPTDst++)
    19041905                        {
    1905                             if (!SHW_PTE_IS_P(pPTDst->a[iPTDst]))
     1906                            if (   !SHW_PTE_IS_P(pPTDst->a[iPTDst])
     1907                                || iPTDst == iPTDstPage)    /* always sync GCPtrPage */
    19061908                            {
    19071909                                GSTPTE PteSrc = pPTSrc->a[offPTSrc + iPTDst];
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