- Timestamp:
- Dec 17, 2012 3:29:40 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/vmm/hm_vmx.h
r44096 r44146 455 455 #define VMX_EXIT_INVALID -1 456 456 /** 0 Exception or non-maskable interrupt (NMI). */ 457 #define VMX_EXIT_ EXCEPTION_NMI0457 #define VMX_EXIT_XCPT_NMI 0 458 458 /** 1 External interrupt. */ 459 #define VMX_EXIT_EXT ERNAL_IRQ1459 #define VMX_EXIT_EXT_INT 1 460 460 /** 2 Triple fault. */ 461 461 #define VMX_EXIT_TRIPLE_FAULT 2 … … 468 468 /** 6 Other SMI. */ 469 469 #define VMX_EXIT_SMI_IRQ 6 470 /** 7 Interrupt window . */471 #define VMX_EXIT_I RQ_WINDOW 7470 /** 7 Interrupt window exiting. */ 471 #define VMX_EXIT_INT_WINDOW 7 472 472 /** 9 Task switch. */ 473 473 #define VMX_EXIT_TASK_SWITCH 9 … … 843 843 #define VMX_VMCS32_CTRL_ENTRY_CONTROLS 0x4012 844 844 #define VMX_VMCS32_CTRL_ENTRY_MSR_LOAD_COUNT 0x4014 845 #define VMX_VMCS32_CTRL_ENTRY_I RQ_INFO0x4016845 #define VMX_VMCS32_CTRL_ENTRY_INTERRUPTION_INFO 0x4016 846 846 #define VMX_VMCS32_CTRL_ENTRY_EXCEPTION_ERRCODE 0x4018 847 847 #define VMX_VMCS32_CTRL_ENTRY_INSTR_LENGTH 0x401A … … 869 869 */ 870 870 /** VM Exit as soon as RFLAGS.IF=1 and no blocking is active. */ 871 #define VMX_VMCS_CTRL_PROC_EXEC_CONTROLS_I RQ_WINDOW_EXIT RT_BIT(2)871 #define VMX_VMCS_CTRL_PROC_EXEC_CONTROLS_INT_WINDOW_EXIT RT_BIT(2) 872 872 /** Use timestamp counter offset. */ 873 873 #define VMX_VMCS_CTRL_PROC_EXEC_CONTROLS_TSC_OFFSET RT_BIT(3) … … 972 972 #define VMX_VMCS_CTRL_EXIT_CONTROLS_LOAD_PERF_MSR RT_BIT(12) 973 973 /** Acknowledge external interrupts with the irq controller if one caused a VM-exit. */ 974 #define VMX_VMCS_CTRL_EXIT_CONTROLS_ACK_EXT ERNAL_IRQRT_BIT(15)974 #define VMX_VMCS_CTRL_EXIT_CONTROLS_ACK_EXT_INT RT_BIT(15) 975 975 /** This control determines whether the guest IA32_PAT MSR is saved on VM exit. */ 976 976 #define VMX_VMCS_CTRL_EXIT_CONTROLS_SAVE_GUEST_PAT_MSR RT_BIT(18) … … 998 998 /** @} */ 999 999 1000 /** @name VMX_VMCS_RO_EXIT_INTERRUPTION_INFO 1001 * @{ 1002 */ 1003 #define VMX_EXIT_INTERRUPTION_INFO_VECTOR(a) (a & 0xff) 1004 #define VMX_EXIT_INTERRUPTION_INFO_TYPE_SHIFT 8 1005 #define VMX_EXIT_INTERRUPTION_INFO_TYPE(a) ((a >> VMX_EXIT_INTERRUPTION_INFO_TYPE_SHIFT) & 7) 1006 #define VMX_EXIT_INTERRUPTION_INFO_ERROR_CODE_VALID RT_BIT(11) 1007 #define VMX_EXIT_INTERRUPTION_INFO_ERROR_CODE_IS_VALID(a) (a & VMX_EXIT_INTERRUPTION_INFO_ERROR_CODE_VALID) 1008 #define VMX_EXIT_INTERRUPTION_INFO_NMI_UNBLOCK(a) (a & RT_BIT(12)) 1009 #define VMX_EXIT_INTERRUPTION_INFO_VALID_SHIFT 31 1010 #define VMX_EXIT_INTERRUPTION_INFO_VALID(a) (a & RT_BIT(31)) 1000 /** @name VMX_VMCS32_RO_EXIT_REASON 1001 * @{ 1002 */ 1003 #define VMX_EXIT_REASON_BASIC(a) (a & 0xffff) 1004 #define VMX_EXIT_REASON_VMENTRY_FAILED(a) (a & RT_BIT(31)) 1005 /** @} */ 1006 1007 /** @name VMX_VMCS32_RO_EXIT_INTERRUPTION_INFO 1008 * @{ 1009 */ 1010 #define VMX_EXIT_INTERRUPTION_INFO_VECTOR(a) (a & 0xff) 1011 #define VMX_EXIT_INTERRUPTION_INFO_TYPE_SHIFT 8 1012 #define VMX_EXIT_INTERRUPTION_INFO_TYPE(a) ((a >> VMX_EXIT_INTERRUPTION_INFO_TYPE_SHIFT) & 7) 1013 #define VMX_EXIT_INTERRUPTION_INFO_ERROR_CODE_VALID RT_BIT(11) 1014 #define VMX_EXIT_INTERRUPTION_INFO_ERROR_CODE_IS_VALID(a) (a & VMX_EXIT_INTERRUPTION_INFO_ERROR_CODE_VALID) 1015 #define VMX_EXIT_INTERRUPTION_INFO_NMI_UNBLOCK(a) (a & RT_BIT(12)) 1016 #define VMX_EXIT_INTERRUPTION_INFO_VALID_SHIFT 31 1017 #define VMX_EXIT_INTERRUPTION_INFO_VALID(a) (a & RT_BIT(31)) 1011 1018 /** Construct an irq event injection value from the exit interruption info value (same except that bit 12 is reserved). */ 1012 #define VMX_VMCS_CTRL_ENTRY_IRQ_INFO_FROM_EXIT_INT_INFO(a) (a & ~RT_BIT(12))1019 #define VMX_VMCS_CTRL_ENTRY_IRQ_INFO_FROM_EXIT_INT_INFO(a) (a & ~RT_BIT(12)) 1013 1020 /** @} */ 1014 1021 -
trunk/src/VBox/VMM/VMMR0/HWVMXR0.cpp
r44096 r44146 974 974 * Set event injection state. 975 975 */ 976 rc = VMXWriteVmcs(VMX_VMCS32_CTRL_ENTRY_I RQ_INFO, intInfo | (1 << VMX_EXIT_INTERRUPTION_INFO_VALID_SHIFT));976 rc = VMXWriteVmcs(VMX_VMCS32_CTRL_ENTRY_INTERRUPTION_INFO, intInfo | (1 << VMX_EXIT_INTERRUPTION_INFO_VALID_SHIFT)); 977 977 rc |= VMXWriteVmcs(VMX_VMCS32_CTRL_ENTRY_INSTR_LENGTH, cbInstr); 978 978 rc |= VMXWriteVmcs(VMX_VMCS32_CTRL_ENTRY_EXCEPTION_ERRCODE, errCode); … … 1040 1040 if (!(pCtx->eflags.u32 & X86_EFL_IF)) 1041 1041 { 1042 if (!(pVCpu->hm.s.vmx.u32ProcCtls & VMX_VMCS_CTRL_PROC_EXEC_CONTROLS_I RQ_WINDOW_EXIT))1042 if (!(pVCpu->hm.s.vmx.u32ProcCtls & VMX_VMCS_CTRL_PROC_EXEC_CONTROLS_INT_WINDOW_EXIT)) 1043 1043 { 1044 1044 LogFlow(("Enable irq window exit!\n")); 1045 pVCpu->hm.s.vmx.u32ProcCtls |= VMX_VMCS_CTRL_PROC_EXEC_CONTROLS_I RQ_WINDOW_EXIT;1045 pVCpu->hm.s.vmx.u32ProcCtls |= VMX_VMCS_CTRL_PROC_EXEC_CONTROLS_INT_WINDOW_EXIT; 1046 1046 rc = VMXWriteVmcs(VMX_VMCS32_CTRL_PROC_EXEC_CONTROLS, pVCpu->hm.s.vmx.u32ProcCtls); 1047 1047 AssertRC(rc); … … 2831 2831 * originated before a VM reset *after* the VM has been reset. See @bugref{6220}. 2832 2832 */ 2833 VMXWriteVmcs(VMX_VMCS32_CTRL_ENTRY_I RQ_INFO, 0);2833 VMXWriteVmcs(VMX_VMCS32_CTRL_ENTRY_INTERRUPTION_INFO, 0); 2834 2834 2835 2835 #ifdef VBOX_STRICT … … 3396 3396 switch (exitReason) 3397 3397 { 3398 case VMX_EXIT_ EXCEPTION_NMI:/* 0 Exception or non-maskable interrupt (NMI). */3399 case VMX_EXIT_EXT ERNAL_IRQ:/* 1 External interrupt. */3398 case VMX_EXIT_XCPT_NMI: /* 0 Exception or non-maskable interrupt (NMI). */ 3399 case VMX_EXIT_EXT_INT: /* 1 External interrupt. */ 3400 3400 { 3401 3401 uint32_t vector = VMX_EXIT_INTERRUPTION_INFO_VECTOR(intInfo); … … 3403 3403 if (!VMX_EXIT_INTERRUPTION_INFO_VALID(intInfo)) 3404 3404 { 3405 Assert(exitReason == VMX_EXIT_EXT ERNAL_IRQ);3405 Assert(exitReason == VMX_EXIT_EXT_INT); 3406 3406 /* External interrupt; leave to allow it to be dispatched again. */ 3407 3407 rc = VINF_EM_RAW_INTERRUPT; … … 4133 4133 } 4134 4134 4135 case VMX_EXIT_I RQ_WINDOW: /* 7 Interrupt window. */4135 case VMX_EXIT_INT_WINDOW: /* 7 Interrupt window exiting. */ 4136 4136 /* Clear VM-exit on IF=1 change. */ 4137 LogFlow(("VMX_EXIT_I RQ_WINDOW %RGv pending=%d IF=%d\n", (RTGCPTR)pCtx->rip,4137 LogFlow(("VMX_EXIT_INT_WINDOW %RGv pending=%d IF=%d\n", (RTGCPTR)pCtx->rip, 4138 4138 VMCPU_FF_ISPENDING(pVCpu, (VMCPU_FF_INTERRUPT_APIC|VMCPU_FF_INTERRUPT_PIC)), pCtx->eflags.Bits.u1IF)); 4139 pVCpu->hm.s.vmx.u32ProcCtls &= ~VMX_VMCS_CTRL_PROC_EXEC_CONTROLS_I RQ_WINDOW_EXIT;4139 pVCpu->hm.s.vmx.u32ProcCtls &= ~VMX_VMCS_CTRL_PROC_EXEC_CONTROLS_INT_WINDOW_EXIT; 4140 4140 rc2 = VMXWriteVmcs(VMX_VMCS32_CTRL_PROC_EXEC_CONTROLS, pVCpu->hm.s.vmx.u32ProcCtls); 4141 4141 AssertRC(rc2); 4142 STAM_COUNTER_INC(&pVCpu->hm.s.StatExitI rqWindow);4142 STAM_COUNTER_INC(&pVCpu->hm.s.StatExitIntWindow); 4143 4143 goto ResumeExecution; /* we check for pending guest interrupts there */ 4144 4144 … … 4680 4680 switch (exitReason) 4681 4681 { 4682 case VMX_EXIT_ EXCEPTION_NMI:/* 0 Exception or non-maskable interrupt (NMI). */4683 case VMX_EXIT_EXT ERNAL_IRQ:/* 1 External interrupt. */4682 case VMX_EXIT_XCPT_NMI: /* 0 Exception or non-maskable interrupt (NMI). */ 4683 case VMX_EXIT_EXT_INT: /* 1 External interrupt. */ 4684 4684 case VMX_EXIT_EPT_VIOLATION: 4685 4685 case VMX_EXIT_EPT_MISCONFIG: /* 49 EPT misconfig is used by the PGM/MMIO optimizations. */ … … 4820 4820 } 4821 4821 4822 case VMX_EXIT_I RQ_WINDOW: /* 7 Interrupt window. */4822 case VMX_EXIT_INT_WINDOW: /* 7 Interrupt window. */ 4823 4823 Assert(rc == VINF_EM_RAW_INTERRUPT); 4824 4824 break; … … 4891 4891 * If we executed vmlaunch/vmresume and an external IRQ was pending, then we don't have to do a full sync the next time. 4892 4892 */ 4893 if ( exitReason == VMX_EXIT_EXT ERNAL_IRQ4893 if ( exitReason == VMX_EXIT_EXT_INT 4894 4894 && !VMX_EXIT_INTERRUPTION_INFO_VALID(intInfo)) 4895 4895 { -
trunk/src/VBox/VMM/VMMR3/HM.cpp
r44089 r44146 59 59 static const char * const g_apszVTxExitReasons[MAX_EXITREASON_STAT] = 60 60 { 61 EXIT_REASON(VMX_EXIT_ EXCEPTION, 0, "Exception or non-maskable interrupt (NMI)."),62 EXIT_REASON(VMX_EXIT_EXT ERNAL_IRQ, 1, "External interrupt."),61 EXIT_REASON(VMX_EXIT_XCPT_NMI , 0, "Exception or non-maskable interrupt (NMI)."), 62 EXIT_REASON(VMX_EXIT_EXT_INT , 1, "External interrupt."), 63 63 EXIT_REASON(VMX_EXIT_TRIPLE_FAULT , 2, "Triple fault."), 64 64 EXIT_REASON(VMX_EXIT_INIT_SIGNAL , 3, "INIT signal."), … … 545 545 HM_REG_COUNTER(&pVCpu->hm.s.StatExitIOStringWrite, "/HM/CPU%d/Exit/IO/WriteString"); 546 546 HM_REG_COUNTER(&pVCpu->hm.s.StatExitIOStringRead, "/HM/CPU%d/Exit/IO/ReadString"); 547 HM_REG_COUNTER(&pVCpu->hm.s.StatExitI rqWindow, "/HM/CPU%d/Exit/IrqWindow");547 HM_REG_COUNTER(&pVCpu->hm.s.StatExitIntWindow, "/HM/CPU%d/Exit/IntWindow"); 548 548 HM_REG_COUNTER(&pVCpu->hm.s.StatExitMaxResume, "/HM/CPU%d/Exit/MaxResume"); 549 549 HM_REG_COUNTER(&pVCpu->hm.s.StatExitPreemptPending, "/HM/CPU%d/Exit/PreemptPending"); … … 850 850 LogRel(("HM: MSR_IA32_VMX_PROCBASED_CTLS = %RX64\n", pVM->hm.s.vmx.msr.vmx_proc_ctls.u)); 851 851 val = pVM->hm.s.vmx.msr.vmx_proc_ctls.n.allowed1; 852 if (val & VMX_VMCS_CTRL_PROC_EXEC_CONTROLS_I RQ_WINDOW_EXIT)853 LogRel(("HM: VMX_VMCS_CTRL_PROC_EXEC_CONTROLS_I RQ_WINDOW_EXIT\n"));852 if (val & VMX_VMCS_CTRL_PROC_EXEC_CONTROLS_INT_WINDOW_EXIT) 853 LogRel(("HM: VMX_VMCS_CTRL_PROC_EXEC_CONTROLS_INT_WINDOW_EXIT\n")); 854 854 if (val & VMX_VMCS_CTRL_PROC_EXEC_CONTROLS_TSC_OFFSET) 855 855 LogRel(("HM: VMX_VMCS_CTRL_PROC_EXEC_CONTROLS_TSC_OFFSET\n")); … … 894 894 895 895 val = pVM->hm.s.vmx.msr.vmx_proc_ctls.n.disallowed0; 896 if (val & VMX_VMCS_CTRL_PROC_EXEC_CONTROLS_I RQ_WINDOW_EXIT)897 LogRel(("HM: VMX_VMCS_CTRL_PROC_EXEC_CONTROLS_I RQ_WINDOW_EXIT *must* be set\n"));896 if (val & VMX_VMCS_CTRL_PROC_EXEC_CONTROLS_INT_WINDOW_EXIT) 897 LogRel(("HM: VMX_VMCS_CTRL_PROC_EXEC_CONTROLS_INT_WINDOW_EXIT *must* be set\n")); 898 898 if (val & VMX_VMCS_CTRL_PROC_EXEC_CONTROLS_TSC_OFFSET) 899 899 LogRel(("HM: VMX_VMCS_CTRL_PROC_EXEC_CONTROLS_TSC_OFFSET *must* be set\n")); … … 1019 1019 if (val & VMX_VMCS_CTRL_EXIT_CONTROLS_HOST_ADDR_SPACE_SIZE) 1020 1020 LogRel(("HM: VMX_VMCS_CTRL_EXIT_CONTROLS_HOST_ADDR_SPACE_SIZE\n")); 1021 if (val & VMX_VMCS_CTRL_EXIT_CONTROLS_ACK_EXT ERNAL_IRQ)1022 LogRel(("HM: VMX_VMCS_CTRL_EXIT_CONTROLS_ACK_EXT ERNAL_IRQ\n"));1021 if (val & VMX_VMCS_CTRL_EXIT_CONTROLS_ACK_EXT_INT) 1022 LogRel(("HM: VMX_VMCS_CTRL_EXIT_CONTROLS_ACK_EXT_INT\n")); 1023 1023 if (val & VMX_VMCS_CTRL_EXIT_CONTROLS_SAVE_GUEST_PAT_MSR) 1024 1024 LogRel(("HM: VMX_VMCS_CTRL_EXIT_CONTROLS_SAVE_GUEST_PAT_MSR\n")); … … 1036 1036 if (val & VMX_VMCS_CTRL_EXIT_CONTROLS_HOST_ADDR_SPACE_SIZE) 1037 1037 LogRel(("HM: VMX_VMCS_CTRL_EXIT_CONTROLS_HOST_ADDR_SPACE_SIZE *must* be set\n")); 1038 if (val & VMX_VMCS_CTRL_EXIT_CONTROLS_ACK_EXT ERNAL_IRQ)1039 LogRel(("HM: VMX_VMCS_CTRL_EXIT_CONTROLS_ACK_EXT ERNAL_IRQ*must* be set\n"));1038 if (val & VMX_VMCS_CTRL_EXIT_CONTROLS_ACK_EXT_INT) 1039 LogRel(("HM: VMX_VMCS_CTRL_EXIT_CONTROLS_ACK_EXT_INT *must* be set\n")); 1040 1040 if (val & VMX_VMCS_CTRL_EXIT_CONTROLS_SAVE_GUEST_PAT_MSR) 1041 1041 LogRel(("HM: VMX_VMCS_CTRL_EXIT_CONTROLS_SAVE_GUEST_PAT_MSR *must* be set\n")); -
trunk/src/VBox/VMM/include/HMInternal.h
r44089 r44146 774 774 STAMCOUNTER StatExitIOStringWrite; 775 775 STAMCOUNTER StatExitIOStringRead; 776 STAMCOUNTER StatExitI rqWindow;776 STAMCOUNTER StatExitIntWindow; 777 777 STAMCOUNTER StatExitMaxResume; 778 778 STAMCOUNTER StatExitPreemptPending;
Note:
See TracChangeset
for help on using the changeset viewer.