VirtualBox

Changeset 73781 in vbox for trunk


Ignore:
Timestamp:
Aug 20, 2018 11:39:33 AM (6 years ago)
Author:
vboxsync
Message:

hm_vmx.h: Nested VMX: bugref:9180 VMCS field encoding union.

File:
1 edited

Legend:

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

    r73774 r73781  
    26842684/** @name VMCS field encoding.
    26852685 * @{ */
    2686 #define VMX_VMCS_ENC_GET_INDEX(a)
    2687 
     2686typedef union
     2687{
     2688    struct
     2689    {
     2690        /** The access type; 0=full, 1=high of 64-bit fields. */
     2691        uint32_t    fAccessType  : 1;
     2692        /** The index. */
     2693        uint32_t    uIndex       : 8;
     2694        /** The type; 0=control, 1=VM-exit info, 2=guest-state, 3=host-state.  */
     2695        uint32_t    uType        : 2;
     2696        /** Reserved (MBZ). */
     2697        uint32_t    u1Reserved0  : 1;
     2698        /** The width; 0=16-bit, 1=64-bit, 2=32-bit, 3=natural-width. */
     2699        uint32_t    uWidth       : 2;
     2700        /** Reserved (MBZ). */
     2701        uint32_t    u18Reserved0 : 18;
     2702    } n;
     2703    /* The unsigned integer view. */
     2704    uint32_t    u;
     2705} VMXVMCSFIELDENC;
     2706AssertCompileSize(VMXVMCSFIELDENC, 4);
     2707/** Pointer to a VMCS field encoding. */
     2708typedef VMXVMCSFIELDENC *PVMXVMCSFIELDENC;
     2709/** Pointer to a const VMCS field encoding. */
     2710typedef const VMXVMCSFIELDENC *PCVMXVMCSFIELDENC;
     2711/** Bits fields VMCS field encoding. */
    26882712#define VMX_BF_VMCS_ENC_ACCESS_TYPE_SHIFT                       0
    26892713#define VMX_BF_VMCS_ENC_ACCESS_TYPE_MASK                        UINT32_C(0x00000001)
     
    27262750
    27272751/** The highest index value used for supported virtual VMCS field encoding. */
    2728 #define VMX_V_VMCS_MAX_INDEX                                    RT_BF_GET(VMX_VMCS32_PREEMPT_TIMER_VALUE, VMX_BF_VMCS_ENC_INDEX)
     2752#define VMX_V_VMCS_MAX_INDEX                                    RT_BF_GET(VMX_VMCS64_CTRL_TSC_MULTIPLIER_HIGH, VMX_BF_VMCS_ENC_INDEX)
    27292753
    27302754/** Whether physical addresses of VMXON and VMCS related structures (I/O bitmap
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