Changeset 70948 in vbox for trunk/include
- Timestamp:
- Feb 10, 2018 3:38:12 PM (7 years ago)
- svn:sync-xref-src-repo-rev:
- 120791
- Location:
- trunk/include/VBox/vmm
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/vmm/cpum.h
r70913 r70948 1695 1695 VMMR3DECL(void) CPUMR3ResetCpu(PVM pVM, PVMCPU pVCpu); 1696 1696 VMMDECL(bool) CPUMR3IsStateRestorePending(PVM pVM); 1697 VMMR3DECL(void) CPUMR3SetHWVirtEx(PVM pVM, bool fHWVirtExEnabled);1698 1697 VMMR3DECL(int) CPUMR3SetCR4Feature(PVM pVM, RTHCUINTREG fOr, RTHCUINTREG fAnd); 1699 1698 -
trunk/include/VBox/vmm/hm.h
r70782 r70948 46 46 * 47 47 * @retval true if used. 48 * @retval false if software virtualization (raw-mode) is used.48 * @retval false if software virtualization (raw-mode) or NEM is used. 49 49 * 50 50 * @param a_pVM The cross context VM structure. 51 * @sa HMIsEnabledNotMacro, HMR3IsEnabled 51 * @sa VM_IS_HM_OR_NEM_ENABLED, VM_IS_RAW_MODE_ENABLED, 52 * HMIsEnabledNotMacro, HMR3IsEnabled 52 53 * @internal 53 54 */ -
trunk/include/VBox/vmm/vm.h
r70918 r70948 931 931 932 932 933 /** @name VM_EXEC_ENGINE_XXX - VM::bMainExecutionEngine values. 934 * @{ */ 935 /** Has not yet been set. */ 936 #define VM_EXEC_ENGINE_NOT_SET UINT8_C(0) 937 /** Raw-mode. */ 938 #define VM_EXEC_ENGINE_RAW_MODE UINT8_C(1) 939 /** Hardware assisted virtualization thru HM. */ 940 #define VM_EXEC_ENGINE_HW_VIRT UINT8_C(2) 941 /** Hardware assisted virtualization thru native API (NEM). */ 942 #define VM_EXEC_ENGINE_NATIVE_API UINT8_C(3) 943 /** @} */ 944 945 /** 946 * Helper that HM and NEM uses for safely modifying VM::bMainExecutionEngine. 947 * 948 * ONLY HM and NEM MAY USE THIS! 949 * 950 * @param a_pVM The cross context VM structure. 951 * @param a_bValue The new value. 952 * @internal 953 */ 954 #define VM_SET_MAIN_EXECUTION_ENGINE(a_pVM, a_bValue) \ 955 do { \ 956 *const_cast<uint8_t *>(&(a_pVM)->bMainExecutionEngine) = (a_bValue); \ 957 ASMCompilerBarrier(); /* just to be on the safe side */ \ 958 } while (0) 959 960 /** 961 * Checks whether raw-mode is used. 962 * 963 * @retval true if either is used. 964 * @retval false if software virtualization (raw-mode) is used. 965 * 966 * @param a_pVM The cross context VM structure. 967 * @sa HMR3IsEnabled, HMIsEnabled 968 * @internal 969 */ 970 #ifdef VBOX_WITH_RAW_MODE 971 # define VM_IS_RAW_MODE_ENABLED(a_pVM) ((a_pVM)->bMainExecutionEngine == VM_EXEC_ENGINE_RAW_MODE) 972 #else 973 # define VM_IS_RAW_MODE_ENABLED(a_pVM) (false) 974 #endif 975 976 /** 977 * Checks whether HM (VT-x/AMD-V) or NEM is being used by this VM. 978 * 979 * @retval true if either is used. 980 * @retval false if software virtualization (raw-mode) is used. 981 * 982 * @param a_pVM The cross context VM structure. 983 * @sa VM_IS_RAW_MODE_ENABLED, HMIsEnabled, HMR3IsEnabled 984 * @internal 985 */ 986 #define VM_IS_HM_OR_NEM_ENABLED(a_pVM) ((a_pVM)->bMainExecutionEngine != VM_EXEC_ENGINE_RAW_MODE) 987 933 988 934 989 /** … … 1010 1065 /** @name Various items that are frequently accessed. 1011 1066 * @{ */ 1067 /** The main execution engine, VM_EXEC_ENGINE_XXX. 1068 * This is set early during vmR3InitRing3 by HM or NEM. */ 1069 uint8_t const bMainExecutionEngine; 1070 1012 1071 /** Whether to recompile user mode code or run it raw/hm. */ 1013 1072 bool fRecompileUser; … … 1024 1083 /** Hardware VM support is available and enabled. 1025 1084 * Determined very early during init. 1026 * This is placed here for performance reasons. */ 1085 * This is placed here for performance reasons. 1086 * @todo obsoleted by bMainExecutionEngine, eliminate. */ 1027 1087 bool fHMEnabled; 1028 /** For asserting on fHMEnable usage. */1029 bool fHMEnabledFixed;1030 1088 /** Hardware VM support requires a minimal raw-mode context. 1031 1089 * This is never set on 64-bit hosts, only 32-bit hosts requires it. */ 1032 1090 bool fHMNeedRawModeCtx; 1033 /** NEM (native execution manager) active flag.1034 * This means we'll use NEM instead of HM when running guest code. */1035 bool fNEMActive;1036 1091 /** Set when this VM is the master FT node. 1037 1092 * @todo This doesn't need to be here, FTM should store it in it's own … … 1045 1100 1046 1101 /** Alignment padding. */ 1047 uint8_t uPadding1[ 1];1102 uint8_t uPadding1[2]; 1048 1103 1049 1104 /** @name Debugging -
trunk/include/VBox/vmm/vm.mac
r70918 r70948 104 104 .pfnVMMRCToHostAsm resd 1 105 105 .pfnVMMRCToHostAsmNoReturn resd 1 106 .bMainExecutionEngine resb 1 106 107 .fRecompileUser resb 1 107 108 .fRecompileSupervisor resb 1 … … 110 111 .fCSAMEnabled resb 1 111 112 .fHMEnabled resb 1 112 .fHMEnabledFixed resb 1113 113 .fHMNeedRawModeCtx resb 1 114 .fNEMActive resb 1115 114 .fFaultTolerantMaster resb 1 116 115 .fUseLargePages resb 1 117 116 118 .uPadding1 resb 1117 .uPadding1 resb 2 119 118 120 119 .hTraceBufRC RTRCPTR_RES 1
Note:
See TracChangeset
for help on using the changeset viewer.