VirtualBox

Changeset 91101 in vbox for trunk/include


Ignore:
Timestamp:
Sep 3, 2021 8:51:43 AM (3 years ago)
Author:
vboxsync
Message:

VMM: Nested VMX: hm_vmx: Bit fields for VM-exit qualifations due to EPT violations.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/vmm/hm_vmx.h

    r91098 r91101  
    31593159 */
    31603160/** 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)
    31623162/** 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)
    31643164/** 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)
    31663166/** 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)
    31683168/** 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)
    31703170/** 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)
    31723172/** And of the execute bit of all EPT structures for user-mode addresses
    31733173 *  (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)
    31753175/** 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)
    31773177/** If bit 7 is one: (reserved otherwise)
    31783178 *  1 - violation due to physical address access.
    31793179 *  0 - violation caused by page walk or access/dirty bit updates
    31803180 */
    3181 #define VMX_EXIT_QUAL_EPT_TRANSLATED_ACCESS                     RT_BIT(8)
     3181#define VMX_EXIT_QUAL_EPT_ACCESS_TRANSLATE                      RT_BIT_64(8)
    31823182/** If bit 7, 8 and advanced VM-exit info. for EPT is one: (reserved otherwise)
    31833183 *  1 - linear address is user-mode address.
    31843184 *  0 - linear address is supervisor-mode address.
    31853185 */
    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)
    31873187/** If bit 7, 8 and advanced VM-exit info. for EPT is one: (reserved otherwise)
    31883188 *  1 - linear address translates to read-only page.
    31893189 *  0 - linear address translates to read-write page.
    31903190 */
    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)
    31923192/** If bit 7, 8 and advanced VM-exit info. for EPT is one: (reserved otherwise)
    31933193 *  1 - linear address translates to executable-disabled page.
    31943194 *  0 - linear address translates to executable page.
    31953195 */
    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)
    31973197/** 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)
    31993199/** Set if acess causing the violation was a shadow-stack access. */
    3200 #define VMX_EXIT_QUAL_EPT_ACCESS_SUPERVISOR_SHW_STACK           RT_BIT(13)
     3200#define VMX_EXIT_QUAL_EPT_ACCESS_SHW_STACK                      RT_BIT_64(13)
    32013201/** If supervisor-shadow stack is enabled: (reserved otherwise)
    32023202 *  1 - supervisor shadow-stack access allowed.
    32033203 *  0 - supervisor shadow-stack access disallowed.
    32043204 */
    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)
    32063206/** 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)
    32083208
    32093209/** Checks whether NMI unblocking due to IRET. */
    32103210#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)
     3249RT_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));
    32113254/** @} */
    32123255
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette