Changeset 44096 in vbox
- Timestamp:
- Dec 11, 2012 3:01:52 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/vmm/hm_vmx.h
r43947 r44096 1016 1016 * @{ 1017 1017 */ 1018 #define VMX_EXIT_INTERRUPTION_INFO_TYPE_EXT 1018 #define VMX_EXIT_INTERRUPTION_INFO_TYPE_EXT_INT 0 1019 1019 #define VMX_EXIT_INTERRUPTION_INFO_TYPE_NMI 2 1020 #define VMX_EXIT_INTERRUPTION_INFO_TYPE_HW EXCPT 31021 #define VMX_EXIT_INTERRUPTION_INFO_TYPE_SW 1022 #define VMX_EXIT_INTERRUPTION_INFO_TYPE_DB EXCPT 5 /**< Why are we getting this one?? */1023 #define VMX_EXIT_INTERRUPTION_INFO_TYPE_SW EXCPT 61020 #define VMX_EXIT_INTERRUPTION_INFO_TYPE_HW_XCPT 3 1021 #define VMX_EXIT_INTERRUPTION_INFO_TYPE_SW_INT 4 /**< int xx */ 1022 #define VMX_EXIT_INTERRUPTION_INFO_TYPE_DB_XCPT 5 /**< Why are we getting this one?? */ 1023 #define VMX_EXIT_INTERRUPTION_INFO_TYPE_SW_XCPT 6 1024 1024 /** @} */ 1025 1025 … … 1105 1105 #define VMX_VMCS_RO_IO_RDI 0x6406 1106 1106 #define VMX_VMCS_RO_IO_RIP 0x6408 1107 #define VMX_VMCS_ EXIT_GUEST_LINEAR_ADDR0x640A1107 #define VMX_VMCS_RO_EXIT_GUEST_LINEAR_ADDR 0x640A 1108 1108 /** @} */ 1109 1109 … … 1176 1176 /** Task switch caused by an interrupt gate. */ 1177 1177 #define VMX_EXIT_QUALIFICATION_TASK_SWITCH_TYPE_IDT 3 1178 1179 1178 /** @} */ 1180 1179 -
trunk/src/VBox/VMM/VMMR0/HWVMXR0.cpp
r44089 r44096 884 884 { 885 885 LogFlow(("INJ-EI: %x at %RGv\n", iGate, (RTGCPTR)pCtx->rip)); 886 Assert( VMX_EXIT_INTERRUPTION_INFO_TYPE(intInfo) == VMX_EXIT_INTERRUPTION_INFO_TYPE_SW 886 Assert( VMX_EXIT_INTERRUPTION_INFO_TYPE(intInfo) == VMX_EXIT_INTERRUPTION_INFO_TYPE_SW_INT 887 887 || !VMCPU_FF_ISSET(pVCpu, VMCPU_FF_INHIBIT_INTERRUPTS)); 888 Assert( VMX_EXIT_INTERRUPTION_INFO_TYPE(intInfo) == VMX_EXIT_INTERRUPTION_INFO_TYPE_SW 888 Assert( VMX_EXIT_INTERRUPTION_INFO_TYPE(intInfo) == VMX_EXIT_INTERRUPTION_INFO_TYPE_SW_INT 889 889 || pCtx->eflags.u32 & X86_EFL_IF); 890 890 } … … 920 920 intInfo2 |= (1 << VMX_EXIT_INTERRUPTION_INFO_VALID_SHIFT); 921 921 intInfo2 |= VMX_EXIT_INTERRUPTION_INFO_ERROR_CODE_VALID; 922 intInfo2 |= (VMX_EXIT_INTERRUPTION_INFO_TYPE_HW EXCPT << VMX_EXIT_INTERRUPTION_INFO_TYPE_SHIFT);922 intInfo2 |= (VMX_EXIT_INTERRUPTION_INFO_TYPE_HW_XCPT << VMX_EXIT_INTERRUPTION_INFO_TYPE_SHIFT); 923 923 924 924 return hmR0VmxInjectEvent(pVM, pVCpu, pCtx, intInfo2, 0, 0 /* no error code according to the Intel docs */); … … 927 927 return VINF_EM_RESET; 928 928 } 929 if ( VMX_EXIT_INTERRUPTION_INFO_TYPE(intInfo) == VMX_EXIT_INTERRUPTION_INFO_TYPE_SW 929 if ( VMX_EXIT_INTERRUPTION_INFO_TYPE(intInfo) == VMX_EXIT_INTERRUPTION_INFO_TYPE_SW_INT 930 930 || iGate == 3 /* Both #BP and #OF point to the instruction after. */ 931 931 || iGate == 4) … … 1134 1134 || u8Vector == X86_XCPT_OF) 1135 1135 { 1136 intInfo |= (VMX_EXIT_INTERRUPTION_INFO_TYPE_SW EXCPT << VMX_EXIT_INTERRUPTION_INFO_TYPE_SHIFT);1136 intInfo |= (VMX_EXIT_INTERRUPTION_INFO_TYPE_SW_XCPT << VMX_EXIT_INTERRUPTION_INFO_TYPE_SHIFT); 1137 1137 } 1138 1138 else 1139 intInfo |= (VMX_EXIT_INTERRUPTION_INFO_TYPE_HW EXCPT << VMX_EXIT_INTERRUPTION_INFO_TYPE_SHIFT);1139 intInfo |= (VMX_EXIT_INTERRUPTION_INFO_TYPE_HW_XCPT << VMX_EXIT_INTERRUPTION_INFO_TYPE_SHIFT); 1140 1140 } 1141 1141 else 1142 intInfo |= (VMX_EXIT_INTERRUPTION_INFO_TYPE_EXT << VMX_EXIT_INTERRUPTION_INFO_TYPE_SHIFT);1142 intInfo |= (VMX_EXIT_INTERRUPTION_INFO_TYPE_EXT_INT << VMX_EXIT_INTERRUPTION_INFO_TYPE_SHIFT); 1143 1143 1144 1144 STAM_COUNTER_INC(&pVCpu->hm.s.StatIntInject); … … 1173 1173 switch (VMX_EXIT_INTERRUPTION_INFO_TYPE(pVCpu->hm.s.Event.u64IntrInfo)) 1174 1174 { 1175 case VMX_EXIT_INTERRUPTION_INFO_TYPE_EXT :1175 case VMX_EXIT_INTERRUPTION_INFO_TYPE_EXT_INT: 1176 1176 case VMX_EXIT_INTERRUPTION_INFO_TYPE_NMI: 1177 1177 enmTrapType = TRPM_HARDWARE_INT; 1178 1178 break; 1179 case VMX_EXIT_INTERRUPTION_INFO_TYPE_SW :1180 case VMX_EXIT_INTERRUPTION_INFO_TYPE_SW EXCPT:1181 case VMX_EXIT_INTERRUPTION_INFO_TYPE_DB EXCPT:1179 case VMX_EXIT_INTERRUPTION_INFO_TYPE_SW_INT: 1180 case VMX_EXIT_INTERRUPTION_INFO_TYPE_SW_XCPT: 1181 case VMX_EXIT_INTERRUPTION_INFO_TYPE_DB_XCPT: 1182 1182 enmTrapType = TRPM_SOFTWARE_INT; 1183 1183 break; 1184 case VMX_EXIT_INTERRUPTION_INFO_TYPE_HW EXCPT:1184 case VMX_EXIT_INTERRUPTION_INFO_TYPE_HW_XCPT: 1185 1185 enmTrapType = TRPM_TRAP; 1186 1186 break; … … 3335 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.u64IntrInfo) != VMX_EXIT_INTERRUPTION_INFO_TYPE_SW 3337 && VMX_EXIT_INTERRUPTION_INFO_TYPE(pVCpu->hm.s.Event.u64IntrInfo) != VMX_EXIT_INTERRUPTION_INFO_TYPE_SW_INT 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.u64IntrInfo) != VMX_EXIT_INTERRUPTION_INFO_TYPE_SW EXCPT)3339 && VMX_EXIT_INTERRUPTION_INFO_TYPE(pVCpu->hm.s.Event.u64IntrInfo) != VMX_EXIT_INTERRUPTION_INFO_TYPE_SW_XCPT) 3340 3340 { 3341 3341 Assert(!pVCpu->hm.s.Event.fPending); … … 3360 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.u64IntrInfo) == VMX_EXIT_INTERRUPTION_INFO_TYPE_SW EXCPT)3362 && VMX_EXIT_INTERRUPTION_INFO_TYPE(pVCpu->hm.s.Event.u64IntrInfo) == VMX_EXIT_INTERRUPTION_INFO_TYPE_SW_XCPT) 3363 3363 { 3364 3364 Log(("Ignore pending inject %RX64 at %RGv exit=%08x intInfo=%08x exitQualification=%RGv\n", … … 3411 3411 switch (VMX_EXIT_INTERRUPTION_INFO_TYPE(intInfo)) 3412 3412 { 3413 case VMX_EXIT_INTERRUPTION_INFO_TYPE_NMI: /* Non-maskable interrupt. */3413 case VMX_EXIT_INTERRUPTION_INFO_TYPE_NMI: /* Non-maskable interrupt. */ 3414 3414 /* External interrupt; leave to allow it to be dispatched again. */ 3415 3415 rc = VINF_EM_RAW_INTERRUPT; 3416 3416 break; 3417 3417 3418 case VMX_EXIT_INTERRUPTION_INFO_TYPE_EXT : /* External hardware interrupt. */3418 case VMX_EXIT_INTERRUPTION_INFO_TYPE_EXT_INT: /* External hardware interrupt. */ 3419 3419 AssertFailed(); /* can't come here; fails the first check. */ 3420 3420 break; 3421 3421 3422 case VMX_EXIT_INTERRUPTION_INFO_TYPE_DB EXCPT: /* Unknown why we get this type for #DB */3423 case VMX_EXIT_INTERRUPTION_INFO_TYPE_SW EXCPT: /* Software exception. (#BP or #OF) */3422 case VMX_EXIT_INTERRUPTION_INFO_TYPE_DB_XCPT: /* Unknown why we get this type for #DB */ 3423 case VMX_EXIT_INTERRUPTION_INFO_TYPE_SW_XCPT: /* Software exception. (#BP or #OF) */ 3424 3424 Assert(vector == 1 || vector == 3 || vector == 4); 3425 3425 /* no break */ 3426 case VMX_EXIT_INTERRUPTION_INFO_TYPE_HW EXCPT: /* Hardware exception. */3426 case VMX_EXIT_INTERRUPTION_INFO_TYPE_HW_XCPT: /* Hardware exception. */ 3427 3427 Log2(("Hardware/software interrupt %d\n", vector)); 3428 3428 switch (vector) … … 3870 3870 intInfo2 = pDis->Param1.uValue & 0xff; 3871 3871 intInfo2 |= (1 << VMX_EXIT_INTERRUPTION_INFO_VALID_SHIFT); 3872 intInfo2 |= (VMX_EXIT_INTERRUPTION_INFO_TYPE_SW << VMX_EXIT_INTERRUPTION_INFO_TYPE_SHIFT);3872 intInfo2 |= (VMX_EXIT_INTERRUPTION_INFO_TYPE_SW_INT << VMX_EXIT_INTERRUPTION_INFO_TYPE_SHIFT); 3873 3873 3874 3874 rc = hmR0VmxInjectEvent(pVM, pVCpu, pCtx, intInfo2, cbOp, 0); … … 3888 3888 intInfo2 = X86_XCPT_OF; 3889 3889 intInfo2 |= (1 << VMX_EXIT_INTERRUPTION_INFO_VALID_SHIFT); 3890 intInfo2 |= (VMX_EXIT_INTERRUPTION_INFO_TYPE_SW << VMX_EXIT_INTERRUPTION_INFO_TYPE_SHIFT);3890 intInfo2 |= (VMX_EXIT_INTERRUPTION_INFO_TYPE_SW_INT << VMX_EXIT_INTERRUPTION_INFO_TYPE_SHIFT); 3891 3891 3892 3892 rc = hmR0VmxInjectEvent(pVM, pVCpu, pCtx, intInfo2, cbOp, 0); … … 3905 3905 intInfo2 = 3; 3906 3906 intInfo2 |= (1 << VMX_EXIT_INTERRUPTION_INFO_VALID_SHIFT); 3907 intInfo2 |= (VMX_EXIT_INTERRUPTION_INFO_TYPE_SW << VMX_EXIT_INTERRUPTION_INFO_TYPE_SHIFT);3907 intInfo2 |= (VMX_EXIT_INTERRUPTION_INFO_TYPE_SW_INT << VMX_EXIT_INTERRUPTION_INFO_TYPE_SHIFT); 3908 3908 3909 3909 rc = hmR0VmxInjectEvent(pVM, pVCpu, pCtx, intInfo2, cbOp, 0); … … 4483 4483 4484 4484 /* Disassemble manually to deal with segment prefixes. */ 4485 /** @todo VMX_VMCS_EXIT_GUEST_LINEAR_ADDR contains the flat pointer operand of the instruction. */ 4485 /** @todo VMX_VMCS_RO_EXIT_GUEST_LINEAR_ADDR contains the flat pointer 4486 * operand of the instruction. */ 4486 4487 /** @todo VMX_VMCS32_RO_EXIT_INSTR_INFO also contains segment prefix info. */ 4487 4488 rc2 = EMInterpretDisasCurrent(pVM, pVCpu, pDis, NULL); … … 4589 4590 intInfo = X86_XCPT_DB; 4590 4591 intInfo |= (1 << VMX_EXIT_INTERRUPTION_INFO_VALID_SHIFT); 4591 intInfo |= (VMX_EXIT_INTERRUPTION_INFO_TYPE_HW EXCPT << VMX_EXIT_INTERRUPTION_INFO_TYPE_SHIFT);4592 intInfo |= (VMX_EXIT_INTERRUPTION_INFO_TYPE_HW_XCPT << VMX_EXIT_INTERRUPTION_INFO_TYPE_SHIFT); 4592 4593 4593 4594 Log(("Inject IO debug trap at %RGv\n", (RTGCPTR)pCtx->rip));
Note:
See TracChangeset
for help on using the changeset viewer.