Changeset 44035 in vbox for trunk/src/VBox/VMM
- Timestamp:
- Dec 4, 2012 6:30:44 PM (12 years ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR0/HWSVMR0.cpp
r44034 r44035 533 533 534 534 /* Set pending event state. */ 535 pVCpu->hm.s.Event.u IntrInfo = pEvent->au64[0];535 pVCpu->hm.s.Event.u64IntrInfo = pEvent->au64[0]; 536 536 pVCpu->hm.s.Event.fPending = true; 537 537 } … … 593 593 SVM_EVENT Event; 594 594 595 Log(("Reinjecting event %08x %08x at %RGv\n", pVCpu->hm.s.Event.u IntrInfo, pVCpu->hm.s.Event.uErrCode,595 Log(("Reinjecting event %08x %08x at %RGv\n", pVCpu->hm.s.Event.u64IntrInfo, pVCpu->hm.s.Event.u32ErrCode, 596 596 (RTGCPTR)pCtx->rip)); 597 597 STAM_COUNTER_INC(&pVCpu->hm.s.StatIntReinject); 598 Event.au64[0] = pVCpu->hm.s.Event.u IntrInfo;598 Event.au64[0] = pVCpu->hm.s.Event.u64IntrInfo; 599 599 hmR0SvmInjectEvent(pVCpu, pvVMCB, pCtx, &Event); 600 600 … … 1792 1792 1793 1793 /* Check if an injected event was interrupted prematurely. */ 1794 pVCpu->hm.s.Event.u IntrInfo = pvVMCB->ctrl.ExitIntInfo.au64[0];1794 pVCpu->hm.s.Event.u64IntrInfo = pvVMCB->ctrl.ExitIntInfo.au64[0]; 1795 1795 if ( pvVMCB->ctrl.ExitIntInfo.n.u1Valid 1796 1796 /* we don't care about 'int xx' as the instruction will be restarted. */ 1797 1797 && pvVMCB->ctrl.ExitIntInfo.n.u3Type != SVM_EVENT_SOFTWARE_INT) 1798 1798 { 1799 Log(("Pending inject %RX64 at %RGv exit=%08x\n", pVCpu->hm.s.Event.u IntrInfo, (RTGCPTR)pCtx->rip, exitCode));1799 Log(("Pending inject %RX64 at %RGv exit=%08x\n", pVCpu->hm.s.Event.u64IntrInfo, (RTGCPTR)pCtx->rip, exitCode)); 1800 1800 1801 1801 #ifdef LOG_ENABLED 1802 1802 SVM_EVENT Event; 1803 Event.au64[0] = pVCpu->hm.s.Event.u IntrInfo;1803 Event.au64[0] = pVCpu->hm.s.Event.u64IntrInfo; 1804 1804 1805 1805 if ( exitCode == SVM_EXIT_EXCEPTION_E … … 1813 1813 /* Error code present? (redundant) */ 1814 1814 if (pvVMCB->ctrl.ExitIntInfo.n.u1ErrorCodeValid) 1815 pVCpu->hm.s.Event.u ErrCode = pvVMCB->ctrl.ExitIntInfo.n.u32ErrorCode;1815 pVCpu->hm.s.Event.u32ErrCode = pvVMCB->ctrl.ExitIntInfo.n.u32ErrorCode; 1816 1816 else 1817 pVCpu->hm.s.Event.u ErrCode = 0;1817 pVCpu->hm.s.Event.u32ErrCode = 0; 1818 1818 } 1819 1819 #ifdef VBOX_WITH_STATISTICS … … 2739 2739 { 2740 2740 SVM_EVENT Event; 2741 Event.au64[0] = pVCpu->hm.s.Event.u IntrInfo;2741 Event.au64[0] = pVCpu->hm.s.Event.u64IntrInfo; 2742 2742 2743 2743 /* Caused by an injected interrupt. */ -
trunk/src/VBox/VMM/VMMR0/HWVMXR0.cpp
r44033 r44035 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.u IntrInfo,1003 pVCpu->hm.s.Event.u 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.u64IntrInfo, 1003 pVCpu->hm.s.Event.u32ErrCode, (RTGCPTR)pCtx->rip, pCtx->cr2)); 1004 1004 STAM_COUNTER_INC(&pVCpu->hm.s.StatIntReinject); 1005 rc = hmR0VmxInjectEvent(pVM, pVCpu, pCtx, pVCpu->hm.s.Event.u IntrInfo, 0, pVCpu->hm.s.Event.uErrCode);1005 rc = hmR0VmxInjectEvent(pVM, pVCpu, pCtx, pVCpu->hm.s.Event.u64IntrInfo, 0, pVCpu->hm.s.Event.u32ErrCode); 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.u IntrInfo))1173 switch (VMX_EXIT_INTERRUPTION_INFO_TYPE(pVCpu->hm.s.Event.u64IntrInfo)) 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.u IntrInfo), enmTrapType);1192 if (VMX_EXIT_INTERRUPTION_INFO_ERROR_CODE_IS_VALID(pVCpu->hm.s.Event.u IntrInfo))1193 TRPMSetErrorCode(pVCpu, pVCpu->hm.s.Event.u ErrCode);1191 TRPMAssertTrap(pVCpu, VMX_EXIT_INTERRUPTION_INFO_VECTOR(pVCpu->hm.s.Event.u64IntrInfo), enmTrapType); 1192 if (VMX_EXIT_INTERRUPTION_INFO_ERROR_CODE_IS_VALID(pVCpu->hm.s.Event.u64IntrInfo)) 1193 TRPMSetErrorCode(pVCpu, pVCpu->hm.s.Event.u32ErrCode); 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.u IntrInfo = VMX_VMCS_CTRL_ENTRY_IRQ_INFO_FROM_EXIT_INT_INFO(val);3335 if ( VMX_EXIT_INTERRUPTION_INFO_VALID(pVCpu->hm.s.Event.u IntrInfo)3334 pVCpu->hm.s.Event.u64IntrInfo = VMX_VMCS_CTRL_ENTRY_IRQ_INFO_FROM_EXIT_INT_INFO(val); 3335 if ( VMX_EXIT_INTERRUPTION_INFO_VALID(pVCpu->hm.s.Event.u64IntrInfo) 3336 3336 /* Ignore 'int xx' as they'll be restarted anyway. */ 3337 && VMX_EXIT_INTERRUPTION_INFO_TYPE(pVCpu->hm.s.Event.u IntrInfo) != VMX_EXIT_INTERRUPTION_INFO_TYPE_SW3337 && VMX_EXIT_INTERRUPTION_INFO_TYPE(pVCpu->hm.s.Event.u64IntrInfo) != 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.u IntrInfo) != VMX_EXIT_INTERRUPTION_INFO_TYPE_SWEXCPT)3339 && VMX_EXIT_INTERRUPTION_INFO_TYPE(pVCpu->hm.s.Event.u64IntrInfo) != 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.u IntrInfo))3344 if (VMX_EXIT_INTERRUPTION_INFO_ERROR_CODE_IS_VALID(pVCpu->hm.s.Event.u64IntrInfo)) 3345 3345 { 3346 3346 rc2 = VMXReadCachedVmcs(VMX_VMCS32_RO_IDT_ERRCODE, &val); 3347 3347 AssertRC(rc2); 3348 pVCpu->hm.s.Event.u ErrCode = val;3348 pVCpu->hm.s.Event.u32ErrCode = val; 3349 3349 Log(("Pending inject %RX64 at %RGv exit=%08x intInfo=%08x exitQualification=%RGv pending error=%RX64\n", 3350 pVCpu->hm.s.Event.u IntrInfo, (RTGCPTR)pCtx->rip, exitReason, intInfo, exitQualification, val));3350 pVCpu->hm.s.Event.u64IntrInfo, (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.u IntrInfo,3354 Log(("Pending inject %RX64 at %RGv exit=%08x intInfo=%08x exitQualification=%RGv\n", pVCpu->hm.s.Event.u64IntrInfo, 3355 3355 (RTGCPTR)pCtx->rip, exitReason, intInfo, exitQualification)); 3356 pVCpu->hm.s.Event.u ErrCode = 0;3356 pVCpu->hm.s.Event.u32ErrCode = 0; 3357 3357 } 3358 3358 } 3359 3359 #ifdef VBOX_STRICT 3360 else if ( VMX_EXIT_INTERRUPTION_INFO_VALID(pVCpu->hm.s.Event.u IntrInfo)3360 else if ( VMX_EXIT_INTERRUPTION_INFO_VALID(pVCpu->hm.s.Event.u64IntrInfo) 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.u IntrInfo) == VMX_EXIT_INTERRUPTION_INFO_TYPE_SWEXCPT)3362 && VMX_EXIT_INTERRUPTION_INFO_TYPE(pVCpu->hm.s.Event.u64IntrInfo) == 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.u IntrInfo, (RTGCPTR)pCtx->rip, exitReason, intInfo, exitQualification));3365 pVCpu->hm.s.Event.u64IntrInfo, (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.u IntrInfo)));4714 Assert(!VMX_EXIT_INTERRUPTION_INFO_ERROR_CODE_IS_VALID(pVCpu->hm.s.Event.u IntrInfo));4713 Log(("VMX_EXIT_TASK_SWITCH: reassert trap %d\n", VMX_EXIT_INTERRUPTION_INFO_VECTOR(pVCpu->hm.s.Event.u64IntrInfo))); 4714 Assert(!VMX_EXIT_INTERRUPTION_INFO_ERROR_CODE_IS_VALID(pVCpu->hm.s.Event.u64IntrInfo)); 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.u IntrInfo), TRPM_HARDWARE_INT);4716 rc2 = TRPMAssertTrap(pVCpu, VMX_EXIT_INTERRUPTION_INFO_VECTOR(pVCpu->hm.s.Event.u64IntrInfo), TRPM_HARDWARE_INT); 4717 4717 AssertRC(rc2); 4718 4718 } -
trunk/src/VBox/VMM/VMMR3/HM.cpp
r44033 r44035 2764 2764 rc = SSMR3PutU32(pSSM, pVM->aCpus[i].hm.s.Event.fPending); 2765 2765 AssertRCReturn(rc, rc); 2766 rc = SSMR3PutU32(pSSM, pVM->aCpus[i].hm.s.Event.u ErrCode);2766 rc = SSMR3PutU32(pSSM, pVM->aCpus[i].hm.s.Event.u32ErrCode); 2767 2767 AssertRCReturn(rc, rc); 2768 rc = SSMR3PutU64(pSSM, pVM->aCpus[i].hm.s.Event.u IntrInfo);2768 rc = SSMR3PutU64(pSSM, pVM->aCpus[i].hm.s.Event.u64IntrInfo); 2769 2769 AssertRCReturn(rc, rc); 2770 2770 … … 2858 2858 rc = SSMR3GetU32(pSSM, &pVM->aCpus[i].hm.s.Event.fPending); 2859 2859 AssertRCReturn(rc, rc); 2860 rc = SSMR3GetU32(pSSM, &pVM->aCpus[i].hm.s.Event.u ErrCode);2860 rc = SSMR3GetU32(pSSM, &pVM->aCpus[i].hm.s.Event.u32ErrCode); 2861 2861 AssertRCReturn(rc, rc); 2862 rc = SSMR3GetU64(pSSM, &pVM->aCpus[i].hm.s.Event.u IntrInfo);2862 rc = SSMR3GetU64(pSSM, &pVM->aCpus[i].hm.s.Event.u64IntrInfo); 2863 2863 AssertRCReturn(rc, rc); 2864 2864 -
trunk/src/VBox/VMM/testcase/tstVMStructSize.cpp
r44033 r44035 402 402 CHECK_MEMBER_ALIGNMENT(HMCPU, vmx.HCPhysVMCS, sizeof(RTHCPHYS)); 403 403 CHECK_MEMBER_ALIGNMENT(HMCPU, vmx.u32ProcCtls, 8); 404 CHECK_MEMBER_ALIGNMENT(HMCPU, Event.u IntrInfo, 8);404 CHECK_MEMBER_ALIGNMENT(HMCPU, Event.u64IntrInfo, 8); 405 405 406 406 /* Make sure the set is large enough and has the correct size. */
Note:
See TracChangeset
for help on using the changeset viewer.