VirtualBox

Changeset 27630 in vbox for trunk/src/VBox/VMM


Ignore:
Timestamp:
Mar 23, 2010 1:48:50 PM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
59186
Message:

PGM,HWACCM: Fix for panic on 32-bit mac os x when using nested paging. The dynamic mapping set was used without being started during HWACCMR0Enter by VMXR0LoadGuestState/vmxR0PrefetchPAEPdptrs. The fix is to start + stop it in HWACCMR0Enter. (defect 4741)

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMR0/HWACCMR0.cpp

    r26152 r27630  
    10961096    }
    10971097
     1098#ifdef VBOX_WITH_2X_4GB_ADDR_SPACE
     1099    bool fStartedSet = PGMDynMapStartOrMigrateAutoSet(pVCpu);
     1100#endif
     1101
    10981102    rc  = HWACCMR0Globals.pfnEnterSession(pVM, pVCpu, pCpu);
    10991103    AssertRC(rc);
     
    11041108    AssertRC(rc);
    11051109
     1110#ifdef VBOX_WITH_2X_4GB_ADDR_SPACE
     1111    if (fStartedSet)
     1112        PGMDynMapReleaseAutoSet(pVCpu);
     1113#endif
     1114
    11061115    /* keep track of the CPU owning the VMCS for debugging scheduling weirdness and ring-3 calls. */
    1107     if (RT_SUCCESS(rc))
    1108     {
    1109 #ifdef VBOX_WITH_2X_4GB_ADDR_SPACE
    1110         PGMDynMapMigrateAutoSet(pVCpu);
    1111 #endif
    1112     }
    1113     else
     1116    if (RT_FAILURE(rc))
    11141117        pVCpu->hwaccm.s.idEnteredCpu = NIL_RTCPUID;
    11151118    return rc;
  • trunk/src/VBox/VMM/VMMR0/PGMR0DynMap.cpp

    r27464 r27630  
    15181518
    15191519/**
     1520 * Starts or migrates the autoset of a virtual CPU.
     1521 *
     1522 * This is used by HWACCMR0Enter.  When we've longjumped out of the HWACCM
     1523 * execution loop with the set open, we'll migrate it when re-entering.  While
     1524 * under normal circumstances, we'll start it so VMXR0LoadGuestState can access
     1525 * guest memory.
     1526 *
     1527 * @returns @c true if started, @c false if migrated.
     1528 * @param   pVCpu       The shared data for the current virtual CPU.
     1529 * @thread  EMT
     1530 */
     1531VMMDECL(bool) PGMDynMapStartOrMigrateAutoSet(PVMCPU pVCpu)
     1532{
     1533    bool fStartIt = pVCpu->pgm.s.AutoSet.cEntries == PGMMAPSET_CLOSED;
     1534    if (fStartIt)
     1535        PGMDynMapStartAutoSet(pVCpu);
     1536    else
     1537        PGMDynMapMigrateAutoSet(pVCpu);
     1538    return fStartIt;
     1539}
     1540
     1541
     1542/**
    15201543 * Worker that performs the actual flushing of the set.
    15211544 *
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