VirtualBox

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


Ignore:
Timestamp:
Sep 6, 2013 6:28:00 PM (11 years ago)
Author:
vboxsync
Message:

EM,HM: MWait fix, clearing the active bit too early.

File:
1 edited

Legend:

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

    r48130 r48370  
    25142514                {
    25152515                    STAM_REL_PROFILE_START(&pVCpu->em.s.StatHalted, y);
     2516                    /* If HM (or someone else) store a pending interrupt in
     2517                       TRPM, it must be dispatched ASAP without any halting.
     2518                       Anything pending in TRPM has been accepted and the CPU
     2519                       should already be the right state to receive it. */
     2520                    if (TRPMHasTrap(pVCpu))
     2521                        rc = VINF_EM_RESCHEDULE;
    25162522                    /* MWAIT has a special extension where it's woken up when
    25172523                       an interrupt is pending even when IF=0. */
    2518                     if (   (pVCpu->em.s.MWait.fWait & (EMMWAIT_FLAG_ACTIVE | EMMWAIT_FLAG_BREAKIRQIF0))
    2519                         ==                            (EMMWAIT_FLAG_ACTIVE | EMMWAIT_FLAG_BREAKIRQIF0))
     2524                    else if (   (pVCpu->em.s.MWait.fWait & (EMMWAIT_FLAG_ACTIVE | EMMWAIT_FLAG_BREAKIRQIF0))
     2525                             ==                            (EMMWAIT_FLAG_ACTIVE | EMMWAIT_FLAG_BREAKIRQIF0))
    25202526                    {
    25212527                        rc = VMR3WaitHalted(pVM, pVCpu, false /*fIgnoreInterrupts*/);
     
    25272533                        }
    25282534                    }
    2529                     else if (TRPMHasTrap(pVCpu))
    2530                         rc = VINF_EM_RESCHEDULE;
    25312535                    else
    25322536                        rc = VMR3WaitHalted(pVM, pVCpu, !(CPUMGetGuestEFlags(pVCpu) & X86_EFL_IF));
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