Changeset 91098 in vbox
- Timestamp:
- Sep 2, 2021 3:22:54 PM (3 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
-
include/VBox/vmm/hm_vmx.h (modified) (2 diffs)
-
src/VBox/VMM/VMMR0/HMVMXR0.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/vmm/hm_vmx.h
r91045 r91098 3158 3158 * @{ 3159 3159 */ 3160 /** Set if the violation was caused bya data read. */3161 #define VMX_EXIT_QUAL_EPT_ DATA_READRT_BIT(0)3162 /** Set if the violation was caused bya data write. */3163 #define VMX_EXIT_QUAL_EPT_ DATA_WRITERT_BIT(1)3160 /** Set if acess causing the violation was a data read. */ 3161 #define VMX_EXIT_QUAL_EPT_ACCESS_READ RT_BIT(0) 3162 /** Set if acess causing the violation was a data write. */ 3163 #define VMX_EXIT_QUAL_EPT_ACCESS_WRITE RT_BIT(1) 3164 3164 /** Set if the violation was caused by an instruction fetch. */ 3165 #define VMX_EXIT_QUAL_EPT_ INSTR_FETCHRT_BIT(2)3165 #define VMX_EXIT_QUAL_EPT_ACCESS_INSTR_FETCH RT_BIT(2) 3166 3166 /** AND of the present bit of all EPT structures. */ 3167 #define VMX_EXIT_QUAL_EPT_ENTRY_ PRESENTRT_BIT(3)3167 #define VMX_EXIT_QUAL_EPT_ENTRY_READ RT_BIT(3) 3168 3168 /** AND of the write bit of all EPT structures. */ 3169 3169 #define VMX_EXIT_QUAL_EPT_ENTRY_WRITE RT_BIT(4) 3170 3170 /** AND of the execute bit of all EPT structures. */ 3171 3171 #define VMX_EXIT_QUAL_EPT_ENTRY_EXECUTE RT_BIT(5) 3172 /** Set if the guest linear address field contains the faulting address. */ 3173 #define VMX_EXIT_QUAL_EPT_GUEST_ADDR_VALID RT_BIT(7) 3172 /** And of the execute bit of all EPT structures for user-mode addresses 3173 * (requires mode-based execute control). */ 3174 #define VMX_EXIT_QUAL_EPT_ENTRY_EXECUTE_USER RT_BIT(6) 3175 /** Set if the guest linear address field is valid. */ 3176 #define VMX_EXIT_QUAL_EPT_GST_LINEAR_ADDR_VALID RT_BIT(7) 3174 3177 /** If bit 7 is one: (reserved otherwise) 3175 3178 * 1 - violation due to physical address access. … … 3177 3180 */ 3178 3181 #define VMX_EXIT_QUAL_EPT_TRANSLATED_ACCESS RT_BIT(8) 3182 /** If bit 7, 8 and advanced VM-exit info. for EPT is one: (reserved otherwise) 3183 * 1 - linear address is user-mode address. 3184 * 0 - linear address is supervisor-mode address. 3185 */ 3186 #define VMX_EXIT_QUAL_EPT_LINEAR_ADDR_USER RT_BIT(9) 3187 /** If bit 7, 8 and advanced VM-exit info. for EPT is one: (reserved otherwise) 3188 * 1 - linear address translates to read-only page. 3189 * 0 - linear address translates to read-write page. 3190 */ 3191 #define VMX_EXIT_QUAL_EPT_LINEAR_ADDR_RO RT_BIT(10) 3192 /** If bit 7, 8 and advanced VM-exit info. for EPT is one: (reserved otherwise) 3193 * 1 - linear address translates to executable-disabled page. 3194 * 0 - linear address translates to executable page. 3195 */ 3196 #define VMX_EXIT_QUAL_EPT_LINEAR_ADDR_XD RT_BIT(11) 3179 3197 /** NMI unblocking due to IRET. */ 3198 #define VMX_EXIT_QUAL_EPT_NMI_UNBLOCK_IRET RT_BIT(12) 3199 /** Set if acess causing the violation was a shadow-stack access. */ 3200 #define VMX_EXIT_QUAL_EPT_ACCESS_SUPERVISOR_SHW_STACK RT_BIT(13) 3201 /** If supervisor-shadow stack is enabled: (reserved otherwise) 3202 * 1 - supervisor shadow-stack access allowed. 3203 * 0 - supervisor shadow-stack access disallowed. 3204 */ 3205 #define VMX_EXIT_QUAL_EPT_ENTRY_SHW_STACK_ALLOWED RT_BIT(14) 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) 3208 3209 /** Checks whether NMI unblocking due to IRET. */ 3180 3210 #define VMX_EXIT_QUAL_EPT_IS_NMI_UNBLOCK_IRET(a) (((a) >> 12) & 1) 3181 3211 /** @} */ -
trunk/src/VBox/VMM/VMMR0/HMVMXR0.cpp
r91037 r91098 16398 16398 16399 16399 RTGCUINT uErrorCode = 0; 16400 if (uExitQual & VMX_EXIT_QUAL_EPT_ INSTR_FETCH)16400 if (uExitQual & VMX_EXIT_QUAL_EPT_ACCESS_INSTR_FETCH) 16401 16401 uErrorCode |= X86_TRAP_PF_ID; 16402 if (uExitQual & VMX_EXIT_QUAL_EPT_ DATA_WRITE)16402 if (uExitQual & VMX_EXIT_QUAL_EPT_ACCESS_WRITE) 16403 16403 uErrorCode |= X86_TRAP_PF_RW; 16404 if (uExitQual & VMX_EXIT_QUAL_EPT_ENTRY_PRESENT)16404 if (uExitQual & (VMX_EXIT_QUAL_EPT_ENTRY_READ | VMX_EXIT_QUAL_EPT_ENTRY_WRITE | VMX_EXIT_QUAL_EPT_ENTRY_EXECUTE)) 16405 16405 uErrorCode |= X86_TRAP_PF_P; 16406 16406
Note:
See TracChangeset
for help on using the changeset viewer.

