Changeset 101323 in vbox
- Timestamp:
- Sep 30, 2023 4:22:15 PM (16 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR3/CPUM.cpp
r101309 r101323 1912 1912 EmuFeat.fVmxExitSaveEferMsr = 1; 1913 1913 EmuFeat.fVmxExitLoadEferMsr = 1; 1914 EmuFeat.fVmxSavePreemptTimer = 0 ;/* Cannot be enabled if VMX-preemption timer is disabled. */1914 EmuFeat.fVmxSavePreemptTimer = 0 & fVmxPreemptTimer; /* Cannot be enabled if VMX-preemption timer is disabled. */ 1915 1915 EmuFeat.fVmxSecondaryExitCtls = 0; 1916 EmuFeat.fVmxExitSaveEferLma = 1 ; /* Cannot be disabled if unrestricted guest is enabled. */1916 EmuFeat.fVmxExitSaveEferLma = 1 | fVmxUnrestrictedGuest; /* Cannot be disabled if unrestricted guest is enabled. */ 1917 1917 EmuFeat.fVmxPt = 0; 1918 1918 EmuFeat.fVmxVmwriteAll = 0; /** @todo NSTVMX: enable this when nested VMCS shadowing is enabled. */ … … 1928 1928 PCPUMFEATURES pGuestFeat = &pVM->cpum.s.GuestFeatures; 1929 1929 Assert(pBaseFeat->fVmx); 1930 pGuestFeat->fVmxInsOutInfo = (pBaseFeat->fVmxInsOutInfo & EmuFeat.fVmxInsOutInfo ); 1931 pGuestFeat->fVmxExtIntExit = (pBaseFeat->fVmxExtIntExit & EmuFeat.fVmxExtIntExit ); 1932 pGuestFeat->fVmxNmiExit = (pBaseFeat->fVmxNmiExit & EmuFeat.fVmxNmiExit ); 1933 pGuestFeat->fVmxVirtNmi = (pBaseFeat->fVmxVirtNmi & EmuFeat.fVmxVirtNmi ); 1934 pGuestFeat->fVmxPreemptTimer = (pBaseFeat->fVmxPreemptTimer & EmuFeat.fVmxPreemptTimer ); 1935 pGuestFeat->fVmxPostedInt = (pBaseFeat->fVmxPostedInt & EmuFeat.fVmxPostedInt ); 1936 pGuestFeat->fVmxIntWindowExit = (pBaseFeat->fVmxIntWindowExit & EmuFeat.fVmxIntWindowExit ); 1937 pGuestFeat->fVmxTscOffsetting = (pBaseFeat->fVmxTscOffsetting & EmuFeat.fVmxTscOffsetting ); 1938 pGuestFeat->fVmxHltExit = (pBaseFeat->fVmxHltExit & EmuFeat.fVmxHltExit ); 1939 pGuestFeat->fVmxInvlpgExit = (pBaseFeat->fVmxInvlpgExit & EmuFeat.fVmxInvlpgExit ); 1940 pGuestFeat->fVmxMwaitExit = (pBaseFeat->fVmxMwaitExit & EmuFeat.fVmxMwaitExit ); 1941 pGuestFeat->fVmxRdpmcExit = (pBaseFeat->fVmxRdpmcExit & EmuFeat.fVmxRdpmcExit ); 1942 pGuestFeat->fVmxRdtscExit = (pBaseFeat->fVmxRdtscExit & EmuFeat.fVmxRdtscExit ); 1943 pGuestFeat->fVmxCr3LoadExit = (pBaseFeat->fVmxCr3LoadExit & EmuFeat.fVmxCr3LoadExit ); 1944 pGuestFeat->fVmxCr3StoreExit = (pBaseFeat->fVmxCr3StoreExit & EmuFeat.fVmxCr3StoreExit ); 1945 pGuestFeat->fVmxTertiaryExecCtls = (pBaseFeat->fVmxTertiaryExecCtls & EmuFeat.fVmxTertiaryExecCtls ); 1946 pGuestFeat->fVmxCr8LoadExit = (pBaseFeat->fVmxCr8LoadExit & EmuFeat.fVmxCr8LoadExit ); 1947 pGuestFeat->fVmxCr8StoreExit = (pBaseFeat->fVmxCr8StoreExit & EmuFeat.fVmxCr8StoreExit ); 1948 pGuestFeat->fVmxUseTprShadow = (pBaseFeat->fVmxUseTprShadow & EmuFeat.fVmxUseTprShadow ); 1949 pGuestFeat->fVmxNmiWindowExit = (pBaseFeat->fVmxNmiWindowExit & EmuFeat.fVmxNmiWindowExit ); 1950 pGuestFeat->fVmxMovDRxExit = (pBaseFeat->fVmxMovDRxExit & EmuFeat.fVmxMovDRxExit ); 1951 pGuestFeat->fVmxUncondIoExit = (pBaseFeat->fVmxUncondIoExit & EmuFeat.fVmxUncondIoExit ); 1952 pGuestFeat->fVmxUseIoBitmaps = (pBaseFeat->fVmxUseIoBitmaps & EmuFeat.fVmxUseIoBitmaps ); 1953 pGuestFeat->fVmxMonitorTrapFlag = (pBaseFeat->fVmxMonitorTrapFlag & EmuFeat.fVmxMonitorTrapFlag ); 1954 pGuestFeat->fVmxUseMsrBitmaps = (pBaseFeat->fVmxUseMsrBitmaps & EmuFeat.fVmxUseMsrBitmaps ); 1955 pGuestFeat->fVmxMonitorExit = (pBaseFeat->fVmxMonitorExit & EmuFeat.fVmxMonitorExit ); 1956 pGuestFeat->fVmxPauseExit = (pBaseFeat->fVmxPauseExit & EmuFeat.fVmxPauseExit ); 1957 pGuestFeat->fVmxSecondaryExecCtls = (pBaseFeat->fVmxSecondaryExecCtls & EmuFeat.fVmxSecondaryExecCtls ); 1958 pGuestFeat->fVmxVirtApicAccess = (pBaseFeat->fVmxVirtApicAccess & EmuFeat.fVmxVirtApicAccess ); 1959 pGuestFeat->fVmxEpt = (pBaseFeat->fVmxEpt & EmuFeat.fVmxEpt ); 1960 pGuestFeat->fVmxDescTableExit = (pBaseFeat->fVmxDescTableExit & EmuFeat.fVmxDescTableExit ); 1961 pGuestFeat->fVmxRdtscp = (pBaseFeat->fVmxRdtscp & EmuFeat.fVmxRdtscp ); 1962 pGuestFeat->fVmxVirtX2ApicMode = (pBaseFeat->fVmxVirtX2ApicMode & EmuFeat.fVmxVirtX2ApicMode ); 1963 pGuestFeat->fVmxVpid = (pBaseFeat->fVmxVpid & EmuFeat.fVmxVpid ); 1964 pGuestFeat->fVmxWbinvdExit = (pBaseFeat->fVmxWbinvdExit & EmuFeat.fVmxWbinvdExit ); 1965 pGuestFeat->fVmxUnrestrictedGuest = (pBaseFeat->fVmxUnrestrictedGuest & EmuFeat.fVmxUnrestrictedGuest ); 1966 pGuestFeat->fVmxApicRegVirt = (pBaseFeat->fVmxApicRegVirt & EmuFeat.fVmxApicRegVirt ); 1967 pGuestFeat->fVmxVirtIntDelivery = (pBaseFeat->fVmxVirtIntDelivery & EmuFeat.fVmxVirtIntDelivery ); 1968 pGuestFeat->fVmxPauseLoopExit = (pBaseFeat->fVmxPauseLoopExit & EmuFeat.fVmxPauseLoopExit ); 1969 pGuestFeat->fVmxRdrandExit = (pBaseFeat->fVmxRdrandExit & EmuFeat.fVmxRdrandExit ); 1970 pGuestFeat->fVmxInvpcid = (pBaseFeat->fVmxInvpcid & EmuFeat.fVmxInvpcid ); 1971 pGuestFeat->fVmxVmFunc = (pBaseFeat->fVmxVmFunc & EmuFeat.fVmxVmFunc ); 1972 pGuestFeat->fVmxVmcsShadowing = (pBaseFeat->fVmxVmcsShadowing & EmuFeat.fVmxVmcsShadowing ); 1973 pGuestFeat->fVmxRdseedExit = (pBaseFeat->fVmxRdseedExit & EmuFeat.fVmxRdseedExit ); 1974 pGuestFeat->fVmxPml = (pBaseFeat->fVmxPml & EmuFeat.fVmxPml ); 1975 pGuestFeat->fVmxEptXcptVe = (pBaseFeat->fVmxEptXcptVe & EmuFeat.fVmxEptXcptVe ); 1976 pGuestFeat->fVmxConcealVmxFromPt = (pBaseFeat->fVmxConcealVmxFromPt & EmuFeat.fVmxConcealVmxFromPt ); 1977 pGuestFeat->fVmxXsavesXrstors = (pBaseFeat->fVmxXsavesXrstors & EmuFeat.fVmxXsavesXrstors ); 1978 pGuestFeat->fVmxPasidTranslate = (pBaseFeat->fVmxPasidTranslate & EmuFeat.fVmxPasidTranslate ); 1979 pGuestFeat->fVmxModeBasedExecuteEpt = (pBaseFeat->fVmxModeBasedExecuteEpt & EmuFeat.fVmxModeBasedExecuteEpt ); 1980 pGuestFeat->fVmxSppEpt = (pBaseFeat->fVmxSppEpt & EmuFeat.fVmxSppEpt ); 1981 pGuestFeat->fVmxPtEpt = (pBaseFeat->fVmxPtEpt & EmuFeat.fVmxPtEpt ); 1982 pGuestFeat->fVmxUseTscScaling = (pBaseFeat->fVmxUseTscScaling & EmuFeat.fVmxUseTscScaling ); 1983 pGuestFeat->fVmxUserWaitPause = (pBaseFeat->fVmxUserWaitPause & EmuFeat.fVmxUserWaitPause ); 1984 pGuestFeat->fVmxPconfig = (pBaseFeat->fVmxPconfig & EmuFeat.fVmxPconfig ); 1985 pGuestFeat->fVmxEnclvExit = (pBaseFeat->fVmxEnclvExit & EmuFeat.fVmxEnclvExit ); 1986 pGuestFeat->fVmxBusLockDetect = (pBaseFeat->fVmxBusLockDetect & EmuFeat.fVmxBusLockDetect ); 1987 pGuestFeat->fVmxInstrTimeout = (pBaseFeat->fVmxInstrTimeout & EmuFeat.fVmxInstrTimeout ); 1988 pGuestFeat->fVmxLoadIwKeyExit = (pBaseFeat->fVmxLoadIwKeyExit & EmuFeat.fVmxLoadIwKeyExit ); 1989 pGuestFeat->fVmxHlat = (pBaseFeat->fVmxHlat & EmuFeat.fVmxHlat ); 1990 pGuestFeat->fVmxEptPagingWrite = (pBaseFeat->fVmxEptPagingWrite & EmuFeat.fVmxEptPagingWrite ); 1991 pGuestFeat->fVmxGstPagingVerify = (pBaseFeat->fVmxGstPagingVerify & EmuFeat.fVmxGstPagingVerify ); 1992 pGuestFeat->fVmxIpiVirt = (pBaseFeat->fVmxIpiVirt & EmuFeat.fVmxIpiVirt ); 1993 pGuestFeat->fVmxVirtSpecCtrl = (pBaseFeat->fVmxVirtSpecCtrl & EmuFeat.fVmxVirtSpecCtrl ); 1994 pGuestFeat->fVmxEntryLoadDebugCtls = (pBaseFeat->fVmxEntryLoadDebugCtls & EmuFeat.fVmxEntryLoadDebugCtls ); 1995 pGuestFeat->fVmxIa32eModeGuest = (pBaseFeat->fVmxIa32eModeGuest & EmuFeat.fVmxIa32eModeGuest ); 1996 pGuestFeat->fVmxEntryLoadEferMsr = (pBaseFeat->fVmxEntryLoadEferMsr & EmuFeat.fVmxEntryLoadEferMsr ); 1997 pGuestFeat->fVmxEntryLoadPatMsr = (pBaseFeat->fVmxEntryLoadPatMsr & EmuFeat.fVmxEntryLoadPatMsr ); 1998 pGuestFeat->fVmxExitSaveDebugCtls = (pBaseFeat->fVmxExitSaveDebugCtls & EmuFeat.fVmxExitSaveDebugCtls ); 1999 pGuestFeat->fVmxHostAddrSpaceSize = (pBaseFeat->fVmxHostAddrSpaceSize & EmuFeat.fVmxHostAddrSpaceSize ); 2000 pGuestFeat->fVmxExitAckExtInt = (pBaseFeat->fVmxExitAckExtInt & EmuFeat.fVmxExitAckExtInt ); 2001 pGuestFeat->fVmxExitSavePatMsr = (pBaseFeat->fVmxExitSavePatMsr & EmuFeat.fVmxExitSavePatMsr ); 2002 pGuestFeat->fVmxExitLoadPatMsr = (pBaseFeat->fVmxExitLoadPatMsr & EmuFeat.fVmxExitLoadPatMsr ); 2003 pGuestFeat->fVmxExitSaveEferMsr = (pBaseFeat->fVmxExitSaveEferMsr & EmuFeat.fVmxExitSaveEferMsr ); 2004 pGuestFeat->fVmxExitLoadEferMsr = (pBaseFeat->fVmxExitLoadEferMsr & EmuFeat.fVmxExitLoadEferMsr ); 2005 pGuestFeat->fVmxSavePreemptTimer = (pBaseFeat->fVmxSavePreemptTimer & EmuFeat.fVmxSavePreemptTimer ); 2006 pGuestFeat->fVmxSecondaryExitCtls = (pBaseFeat->fVmxSecondaryExitCtls & EmuFeat.fVmxSecondaryExitCtls ); 2007 pGuestFeat->fVmxExitSaveEferLma = (pBaseFeat->fVmxExitSaveEferLma & EmuFeat.fVmxExitSaveEferLma ); 2008 pGuestFeat->fVmxPt = (pBaseFeat->fVmxPt & EmuFeat.fVmxPt ); 2009 pGuestFeat->fVmxVmwriteAll = (pBaseFeat->fVmxVmwriteAll & EmuFeat.fVmxVmwriteAll ); 2010 pGuestFeat->fVmxEntryInjectSoftInt = (pBaseFeat->fVmxEntryInjectSoftInt & EmuFeat.fVmxEntryInjectSoftInt ); 1930 #define CPUMVMX_SET_GST_FEAT(a_Feat) \ 1931 do { \ 1932 pGuestFeat->a_Feat = (pBaseFeat->a_Feat & EmuFeat.a_Feat); \ 1933 } while (0) 1934 1935 CPUMVMX_SET_GST_FEAT(fVmxInsOutInfo); 1936 CPUMVMX_SET_GST_FEAT(fVmxExtIntExit); 1937 CPUMVMX_SET_GST_FEAT(fVmxNmiExit); 1938 CPUMVMX_SET_GST_FEAT(fVmxVirtNmi); 1939 CPUMVMX_SET_GST_FEAT(fVmxPreemptTimer); 1940 CPUMVMX_SET_GST_FEAT(fVmxPostedInt); 1941 CPUMVMX_SET_GST_FEAT(fVmxIntWindowExit); 1942 CPUMVMX_SET_GST_FEAT(fVmxTscOffsetting); 1943 CPUMVMX_SET_GST_FEAT(fVmxHltExit); 1944 CPUMVMX_SET_GST_FEAT(fVmxInvlpgExit); 1945 CPUMVMX_SET_GST_FEAT(fVmxMwaitExit); 1946 CPUMVMX_SET_GST_FEAT(fVmxRdpmcExit); 1947 CPUMVMX_SET_GST_FEAT(fVmxRdtscExit); 1948 CPUMVMX_SET_GST_FEAT(fVmxCr3LoadExit); 1949 CPUMVMX_SET_GST_FEAT(fVmxCr3StoreExit); 1950 CPUMVMX_SET_GST_FEAT(fVmxTertiaryExecCtls); 1951 CPUMVMX_SET_GST_FEAT(fVmxCr8LoadExit); 1952 CPUMVMX_SET_GST_FEAT(fVmxCr8StoreExit); 1953 CPUMVMX_SET_GST_FEAT(fVmxUseTprShadow); 1954 CPUMVMX_SET_GST_FEAT(fVmxNmiWindowExit); 1955 CPUMVMX_SET_GST_FEAT(fVmxMovDRxExit); 1956 CPUMVMX_SET_GST_FEAT(fVmxUncondIoExit); 1957 CPUMVMX_SET_GST_FEAT(fVmxUseIoBitmaps); 1958 CPUMVMX_SET_GST_FEAT(fVmxMonitorTrapFlag); 1959 CPUMVMX_SET_GST_FEAT(fVmxUseMsrBitmaps); 1960 CPUMVMX_SET_GST_FEAT(fVmxMonitorExit); 1961 CPUMVMX_SET_GST_FEAT(fVmxPauseExit); 1962 CPUMVMX_SET_GST_FEAT(fVmxSecondaryExecCtls); 1963 CPUMVMX_SET_GST_FEAT(fVmxVirtApicAccess); 1964 CPUMVMX_SET_GST_FEAT(fVmxEpt); 1965 CPUMVMX_SET_GST_FEAT(fVmxDescTableExit); 1966 CPUMVMX_SET_GST_FEAT(fVmxRdtscp); 1967 CPUMVMX_SET_GST_FEAT(fVmxVirtX2ApicMode); 1968 CPUMVMX_SET_GST_FEAT(fVmxVpid); 1969 CPUMVMX_SET_GST_FEAT(fVmxWbinvdExit); 1970 CPUMVMX_SET_GST_FEAT(fVmxUnrestrictedGuest); 1971 CPUMVMX_SET_GST_FEAT(fVmxApicRegVirt); 1972 CPUMVMX_SET_GST_FEAT(fVmxVirtIntDelivery); 1973 CPUMVMX_SET_GST_FEAT(fVmxPauseLoopExit); 1974 CPUMVMX_SET_GST_FEAT(fVmxRdrandExit); 1975 CPUMVMX_SET_GST_FEAT(fVmxInvpcid); 1976 CPUMVMX_SET_GST_FEAT(fVmxVmFunc); 1977 CPUMVMX_SET_GST_FEAT(fVmxVmcsShadowing); 1978 CPUMVMX_SET_GST_FEAT(fVmxRdseedExit); 1979 CPUMVMX_SET_GST_FEAT(fVmxPml); 1980 CPUMVMX_SET_GST_FEAT(fVmxEptXcptVe); 1981 CPUMVMX_SET_GST_FEAT(fVmxConcealVmxFromPt); 1982 CPUMVMX_SET_GST_FEAT(fVmxXsavesXrstors); 1983 CPUMVMX_SET_GST_FEAT(fVmxPasidTranslate); 1984 CPUMVMX_SET_GST_FEAT(fVmxModeBasedExecuteEpt); 1985 CPUMVMX_SET_GST_FEAT(fVmxSppEpt); 1986 CPUMVMX_SET_GST_FEAT(fVmxPtEpt); 1987 CPUMVMX_SET_GST_FEAT(fVmxUseTscScaling); 1988 CPUMVMX_SET_GST_FEAT(fVmxUserWaitPause); 1989 CPUMVMX_SET_GST_FEAT(fVmxPconfig); 1990 CPUMVMX_SET_GST_FEAT(fVmxEnclvExit); 1991 CPUMVMX_SET_GST_FEAT(fVmxBusLockDetect); 1992 CPUMVMX_SET_GST_FEAT(fVmxInstrTimeout); 1993 CPUMVMX_SET_GST_FEAT(fVmxLoadIwKeyExit); 1994 CPUMVMX_SET_GST_FEAT(fVmxHlat); 1995 CPUMVMX_SET_GST_FEAT(fVmxEptPagingWrite); 1996 CPUMVMX_SET_GST_FEAT(fVmxGstPagingVerify); 1997 CPUMVMX_SET_GST_FEAT(fVmxIpiVirt); 1998 CPUMVMX_SET_GST_FEAT(fVmxVirtSpecCtrl); 1999 CPUMVMX_SET_GST_FEAT(fVmxEntryLoadDebugCtls); 2000 CPUMVMX_SET_GST_FEAT(fVmxIa32eModeGuest); 2001 CPUMVMX_SET_GST_FEAT(fVmxEntryLoadEferMsr); 2002 CPUMVMX_SET_GST_FEAT(fVmxEntryLoadPatMsr); 2003 CPUMVMX_SET_GST_FEAT(fVmxExitSaveDebugCtls); 2004 CPUMVMX_SET_GST_FEAT(fVmxHostAddrSpaceSize); 2005 CPUMVMX_SET_GST_FEAT(fVmxExitAckExtInt); 2006 CPUMVMX_SET_GST_FEAT(fVmxExitSavePatMsr); 2007 CPUMVMX_SET_GST_FEAT(fVmxExitLoadPatMsr); 2008 CPUMVMX_SET_GST_FEAT(fVmxExitSaveEferMsr); 2009 CPUMVMX_SET_GST_FEAT(fVmxExitLoadEferMsr); 2010 CPUMVMX_SET_GST_FEAT(fVmxSavePreemptTimer); 2011 CPUMVMX_SET_GST_FEAT(fVmxSecondaryExitCtls); 2012 CPUMVMX_SET_GST_FEAT(fVmxExitSaveEferLma); 2013 CPUMVMX_SET_GST_FEAT(fVmxPt); 2014 CPUMVMX_SET_GST_FEAT(fVmxVmwriteAll); 2015 CPUMVMX_SET_GST_FEAT(fVmxEntryInjectSoftInt); 2016 2017 #undef CPUMVMX_SET_GST_FEAT 2011 2018 2012 2019 #if defined(RT_ARCH_AMD64) || defined(RT_ARCH_X86) … … 3580 3587 "%sMTRR_CAP =%016RX64\n" 3581 3588 "%sMTRR_DEF_TYPE =%016RX64\n" 3582 "%sM trrFix64K_00000=%016RX64\n"3583 "%sM trrFix16K_80000=%016RX64\n"3584 "%sM trrFix16K_A0000=%016RX64\n"3585 "%sM trrFix4K_C0000=%016RX64\n"3586 "%sM trrFix4K_C8000=%016RX64\n"3587 "%sM trrFix4K_D0000=%016RX64\n"3588 "%sM trrFix4K_D8000=%016RX64\n"3589 "%sM trrFix4K_E0000=%016RX64\n"3590 "%sM trrFix4K_E8000=%016RX64\n"3591 "%sM trrFix4K_F0000=%016RX64\n"3592 "%sM trrFix4K_F8000=%016RX64\n",3589 "%sMTRR_FIX64K_00000 =%016RX64\n" 3590 "%sMTRR_FIX16K_80000 =%016RX64\n" 3591 "%sMTRR_FIX16K_A0000 =%016RX64\n" 3592 "%sMTRR_FIX4K_C0000 =%016RX64\n" 3593 "%sMTRR_FIX4K_C8000 =%016RX64\n" 3594 "%sMTRR_FIX4K_D0000 =%016RX64\n" 3595 "%sMTRR_FIX4K_D8000 =%016RX64\n" 3596 "%sMTRR_FIX4K_E0000 =%016RX64\n" 3597 "%sMTRR_FIX4K_E8000 =%016RX64\n" 3598 "%sMTRR_FIX4K_F0000 =%016RX64\n" 3599 "%sMTRR_FIX4K_F8000 =%016RX64\n", 3593 3600 pszPrefix, pVCpu->cpum.s.GuestMsrs.msr.MtrrCap, 3594 3601 pszPrefix, pVCpu->cpum.s.GuestMsrs.msr.MtrrDefType,
Note:
See TracChangeset
for help on using the changeset viewer.