Changeset 45409 in vbox for trunk/src/VBox/VMM/VMMR0/HMVMXR0.cpp
- Timestamp:
- Apr 8, 2013 3:01:06 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR0/HMVMXR0.cpp
r45408 r45409 169 169 uint32_t fVmcsFieldsRead; 170 170 /** Whether TSC-offsetting should be setup before VM-entry. */ 171 bool fUpdateTscOffsetting ;171 bool fUpdateTscOffsettingAndPreemptTimer; 172 172 /** Whether the VM-exit was caused by a page-fault during delivery of a 173 173 * contributary exception or a page-fault. */ … … 2353 2353 * VMX_VMCS_CTRL_EXIT_CONTROLS_LOAD_HOST_PAT_MSR, 2354 2354 * VMX_VMCS_CTRL_EXIT_CONTROLS_SAVE_GUEST_EFER_MSR, 2355 * VMX_VMCS_CTRL_EXIT_CONTROLS_LOAD_HOST_EFER_MSR, 2356 * VMX_VMCS_CTRL_EXIT_CONTROLS_SAVE_VMX_PREEMPT_TIMER. */ 2355 * VMX_VMCS_CTRL_EXIT_CONTROLS_LOAD_HOST_EFER_MSR. */ 2356 2357 if (pVM->hm.s.vmx.msr.vmx_exit.n.allowed1 & VMX_VMCS_CTRL_EXIT_CONTROLS_SAVE_VMX_PREEMPT_TIMER) 2358 val |= VMX_VMCS_CTRL_EXIT_CONTROLS_SAVE_VMX_PREEMPT_TIMER; 2357 2359 2358 2360 if ((val & zap) != val) … … 4795 4797 4796 4798 /** 4797 * Gets the guest's interruptibility-state ("interrupt shadow" as AMD calls it)4799 * Saves the guest's interruptibility-state ("interrupt shadow" as AMD calls it) 4798 4800 * from the guest-state area in the VMCS. 4799 4801 * … … 6348 6350 6349 6351 /* Setup TSC-offsetting or intercept RDTSC(P)s and update the preemption timer. */ 6350 if (pVmxTransient->fUpdateTscOffsetting )6352 if (pVmxTransient->fUpdateTscOffsettingAndPreemptTimer) 6351 6353 { 6352 6354 hmR0VmxUpdateTscOffsettingAndPreemptTimer(pVM, pVCpu, pMixedCtx); 6353 pVmxTransient->fUpdateTscOffsetting = false;6355 pVmxTransient->fUpdateTscOffsettingAndPreemptTimer = false; 6354 6356 } 6355 6357 … … 6483 6485 6484 6486 VMXTRANSIENT VmxTransient; 6485 VmxTransient.fUpdateTscOffsetting = true;6487 VmxTransient.fUpdateTscOffsettingAndPreemptTimer = true; 6486 6488 int rc = VERR_INTERNAL_ERROR_5; 6487 6489 unsigned cLoops = 0; … … 6822 6824 /* If we get a spurious VM-exit when offsetting is enabled, we must reset offsetting on VM-reentry. See @bugref{6634}. */ 6823 6825 if (pVCpu->hm.s.vmx.u32ProcCtls & VMX_VMCS_CTRL_PROC_EXEC_CONTROLS_USE_TSC_OFFSETTING) 6824 pVmxTransient->fUpdateTscOffsetting = true;6826 pVmxTransient->fUpdateTscOffsettingAndPreemptTimer = true; 6825 6827 } 6826 6828 else … … 6857 6859 /* If we get a spurious VM-exit when offsetting is enabled, we must reset offsetting on VM-reentry. See @bugref{6634}. */ 6858 6860 if (pVCpu->hm.s.vmx.u32ProcCtls & VMX_VMCS_CTRL_PROC_EXEC_CONTROLS_USE_TSC_OFFSETTING) 6859 pVmxTransient->fUpdateTscOffsetting = true;6861 pVmxTransient->fUpdateTscOffsettingAndPreemptTimer = true; 6860 6862 } 6861 6863 else … … 7129 7131 { 7130 7132 VMX_VALIDATE_EXIT_HANDLER_PARAMS(); 7133 7134 /* If we're saving the preemption-timer value on every VM-exit & we've reached zero, reset it up on next VM-entry. */ 7135 if (pVCpu->hm.s.vmx.u32ExitCtls & VMX_VMCS_CTRL_EXIT_CONTROLS_SAVE_VMX_PREEMPT_TIMER) 7136 pVmxTransient->fUpdateTscOffsettingAndPreemptTimer = true; 7137 7131 7138 /* If there are any timer events pending, fall back to ring-3, otherwise resume guest execution. */ 7132 7139 bool fTimersPending = TMTimerPollBool(pVM, pVCpu); 7133 int rc = fTimersPending ? VINF_EM_RAW_TIMER_PENDING : VINF_SUCCESS;7134 7140 STAM_COUNTER_INC(&pVCpu->hm.s.StatExitPreemptTimer); 7135 return rc;7141 return fTimersPending ? VINF_EM_RAW_TIMER_PENDING : VINF_SUCCESS; 7136 7142 } 7137 7143
Note:
See TracChangeset
for help on using the changeset viewer.