VirtualBox

Ignore:
Timestamp:
Jun 16, 2009 8:00:54 AM (15 years ago)
Author:
vboxsync
Message:

Backed out 48516. Caused interrupt loss.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMR0/HWVMXR0.cpp

    r20607 r20608  
    17261726    {
    17271727        Assert(uInterruptState <= 2);    /* only sti & mov ss */
    1728         Log(("uInterruptState %x eip=%RGv\n", uInterruptState, pCtx->rip));
     1728        Log(("uInterruptState %x eip=%RGv\n", (uint32_t)uInterruptState, pCtx->rip));
    17291729        EMSetInhibitInterruptsPC(pVCpu, pCtx->rip);
    17301730    }
     
    21802180    }
    21812181
     2182#ifdef VBOX_WITH_VMMR0_DISABLE_PREEMPTION
     2183    /*
     2184     * Exit to ring-3 preemption/work is pending.
     2185     *
     2186     * Interrupts are disabled before the call to make sure we don't miss any interrupt
     2187     * that would flag preemption (IPI, timer tick, ++). (Would've been nice to do this
     2188     * further down, but VMXR0CheckPendingInterrupt makes that impossible.)
     2189     *
     2190     * Note! Interrupts must be disabled done *before* we check for TLB flushes; TLB
     2191     *       shootdowns rely on this.
     2192     */
     2193    uOldEFlags = ASMIntDisableFlags();
     2194    if (RTThreadPreemptIsPending(NIL_RTTHREAD))
     2195    {
     2196        STAM_COUNTER_INC(&pVCpu->hwaccm.s.StatExitPreemptPending);
     2197        rc = VINF_EM_RAW_INTERRUPT;
     2198        goto end;
     2199    }
     2200    VMCPU_SET_STATE(pVCpu, VMCPUSTATE_STARTED_EXEC);
     2201#endif
     2202
    21822203    /* When external interrupts are pending, we should exit the VM when IF is set. */
    21832204    /* Note! *After* VM_FF_INHIBIT_INTERRUPTS check!!! */
     
    22642285        goto end;
    22652286
    2266 #ifdef VBOX_WITH_VMMR0_DISABLE_PREEMPTION
    2267     /*
    2268      * Exit to ring-3 preemption/work is pending.
    2269      *
    2270      * Interrupts are disabled before the call to make sure we don't miss any interrupt
    2271      * that would flag preemption (IPI, timer tick, ++).
    2272      *
    2273      * Note! Interrupts must be disabled done *before* we check for TLB flushes; TLB
    2274      *       shootdowns rely on this.
    2275      */
    2276     uOldEFlags = ASMIntDisableFlags();
    2277     if (RTThreadPreemptIsPending(NIL_RTTHREAD))
    2278     {
    2279         STAM_COUNTER_INC(&pVCpu->hwaccm.s.StatExitPreemptPending);
    2280         rc = VINF_EM_RAW_INTERRUPT;
    2281         goto end;
    2282     }
    2283     VMCPU_SET_STATE(pVCpu, VMCPUSTATE_STARTED_EXEC);
    2284 #else
     2287#ifndef VBOX_WITH_VMMR0_DISABLE_PREEMPTION
    22852288    /* Disable interrupts to make sure a poke will interrupt execution.
    22862289     * This must be done *before* we check for TLB flushes; TLB shootdowns rely on this.
     
    23852388        /* Ignore 'int xx' as they'll be restarted anyway. */
    23862389        &&  VMX_EXIT_INTERRUPTION_INFO_TYPE(pVCpu->hwaccm.s.Event.intInfo) != VMX_EXIT_INTERRUPTION_INFO_TYPE_SW
    2387         /* Ignore software exceptions (such as int3) as they're reoccur when we restart the instruction anyway. */
     2390        /* Ignore software exceptions (such as int3) as they'll reoccur when we restart the instruction anyway. */
    23882391        &&  VMX_EXIT_INTERRUPTION_INFO_TYPE(pVCpu->hwaccm.s.Event.intInfo) != VMX_EXIT_INTERRUPTION_INFO_TYPE_SWEXCPT)
    23892392    {
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