Changeset 79077 in vbox for trunk/include/VBox
- Timestamp:
- Jun 11, 2019 6:35:31 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/vmm/hm_vmx.h
r79076 r79077 760 760 /** 761 761 * VMX VPID flush types. 762 * @note Valid enum members are in accordance tothe VT-x spec.762 * Valid enum members are in accordance with the VT-x spec. 763 763 */ 764 764 typedef enum … … 781 781 /** 782 782 * VMX EPT flush types. 783 * @note Valid enums values are in accordance tothe VT-x spec.783 * @note Valid enums values are in accordance with the VT-x spec. 784 784 */ 785 785 typedef enum … … 798 798 /** 799 799 * VMX Posted Interrupt Descriptor. 800 * In accordance tothe VT-x spec.800 * In accordance with the VT-x spec. 801 801 */ 802 802 typedef struct VMXPOSTEDINTRDESC … … 1059 1059 1060 1060 /** @name VMXMSRPM_XXX - VMX MSR-bitmap permissions. 1061 * These are not in accordance to the Intel spec.but used internally by VirtualBox.1061 * These are -not- specified by Intel but used internally by VirtualBox. 1062 1062 * @{ */ 1063 1063 /** Guest software reads of this MSR must not cause a VM-exit. */ … … 1089 1089 /** 1090 1090 * VMX MSR autoload/store slot. 1091 * In accordance tothe VT-x spec.1091 * In accordance with the VT-x spec. 1092 1092 */ 1093 1093 typedef struct VMXAUTOMSR … … 1979 1979 } VMXVMCSFIELDACCESS; 1980 1980 AssertCompileSize(VMXVMCSFIELDACCESS, 4); 1981 1982 /** VMCS field encoding type: Full. */ 1983 #define VMX_VMCS_ENC_ACCESS_TYPE_FULL 0 1984 /** VMCS field encoding type: High. */ 1985 #define VMX_VMCS_ENC_ACCESS_TYPE_HIGH 1 1981 1986 /** @} */ 1982 1987 … … 1992 1997 } VMXVMCSFIELDTYPE; 1993 1998 AssertCompileSize(VMXVMCSFIELDTYPE, 4); 1999 2000 /** VMCS field encoding type: Control. */ 2001 #define VMX_VMCS_ENC_TYPE_CONTROL 0 2002 /** VMCS field encoding type: VM-exit information / read-only fields. */ 2003 #define VMX_VMCS_ENC_TYPE_VMEXIT_INFO 1 2004 /** VMCS field encoding type: Guest-state. */ 2005 #define VMX_VMCS_ENC_TYPE_GUEST_STATE 2 2006 /** VMCS field encoding type: Host-state. */ 2007 #define VMX_VMCS_ENC_TYPE_HOST_STATE 3 1994 2008 /** @} */ 1995 2009 … … 2005 2019 } VMXVMCSFIELDWIDTH; 2006 2020 AssertCompileSize(VMXVMCSFIELDWIDTH, 4); 2007 /** @} */ 2021 2022 /** VMCS field encoding width: 16-bit. */ 2023 #define VMX_VMCS_ENC_WIDTH_16BIT 0 2024 /** VMCS field encoding width: 64-bit. */ 2025 #define VMX_VMCS_ENC_WIDTH_64BIT 1 2026 /** VMCS field encoding width: 32-bit. */ 2027 #define VMX_VMCS_ENC_WIDTH_32BIT 2 2028 /** VMCS field encoding width: Natural width. */ 2029 #define VMX_VMCS_ENC_WIDTH_NATURAL 3 2030 /** @} */ 2031 2032 2033 /** @name VMCS field. 2034 * @{ */ 2035 typedef union 2036 { 2037 struct 2038 { 2039 /** The access type; 0=full, 1=high of 64-bit fields. */ 2040 uint32_t fAccessType : 1; 2041 /** The index. */ 2042 uint32_t u8Index : 8; 2043 /** The type; 0=control, 1=VM-exit info, 2=guest-state, 3=host-state. */ 2044 uint32_t u2Type : 2; 2045 /** Reserved (MBZ). */ 2046 uint32_t u1Reserved0 : 1; 2047 /** The width; 0=16-bit, 1=64-bit, 2=32-bit, 3=natural-width. */ 2048 uint32_t u2Width : 2; 2049 /** Reserved (MBZ). */ 2050 uint32_t u18Reserved0 : 18; 2051 } n; 2052 2053 /* The unsigned integer view. */ 2054 uint32_t u; 2055 } VMXVMCSFIELD; 2056 AssertCompileSize(VMXVMCSFIELD, 4); 2057 /** Pointer to a VMCS field encoding. */ 2058 typedef VMXVMCSFIELD *PVMXVMCSFIELD; 2059 /** Pointer to a const VMCS field encoding. */ 2060 typedef const VMXVMCSFIELD *PCVMXVMCSFIELD; 2061 2062 /** VMCS field encoding: Mask of reserved bits (bits 63:15 MBZ), bit 12 is 2063 * not included! */ 2064 #define VMX_VMCS_ENC_RSVD_MASK UINT64_C(0xffffffffffff8000) 2065 2066 /** Bits fields for VMCS field encoding. */ 2067 #define VMX_BF_VMCS_ENC_ACCESS_TYPE_SHIFT 0 2068 #define VMX_BF_VMCS_ENC_ACCESS_TYPE_MASK UINT32_C(0x00000001) 2069 #define VMX_BF_VMCS_ENC_INDEX_SHIFT 1 2070 #define VMX_BF_VMCS_ENC_INDEX_MASK UINT32_C(0x000003fe) 2071 #define VMX_BF_VMCS_ENC_TYPE_SHIFT 10 2072 #define VMX_BF_VMCS_ENC_TYPE_MASK UINT32_C(0x00000c00) 2073 #define VMX_BF_VMCS_ENC_RSVD_12_SHIFT 12 2074 #define VMX_BF_VMCS_ENC_RSVD_12_MASK UINT32_C(0x00001000) 2075 #define VMX_BF_VMCS_ENC_WIDTH_SHIFT 13 2076 #define VMX_BF_VMCS_ENC_WIDTH_MASK UINT32_C(0x00006000) 2077 #define VMX_BF_VMCS_ENC_RSVD_15_31_SHIFT 15 2078 #define VMX_BF_VMCS_ENC_RSVD_15_31_MASK UINT32_C(0xffff8000) 2079 RT_BF_ASSERT_COMPILE_CHECKS(VMX_BF_VMCS_ENC_, UINT32_C(0), UINT32_MAX, 2080 (ACCESS_TYPE, INDEX, TYPE, RSVD_12, WIDTH, RSVD_15_31)); 2081 /** @} */ 2082 2008 2083 2009 2084 /** @name VM-entry instruction length. … … 2528 2603 /** @} */ 2529 2604 2605 2530 2606 /** @name VM-entry exception error code. 2531 2607 * @{ */ … … 3212 3288 3213 3289 3214 /** @name VMCS field encoding.3215 * @{ */3216 typedef union3217 {3218 struct3219 {3220 /** The access type; 0=full, 1=high of 64-bit fields. */3221 uint32_t fAccessType : 1;3222 /** The index. */3223 uint32_t u8Index : 8;3224 /** The type; 0=control, 1=VM-exit info, 2=guest-state, 3=host-state. */3225 uint32_t u2Type : 2;3226 /** Reserved (MBZ). */3227 uint32_t u1Reserved0 : 1;3228 /** The width; 0=16-bit, 1=64-bit, 2=32-bit, 3=natural-width. */3229 uint32_t u2Width : 2;3230 /** Reserved (MBZ). */3231 uint32_t u18Reserved0 : 18;3232 } n;3233 /* The unsigned integer view. */3234 uint32_t u;3235 } VMXVMCSFIELDENC;3236 AssertCompileSize(VMXVMCSFIELDENC, 4);3237 /** Pointer to a VMCS field encoding. */3238 typedef VMXVMCSFIELDENC *PVMXVMCSFIELDENC;3239 /** Pointer to a const VMCS field encoding. */3240 typedef const VMXVMCSFIELDENC *PCVMXVMCSFIELDENC;3241 3242 /** VMCS field encoding type: Full. */3243 #define VMX_VMCS_ENC_ACCESS_TYPE_FULL 03244 /** VMCS field encoding type: High. */3245 #define VMX_VMCS_ENC_ACCESS_TYPE_HIGH 13246 3247 /** VMCS field encoding type: Control. */3248 #define VMX_VMCS_ENC_TYPE_CONTROL 03249 /** VMCS field encoding type: VM-exit information / read-only fields. */3250 #define VMX_VMCS_ENC_TYPE_VMEXIT_INFO 13251 /** VMCS field encoding type: Guest-state. */3252 #define VMX_VMCS_ENC_TYPE_GUEST_STATE 23253 /** VMCS field encoding type: Host-state. */3254 #define VMX_VMCS_ENC_TYPE_HOST_STATE 33255 3256 /** VMCS field encoding width: 16-bit. */3257 #define VMX_VMCS_ENC_WIDTH_16BIT 03258 /** VMCS field encoding width: 64-bit. */3259 #define VMX_VMCS_ENC_WIDTH_64BIT 13260 /** VMCS field encoding width: 32-bit. */3261 #define VMX_VMCS_ENC_WIDTH_32BIT 23262 /** VMCS field encoding width: Natural width. */3263 #define VMX_VMCS_ENC_WIDTH_NATURAL 33264 3265 /** VMCS field encoding: Mask of reserved bits (bits 63:15 MBZ), bit 12 is3266 * not included! */3267 #define VMX_VMCS_ENC_RSVD_MASK UINT64_C(0xffffffffffff8000)3268 3269 /** Bits fields for VMCS field encoding. */3270 #define VMX_BF_VMCS_ENC_ACCESS_TYPE_SHIFT 03271 #define VMX_BF_VMCS_ENC_ACCESS_TYPE_MASK UINT32_C(0x00000001)3272 #define VMX_BF_VMCS_ENC_INDEX_SHIFT 13273 #define VMX_BF_VMCS_ENC_INDEX_MASK UINT32_C(0x000003fe)3274 #define VMX_BF_VMCS_ENC_TYPE_SHIFT 103275 #define VMX_BF_VMCS_ENC_TYPE_MASK UINT32_C(0x00000c00)3276 #define VMX_BF_VMCS_ENC_RSVD_12_SHIFT 123277 #define VMX_BF_VMCS_ENC_RSVD_12_MASK UINT32_C(0x00001000)3278 #define VMX_BF_VMCS_ENC_WIDTH_SHIFT 133279 #define VMX_BF_VMCS_ENC_WIDTH_MASK UINT32_C(0x00006000)3280 #define VMX_BF_VMCS_ENC_RSVD_15_31_SHIFT 153281 #define VMX_BF_VMCS_ENC_RSVD_15_31_MASK UINT32_C(0xffff8000)3282 RT_BF_ASSERT_COMPILE_CHECKS(VMX_BF_VMCS_ENC_, UINT32_C(0), UINT32_MAX,3283 (ACCESS_TYPE, INDEX, TYPE, RSVD_12, WIDTH, RSVD_15_31));3284 /** @} */3285 3286 3287 3290 /** @defgroup grp_hm_vmx_virt VMX virtualization. 3288 3291 * @{ … … 3442 3445 * 3443 3446 * This is our custom format. Relevant fields from this VMCS will be merged into the 3444 * actual VMCS (/shadow)when we execute nested-guest code using hardware-assisted3447 * actual/shadow VMCS when we execute nested-guest code using hardware-assisted 3445 3448 * VMX. 3446 3449 *
Note:
See TracChangeset
for help on using the changeset viewer.