Changeset 20317 in vbox for trunk/src/VBox/VMM/VMMR0/HWVMXR0.cpp
- Timestamp:
- Jun 5, 2009 12:20:10 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR0/HWVMXR0.cpp
r20222 r20317 40 40 #include <iprt/param.h> 41 41 #include <iprt/string.h> 42 #include <iprt/time.h> 42 43 #ifdef VBOX_WITH_VMMR0_DISABLE_PREEMPTION 43 44 # include <iprt/thread.h> … … 2009 2010 unsigned cResume = 0; 2010 2011 #ifdef VBOX_STRICT 2011 RTCPUID idCpuCheck; 2012 RTCPUID idCpuCheck; 2013 #endif 2014 #ifdef VBOX_HIGH_RES_TIMERS_HACK_IN_RING0 2015 uint64_t u64LastTime = RTTimeMilliTS(); 2012 2016 #endif 2013 2017 #ifdef VBOX_WITH_STATISTICS … … 2139 2143 } 2140 2144 2145 #ifdef VBOX_HIGH_RES_TIMERS_HACK_IN_RING0 2146 if (RT_UNLIKELY(cResume & 0xf) == 0) 2147 { 2148 uint64_t u64CurTime = RTTimeMilliTS(); 2149 2150 if (RT_UNLIKELY(u64CurTime > u64LastTime)) 2151 { 2152 u64LastTime = u64CurTime; 2153 TMTimerPollVoid(pVM, pVCpu); 2154 } 2155 } 2156 #endif 2157 2141 2158 /* Check for pending actions that force us to go back to ring 3. */ 2142 if ( VM_FF_ISPENDING(pVM, VM_FF_HWACCM_TO_R3_MASK) 2143 || VMCPU_FF_ISPENDING(pVCpu, VMCPU_FF_HWACCM_TO_R3_MASK)) 2144 { 2145 VMCPU_FF_CLEAR(pVCpu, VMCPU_FF_TO_R3); 2146 STAM_COUNTER_INC(&pVCpu->hwaccm.s.StatSwitchToR3); 2147 rc = RT_UNLIKELY(VM_FF_ISPENDING(pVM, VM_FF_PGM_NO_MEMORY)) ? VINF_EM_NO_MEMORY : VINF_EM_RAW_TO_R3; 2148 goto end; 2149 } 2159 #ifdef DEBUG 2160 /* Intercept X86_XCPT_DB if stepping is enabled */ 2161 if (!DBGFIsStepping(pVCpu)) 2162 #endif 2163 { 2164 if ( VM_FF_ISPENDING(pVM, VM_FF_HWACCM_TO_R3_MASK) 2165 || VMCPU_FF_ISPENDING(pVCpu, VMCPU_FF_HWACCM_TO_R3_MASK)) 2166 { 2167 VMCPU_FF_CLEAR(pVCpu, VMCPU_FF_TO_R3); 2168 STAM_COUNTER_INC(&pVCpu->hwaccm.s.StatSwitchToR3); 2169 rc = RT_UNLIKELY(VM_FF_ISPENDING(pVM, VM_FF_PGM_NO_MEMORY)) ? VINF_EM_NO_MEMORY : VINF_EM_RAW_TO_R3; 2170 goto end; 2171 } 2172 } 2173 2150 2174 /* Pending request packets might contain actions that need immediate attention, such as pending hardware interrupts. */ 2151 2175 if ( VM_FF_ISPENDING(pVM, VM_FF_REQUEST)
Note:
See TracChangeset
for help on using the changeset viewer.