Changeset 100139 in vbox
- Timestamp:
- Jun 9, 2023 2:31:28 PM (23 months ago)
- svn:sync-xref-src-repo-rev:
- 157832
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/HMVMXAll.cpp
r98103 r100139 746 746 } 747 747 } 748 STAM_COUNTER_INC(&pVCpu->hm.s.StatVmxCheckPmOk); 748 749 } 749 750 } … … 756 757 /* Requires a fake TSS for real mode - stored in the VMM device heap: */ 757 758 || CPUMIsGuestInRealModeEx(pCtx)) 759 { 760 STAM_COUNTER_INC(&pVCpu->hm.s.StatVmxCheck1); 758 761 return false; 762 } 759 763 760 764 /* Too early for VT-x; Solaris guests will fail with a guru meditation otherwise; same for XP. */ 761 765 if (pCtx->idtr.pIdt == 0 || pCtx->idtr.cbIdt == 0 || pCtx->tr.Sel == 0) 766 { 767 STAM_COUNTER_INC(&pVCpu->hm.s.StatVmxCheck1); 762 768 return false; 769 } 763 770 764 771 /* … … 769 776 /** @todo Is this supposed recompiler bug still relevant with IEM? */ 770 777 if (pCtx->cs.Attr.n.u1Present == 0) 778 { 779 STAM_COUNTER_INC(&pVCpu->hm.s.StatVmxCheck1); 771 780 return false; 781 } 772 782 if (pCtx->ss.Attr.n.u1Present == 0) 783 { 784 STAM_COUNTER_INC(&pVCpu->hm.s.StatVmxCheck1); 773 785 return false; 786 } 774 787 775 788 /* … … 781 794 * stack segment into account. But, it does the job for now. */ 782 795 if (pCtx->rsp >= pCtx->ss.u32Limit) 796 { 797 STAM_COUNTER_INC(&pVCpu->hm.s.StatVmxCheck1); 783 798 return false; 799 } 784 800 } 785 801 } … … 805 821 } 806 822 if ((pCtx->cr0 & uCr0Mask) != uCr0Mask) 823 { 824 STAM_COUNTER_INC(&pVCpu->hm.s.StatVmxCheck2); 807 825 return false; 826 } 808 827 809 828 /* If bit N is cleared in cr0_fixed1, then it must be zero in the guest's cr0. */ 810 829 uCr0Mask = (uint32_t)~CTX_EXPR(pVM->hm.s.ForR3.vmx.Msrs.u64Cr0Fixed1, g_HmMsrs.u.vmx.u64Cr0Fixed1, RT_NOTHING); 811 830 if ((pCtx->cr0 & uCr0Mask) != 0) 831 { 832 STAM_COUNTER_INC(&pVCpu->hm.s.StatVmxCheck2); 812 833 return false; 834 } 813 835 814 836 /* If bit N is set in cr4_fixed0, then it must be set in the guest's cr4. */ … … 816 838 uCr0Mask &= ~X86_CR4_VMXE; 817 839 if ((pCtx->cr4 & uCr0Mask) != uCr0Mask) 840 { 841 STAM_COUNTER_INC(&pVCpu->hm.s.StatVmxCheck2); 818 842 return false; 843 } 819 844 820 845 /* If bit N is cleared in cr4_fixed1, then it must be zero in the guest's cr4. */ 821 846 uCr0Mask = (uint32_t)~CTX_EXPR(pVM->hm.s.ForR3.vmx.Msrs.u64Cr4Fixed1, g_HmMsrs.u.vmx.u64Cr4Fixed1, RT_NOTHING); 822 847 if ((pCtx->cr4 & uCr0Mask) != 0) 848 { 849 STAM_COUNTER_INC(&pVCpu->hm.s.StatVmxCheck2); 823 850 return false; 851 } 824 852 825 853 pVCpu->hm.s.fActive = true; 854 STAM_COUNTER_INC(&pVCpu->hm.s.StatVmxCheckOk); 826 855 return true; 827 856 } 828 857 858 STAM_COUNTER_INC(&pVCpu->hm.s.StatVmxCheckDisabled); 829 859 return false; 830 860 } -
trunk/src/VBox/VMM/VMMR3/HM.cpp
r99809 r100139 976 976 HM_REG_COUNTER(&pHmCpu->StatVmxCheckBadRpl, "/HM/CPU%u/VMXCheck/RPL", "Could not use VMX due to unsuitable RPL."); 977 977 HM_REG_COUNTER(&pHmCpu->StatVmxCheckPmOk, "/HM/CPU%u/VMXCheck/VMX_PM", "VMX execution in protected mode OK."); 978 HM_REG_COUNTER(&pHmCpu->StatVmxCheck1, "/HM/CPU%u/VMXCheck/1", "Could not use VMX due to unsuitable state and no VMMDev heap"); 979 HM_REG_COUNTER(&pHmCpu->StatVmxCheck2, "/HM/CPU%u/VMXCheck/2", "CR0/CR4 fixed stuff."); 980 HM_REG_COUNTER(&pHmCpu->StatVmxCheckDisabled, "/HM/CPU%u/VMXCheck/Disabled", "VMX is not enabled."); 981 HM_REG_COUNTER(&pHmCpu->StatVmxCheckOk, "/HM/CPU%u/VMXCheck/Ok", "We could do VMX!"); 978 982 #endif 979 983 if (fCpuSupportsVmx) -
trunk/src/VBox/VMM/include/HMInternal.h
r99208 r100139 991 991 STAMCOUNTER StatVmxCheckBadRpl; 992 992 STAMCOUNTER StatVmxCheckPmOk; 993 STAMCOUNTER StatVmxCheck1; 994 STAMCOUNTER StatVmxCheck2; 995 STAMCOUNTER StatVmxCheckDisabled; 996 STAMCOUNTER StatVmxCheckOk; 993 997 994 998 STAMCOUNTER StatVmxPreemptionRecalcingDeadline;
Note:
See TracChangeset
for help on using the changeset viewer.