VirtualBox

Changeset 105698 in vbox for trunk/src/VBox/VMM/VMMR3/EM.cpp


Ignore:
Timestamp:
Aug 15, 2024 11:33:49 PM (4 months ago)
Author:
vboxsync
Message:

VMM/IEM,TM: Adaptive timer polling and running of the timer queues from the IEM recompiler execution loop. bugref:10656

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMR3/EM.cpp

    r103415 r105698  
    10571057 * @param   pVM         The cross context VM structure.
    10581058 * @param   pVCpu       The cross context virtual CPU structure.
     1059 * @param   fWasHalted  Set if we're comming out of a CPU HALT state.
    10591060 * @param   pfFFDone    Where to store an indicator telling whether or not
    10601061 *                      FFs were done before returning.
    10611062 *
    10621063 */
    1063 static VBOXSTRICTRC emR3RecompilerExecute(PVM pVM, PVMCPU pVCpu, bool *pfFFDone)
     1064static VBOXSTRICTRC emR3RecompilerExecute(PVM pVM, PVMCPU pVCpu, bool fWasHalted, bool *pfFFDone)
    10641065{
    10651066    STAM_REL_PROFILE_START(&pVCpu->em.s.StatREMTotal, a);
     
    10981099#ifdef VBOX_WITH_IEM_RECOMPILER
    10991100            if (pVM->em.s.fIemRecompiled)
    1100                 rcStrict = IEMExecRecompiler(pVM, pVCpu);
     1101                rcStrict = IEMExecRecompiler(pVM, pVCpu, fWasHalted);
    11011102            else
    11021103#endif
     
    11901191        }
    11911192
     1193#ifdef VBOX_WITH_IEM_RECOMPILER
     1194        fWasHalted = false;
     1195#else
     1196        RT_NOREF(fWasHalted);
     1197#endif
    11921198    } /* The Inner Loop, recompiled execution mode version. */
    11931199
     
    22532259                case VINF_EM_RESUME:
    22542260                    Log2(("EMR3ExecuteVM: VINF_EM_RESUME: %d -> VINF_EM_RESCHEDULE\n", enmOldState));
    2255                     /* Don't reschedule in the halted or wait for SIPI case. */
     2261                    /* Don't reschedule in the halted or wait-for-SIPI cases. */
    22562262                    if (    pVCpu->em.s.enmPrevState == EMSTATE_WAIT_SIPI
    22572263                        ||  pVCpu->em.s.enmPrevState == EMSTATE_HALTED)
     
    25102516                 */
    25112517                case EMSTATE_RECOMPILER:
    2512                     rc = VBOXSTRICTRC_TODO(emR3RecompilerExecute(pVM, pVCpu, &fFFDone));
     2518                    rc = VBOXSTRICTRC_TODO(emR3RecompilerExecute(pVM, pVCpu, enmOldState == EMSTATE_HALTED, &fFFDone));
    25132519                    Log2(("EMR3ExecuteVM: emR3RecompilerExecute -> %Rrc\n", rc));
    25142520                    break;
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