VirtualBox

Changeset 43392 in vbox


Ignore:
Timestamp:
Sep 21, 2012 10:21:29 AM (12 years ago)
Author:
vboxsync
Message:

VMM: HM cleanup.

Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/vmm/vmm.h

    r43047 r43392  
    264264VMMR3_INT_DECL(RTR0PTR) VMMR3GetHostToGuestSwitcher(PVM pVM, VMMSWITCHER enmSwitcher);
    265265VMMR3_INT_DECL(int)     VMMR3RawRunGC(PVM pVM, PVMCPU pVCpu);
    266 VMMR3_INT_DECL(int)     VMMR3HwAccRunGC(PVM pVM, PVMCPU pVCpu);
     266VMMR3_INT_DECL(int)     VMMR3HmRunGC(PVM pVM, PVMCPU pVCpu);
    267267VMMR3DECL(int)          VMMR3CallRC(PVM pVM, RTRCPTR RCPtrEntry, unsigned cArgs, ...);
    268268VMMR3DECL(int)          VMMR3CallRCV(PVM pVM, RTRCPTR RCPtrEntry, unsigned cArgs, va_list args);
  • trunk/src/VBox/VMM/VMMR3/EM.cpp

    r43387 r43392  
    2222 * Interpreted), and keeping the CPU states in sync. The function
    2323 * EMR3ExecuteVM() is the 'main-loop' of the VM, while each of the execution
    24  * modes has different inner loops (emR3RawExecute, emR3HwAccExecute, and
     24 * modes has different inner loops (emR3RawExecute, emR3HmExecute, and
    2525 * emR3RemExecute).
    2626 *
     
    391391        EM_REG_COUNTER(&pVCpu->em.s.StatIOEmu,                 "/PROF/CPU%d/EM/Emulation/IO",      "Profiling of emR3RawExecuteIOInstruction.");
    392392        EM_REG_COUNTER(&pVCpu->em.s.StatPrivEmu,               "/PROF/CPU%d/EM/Emulation/Priv",    "Profiling of emR3RawPrivileged.");
    393         EM_REG_PROFILE(&pVCpu->em.s.StatHwAccEntry,           "/PROF/CPU%d/EM/HwAccEnter",        "Profiling Hardware Accelerated Mode entry overhead.");
    394         EM_REG_PROFILE(&pVCpu->em.s.StatHwAccExec,            "/PROF/CPU%d/EM/HwAccExec",         "Profiling Hardware Accelerated Mode execution.");
     393        EM_REG_PROFILE(&pVCpu->em.s.StatHmEntry,           "/PROF/CPU%d/EM/HmEnter",        "Profiling Hardware Accelerated Mode entry overhead.");
     394        EM_REG_PROFILE(&pVCpu->em.s.StatHmExec,            "/PROF/CPU%d/EM/HmExec",         "Profiling Hardware Accelerated Mode execution.");
    395395        EM_REG_PROFILE(&pVCpu->em.s.StatREMEmu,               "/PROF/CPU%d/EM/REMEmuSingle",      "Profiling single instruction REM execution.");
    396396        EM_REG_PROFILE(&pVCpu->em.s.StatREMExec,              "/PROF/CPU%d/EM/REMExec",           "Profiling REM execution.");
     
    21982198                case EMSTATE_HWACC:
    21992199#ifndef IEM_VERIFICATION_MODE /* remove later */
    2200                     rc = emR3HwAccExecute(pVM, pVCpu, &fFFDone);
     2200                    rc = emR3HmExecute(pVM, pVCpu, &fFFDone);
    22012201                    break;
    22022202#endif
  • trunk/src/VBox/VMM/VMMR3/EMHM.cpp

    r43391 r43392  
    7979 * @param   pVCpu   Pointer to the VMCPU.
    8080 */
    81 static int emR3HwAccStep(PVM pVM, PVMCPU pVCpu)
     81static int emR3HmStep(PVM pVM, PVMCPU pVCpu)
    8282{
    8383    Assert(pVCpu->em.s.enmState == EMSTATE_DEBUG_GUEST_HWACC);
     
    108108    do
    109109    {
    110         rc = VMMR3HwAccRunGC(pVM, pVCpu);
     110        rc = VMMR3HmRunGC(pVM, pVCpu);
    111111    } while (   rc == VINF_SUCCESS
    112112             || rc == VINF_EM_RAW_INTERRUPT);
     
    128128
    129129
    130 static int emR3SingleStepExecHwAcc(PVM pVM, PVMCPU pVCpu, uint32_t cIterations)
     130static int emR3SingleStepExecHm(PVM pVM, PVMCPU pVCpu, uint32_t cIterations)
    131131{
    132132    int     rc          = VINF_SUCCESS;
     
    139139        DBGFR3PrgStep(pVCpu);
    140140        DBGFR3DisasInstrCurrentLog(pVCpu, "RSS: ");
    141         rc = emR3HwAccStep(pVM, pVCpu);
     141        rc = emR3HmStep(pVM, pVCpu);
    142142        if (    rc != VINF_SUCCESS
    143143            ||  !HMR3CanExecuteGuest(pVM, pVCpu->em.s.pCtx))
     
    464464 *                      FFs were done before returning.
    465465 */
    466 int emR3HwAccExecute(PVM pVM, PVMCPU pVCpu, bool *pfFFDone)
     466int emR3HmExecute(PVM pVM, PVMCPU pVCpu, bool *pfFFDone)
    467467{
    468468    int      rc = VERR_IPE_UNINITIALIZED_STATUS;
    469469    PCPUMCTX pCtx = pVCpu->em.s.pCtx;
    470470
    471     LogFlow(("emR3HwAccExecute%d: (cs:eip=%04x:%RGv)\n", pVCpu->idCpu, pCtx->cs.Sel, (RTGCPTR)pCtx->rip));
     471    LogFlow(("emR3HmExecute%d: (cs:eip=%04x:%RGv)\n", pVCpu->idCpu, pCtx->cs.Sel, (RTGCPTR)pCtx->rip));
    472472    *pfFFDone = false;
    473473
    474     STAM_COUNTER_INC(&pVCpu->em.s.StatHwAccExecuteEntry);
     474    STAM_COUNTER_INC(&pVCpu->em.s.StatHmExecuteEntry);
    475475
    476476#ifdef EM_NOTIFY_HM
     
    483483    for (;;)
    484484    {
    485         STAM_PROFILE_ADV_START(&pVCpu->em.s.StatHwAccEntry, a);
     485        STAM_PROFILE_ADV_START(&pVCpu->em.s.StatHmEntry, a);
    486486
    487487        /* Check if a forced reschedule is pending. */
     
    536536         * Execute the code.
    537537         */
    538         STAM_PROFILE_ADV_STOP(&pVCpu->em.s.StatHwAccEntry, a);
     538        STAM_PROFILE_ADV_STOP(&pVCpu->em.s.StatHmEntry, a);
    539539
    540540        if (RT_LIKELY(EMR3IsExecutionAllowed(pVM, pVCpu)))
    541541        {
    542             STAM_PROFILE_START(&pVCpu->em.s.StatHwAccExec, x);
    543             rc = VMMR3HwAccRunGC(pVM, pVCpu);
    544             STAM_PROFILE_STOP(&pVCpu->em.s.StatHwAccExec, x);
     542            STAM_PROFILE_START(&pVCpu->em.s.StatHmExec, x);
     543            rc = VMMR3HmRunGC(pVM, pVCpu);
     544            STAM_PROFILE_STOP(&pVCpu->em.s.StatHmExec, x);
    545545        }
    546546        else
  • trunk/src/VBox/VMM/VMMR3/VMM.cpp

    r43387 r43392  
    12711271 * @param   pVCpu       Pointer to the VMCPU.
    12721272 */
    1273 VMMR3_INT_DECL(int) VMMR3HwAccRunGC(PVM pVM, PVMCPU pVCpu)
    1274 {
    1275     Log2(("VMMR3HwAccRunGC: (cs:eip=%04x:%08x)\n", CPUMGetGuestCS(pVCpu), CPUMGetGuestEIP(pVCpu)));
     1273VMMR3_INT_DECL(int) VMMR3HmRunGC(PVM pVM, PVMCPU pVCpu)
     1274{
     1275    Log2(("VMMR3HmRunGC: (cs:eip=%04x:%08x)\n", CPUMGetGuestCS(pVCpu), CPUMGetGuestEIP(pVCpu)));
    12761276
    12771277    for (;;)
     
    13041304        if (rc != VINF_VMM_CALL_HOST)
    13051305        {
    1306             Log2(("VMMR3HwAccRunGC: returns %Rrc (cs:eip=%04x:%08x)\n", rc, CPUMGetGuestCS(pVCpu), CPUMGetGuestEIP(pVCpu)));
     1306            Log2(("VMMR3HmRunGC: returns %Rrc (cs:eip=%04x:%08x)\n", rc, CPUMGetGuestCS(pVCpu), CPUMGetGuestEIP(pVCpu)));
    13071307            return rc;
    13081308        }
  • trunk/src/VBox/VMM/include/EMInternal.h

    r43391 r43392  
    398398    STAMPROFILE             StatHalted;
    399399    STAMPROFILEADV          StatCapped;
    400     STAMPROFILEADV          StatHwAccEntry;
    401     STAMPROFILE             StatHwAccExec;
     400    STAMPROFILEADV          StatHmEntry;
     401    STAMPROFILE             StatHmExec;
    402402    STAMPROFILE             StatREMEmu;
    403403    STAMPROFILE             StatREMExec;
     
    415415    /** R3: Profiling of emR3RawPrivileged. */
    416416    STAMPROFILE             StatPrivEmu;
    417     /** R3: Number of time emR3HwAccExecute is called. */
    418     STAMCOUNTER             StatHwAccExecuteEntry;
     417    /** R3: Number of time emR3HmExecute is called. */
     418    STAMCOUNTER             StatHmExecuteEntry;
    419419
    420420    /** More statistics (R3). */
     
    442442
    443443
    444 int     emR3HwAccExecute(PVM pVM, PVMCPU pVCpu, bool *pfFFDone);
     444int     emR3HmExecute(PVM pVM, PVMCPU pVCpu, bool *pfFFDone);
    445445int     emR3RawExecute(PVM pVM, PVMCPU pVCpu, bool *pfFFDone);
    446446int     emR3RawHandleRC(PVM pVM, PVMCPU pVCpu, PCPUMCTX pCtx, int rc);
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