VirtualBox

Changeset 23430 in vbox for trunk/src/VBox/HostDrivers


Ignore:
Timestamp:
Sep 30, 2009 9:53:51 AM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
53011
Message:

Experiment with KeSetSystemAffinityThread instead of raising the IRQL to DISPATCH_LEVEL when running guest code. (potential problem case -> take note!)

File:
1 edited

Legend:

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

    r20374 r23430  
    325325        int rc = supdrvIOCtlFast(ulCmd, (unsigned)(uintptr_t)pIrp->UserBuffer /* VMCPU id */, pDevExt, pSession);
    326326#else
     327# if 1 /* experiment */
     328        /* Prevent Windows from rescheduling us to another CPU/core. */
     329        KeSetSystemAffinityThread((KAFFINITY)1 << KeGetCurrentProcessorNumber());
     330        int rc = supdrvIOCtlFast(ulCmd, (unsigned)(uintptr_t)pIrp->UserBuffer /* VMCPU id */, pDevExt, pSession);
     331        KeSetSystmeAffinityThread(KeQueryActiveProcessors());
     332# else /* old code */
    327333        /* Raise the IRQL to DISPATCH_LEVEL to prevent Windows from rescheduling us to another CPU/core. */
    328334        Assert(KeGetCurrentIrql() <= DISPATCH_LEVEL);
     
    331337        int rc = supdrvIOCtlFast(ulCmd, (unsigned)(uintptr_t)pIrp->UserBuffer /* VMCPU id */, pDevExt, pSession);
    332338        KeLowerIrql(oldIrql);
     339# endif
    333340#endif
    334341
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