Changeset 42373 in vbox
- Timestamp:
- Jul 25, 2012 7:18:33 AM (12 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/vmm/hwacc_vmx.h
r42024 r42373 475 475 /** 13 Guest software attempted to execute INVD. */ 476 476 #define VMX_EXIT_INVD 13 477 /** 14 Guest software attempted to execute INV PG. */478 #define VMX_EXIT_INV PG14477 /** 14 Guest software attempted to execute INVLPG. */ 478 #define VMX_EXIT_INVLPG 14 479 479 /** 15 Guest software attempted to execute RDPMC. */ 480 480 #define VMX_EXIT_RDPMC 15 -
trunk/src/VBox/VMM/VMMAll/EMAll.cpp
r42317 r42373 201 201 202 202 /** 203 * Locks REM execution to a single VC pu203 * Locks REM execution to a single VCPU. 204 204 * 205 205 * @param pVM Pointer to the VM. … … 666 666 667 667 /** 668 * Interpret CPUID given the parameters in the CPU context 668 * Interpret CPUID given the parameters in the CPU context. 669 669 * 670 670 * @returns VBox status code. … … 694 694 695 695 /** 696 * Interpret RDTSC 696 * Interpret RDTSC. 697 697 * 698 698 * @returns VBox status code. … … 721 721 722 722 /** 723 * Interpret RDTSCP 723 * Interpret RDTSCP. 724 724 * 725 725 * @returns VBox status code. … … 756 756 757 757 /** 758 * Interpret RDPMC 758 * Interpret RDPMC. 759 759 * 760 760 * @returns VBox status code. … … 856 856 857 857 858 859 /* VT-x only: */ 860 861 /** 862 * Interpret INVLPG 858 /** 859 * Interpret INVLPG. 863 860 * 864 861 * @returns VBox status code. … … 866 863 * @param pVCpu Pointer to the VMCPU. 867 864 * @param pRegFrame The register frame. 868 * @param pAddrGC Operand address 865 * @param pAddrGC Operand address. 869 866 * 870 867 */ … … 890 887 891 888 892 /** 893 * Update CRx 889 /* VT-x only: */ 890 891 /** 892 * Update CRx. 894 893 * 895 894 * @returns VBox status code. … … 1032 1031 1033 1032 /** 1034 * Interpret CRx write 1033 * Interpret CRx write. 1035 1034 * 1036 1035 * @returns VBox status code. … … 1064 1063 1065 1064 /** 1066 * Interpret LMSW 1065 * Interpret LMSW. 1067 1066 * 1068 1067 * @returns VBox status code. … … 1086 1085 1087 1086 1088 1089 /** 1090 * Interpret CLTS 1087 /** 1088 * Interpret CLTS. 1091 1089 * 1092 1090 * @returns VBox status code. … … 1107 1105 1108 1106 /** 1109 * Interpret CRx read 1107 * Interpret CRx read. 1110 1108 * 1111 1109 * @returns VBox status code. … … 1140 1138 1141 1139 /** 1142 * Interpret DRx write 1140 * Interpret DRx write. 1143 1141 * 1144 1142 * @returns VBox status code. … … 1179 1177 1180 1178 /** 1181 * Interpret DRx read 1179 * Interpret DRx read. 1182 1180 * 1183 1181 * @returns VBox status code. -
trunk/src/VBox/VMM/VMMR0/HWSVMR0.cpp
r42345 r42373 54 54 * Internal Functions * 55 55 *******************************************************************************/ 56 static int hmR0SvmInterpretInv pg(PVM pVM, PVMCPU pVCpu, PCPUMCTXCORE pRegFrame, uint32_t uASID);56 static int hmR0SvmInterpretInvlpg(PVM pVM, PVMCPU pVCpu, PCPUMCTXCORE pRegFrame); 57 57 static int hmR0SvmEmulateTprVMMCall(PVM pVM, PVMCPU pVCpu, PCPUMCTX pCtx); 58 58 static void hmR0SvmSetMSRPermission(PVMCPU pVCpu, unsigned ulMSR, bool fRead, bool fWrite); … … 2249 2249 } 2250 2250 2251 case SVM_EXIT_INVLPG: /* Guest software attempted to execute INV PG. */2251 case SVM_EXIT_INVLPG: /* Guest software attempted to execute INVLPG. */ 2252 2252 { 2253 2253 Log2(("SVM: invlpg\n")); 2254 STAM_COUNTER_INC(&pVCpu->hwaccm.s.StatExitInv pg);2254 STAM_COUNTER_INC(&pVCpu->hwaccm.s.StatExitInvlpg); 2255 2255 2256 2256 Assert(!pVM->hwaccm.s.fNestedPaging); 2257 2257 2258 2258 /* Truly a pita. Why can't SVM give the same information as VT-x? */ 2259 rc = hmR0SvmInterpretInv pg(pVM, pVCpu, CPUMCTX2CORE(pCtx), pVMCB->ctrl.TLBCtrl.n.u32ASID);2259 rc = hmR0SvmInterpretInvlpg(pVM, pVCpu, CPUMCTX2CORE(pCtx)); 2260 2260 if (rc == VINF_SUCCESS) 2261 2261 { … … 2928 2928 2929 2929 /** 2930 * Interprets INVLPG.2930 * Worker for Interprets INVLPG. 2931 2931 * 2932 2932 * @return VBox status code. … … 2934 2934 * @param pCpu Pointer to the CPU info struct. 2935 2935 * @param pRegFrame Pointer to the register frame. 2936 * @param ASID Tagged TLB id for the guest.2937 2936 */ 2938 static int hmR0svmInterpretInvlPg (PVMCPU pVCpu, PDISCPUSTATE pCpu, PCPUMCTXCORE pRegFrame, uint32_t uASID)2937 static int hmR0svmInterpretInvlPgEx(PVMCPU pVCpu, PDISCPUSTATE pCpu, PCPUMCTXCORE pRegFrame) 2939 2938 { 2940 2939 DISQPVPARAMVAL param1; 2941 2940 RTGCPTR addr; 2942 NOREF(uASID);2943 2941 2944 2942 int rc = DISQueryParamVal(pRegFrame, pCpu, &pCpu->Param1, ¶m1, DISQPVWHICH_SRC); … … 2981 2979 * @param pVM Pointer to the VM. 2982 2980 * @param pRegFrame Pointer to the register frame. 2983 * @param ASID Tagged TLB id for the guest.2984 2981 * 2985 2982 * @remarks Updates the EIP if an instruction was executed successfully. 2986 2983 */ 2987 static int hmR0SvmInterpretInv pg(PVM pVM, PVMCPU pVCpu, PCPUMCTXCORE pRegFrame, uint32_t uASID)2984 static int hmR0SvmInterpretInvlpg(PVM pVM, PVMCPU pVCpu, PCPUMCTXCORE pRegFrame) 2988 2985 { 2989 2986 /* … … 2996 2993 if (RT_SUCCESS(rc) && pDis->pCurInstr->uOpcode == OP_INVLPG) 2997 2994 { 2998 rc = hmR0svmInterpretInvlPg (pVCpu, pDis, pRegFrame, uASID);2995 rc = hmR0svmInterpretInvlPgEx(pVCpu, pDis, pRegFrame); 2999 2996 if (RT_SUCCESS(rc)) 3000 2997 pRegFrame->rip += pDis->cbInstr; /* Move on to the next instruction. */ -
trunk/src/VBox/VMM/VMMR0/HWVMXR0.cpp
r42343 r42373 3660 3660 switch (pDis->pCurInstr->uOpcode) 3661 3661 { 3662 case OP_CLI: 3663 pCtx->eflags.Bits.u1IF = 0; 3664 STAM_COUNTER_INC(&pVCpu->hwaccm.s.StatExitCli); 3665 break; 3666 3667 case OP_STI: 3668 pCtx->eflags.Bits.u1IF = 1; 3669 EMSetInhibitInterruptsPC(pVCpu, pCtx->rip + pDis->cbInstr); 3670 Assert(VMCPU_FF_ISSET(pVCpu, VMCPU_FF_INHIBIT_INTERRUPTS)); 3671 rc2 = VMXWriteVMCS(VMX_VMCS32_GUEST_INTERRUPTIBILITY_STATE, 3672 VMX_VMCS_GUEST_INTERRUPTIBILITY_STATE_BLOCK_STI); 3673 AssertRC(rc2); 3674 STAM_COUNTER_INC(&pVCpu->hwaccm.s.StatExitSti); 3675 break; 3676 3677 case OP_HLT: 3678 fUpdateRIP = false; 3679 rc = VINF_EM_HALT; 3680 pCtx->rip += pDis->cbInstr; 3681 STAM_COUNTER_INC(&pVCpu->hwaccm.s.StatExitHlt); 3682 break; 3683 3684 case OP_POPF: 3685 { 3686 RTGCPTR GCPtrStack; 3687 uint32_t cbParm; 3688 uint32_t uMask; 3689 X86EFLAGS eflags; 3690 3691 if (pDis->fPrefix & DISPREFIX_OPSIZE) 3662 case OP_CLI: 3663 pCtx->eflags.Bits.u1IF = 0; 3664 STAM_COUNTER_INC(&pVCpu->hwaccm.s.StatExitCli); 3665 break; 3666 3667 case OP_STI: 3668 pCtx->eflags.Bits.u1IF = 1; 3669 EMSetInhibitInterruptsPC(pVCpu, pCtx->rip + pDis->cbInstr); 3670 Assert(VMCPU_FF_ISSET(pVCpu, VMCPU_FF_INHIBIT_INTERRUPTS)); 3671 rc2 = VMXWriteVMCS(VMX_VMCS32_GUEST_INTERRUPTIBILITY_STATE, 3672 VMX_VMCS_GUEST_INTERRUPTIBILITY_STATE_BLOCK_STI); 3673 AssertRC(rc2); 3674 STAM_COUNTER_INC(&pVCpu->hwaccm.s.StatExitSti); 3675 break; 3676 3677 case OP_HLT: 3678 fUpdateRIP = false; 3679 rc = VINF_EM_HALT; 3680 pCtx->rip += pDis->cbInstr; 3681 STAM_COUNTER_INC(&pVCpu->hwaccm.s.StatExitHlt); 3682 break; 3683 3684 case OP_POPF: 3692 3685 { 3693 cbParm = 4; 3694 uMask = 0xffffffff; 3695 } 3696 else 3697 { 3698 cbParm = 2; 3699 uMask = 0xffff; 3700 } 3701 3702 rc2 = SELMToFlatEx(pVCpu, DISSELREG_SS, CPUMCTX2CORE(pCtx), pCtx->esp & uMask, 0, &GCPtrStack); 3703 if (RT_FAILURE(rc2)) 3704 { 3705 rc = VERR_EM_INTERPRETER; 3686 RTGCPTR GCPtrStack; 3687 uint32_t cbParm; 3688 uint32_t uMask; 3689 X86EFLAGS eflags; 3690 3691 if (pDis->fPrefix & DISPREFIX_OPSIZE) 3692 { 3693 cbParm = 4; 3694 uMask = 0xffffffff; 3695 } 3696 else 3697 { 3698 cbParm = 2; 3699 uMask = 0xffff; 3700 } 3701 3702 rc2 = SELMToFlatEx(pVCpu, DISSELREG_SS, CPUMCTX2CORE(pCtx), pCtx->esp & uMask, 0, &GCPtrStack); 3703 if (RT_FAILURE(rc2)) 3704 { 3705 rc = VERR_EM_INTERPRETER; 3706 break; 3707 } 3708 eflags.u = 0; 3709 rc2 = PGMPhysRead(pVM, (RTGCPHYS)GCPtrStack, &eflags.u, cbParm); 3710 if (RT_FAILURE(rc2)) 3711 { 3712 rc = VERR_EM_INTERPRETER; 3713 break; 3714 } 3715 LogFlow(("POPF %x -> %RGv mask=%x\n", eflags.u, pCtx->rsp, uMask)); 3716 pCtx->eflags.u = (pCtx->eflags.u & ~(X86_EFL_POPF_BITS & uMask)) 3717 | (eflags.u & X86_EFL_POPF_BITS & uMask); 3718 /* RF cleared when popped in real mode; see pushf description in AMD manual. */ 3719 pCtx->eflags.Bits.u1RF = 0; 3720 pCtx->esp += cbParm; 3721 pCtx->esp &= uMask; 3722 3723 STAM_COUNTER_INC(&pVCpu->hwaccm.s.StatExitPopf); 3706 3724 break; 3707 3725 } 3708 eflags.u = 0; 3709 rc2 = PGMPhysRead(pVM, (RTGCPHYS)GCPtrStack, &eflags.u, cbParm); 3710 if (RT_FAILURE(rc2)) 3726 3727 case OP_PUSHF: 3711 3728 { 3712 rc = VERR_EM_INTERPRETER; 3729 RTGCPTR GCPtrStack; 3730 uint32_t cbParm; 3731 uint32_t uMask; 3732 X86EFLAGS eflags; 3733 3734 if (pDis->fPrefix & DISPREFIX_OPSIZE) 3735 { 3736 cbParm = 4; 3737 uMask = 0xffffffff; 3738 } 3739 else 3740 { 3741 cbParm = 2; 3742 uMask = 0xffff; 3743 } 3744 3745 rc2 = SELMToFlatEx(pVCpu, DISSELREG_SS, CPUMCTX2CORE(pCtx), (pCtx->esp - cbParm) & uMask, 0, 3746 &GCPtrStack); 3747 if (RT_FAILURE(rc2)) 3748 { 3749 rc = VERR_EM_INTERPRETER; 3750 break; 3751 } 3752 eflags = pCtx->eflags; 3753 /* RF & VM cleared when pushed in real mode; see pushf description in AMD manual. */ 3754 eflags.Bits.u1RF = 0; 3755 eflags.Bits.u1VM = 0; 3756 3757 rc2 = PGMPhysWrite(pVM, (RTGCPHYS)GCPtrStack, &eflags.u, cbParm); 3758 if (RT_FAILURE(rc2)) 3759 { 3760 rc = VERR_EM_INTERPRETER; 3761 break; 3762 } 3763 LogFlow(("PUSHF %x -> %RGv\n", eflags.u, GCPtrStack)); 3764 pCtx->esp -= cbParm; 3765 pCtx->esp &= uMask; 3766 STAM_COUNTER_INC(&pVCpu->hwaccm.s.StatExitPushf); 3713 3767 break; 3714 3768 } 3715 LogFlow(("POPF %x -> %RGv mask=%x\n", eflags.u, pCtx->rsp, uMask)); 3716 pCtx->eflags.u = (pCtx->eflags.u & ~(X86_EFL_POPF_BITS & uMask)) | (eflags.u & X86_EFL_POPF_BITS & uMask); 3717 /* RF cleared when popped in real mode; see pushf description in AMD manual. */ 3718 pCtx->eflags.Bits.u1RF = 0; 3719 pCtx->esp += cbParm; 3720 pCtx->esp &= uMask; 3721 3722 STAM_COUNTER_INC(&pVCpu->hwaccm.s.StatExitPopf); 3723 break; 3724 } 3725 3726 case OP_PUSHF: 3727 { 3728 RTGCPTR GCPtrStack; 3729 uint32_t cbParm; 3730 uint32_t uMask; 3731 X86EFLAGS eflags; 3732 3733 if (pDis->fPrefix & DISPREFIX_OPSIZE) 3769 3770 case OP_IRET: 3734 3771 { 3735 cbParm = 4; 3736 uMask = 0xffffffff; 3737 } 3738 else 3739 { 3740 cbParm = 2; 3741 uMask = 0xffff; 3742 } 3743 3744 rc2 = SELMToFlatEx(pVCpu, DISSELREG_SS, CPUMCTX2CORE(pCtx), (pCtx->esp - cbParm) & uMask, 0, 3745 &GCPtrStack); 3746 if (RT_FAILURE(rc2)) 3747 { 3748 rc = VERR_EM_INTERPRETER; 3772 RTGCPTR GCPtrStack; 3773 uint32_t uMask = 0xffff; 3774 uint16_t aIretFrame[3]; 3775 3776 if (pDis->fPrefix & (DISPREFIX_OPSIZE | DISPREFIX_ADDRSIZE)) 3777 { 3778 rc = VERR_EM_INTERPRETER; 3779 break; 3780 } 3781 3782 rc2 = SELMToFlatEx(pVCpu, DISSELREG_SS, CPUMCTX2CORE(pCtx), pCtx->esp & uMask, 0, &GCPtrStack); 3783 if (RT_FAILURE(rc2)) 3784 { 3785 rc = VERR_EM_INTERPRETER; 3786 break; 3787 } 3788 rc2 = PGMPhysRead(pVM, (RTGCPHYS)GCPtrStack, &aIretFrame[0], sizeof(aIretFrame)); 3789 if (RT_FAILURE(rc2)) 3790 { 3791 rc = VERR_EM_INTERPRETER; 3792 break; 3793 } 3794 pCtx->ip = aIretFrame[0]; 3795 pCtx->cs.Sel = aIretFrame[1]; 3796 pCtx->cs.ValidSel = aIretFrame[1]; 3797 pCtx->cs.u64Base = (uint32_t)pCtx->cs.Sel << 4; 3798 pCtx->eflags.u = (pCtx->eflags.u & ~(X86_EFL_POPF_BITS & uMask)) 3799 | (aIretFrame[2] & X86_EFL_POPF_BITS & uMask); 3800 pCtx->sp += sizeof(aIretFrame); 3801 3802 LogFlow(("iret to %04x:%x\n", pCtx->cs.Sel, pCtx->ip)); 3803 fUpdateRIP = false; 3804 STAM_COUNTER_INC(&pVCpu->hwaccm.s.StatExitIret); 3749 3805 break; 3750 3806 } 3751 eflags = pCtx->eflags; 3752 /* RF & VM cleared when pushed in real mode; see pushf description in AMD manual. */ 3753 eflags.Bits.u1RF = 0; 3754 eflags.Bits.u1VM = 0; 3755 3756 rc2 = PGMPhysWrite(pVM, (RTGCPHYS)GCPtrStack, &eflags.u, cbParm); 3757 if (RT_FAILURE(rc2)) 3758 { 3759 rc = VERR_EM_INTERPRETER; 3760 break; 3761 } 3762 LogFlow(("PUSHF %x -> %RGv\n", eflags.u, GCPtrStack)); 3763 pCtx->esp -= cbParm; 3764 pCtx->esp &= uMask; 3765 STAM_COUNTER_INC(&pVCpu->hwaccm.s.StatExitPushf); 3766 break; 3767 } 3768 3769 case OP_IRET: 3770 { 3771 RTGCPTR GCPtrStack; 3772 uint32_t uMask = 0xffff; 3773 uint16_t aIretFrame[3]; 3774 3775 if (pDis->fPrefix & (DISPREFIX_OPSIZE | DISPREFIX_ADDRSIZE)) 3776 { 3777 rc = VERR_EM_INTERPRETER; 3778 break; 3779 } 3780 3781 rc2 = SELMToFlatEx(pVCpu, DISSELREG_SS, CPUMCTX2CORE(pCtx), pCtx->esp & uMask, 0, &GCPtrStack); 3782 if (RT_FAILURE(rc2)) 3783 { 3784 rc = VERR_EM_INTERPRETER; 3785 break; 3786 } 3787 rc2 = PGMPhysRead(pVM, (RTGCPHYS)GCPtrStack, &aIretFrame[0], sizeof(aIretFrame)); 3788 if (RT_FAILURE(rc2)) 3789 { 3790 rc = VERR_EM_INTERPRETER; 3791 break; 3792 } 3793 pCtx->ip = aIretFrame[0]; 3794 pCtx->cs.Sel = aIretFrame[1]; 3795 pCtx->cs.ValidSel = aIretFrame[1]; 3796 pCtx->cs.u64Base = (uint32_t)pCtx->cs.Sel << 4; 3797 pCtx->eflags.u = (pCtx->eflags.u & ~(X86_EFL_POPF_BITS & uMask)) 3798 | (aIretFrame[2] & X86_EFL_POPF_BITS & uMask); 3799 pCtx->sp += sizeof(aIretFrame); 3800 3801 LogFlow(("iret to %04x:%x\n", pCtx->cs.Sel, pCtx->ip)); 3802 fUpdateRIP = false; 3803 STAM_COUNTER_INC(&pVCpu->hwaccm.s.StatExitIret); 3804 break; 3805 } 3806 3807 case OP_INT: 3808 { 3809 uint32_t intInfo2; 3810 3811 LogFlow(("Realmode: INT %x\n", pDis->Param1.uValue & 0xff)); 3812 intInfo2 = pDis->Param1.uValue & 0xff; 3813 intInfo2 |= (1 << VMX_EXIT_INTERRUPTION_INFO_VALID_SHIFT); 3814 intInfo2 |= (VMX_EXIT_INTERRUPTION_INFO_TYPE_SW << VMX_EXIT_INTERRUPTION_INFO_TYPE_SHIFT); 3815 3816 rc = hmR0VmxInjectEvent(pVM, pVCpu, pCtx, intInfo2, cbOp, 0); 3817 AssertRC(VBOXSTRICTRC_VAL(rc)); 3818 fUpdateRIP = false; 3819 STAM_COUNTER_INC(&pVCpu->hwaccm.s.StatExitInt); 3820 break; 3821 } 3822 3823 case OP_INTO: 3824 { 3825 if (pCtx->eflags.Bits.u1OF) 3807 3808 case OP_INT: 3826 3809 { 3827 3810 uint32_t intInfo2; 3828 3811 3829 LogFlow(("Realmode: INT O\n"));3830 intInfo2 = X86_XCPT_OF;3812 LogFlow(("Realmode: INT %x\n", pDis->Param1.uValue & 0xff)); 3813 intInfo2 = pDis->Param1.uValue & 0xff; 3831 3814 intInfo2 |= (1 << VMX_EXIT_INTERRUPTION_INFO_VALID_SHIFT); 3832 3815 intInfo2 |= (VMX_EXIT_INTERRUPTION_INFO_TYPE_SW << VMX_EXIT_INTERRUPTION_INFO_TYPE_SHIFT); … … 3836 3819 fUpdateRIP = false; 3837 3820 STAM_COUNTER_INC(&pVCpu->hwaccm.s.StatExitInt); 3821 break; 3838 3822 } 3839 break; 3840 } 3841 3842 case OP_INT3: 3843 { 3844 uint32_t intInfo2; 3845 3846 LogFlow(("Realmode: INT 3\n")); 3847 intInfo2 = 3; 3848 intInfo2 |= (1 << VMX_EXIT_INTERRUPTION_INFO_VALID_SHIFT); 3849 intInfo2 |= (VMX_EXIT_INTERRUPTION_INFO_TYPE_SW << VMX_EXIT_INTERRUPTION_INFO_TYPE_SHIFT); 3850 3851 rc = hmR0VmxInjectEvent(pVM, pVCpu, pCtx, intInfo2, cbOp, 0); 3852 AssertRC(VBOXSTRICTRC_VAL(rc)); 3853 fUpdateRIP = false; 3854 STAM_COUNTER_INC(&pVCpu->hwaccm.s.StatExitInt); 3855 break; 3856 } 3857 3858 default: 3859 rc = EMInterpretInstructionDisasState(pVCpu, pDis, CPUMCTX2CORE(pCtx), 0, EMCODETYPE_SUPERVISOR); 3860 fUpdateRIP = false; 3861 break; 3823 3824 case OP_INTO: 3825 { 3826 if (pCtx->eflags.Bits.u1OF) 3827 { 3828 uint32_t intInfo2; 3829 3830 LogFlow(("Realmode: INTO\n")); 3831 intInfo2 = X86_XCPT_OF; 3832 intInfo2 |= (1 << VMX_EXIT_INTERRUPTION_INFO_VALID_SHIFT); 3833 intInfo2 |= (VMX_EXIT_INTERRUPTION_INFO_TYPE_SW << VMX_EXIT_INTERRUPTION_INFO_TYPE_SHIFT); 3834 3835 rc = hmR0VmxInjectEvent(pVM, pVCpu, pCtx, intInfo2, cbOp, 0); 3836 AssertRC(VBOXSTRICTRC_VAL(rc)); 3837 fUpdateRIP = false; 3838 STAM_COUNTER_INC(&pVCpu->hwaccm.s.StatExitInt); 3839 } 3840 break; 3841 } 3842 3843 case OP_INT3: 3844 { 3845 uint32_t intInfo2; 3846 3847 LogFlow(("Realmode: INT 3\n")); 3848 intInfo2 = 3; 3849 intInfo2 |= (1 << VMX_EXIT_INTERRUPTION_INFO_VALID_SHIFT); 3850 intInfo2 |= (VMX_EXIT_INTERRUPTION_INFO_TYPE_SW << VMX_EXIT_INTERRUPTION_INFO_TYPE_SHIFT); 3851 3852 rc = hmR0VmxInjectEvent(pVM, pVCpu, pCtx, intInfo2, cbOp, 0); 3853 AssertRC(VBOXSTRICTRC_VAL(rc)); 3854 fUpdateRIP = false; 3855 STAM_COUNTER_INC(&pVCpu->hwaccm.s.StatExitInt); 3856 break; 3857 } 3858 3859 default: 3860 rc = EMInterpretInstructionDisasState(pVCpu, pDis, CPUMCTX2CORE(pCtx), 0, EMCODETYPE_SUPERVISOR); 3861 fUpdateRIP = false; 3862 break; 3862 3863 } 3863 3864 … … 3895 3896 switch (vector) 3896 3897 { 3897 case X86_XCPT_DE: 3898 STAM_COUNTER_INC(&pVCpu->hwaccm.s.StatExitGuestDE); 3899 break; 3900 case X86_XCPT_UD: 3901 STAM_COUNTER_INC(&pVCpu->hwaccm.s.StatExitGuestUD); 3902 break; 3903 case X86_XCPT_SS: 3904 STAM_COUNTER_INC(&pVCpu->hwaccm.s.StatExitGuestSS); 3905 break; 3906 case X86_XCPT_NP: 3907 STAM_COUNTER_INC(&pVCpu->hwaccm.s.StatExitGuestNP); 3908 break; 3909 case X86_XCPT_XF: 3910 STAM_COUNTER_INC(&pVCpu->hwaccm.s.StatExitGuestXF); 3911 break; 3898 case X86_XCPT_DE: STAM_COUNTER_INC(&pVCpu->hwaccm.s.StatExitGuestDE); break; 3899 case X86_XCPT_UD: STAM_COUNTER_INC(&pVCpu->hwaccm.s.StatExitGuestUD); break; 3900 case X86_XCPT_SS: STAM_COUNTER_INC(&pVCpu->hwaccm.s.StatExitGuestSS); break; 3901 case X86_XCPT_NP: STAM_COUNTER_INC(&pVCpu->hwaccm.s.StatExitGuestNP); break; 3902 case X86_XCPT_XF: STAM_COUNTER_INC(&pVCpu->hwaccm.s.StatExitGuestXF); break; 3912 3903 } 3913 3904 … … 4167 4158 } 4168 4159 4169 case VMX_EXIT_INV PG: /* 14 Guest software attempted to execute INVPG. */4160 case VMX_EXIT_INVLPG: /* 14 Guest software attempted to execute INVLPG. */ 4170 4161 { 4171 4162 Log2(("VMX: invlpg\n")); 4172 4163 Assert(!pVM->hwaccm.s.fNestedPaging); 4173 4164 4174 STAM_COUNTER_INC(&pVCpu->hwaccm.s.StatExitInv pg);4165 STAM_COUNTER_INC(&pVCpu->hwaccm.s.StatExitInvlpg); 4175 4166 rc = EMInterpretInvlpg(pVM, pVCpu, CPUMCTX2CORE(pCtx), exitQualification); 4176 4167 if (rc == VINF_SUCCESS) … … 4735 4726 case VMX_EXIT_CPUID: /* 10 Guest software attempted to execute CPUID. */ 4736 4727 case VMX_EXIT_RDTSC: /* 16 Guest software attempted to execute RDTSC. */ 4737 case VMX_EXIT_INV PG: /* 14 Guest software attempted to execute INVPG. */4728 case VMX_EXIT_INVLPG: /* 14 Guest software attempted to execute INVLPG. */ 4738 4729 case VMX_EXIT_CRX_MOVE: /* 28 Control-register accesses. */ 4739 4730 case VMX_EXIT_DRX_MOVE: /* 29 Debug-register accesses. */ -
trunk/src/VBox/VMM/VMMR3/HWACCM.cpp
r42186 r42373 1 1 /* $Id$ */ 2 2 /** @file 3 * HWACCM - Intel/AMD VM Hardware Support Manager 3 * HWACCM - Intel/AMD VM Hardware Support Manager. 4 4 */ 5 5 … … 73 73 EXIT_REASON(VMX_EXIT_HLT , 12, "Guest software attempted to execute HLT."), 74 74 EXIT_REASON(VMX_EXIT_INVD , 13, "Guest software attempted to execute INVD."), 75 EXIT_REASON(VMX_EXIT_INV PG , 14, "Guest software attempted to execute INVPG."),75 EXIT_REASON(VMX_EXIT_INVLPG , 14, "Guest software attempted to execute INVLPG."), 76 76 EXIT_REASON(VMX_EXIT_RDPMC , 15, "Guest software attempted to execute RDPMC."), 77 77 EXIT_REASON(VMX_EXIT_RDTSC , 16, "Guest software attempted to execute RDTSC."), … … 510 510 HWACCM_REG_COUNTER(&pVCpu->hwaccm.s.StatExitGuestXF, "/HWACCM/CPU%d/Exit/Trap/Gst/#XF"); 511 511 HWACCM_REG_COUNTER(&pVCpu->hwaccm.s.StatExitGuestXcpUnk, "/HWACCM/CPU%d/Exit/Trap/Gst/Other"); 512 HWACCM_REG_COUNTER(&pVCpu->hwaccm.s.StatExitInv pg,"/HWACCM/CPU%d/Exit/Instr/Invlpg");512 HWACCM_REG_COUNTER(&pVCpu->hwaccm.s.StatExitInvlpg, "/HWACCM/CPU%d/Exit/Instr/Invlpg"); 513 513 HWACCM_REG_COUNTER(&pVCpu->hwaccm.s.StatExitInvd, "/HWACCM/CPU%d/Exit/Instr/Invd"); 514 514 HWACCM_REG_COUNTER(&pVCpu->hwaccm.s.StatExitCpuid, "/HWACCM/CPU%d/Exit/Instr/Cpuid"); -
trunk/src/VBox/VMM/include/HWACCMInternal.h
r42344 r42373 785 785 STAMCOUNTER StatExitGuestXF; 786 786 STAMCOUNTER StatExitGuestXcpUnk; 787 STAMCOUNTER StatExitInv pg;787 STAMCOUNTER StatExitInvlpg; 788 788 STAMCOUNTER StatExitInvd; 789 789 STAMCOUNTER StatExitCpuid;
Note:
See TracChangeset
for help on using the changeset viewer.