- Timestamp:
- Sep 27, 2018 4:17:27 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/vmm/cpum.h
r74165 r74487 1636 1636 DECLINLINE(bool) CPUMIsGuestSvmCtrlInterceptSet(PVMCPU pVCpu, PCPUMCTX pCtx, uint64_t fIntercept) 1637 1637 { 1638 PCSVMVMCB pVmcb = pCtx->hwvirt.svm.CTX_SUFF(pVmcb); 1639 if (!pVmcb) 1638 if (pCtx->hwvirt.enmHwvirt != CPUMHWVIRT_SVM) 1640 1639 return false; 1640 PCSVMVMCB pVmcb = pCtx->hwvirt.svm.CTX_SUFF(pVmcb); Assert(pVmcb); 1641 1641 if (HMHasGuestSvmVmcbCached(pVCpu)) 1642 1642 return HMIsGuestSvmCtrlInterceptSet(pVCpu, fIntercept); … … 1655 1655 { 1656 1656 Assert(uCr < 16); 1657 PCSVMVMCB pVmcb = pCtx->hwvirt.svm.CTX_SUFF(pVmcb); 1658 if (!pVmcb) 1657 if (pCtx->hwvirt.enmHwvirt != CPUMHWVIRT_SVM) 1659 1658 return false; 1659 PCSVMVMCB pVmcb = pCtx->hwvirt.svm.CTX_SUFF(pVmcb); Assert(pVmcb); 1660 1660 if (HMHasGuestSvmVmcbCached(pVCpu)) 1661 1661 return HMIsGuestSvmReadCRxInterceptSet(pVCpu, uCr); … … 1674 1674 { 1675 1675 Assert(uCr < 16); 1676 PCSVMVMCB pVmcb = pCtx->hwvirt.svm.CTX_SUFF(pVmcb); 1677 if (!pVmcb) 1676 if (pCtx->hwvirt.enmHwvirt != CPUMHWVIRT_SVM) 1678 1677 return false; 1678 PCSVMVMCB pVmcb = pCtx->hwvirt.svm.CTX_SUFF(pVmcb); Assert(pVmcb); 1679 1679 if (HMHasGuestSvmVmcbCached(pVCpu)) 1680 1680 return HMIsGuestSvmWriteCRxInterceptSet(pVCpu, uCr); … … 1693 1693 { 1694 1694 Assert(uDr < 16); 1695 PCSVMVMCB pVmcb = pCtx->hwvirt.svm.CTX_SUFF(pVmcb); 1696 if (!pVmcb) 1695 if (pCtx->hwvirt.enmHwvirt != CPUMHWVIRT_SVM) 1697 1696 return false; 1697 PCSVMVMCB pVmcb = pCtx->hwvirt.svm.CTX_SUFF(pVmcb); Assert(pVmcb); 1698 1698 if (HMHasGuestSvmVmcbCached(pVCpu)) 1699 1699 return HMIsGuestSvmReadDRxInterceptSet(pVCpu, uDr); … … 1712 1712 { 1713 1713 Assert(uDr < 16); 1714 PCSVMVMCB pVmcb = pCtx->hwvirt.svm.CTX_SUFF(pVmcb); 1715 if (!pVmcb) 1714 if (pCtx->hwvirt.enmHwvirt != CPUMHWVIRT_SVM) 1716 1715 return false; 1716 PCSVMVMCB pVmcb = pCtx->hwvirt.svm.CTX_SUFF(pVmcb); Assert(pVmcb); 1717 1717 if (HMHasGuestSvmVmcbCached(pVCpu)) 1718 1718 return HMIsGuestSvmWriteDRxInterceptSet(pVCpu, uDr); … … 1731 1731 { 1732 1732 Assert(uVector < 32); 1733 PCSVMVMCB pVmcb = pCtx->hwvirt.svm.CTX_SUFF(pVmcb); 1734 if (!pVmcb) 1733 if (pCtx->hwvirt.enmHwvirt != CPUMHWVIRT_SVM) 1735 1734 return false; 1735 PCSVMVMCB pVmcb = pCtx->hwvirt.svm.CTX_SUFF(pVmcb); Assert(pVmcb); 1736 1736 if (HMHasGuestSvmVmcbCached(pVCpu)) 1737 1737 return HMIsGuestSvmXcptInterceptSet(pVCpu, uVector); … … 1750 1750 DECLINLINE(bool) CPUMIsGuestSvmVirtIntrMasking(PVMCPU pVCpu, PCCPUMCTX pCtx) 1751 1751 { 1752 PCSVMVMCB pVmcb = pCtx->hwvirt.svm.CTX_SUFF(pVmcb); 1753 if (!pVmcb) 1752 if (pCtx->hwvirt.enmHwvirt != CPUMHWVIRT_SVM) 1754 1753 return false; 1754 PCSVMVMCB pVmcb = pCtx->hwvirt.svm.CTX_SUFF(pVmcb); Assert(pVmcb); 1755 1755 if (HMHasGuestSvmVmcbCached(pVCpu)) 1756 1756 return HMIsGuestSvmVirtIntrMasking(pVCpu); … … 1769 1769 DECLINLINE(bool) CPUMIsGuestSvmNestedPagingEnabled(PVMCPU pVCpu, PCCPUMCTX pCtx) 1770 1770 { 1771 PCSVMVMCB pVmcb = pCtx->hwvirt.svm.CTX_SUFF(pVmcb); 1772 if (!pVmcb) 1771 if (pCtx->hwvirt.enmHwvirt != CPUMHWVIRT_SVM) 1773 1772 return false; 1773 PCSVMVMCB pVmcb = pCtx->hwvirt.svm.CTX_SUFF(pVmcb); Assert(pVmcb); 1774 1774 if (HMHasGuestSvmVmcbCached(pVCpu)) 1775 1775 return HMIsGuestSvmNestedPagingEnabled(pVCpu); … … 1788 1788 DECLINLINE(uint16_t) CPUMGetGuestSvmPauseFilterCount(PVMCPU pVCpu, PCCPUMCTX pCtx) 1789 1789 { 1790 PCSVMVMCB pVmcb = pCtx->hwvirt.svm.CTX_SUFF(pVmcb); 1791 if (!pVmcb) 1790 if (pCtx->hwvirt.enmHwvirt != CPUMHWVIRT_SVM) 1792 1791 return false; 1792 PCSVMVMCB pVmcb = pCtx->hwvirt.svm.CTX_SUFF(pVmcb); Assert(pVmcb); 1793 1793 if (HMHasGuestSvmVmcbCached(pVCpu)) 1794 1794 return HMGetGuestSvmPauseFilterCount(pVCpu); … … 1808 1808 { 1809 1809 RT_NOREF(pVCpu); 1810 Assert(pCtx->hwvirt.enmHwvirt == CPUMHWVIRT_SVM); 1810 1811 PSVMVMCB pVmcb = pCtx->hwvirt.svm.CTX_SUFF(pVmcb); 1811 1812 Assert(pVmcb); … … 1828 1829 */ 1829 1830 #ifndef IN_RC 1830 PCSVMVMCB pVmcb = pCtx->hwvirt.svm.CTX_SUFF(pVmcb); 1831 return pVmcb && (pVmcb->ctrl.u64InterceptCtrl & SVM_CTRL_INTERCEPT_VMRUN); 1831 if ( pCtx->hwvirt.enmHwvirt != CPUMHWVIRT_SVM 1832 || !(pCtx->hwvirt.svm.CTX_SUFF(pVmcb)->ctrl.u64InterceptCtrl & SVM_CTRL_INTERCEPT_VMRUN)) 1833 return false; 1834 return true; 1832 1835 #else 1833 1836 NOREF(pCtx); … … 1845 1848 { 1846 1849 #ifndef IN_RC 1850 if (pCtx->hwvirt.enmHwvirt != CPUMHWVIRT_VMX) 1851 return false; 1847 1852 Assert(!pCtx->hwvirt.vmx.fInVmxNonRootMode || pCtx->hwvirt.vmx.fInVmxRootMode); 1848 1853 return pCtx->hwvirt.vmx.fInVmxNonRootMode; … … 1862 1867 { 1863 1868 #ifndef IN_RC 1869 if (pCtx->hwvirt.enmHwvirt != CPUMHWVIRT_VMX) 1870 return false; 1864 1871 return pCtx->hwvirt.vmx.fInVmxRootMode; 1865 1872 #else
Note:
See TracChangeset
for help on using the changeset viewer.