Changeset 20608 in vbox for trunk/src/VBox/VMM/VMMR0/HWVMXR0.cpp
- Timestamp:
- Jun 16, 2009 8:00:54 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR0/HWVMXR0.cpp
r20607 r20608 1726 1726 { 1727 1727 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)); 1729 1729 EMSetInhibitInterruptsPC(pVCpu, pCtx->rip); 1730 1730 } … … 2180 2180 } 2181 2181 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 2182 2203 /* When external interrupts are pending, we should exit the VM when IF is set. */ 2183 2204 /* Note! *After* VM_FF_INHIBIT_INTERRUPTS check!!! */ … … 2264 2285 goto end; 2265 2286 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 2285 2288 /* Disable interrupts to make sure a poke will interrupt execution. 2286 2289 * This must be done *before* we check for TLB flushes; TLB shootdowns rely on this. … … 2385 2388 /* Ignore 'int xx' as they'll be restarted anyway. */ 2386 2389 && 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' rereoccur when we restart the instruction anyway. */2390 /* Ignore software exceptions (such as int3) as they'll reoccur when we restart the instruction anyway. */ 2388 2391 && VMX_EXIT_INTERRUPTION_INFO_TYPE(pVCpu->hwaccm.s.Event.intInfo) != VMX_EXIT_INTERRUPTION_INFO_TYPE_SWEXCPT) 2389 2392 {
Note:
See TracChangeset
for help on using the changeset viewer.