VirtualBox

Changeset 48132 in vbox for trunk/src


Ignore:
Timestamp:
Aug 28, 2013 5:27:43 PM (12 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
88512
Message:

VMM: Ditch VBOX_WITH_VMMR0_DISABLE_PREEMPTION.

Location:
trunk/src/VBox
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostDrivers/Support/Makefile.kmk

    r46045 r48132  
    275275 ifdef VBOX_WITHOUT_NATIVE_R0_LOADER
    276276  VBoxDrv_DEFS.win       += VBOX_WITHOUT_NATIVE_R0_LOADER
    277  endif
    278  ifdef VBOX_WITH_VMMR0_DISABLE_PREEMPTION
    279   VBoxDrv_DEFS.win       += VBOX_WITH_VMMR0_DISABLE_PREEMPTION
    280277 endif
    281278
  • trunk/src/VBox/HostDrivers/Support/win/SUPDrv-win.cpp

    r47541 r48132  
    452452        && pSession->fUnrestricted == true)
    453453    {
    454 #ifdef VBOX_WITH_VMMR0_DISABLE_PREEMPTION
    455454        int rc = supdrvIOCtlFast(ulCmd, (unsigned)(uintptr_t)pIrp->UserBuffer /* VMCPU id */, pDevExt, pSession);
    456 #else
     455
     456#if 0   /* When preemption was not used i.e. !VBOX_WITH_VMMR0_DISABLE_PREEMPTION. That's no longer required. */
    457457        /* Raise the IRQL to DISPATCH_LEVEL to prevent Windows from rescheduling us to another CPU/core. */
    458458        Assert(KeGetCurrentIrql() <= DISPATCH_LEVEL);
  • trunk/src/VBox/VMM/Makefile.kmk

    r47740 r48132  
    493493        $(VMM_COMMON_DEFS) RTASSERT_HAVE_SHOULD_PANIC
    494494 ## @todo eliminate IN_GVMM_R0 IN_GMM_R0
    495  ifdef VBOX_WITH_VMMR0_DISABLE_PREEMPTION
    496   VMMR0_DEFS    += VBOX_WITH_VMMR0_DISABLE_PREEMPTION
    497  endif
    498495 ifdef VBOX_WITH_PCI_PASSTHROUGH
    499496  VMMR0_DEFS    += IN_PCIRAW_R0
  • trunk/src/VBox/VMM/VMMR0/HMR0.cpp

    r48044 r48132  
    12851285    {
    12861286        pVM->hm.s.cMaxResumeLoops       = 1024;
    1287 #ifdef VBOX_WITH_VMMR0_DISABLE_PREEMPTION
    12881287        if (RTThreadPreemptIsPendingTrusty())
    12891288            pVM->hm.s.cMaxResumeLoops   = 8192;
    1290 #endif
    12911289    }
    12921290
  • trunk/src/VBox/VMM/VMMR0/HMSVMR0.cpp

    r48130 r48132  
    27402740        hmR0SvmEvaluatePendingEvent(pVCpu, pCtx);
    27412741
    2742 #ifdef VBOX_WITH_VMMR0_DISABLE_PREEMPTION
    27432742    /*
    27442743     * We disable interrupts so that we don't miss any interrupts that would flag preemption (IPI/timers etc.)
     
    27692768    VMCPU_ASSERT_STATE(pVCpu, VMCPUSTATE_STARTED_HM);
    27702769    VMCPU_SET_STATE(pVCpu, VMCPUSTATE_STARTED_EXEC);
    2771 #endif
    27722770
    27732771    return VINF_SUCCESS;
     
    27922790    Assert(!VMMRZCallRing3IsEnabled(pVCpu));
    27932791    Assert(VMMR0IsLogFlushDisabled(pVCpu));
    2794 
    2795 #ifndef VBOX_WITH_VMMR0_DISABLE_PREEMPTION
    2796     /** @todo I don't see the point of this, VMMR0EntryFast() already disables interrupts for the entire period. */
    2797     /** @todo get rid of this. */
    2798     pSvmTransient->uEflags = ASMIntDisableFlags();
    2799     VMCPU_SET_STATE(pVCpu, VMCPUSTATE_STARTED_EXEC);
    2800 #endif
    28012792
    28022793    hmR0SvmInjectPendingEvent(pVCpu, pCtx);
  • trunk/src/VBox/VMM/VMMR0/HMVMXR0.cpp

    r48130 r48132  
    73597359        hmR0VmxEvaluatePendingEvent(pVCpu, pMixedCtx);
    73607360
    7361 #ifdef VBOX_WITH_VMMR0_DISABLE_PREEMPTION
    73627361    /*
    73637362     * We disable interrupts so that we don't miss any interrupts that would flag preemption (IPI/timers etc.)
     
    73887387    VMCPU_ASSERT_STATE(pVCpu, VMCPUSTATE_STARTED_HM);
    73897388    VMCPU_SET_STATE(pVCpu, VMCPUSTATE_STARTED_EXEC);
    7390 #endif
    73917389
    73927390    /*
     
    74187416    Assert(!VMMRZCallRing3IsEnabled(pVCpu));
    74197417    Assert(VMMR0IsLogFlushDisabled(pVCpu));
    7420 #ifndef VBOX_WITH_VMMR0_DISABLE_PREEMPTION
    7421     /** @todo I don't see the point of this, VMMR0EntryFast() already disables interrupts for the entire period. */
    7422     /** @todo get rid of this. */
    7423     pVmxTransient->uEflags = ASMIntDisableFlags();
    7424     VMCPU_SET_STATE(pVCpu, VMCPUSTATE_STARTED_EXEC);
    7425 #endif
    74267418    Assert(!RTThreadPreemptIsEnabled(NIL_RTTHREAD));
    74277419
     
    85498541    STAM_COUNTER_INC(&pVCpu->hm.s.StatExitExtInt);
    85508542    /* 32-bit Windows hosts (4 cores) has trouble with this; causes higher interrupt latency. */
    8551 #if HC_ARCH_BITS == 64 && defined(VBOX_WITH_VMMR0_DISABLE_PREEMPTION)
     8543#if HC_ARCH_BITS == 64
    85528544    Assert(ASMIntAreEnabled());
    85538545    if (pVCpu->CTX_SUFF(pVM)->hm.s.vmx.fUsePreemptTimer)
  • trunk/src/VBox/VMM/VMMR0/VMMR0.cpp

    r48130 r48132  
    886886        /*
    887887         * Run guest code using the available hardware acceleration technology.
    888          *
    889          * Disable interrupts before we do anything interesting. On Windows we avoid
    890          * this by having the support driver raise the IRQL before calling us, this way
    891          * we hope to get away with page faults and later calling into the kernel.
    892888         */
    893889        case VMMR0_DO_HM_RUN:
    894890        {
    895 #ifdef VBOX_WITH_VMMR0_DISABLE_PREEMPTION
    896891            Assert(!VMMR0ThreadCtxHooksAreRegistered(pVCpu));
    897892            RTTHREADPREEMPTSTATE PreemptState = RTTHREADPREEMPTSTATE_INITIALIZER;
    898893            RTThreadPreemptDisable(&PreemptState);
    899 #elif !defined(RT_OS_WINDOWS)
    900             RTCCUINTREG uFlags = ASMIntDisableFlags();
    901 #endif
     894
    902895            /* Update the VCPU <-> host CPU mapping before doing anything else. */
    903896            ASMAtomicWriteU32(&pVCpu->idHostCpu, RTMpCpuId());
     
    923916            {
    924917                /* Register thread-context hooks if required. */
    925 #ifdef VBOX_WITH_VMMR0_DISABLE_PREEMPTION
    926918                if (    VMMR0ThreadCtxHooksAreCreated(pVCpu)
    927919                    && !VMMR0ThreadCtxHooksAreRegistered(pVCpu))
     
    930922                    AssertRC(rc);
    931923                }
    932 #endif
    933924
    934925                /* Enter HM context. */
     
    975966            ASMAtomicWriteU32(&pVCpu->idHostCpu, NIL_RTCPUID);
    976967
    977 #ifdef VBOX_WITH_VMMR0_DISABLE_PREEMPTION
    978968            if (!fPreemptRestored)
    979969                RTThreadPreemptRestore(&PreemptState);
    980 #elif !defined(RT_OS_WINDOWS)
    981             ASMSetFlags(uFlags);
    982 #endif
    983970
    984971#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