Changeset 51421 in vbox
- Timestamp:
- May 27, 2014 10:59:35 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR0/HMSVMR0.cpp
r51230 r51421 4416 4416 { 4417 4417 rc = VBOXSTRICTRC_TODO(EMInterpretInstruction(pVCpu, CPUMCTX2CORE(pCtx), 0 /* pvFault */)); 4418 if (RT_UNLIKELY(rc != VINF_SUCCESS)) 4418 if (RT_LIKELY(rc == VINF_SUCCESS)) 4419 HMSVM_CHECK_SINGLE_STEP(pVCpu, rc); /* RIP updated by EMInterpretInstruction(). */ 4420 else 4419 4421 AssertMsg(rc == VERR_EM_INTERPRETER, ("hmR0SvmExitMsr: WrMsr. EMInterpretInstruction failed rc=%Rrc\n", rc)); 4420 /* RIP updated by EMInterpretInstruction(). */ 4421 HMSVM_CHECK_SINGLE_STEP(pVCpu, rc); 4422 } 4423 4424 /* If this is an X2APIC WRMSR access, update the APIC state as well. */ 4425 if ( pCtx->ecx >= MSR_IA32_X2APIC_START 4426 && pCtx->ecx <= MSR_IA32_X2APIC_END) 4427 { 4428 /* 4429 * We've already saved the APIC related guest-state (TPR) in hmR0SvmPostRunGuest(). When full APIC register 4430 * virtualization is implemented we'll have to make sure APIC state is saved from the VMCB before 4431 * EMInterpretWrmsr() changes it. 4432 */ 4433 HMCPU_CF_SET(pVCpu, HM_CHANGED_SVM_GUEST_APIC_STATE); 4434 } 4435 else if (pCtx->ecx == MSR_K6_EFER) 4436 HMCPU_CF_SET(pVCpu, HM_CHANGED_GUEST_EFER_MSR); 4437 else if (pCtx->ecx == MSR_IA32_TSC) 4438 pSvmTransient->fUpdateTscOffsetting = true; 4422 } 4423 4424 if (rc == VINF_SUCCESS) 4425 { 4426 /* If this is an X2APIC WRMSR access, update the APIC state as well. */ 4427 if ( pCtx->ecx >= MSR_IA32_X2APIC_START 4428 && pCtx->ecx <= MSR_IA32_X2APIC_END) 4429 { 4430 /* 4431 * We've already saved the APIC related guest-state (TPR) in hmR0SvmPostRunGuest(). When full APIC register 4432 * virtualization is implemented we'll have to make sure APIC state is saved from the VMCB before 4433 * EMInterpretWrmsr() changes it. 4434 */ 4435 HMCPU_CF_SET(pVCpu, HM_CHANGED_SVM_GUEST_APIC_STATE); 4436 } 4437 else if (pCtx->ecx == MSR_K6_EFER) 4438 HMCPU_CF_SET(pVCpu, HM_CHANGED_GUEST_EFER_MSR); 4439 else if (pCtx->ecx == MSR_IA32_TSC) 4440 pSvmTransient->fUpdateTscOffsetting = true; 4441 } 4439 4442 } 4440 4443 else
Note:
See TracChangeset
for help on using the changeset viewer.