Changeset 91101 in vbox for trunk/include
- Timestamp:
- Sep 3, 2021 8:51:43 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/vmm/hm_vmx.h
r91098 r91101 3159 3159 */ 3160 3160 /** Set if acess causing the violation was a data read. */ 3161 #define VMX_EXIT_QUAL_EPT_ACCESS_READ RT_BIT (0)3161 #define VMX_EXIT_QUAL_EPT_ACCESS_READ RT_BIT_64(0) 3162 3162 /** Set if acess causing the violation was a data write. */ 3163 #define VMX_EXIT_QUAL_EPT_ACCESS_WRITE RT_BIT (1)3163 #define VMX_EXIT_QUAL_EPT_ACCESS_WRITE RT_BIT_64(1) 3164 3164 /** Set if the violation was caused by an instruction fetch. */ 3165 #define VMX_EXIT_QUAL_EPT_ACCESS_INSTR_FETCH RT_BIT (2)3165 #define VMX_EXIT_QUAL_EPT_ACCESS_INSTR_FETCH RT_BIT_64(2) 3166 3166 /** AND of the present bit of all EPT structures. */ 3167 #define VMX_EXIT_QUAL_EPT_ENTRY_READ RT_BIT (3)3167 #define VMX_EXIT_QUAL_EPT_ENTRY_READ RT_BIT_64(3) 3168 3168 /** AND of the write bit of all EPT structures. */ 3169 #define VMX_EXIT_QUAL_EPT_ENTRY_WRITE RT_BIT (4)3169 #define VMX_EXIT_QUAL_EPT_ENTRY_WRITE RT_BIT_64(4) 3170 3170 /** AND of the execute bit of all EPT structures. */ 3171 #define VMX_EXIT_QUAL_EPT_ENTRY_EXECUTE RT_BIT (5)3171 #define VMX_EXIT_QUAL_EPT_ENTRY_EXECUTE RT_BIT_64(5) 3172 3172 /** And of the execute bit of all EPT structures for user-mode addresses 3173 3173 * (requires mode-based execute control). */ 3174 #define VMX_EXIT_QUAL_EPT_ENTRY_EXECUTE_USER RT_BIT (6)3174 #define VMX_EXIT_QUAL_EPT_ENTRY_EXECUTE_USER RT_BIT_64(6) 3175 3175 /** Set if the guest linear address field is valid. */ 3176 #define VMX_EXIT_QUAL_EPT_ GST_LINEAR_ADDR_VALID RT_BIT(7)3176 #define VMX_EXIT_QUAL_EPT_LINEAR_ADDR_VALID RT_BIT_64(7) 3177 3177 /** If bit 7 is one: (reserved otherwise) 3178 3178 * 1 - violation due to physical address access. 3179 3179 * 0 - violation caused by page walk or access/dirty bit updates 3180 3180 */ 3181 #define VMX_EXIT_QUAL_EPT_ TRANSLATED_ACCESS RT_BIT(8)3181 #define VMX_EXIT_QUAL_EPT_ACCESS_TRANSLATE RT_BIT_64(8) 3182 3182 /** If bit 7, 8 and advanced VM-exit info. for EPT is one: (reserved otherwise) 3183 3183 * 1 - linear address is user-mode address. 3184 3184 * 0 - linear address is supervisor-mode address. 3185 3185 */ 3186 #define VMX_EXIT_QUAL_EPT_LINEAR_ADDR_USER RT_BIT (9)3186 #define VMX_EXIT_QUAL_EPT_LINEAR_ADDR_USER RT_BIT_64(9) 3187 3187 /** If bit 7, 8 and advanced VM-exit info. for EPT is one: (reserved otherwise) 3188 3188 * 1 - linear address translates to read-only page. 3189 3189 * 0 - linear address translates to read-write page. 3190 3190 */ 3191 #define VMX_EXIT_QUAL_EPT_LINEAR_ADDR_RO RT_BIT (10)3191 #define VMX_EXIT_QUAL_EPT_LINEAR_ADDR_RO RT_BIT_64(10) 3192 3192 /** If bit 7, 8 and advanced VM-exit info. for EPT is one: (reserved otherwise) 3193 3193 * 1 - linear address translates to executable-disabled page. 3194 3194 * 0 - linear address translates to executable page. 3195 3195 */ 3196 #define VMX_EXIT_QUAL_EPT_LINEAR_ADDR_XD RT_BIT (11)3196 #define VMX_EXIT_QUAL_EPT_LINEAR_ADDR_XD RT_BIT_64(11) 3197 3197 /** NMI unblocking due to IRET. */ 3198 #define VMX_EXIT_QUAL_EPT_NMI_UNBLOCK_IRET RT_BIT (12)3198 #define VMX_EXIT_QUAL_EPT_NMI_UNBLOCK_IRET RT_BIT_64(12) 3199 3199 /** Set if acess causing the violation was a shadow-stack access. */ 3200 #define VMX_EXIT_QUAL_EPT_ACCESS_S UPERVISOR_SHW_STACK RT_BIT(13)3200 #define VMX_EXIT_QUAL_EPT_ACCESS_SHW_STACK RT_BIT_64(13) 3201 3201 /** If supervisor-shadow stack is enabled: (reserved otherwise) 3202 3202 * 1 - supervisor shadow-stack access allowed. 3203 3203 * 0 - supervisor shadow-stack access disallowed. 3204 3204 */ 3205 #define VMX_EXIT_QUAL_EPT_ENTRY_SHW_STACK_ ALLOWED RT_BIT(14)3205 #define VMX_EXIT_QUAL_EPT_ENTRY_SHW_STACK_SUPER RT_BIT_64(14) 3206 3206 /** Set if access is related to trace output by Intel PT (reserved otherwise). */ 3207 #define VMX_EXIT_QUAL_EPT_ACCESS_PT_TRACE RT_BIT (16)3207 #define VMX_EXIT_QUAL_EPT_ACCESS_PT_TRACE RT_BIT_64(16) 3208 3208 3209 3209 /** Checks whether NMI unblocking due to IRET. */ 3210 3210 #define VMX_EXIT_QUAL_EPT_IS_NMI_UNBLOCK_IRET(a) (((a) >> 12) & 1) 3211 3212 /** Bit fields for Exit qualification for EPT violations. */ 3213 #define VMX_BF_EXIT_QUAL_EPT_ACCESS_READ_SHIFT 0 3214 #define VMX_BF_EXIT_QUAL_EPT_ACCESS_READ_MASK UINT64_C(0x0000000000000001) 3215 #define VMX_BF_EXIT_QUAL_EPT_ACCESS_WRITE_SHIFT 1 3216 #define VMX_BF_EXIT_QUAL_EPT_ACCESS_WRITE_MASK UINT64_C(0x0000000000000002) 3217 #define VMX_BF_EXIT_QUAL_EPT_ACCESS_INSTR_FETCH_SHIFT 2 3218 #define VMX_BF_EXIT_QUAL_EPT_ACCESS_INSTR_FETCH_MASK UINT64_C(0x0000000000000004) 3219 #define VMX_BF_EXIT_QUAL_EPT_ENTRY_READ_SHIFT 3 3220 #define VMX_BF_EXIT_QUAL_EPT_ENTRY_READ_MASK UINT64_C(0x0000000000000008) 3221 #define VMX_BF_EXIT_QUAL_EPT_ENTRY_WRITE_SHIFT 4 3222 #define VMX_BF_EXIT_QUAL_EPT_ENTRY_WRITE_MASK UINT64_C(0x0000000000000010) 3223 #define VMX_BF_EXIT_QUAL_EPT_ENTRY_EXECUTE_SHIFT 5 3224 #define VMX_BF_EXIT_QUAL_EPT_ENTRY_EXECUTE_MASK UINT64_C(0x0000000000000020) 3225 #define VMX_BF_EXIT_QUAL_EPT_ENTRY_EXECUTE_USER_SHIFT 6 3226 #define VMX_BF_EXIT_QUAL_EPT_ENTRY_EXECUTE_USER_MASK UINT64_C(0x0000000000000040) 3227 #define VMX_BF_EXIT_QUAL_EPT_LINEAR_ADDR_VALID_SHIFT 7 3228 #define VMX_BF_EXIT_QUAL_EPT_LINEAR_ADDR_VALID_MASK UINT64_C(0x0000000000000080) 3229 #define VMX_BF_EXIT_QUAL_EPT_ACCESS_TRANSLATE_SHIFT 8 3230 #define VMX_BF_EXIT_QUAL_EPT_ACCESS_TRANSLATE_MASK UINT64_C(0x0000000000000100) 3231 #define VMX_BF_EXIT_QUAL_EPT_LINEAR_ADDR_USER_SHIFT 9 3232 #define VMX_BF_EXIT_QUAL_EPT_LINEAR_ADDR_USER_MASK UINT64_C(0x0000000000000200) 3233 #define VMX_BF_EXIT_QUAL_EPT_LINEAR_ADDR_RO_SHIFT 10 3234 #define VMX_BF_EXIT_QUAL_EPT_LINEAR_ADDR_RO_MASK UINT64_C(0x0000000000000400) 3235 #define VMX_BF_EXIT_QUAL_EPT_LINEAR_ADDR_XD_SHIFT 11 3236 #define VMX_BF_EXIT_QUAL_EPT_LINEAR_ADDR_XD_MASK UINT64_C(0x0000000000000800) 3237 #define VMX_BF_EXIT_QUAL_EPT_NMI_UNBLOCK_IRET_SHIFT 12 3238 #define VMX_BF_EXIT_QUAL_EPT_NMI_UNBLOCK_IRET_MASK UINT64_C(0x0000000000001000) 3239 #define VMX_BF_EXIT_QUAL_EPT_ACCESS_SHW_STACK_SHIFT 13 3240 #define VMX_BF_EXIT_QUAL_EPT_ACCESS_SHW_STACK_MASK UINT64_C(0x0000000000002000) 3241 #define VMX_BF_EXIT_QUAL_EPT_ENTRY_SHW_STACK_SUPER_SHIFT 14 3242 #define VMX_BF_EXIT_QUAL_EPT_ENTRY_SHW_STACK_SUPER_MASK UINT64_C(0x0000000000004000) 3243 #define VMX_BF_EXIT_QUAL_EPT_RSVD_15_SHIFT 15 3244 #define VMX_BF_EXIT_QUAL_EPT_RSVD_15_MASK UINT64_C(0x0000000000008000) 3245 #define VMX_BF_EXIT_QUAL_EPT_ACCESS_PT_TRACE_SHIFT 16 3246 #define VMX_BF_EXIT_QUAL_EPT_ACCESS_PT_TRACE_MASK UINT64_C(0x0000000000010000) 3247 #define VMX_BF_EXIT_QUAL_EPT_RSVD_17_63_SHIFT 17 3248 #define VMX_BF_EXIT_QUAL_EPT_RSVD_17_63_MASK UINT64_C(0xfffffffffffe0000) 3249 RT_BF_ASSERT_COMPILE_CHECKS(VMX_BF_EXIT_QUAL_EPT_, UINT64_C(0), UINT64_MAX, 3250 (ACCESS_READ, ACCESS_WRITE, ACCESS_INSTR_FETCH, ENTRY_READ, ENTRY_WRITE, ENTRY_EXECUTE, 3251 ENTRY_EXECUTE_USER, LINEAR_ADDR_VALID, ACCESS_TRANSLATE, LINEAR_ADDR_USER, LINEAR_ADDR_RO, 3252 LINEAR_ADDR_XD, NMI_UNBLOCK_IRET, ACCESS_SHW_STACK, ENTRY_SHW_STACK_SUPER, RSVD_15, 3253 ACCESS_PT_TRACE, RSVD_17_63)); 3211 3254 /** @} */ 3212 3255
Note:
See TracChangeset
for help on using the changeset viewer.