VirtualBox

Changeset 73774 in vbox for trunk/include


Ignore:
Timestamp:
Aug 20, 2018 8:36:16 AM (6 years ago)
Author:
vboxsync
Message:

hm_vmx.h: Nested VMX: bugref:9180 Add VMCS field access-type, type and HMVmxIsVmcsFieldReadOnly.

File:
1 edited

Legend:

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

    r73773 r73774  
    17811781
    17821782
    1783 /** @name VMCS field encoding: Widths
     1783/** @name VMCS field encoding: Access.
     1784 * @{ */
     1785typedef enum
     1786{
     1787    VMXVMCSFIELDACCESS_FULL = 0,
     1788    VMXVMCSFIELDACCESS_HIGH
     1789} VMXVMCSFIELDACCESS;
     1790AssertCompileSize(VMXVMCSFIELDACCESS, 4);
     1791/** @} */
     1792
     1793
     1794/** @name VMCS field encoding: Type.
     1795 * @{ */
     1796typedef enum
     1797{
     1798    VMXVMCSFIELDTYPE_CONTROL = 0,
     1799    VMXVMCSFIELDTYPE_VMEXIT_INFO,
     1800    VMXVMCSFIELDTYPE_GUEST_STATE,
     1801    VMXVMCSFIELDTYPE_HOST_STATE
     1802} VMXVMCSFIELDTYPE;
     1803AssertCompileSize(VMXVMCSFIELDTYPE, 4);
     1804/** @} */
     1805
     1806
     1807/** @name VMCS field encoding: Width.
    17841808 * @{ */
    17851809typedef enum
     
    28442868    return (uFieldEnc >> 13) & 0x3;
    28452869}
     2870
     2871
     2872/**
     2873 * Returns whether the given VMCS field is a read-only VMCS field or not.
     2874 *
     2875 * @returns @c true if it's a read-only field, @c false otherwise.
     2876 * @param   uFieldEnc   The VMCS field encoding.
     2877 *
     2878 * @remarks Warning! This function does not verify the encoding is for a valid and
     2879 *          supported VMCS field.
     2880 */
     2881DECLINLINE(bool) HMVmxIsVmcsFieldReadOnly(uint32_t uFieldEnc)
     2882{
     2883    /* See Intel spec. B.4.2 "Natural-Width Read-Only Data Fields". */
     2884    return (RT_BF_GET(uFieldEnc, VMX_BF_VMCS_ENC_TYPE) == VMXVMCSFIELDTYPE_VMEXIT_INFO);
     2885}
    28462886/** @} */
    28472887
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