Changeset 44033 in vbox for trunk/src/VBox/VMM/VMMR0
- Timestamp:
- Dec 4, 2012 6:25:40 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR0/HWVMXR0.cpp
r44032 r44033 1000 1000 if (pVCpu->hm.s.Event.fPending) 1001 1001 { 1002 Log(("CPU%d: Reinjecting event %RX64 %08x at %RGv cr2=%RX64\n", pVCpu->idCpu, pVCpu->hm.s.Event. intInfo,1003 pVCpu->hm.s.Event. errCode, (RTGCPTR)pCtx->rip, pCtx->cr2));1002 Log(("CPU%d: Reinjecting event %RX64 %08x at %RGv cr2=%RX64\n", pVCpu->idCpu, pVCpu->hm.s.Event.uIntrInfo, 1003 pVCpu->hm.s.Event.uErrCode, (RTGCPTR)pCtx->rip, pCtx->cr2)); 1004 1004 STAM_COUNTER_INC(&pVCpu->hm.s.StatIntReinject); 1005 rc = hmR0VmxInjectEvent(pVM, pVCpu, pCtx, pVCpu->hm.s.Event. intInfo, 0, pVCpu->hm.s.Event.errCode);1005 rc = hmR0VmxInjectEvent(pVM, pVCpu, pCtx, pVCpu->hm.s.Event.uIntrInfo, 0, pVCpu->hm.s.Event.uErrCode); 1006 1006 AssertRC(rc); 1007 1007 … … 1171 1171 */ 1172 1172 pVCpu->hm.s.Event.fPending = false; 1173 switch (VMX_EXIT_INTERRUPTION_INFO_TYPE(pVCpu->hm.s.Event. intInfo))1173 switch (VMX_EXIT_INTERRUPTION_INFO_TYPE(pVCpu->hm.s.Event.uIntrInfo)) 1174 1174 { 1175 1175 case VMX_EXIT_INTERRUPTION_INFO_TYPE_EXT: … … 1189 1189 AssertFailed(); 1190 1190 } 1191 TRPMAssertTrap(pVCpu, VMX_EXIT_INTERRUPTION_INFO_VECTOR(pVCpu->hm.s.Event. intInfo), enmTrapType);1192 if (VMX_EXIT_INTERRUPTION_INFO_ERROR_CODE_IS_VALID(pVCpu->hm.s.Event. intInfo))1193 TRPMSetErrorCode(pVCpu, pVCpu->hm.s.Event. errCode);1191 TRPMAssertTrap(pVCpu, VMX_EXIT_INTERRUPTION_INFO_VECTOR(pVCpu->hm.s.Event.uIntrInfo), enmTrapType); 1192 if (VMX_EXIT_INTERRUPTION_INFO_ERROR_CODE_IS_VALID(pVCpu->hm.s.Event.uIntrInfo)) 1193 TRPMSetErrorCode(pVCpu, pVCpu->hm.s.Event.uErrCode); 1194 1194 //@todo: Is there any situation where we need to call TRPMSetFaultAddress()? 1195 1195 } … … 3332 3332 rc2 = VMXReadCachedVmcs(VMX_VMCS32_RO_IDT_INFO, &val); 3333 3333 AssertRC(rc2); 3334 pVCpu->hm.s.Event. intInfo = VMX_VMCS_CTRL_ENTRY_IRQ_INFO_FROM_EXIT_INT_INFO(val);3335 if ( VMX_EXIT_INTERRUPTION_INFO_VALID(pVCpu->hm.s.Event. intInfo)3334 pVCpu->hm.s.Event.uIntrInfo = VMX_VMCS_CTRL_ENTRY_IRQ_INFO_FROM_EXIT_INT_INFO(val); 3335 if ( VMX_EXIT_INTERRUPTION_INFO_VALID(pVCpu->hm.s.Event.uIntrInfo) 3336 3336 /* Ignore 'int xx' as they'll be restarted anyway. */ 3337 && VMX_EXIT_INTERRUPTION_INFO_TYPE(pVCpu->hm.s.Event. intInfo) != VMX_EXIT_INTERRUPTION_INFO_TYPE_SW3337 && VMX_EXIT_INTERRUPTION_INFO_TYPE(pVCpu->hm.s.Event.uIntrInfo) != VMX_EXIT_INTERRUPTION_INFO_TYPE_SW 3338 3338 /* Ignore software exceptions (such as int3) as they'll reoccur when we restart the instruction anyway. */ 3339 && VMX_EXIT_INTERRUPTION_INFO_TYPE(pVCpu->hm.s.Event. intInfo) != VMX_EXIT_INTERRUPTION_INFO_TYPE_SWEXCPT)3339 && VMX_EXIT_INTERRUPTION_INFO_TYPE(pVCpu->hm.s.Event.uIntrInfo) != VMX_EXIT_INTERRUPTION_INFO_TYPE_SWEXCPT) 3340 3340 { 3341 3341 Assert(!pVCpu->hm.s.Event.fPending); 3342 3342 pVCpu->hm.s.Event.fPending = true; 3343 3343 /* Error code present? */ 3344 if (VMX_EXIT_INTERRUPTION_INFO_ERROR_CODE_IS_VALID(pVCpu->hm.s.Event. intInfo))3344 if (VMX_EXIT_INTERRUPTION_INFO_ERROR_CODE_IS_VALID(pVCpu->hm.s.Event.uIntrInfo)) 3345 3345 { 3346 3346 rc2 = VMXReadCachedVmcs(VMX_VMCS32_RO_IDT_ERRCODE, &val); 3347 3347 AssertRC(rc2); 3348 pVCpu->hm.s.Event. errCode = val;3348 pVCpu->hm.s.Event.uErrCode = val; 3349 3349 Log(("Pending inject %RX64 at %RGv exit=%08x intInfo=%08x exitQualification=%RGv pending error=%RX64\n", 3350 pVCpu->hm.s.Event. intInfo, (RTGCPTR)pCtx->rip, exitReason, intInfo, exitQualification, val));3350 pVCpu->hm.s.Event.uIntrInfo, (RTGCPTR)pCtx->rip, exitReason, intInfo, exitQualification, val)); 3351 3351 } 3352 3352 else 3353 3353 { 3354 Log(("Pending inject %RX64 at %RGv exit=%08x intInfo=%08x exitQualification=%RGv\n", pVCpu->hm.s.Event. intInfo,3354 Log(("Pending inject %RX64 at %RGv exit=%08x intInfo=%08x exitQualification=%RGv\n", pVCpu->hm.s.Event.uIntrInfo, 3355 3355 (RTGCPTR)pCtx->rip, exitReason, intInfo, exitQualification)); 3356 pVCpu->hm.s.Event. errCode = 0;3356 pVCpu->hm.s.Event.uErrCode = 0; 3357 3357 } 3358 3358 } 3359 3359 #ifdef VBOX_STRICT 3360 else if ( VMX_EXIT_INTERRUPTION_INFO_VALID(pVCpu->hm.s.Event. intInfo)3360 else if ( VMX_EXIT_INTERRUPTION_INFO_VALID(pVCpu->hm.s.Event.uIntrInfo) 3361 3361 /* Ignore software exceptions (such as int3) as they're reoccur when we restart the instruction anyway. */ 3362 && VMX_EXIT_INTERRUPTION_INFO_TYPE(pVCpu->hm.s.Event. intInfo) == VMX_EXIT_INTERRUPTION_INFO_TYPE_SWEXCPT)3362 && VMX_EXIT_INTERRUPTION_INFO_TYPE(pVCpu->hm.s.Event.uIntrInfo) == VMX_EXIT_INTERRUPTION_INFO_TYPE_SWEXCPT) 3363 3363 { 3364 3364 Log(("Ignore pending inject %RX64 at %RGv exit=%08x intInfo=%08x exitQualification=%RGv\n", 3365 pVCpu->hm.s.Event. intInfo, (RTGCPTR)pCtx->rip, exitReason, intInfo, exitQualification));3365 pVCpu->hm.s.Event.uIntrInfo, (RTGCPTR)pCtx->rip, exitReason, intInfo, exitQualification)); 3366 3366 } 3367 3367 … … 4711 4711 pVCpu->hm.s.Event.fPending = false; 4712 4712 4713 Log(("VMX_EXIT_TASK_SWITCH: reassert trap %d\n", VMX_EXIT_INTERRUPTION_INFO_VECTOR(pVCpu->hm.s.Event. intInfo)));4714 Assert(!VMX_EXIT_INTERRUPTION_INFO_ERROR_CODE_IS_VALID(pVCpu->hm.s.Event. intInfo));4713 Log(("VMX_EXIT_TASK_SWITCH: reassert trap %d\n", VMX_EXIT_INTERRUPTION_INFO_VECTOR(pVCpu->hm.s.Event.uIntrInfo))); 4714 Assert(!VMX_EXIT_INTERRUPTION_INFO_ERROR_CODE_IS_VALID(pVCpu->hm.s.Event.uIntrInfo)); 4715 4715 //@todo: Why do we assume this had to be a hardware interrupt? What about software interrupts or exceptions? 4716 rc2 = TRPMAssertTrap(pVCpu, VMX_EXIT_INTERRUPTION_INFO_VECTOR(pVCpu->hm.s.Event. intInfo), TRPM_HARDWARE_INT);4716 rc2 = TRPMAssertTrap(pVCpu, VMX_EXIT_INTERRUPTION_INFO_VECTOR(pVCpu->hm.s.Event.uIntrInfo), TRPM_HARDWARE_INT); 4717 4717 AssertRC(rc2); 4718 4718 }
Note:
See TracChangeset
for help on using the changeset viewer.