VirtualBox

Changeset 19195 in vbox for trunk


Ignore:
Timestamp:
Apr 27, 2009 8:53:12 AM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
46529
Message:

Fixed possible corruption due to RC cache entry reuse.

Location:
trunk/src/VBox/VMM
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/PGMInternal.h

    r19022 r19195  
    24492449
    24502450    /* RC only: */
    2451     STAMCOUNTER StatRCDynMapCacheMisses;            /**< RC: The number of dynamic page mapping cache hits */
    2452     STAMCOUNTER StatRCDynMapCacheHits;              /**< RC: The number of dynamic page mapping cache misses */
     2451    STAMCOUNTER StatRCDynMapCacheMisses;            /**< RC: The number of dynamic page mapping cache misses */
     2452    STAMCOUNTER StatRCDynMapCacheHits;              /**< RC: The number of dynamic page mapping cache hits */
    24532453    STAMCOUNTER StatRCInvlPgConflict;               /**< RC: Number of times PGMInvalidatePage() detected a mapping conflict. */
    24542454    STAMCOUNTER StatRCInvlPgSyncMonCR3;             /**< RC: Number of times PGMInvalidatePage() ran into PGM_SYNC_MONITOR_CR3. */
  • trunk/src/VBox/VMM/VMMAll/PGMAllBth.h

    r19141 r19195  
    31523152# endif
    31533153
     3154# if defined(IN_RC)
     3155    /* Make sure the dynamic pPdeDst mapping will not be reused during this function. */
     3156    PGMDynLockHCPage(pVM, (uint8_t *)pPdeDst);
     3157# endif
     3158
    31543159    if (!pPdeDst->n.u1Present)
    31553160    {
    3156 # if defined(IN_RC)
    3157         /* Make sure the dynamic pPdeDst mapping will not be reused during this function. */
    3158         PGMDynLockHCPage(pVM, (uint8_t *)pPdeDst);
    3159 # endif
    31603161        rc = PGM_BTH_NAME(SyncPT)(pVCpu, iPDSrc, pPDSrc, GCPtrPage);
    3161 # if defined(IN_RC)
    3162         /* Make sure the dynamic pPdeDst mapping will not be reused during this function. */
    3163         PGMDynUnlockHCPage(pVM, (uint8_t *)pPdeDst);
    3164 # endif
    31653162        AssertRC(rc);
    31663163        if (rc != VINF_SUCCESS)
     3164        {
     3165# if defined(IN_RC)
     3166            /* Make sure the dynamic pPdeDst mapping will not be reused during this function. */
     3167            PGMDynUnlockHCPage(pVM, (uint8_t *)pPdeDst);
     3168# endif
    31673169            return rc;
     3170        }
    31683171    }
    31693172
     
    32023205        {
    32033206            Log(("PGMVerifyAccess: access violation for %RGv rc=%d\n", GCPtrPage, rc));
    3204             return VINF_EM_RAW_GUEST_TRAP;
     3207            rc = VINF_EM_RAW_GUEST_TRAP;
    32053208        }
    32063209    }
     3210# if defined(IN_RC)
     3211    /* Make sure the dynamic pPdeDst mapping will not be reused during this function. */
     3212    PGMDynUnlockHCPage(pVM, (uint8_t *)pPdeDst);
     3213# endif
    32073214    return rc;
    32083215
Note: See TracChangeset for help on using the changeset viewer.

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