VirtualBox

Changeset 4960 in vbox


Ignore:
Timestamp:
Sep 21, 2007 2:58:57 PM (17 years ago)
Author:
vboxsync
Message:

Raise IRQL to DISPATCH_LEVEL to prevent Windows from rescheduling us to a different CPU.

Location:
trunk/src/VBox
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostDrivers/Support/win/SUPDrv-win.cpp

    r4941 r4960  
    280280        ||  ulCmd == SUP_IOCTL_FAST_DO_NOP)
    281281    {
    282         int rc = supdrvIOCtlFast(ulCmd, pDevExt, pSession);
     282        KIRQL oldIrql;
     283        int   rc;
     284
     285                /* Raise the IRQL to DISPATCH_LEVEl to prevent Windows from rescheduling us to another CPU/core. */
     286                Assert(KeGetCurrentIrql() <= DISPATCH_LEVEL);
     287                KeRaiseIrql(DISPATCH_LEVEL, &oldIrql);       
     288        rc = supdrvIOCtlFast(ulCmd, pDevExt, pSession);
     289        KeLowerIrql(oldIrql);
    283290
    284291        /* Complete the I/O request. */
  • trunk/src/VBox/VMM/VMMR0/VMMR0.cpp

    r4954 r4960  
    550550 * @param   pVM             The VM to operate on.
    551551 * @param   enmOperation    Which operation to execute.
    552  * @remarks Assume called with interrupts disabled.
     552 * @remarks Assume called with interrupts _enabled_.
    553553 */
    554554VMMR0DECL(int) VMMR0EntryFast(PVM pVM, VMMR0OPERATION enmOperation)
     
    594594            STAM_COUNTER_INC(&pVM->vmm.s.StatRunGC);
    595595
     596#ifndef RT_OS_WINDOWS /* @todo check other hosts */
     597            /* We must disable interrupts here */
     598            RTCCUINTREG uFlags = ASMIntDisableFlags();
     599#endif
    596600            int rc = HWACCMR0Enable(pVM);
    597601            if (VBOX_SUCCESS(rc))
     
    608612            }
    609613            pVM->vmm.s.iLastGCRc = rc;
     614#ifndef RT_OS_WINDOWS /* @todo check other hosts */
     615            ASMSetFlags(uFlags);
     616#endif
    610617
    611618#ifdef VBOX_WITH_STATISTICS
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