VirtualBox

Changeset 4970 in vbox


Ignore:
Timestamp:
Sep 21, 2007 6:27:48 PM (17 years ago)
Author:
vboxsync
Message:

r=bird

Location:
trunk
Files:
2 edited

Legend:

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

    r4917 r4970  
    421421 * @param   pVM             The VM to operate on.
    422422 * @param   enmOperation    Which operation to execute.
    423  * @remarks Assume called with interrupts disabled.
     423 * @remarks Assume called with interrupts _enabled_.
    424424 */
    425425VMMR0DECL(int) VMMR0EntryFast(PVM pVM, VMMR0OPERATION enmOperation);
  • trunk/src/VBox/VMM/VMMR0/VMMR0.cpp

    r4960 r4970  
    558558        /*
    559559         * Switch to GC and run guest raw mode code.
     560         * Disable interrupts before doing the world switch.
    560561         */
    561562        case VMMR0_DO_RAW_RUN:
    562563        {
    563             /* We must disable interrupts here */
    564             RTCCUINTREG uFlags = ASMIntDisableFlags();
    565 
    566564            /* Safety precaution as hwaccm disables the switcher. */
    567565            if (RT_LIKELY(!pVM->vmm.s.fSwitcherDisabled))
    568566            {
     567                RTCCUINTREG uFlags = ASMIntDisableFlags();
     568
    569569                int rc = pVM->vmm.s.pfnR0HostToGuest(pVM);
    570570                pVM->vmm.s.iLastGCRc = rc;
     
    574574                    TRPMR0DispatchHostInterrupt(pVM);
    575575
     576                ASMSetFlags(uFlags);
     577
    576578#ifdef VBOX_WITH_STATISTICS
    577579                STAM_COUNTER_INC(&pVM->vmm.s.StatRunGC);
    578580                vmmR0RecordRC(pVM, rc);
    579581#endif
    580                 ASMSetFlags(uFlags);
    581582                return rc;
    582583            }
    583             ASMSetFlags(uFlags);
    584584
    585585            Assert(!pVM->vmm.s.fSwitcherDisabled);
     
    589589        /*
    590590         * Run guest code using the available hardware acceleration technology.
     591         *
     592         * Disable interrupts before we do anything interesting. On Windows we avoid
     593         * this by having the support driver raise the IRQL before calling us, this way
     594         * we hope to get away we page faults and later calling into the kernel.
    591595         */
    592596        case VMMR0_DO_HWACC_RUN:
     
    594598            STAM_COUNTER_INC(&pVM->vmm.s.StatRunGC);
    595599
    596 #ifndef RT_OS_WINDOWS /* @todo check other hosts */
    597             /* We must disable interrupts here */
     600#ifndef RT_OS_WINDOWS /** @todo check other hosts */
    598601            RTCCUINTREG uFlags = ASMIntDisableFlags();
    599602#endif
     
    612615            }
    613616            pVM->vmm.s.iLastGCRc = rc;
    614 #ifndef RT_OS_WINDOWS /* @todo check other hosts */
     617#ifndef RT_OS_WINDOWS /** @todo check other hosts */
    615618            ASMSetFlags(uFlags);
    616619#endif
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