VirtualBox

Changeset 97262 in vbox for trunk/include/VBox/vmm


Ignore:
Timestamp:
Oct 21, 2022 8:10:15 AM (2 years ago)
Author:
vboxsync
Message:

VMM: Nested VMX: bugref:10092 Added fetching VM-exit secondary MSR from the support driver. Updated the virtual VMCS with latest VMCS fields (HLAT prefix size, HLAT ptr, secondary VM-exit controls and PCONFIG-exiting bitmap).

Location:
trunk/include/VBox/vmm
Files:
2 edited

Legend:

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

    r97231 r97262  
    14011401    /** VMX: Supports save VMX preemption timer on VM-exit. */
    14021402    uint32_t        fVmxSavePreemptTimer : 1;
     1403    /** VMX: Supports secondary VM-exit controls. */
     1404    uint32_t        fVmxExitCtls2 : 1;
    14031405    /** @} */
    14041406
     
    14181420
    14191421    /** VMX: Padding / reserved for future features. */
    1420     uint32_t        fVmxPadding0 : 17;
     1422    uint32_t        fVmxPadding0 : 16;
    14211423    /** VMX: Padding / reserved for future, making it a total of 128 bits.  */
    14221424    uint32_t        fVmxPadding1;
  • trunk/include/VBox/vmm/hm_vmx.h

    r97040 r97262  
    13601360    /** Tertiary processor-based VM-execution controls. */
    13611361    uint64_t        u64ProcCtls3;
     1362    /** Secondary VM-exit controls. */
     1363    uint64_t        u64ExitCtls2;
    13621364    /** Reserved for future. */
    1363     uint64_t        a_u64Reserved[9];
     1365    uint64_t        a_u64Reserved[8];
    13641366} VMXMSRS;
    13651367AssertCompileSizeAlignment(VMXMSRS, 8);
     
    19271929#define VMX_VMCS16_POSTED_INT_NOTIFY_VECTOR                     0x0002
    19281930#define VMX_VMCS16_EPTP_INDEX                                   0x0004
     1931#define VMX_VMCS16_HLAT_PREFIX_SIZE                             0x0006
    19291932
    19301933/** 16-bit guest-state fields.  */
     
    20062009#define VMX_VMCS64_CTRL_ENCLV_EXITING_BITMAP_FULL               0x2036
    20072010#define VMX_VMCS64_CTRL_ENCLV_EXITING_BITMAP_HIGH               0x2037
     2011#define VMX_VMCS64_CTRL_PCONFIG_EXITING_BITMAP_FULL             0x203e
     2012#define VMX_VMCS64_CTRL_PCONFIG_EXITING_BITMAP_HIGH             0x203f
     2013#define VMX_VMCS64_CTRL_HLAT_PTR_FULL                           0x2040
     2014#define VMX_VMCS64_CTRL_HLAT_PTR_HIGH                           0x2041
     2015#define VMX_VMCS64_CTRL_EXIT2_FULL                              0x2044
     2016#define VMX_VMCS64_CTRL_EXIT2_HIGH                              0x2045
    20082017
    20092018/** 64-bit read-only data fields.  */
     
    27252734/** Whether the host IA32_PKRS MSR is loaded on VM-exit. */
    27262735#define VMX_EXIT_CTLS_LOAD_PKRS_MSR                             RT_BIT(29)
     2736/** Whether the host IA32_PERF_GLOBAL_CTRL MSR is saved on VM-exit. */
     2737#define VMX_EXIT_CTLS_SAVE_PERF_MSR                             RT_BIT(30)
     2738/** Whether secondary VM-exit controls are used. */
     2739#define VMX_EXIT_CTLS_USE_SECONDARY_CTLS                        RT_BIT(31)
    27272740/** Default1 class when true-capability MSRs are not supported. */
    27282741#define VMX_EXIT_CTLS_DEFAULT1                                  UINT32_C(0x00036dff)
     
    27702783#define VMX_BF_EXIT_CTLS_LOAD_PKRS_MSR_SHIFT                    29
    27712784#define VMX_BF_EXIT_CTLS_LOAD_PKRS_MSR_MASK                     UINT32_C(0x20000000)
    2772 #define VMX_BF_EXIT_CTLS_RSVD_30_31_SHIFT                       30
    2773 #define VMX_BF_EXIT_CTLS_RSVD_30_31_MASK                        UINT32_C(0xc0000000)
     2785#define VMX_BF_EXIT_CTLS_SAVE_PERF_MSR_SHIFT                    30
     2786#define VMX_BF_EXIT_CTLS_SAVE_PERF_MSR_MASK                     UINT32_C(0x40000000)
     2787#define VMX_BF_EXIT_CTLS_USE_SECONDARY_CTLS_SHIFT               31
     2788#define VMX_BF_EXIT_CTLS_USE_SECONDARY_CTLS_MASK                UINT32_C(0x80000000)
    27742789RT_BF_ASSERT_COMPILE_CHECKS(VMX_BF_EXIT_CTLS_, UINT32_C(0), UINT32_MAX,
    27752790                            (RSVD_0_1, SAVE_DEBUG, RSVD_3_8, HOST_ADDR_SPACE_SIZE, RSVD_10_11, LOAD_PERF_MSR, RSVD_13_14,
    27762791                             ACK_EXT_INT, RSVD_16_17, SAVE_PAT_MSR, LOAD_PAT_MSR, SAVE_EFER_MSR, LOAD_EFER_MSR,
    27772792                             SAVE_PREEMPT_TIMER, CLEAR_BNDCFGS_MSR, CONCEAL_VMX_FROM_PT, CLEAR_RTIT_CTL_MSR, RSVD_26_27,
    2778                              LOAD_CET, LOAD_PKRS_MSR, RSVD_30_31));
     2793                             LOAD_CET, LOAD_PKRS_MSR, SAVE_PERF_MSR, USE_SECONDARY_CTLS));
    27792794/** @} */
    27802795
     
    38083823
    38093824/** The highest index value used for supported virtual VMCS field encoding. */
    3810 #define VMX_V_VMCS_MAX_INDEX                                    RT_BF_GET(VMX_VMCS64_CTRL_ENCLV_EXITING_BITMAP_HIGH, VMX_BF_VMCSFIELD_INDEX)
     3825#define VMX_V_VMCS_MAX_INDEX                                    RT_BF_GET(VMX_VMCS64_CTRL_EXIT2_HIGH, VMX_BF_VMCSFIELD_INDEX)
    38113826
    38123827/**
     
    40354050    uint16_t        u16PostIntNotifyVector;      /**< 0x1b2 - Posted interrupt notify vector. */
    40364051    uint16_t        u16EptpIndex;                /**< 0x1b4 - EPTP index. */
    4037     uint16_t        au16Reserved0[13];           /**< 0x1b6 - Reserved for future. */
     4052    uint16_t        u16HlatPrefixSize;           /**< 0x1b6 - HLAT prefix size. */
     4053    uint16_t        au16Reserved0[12];           /**< 0x1b8 - Reserved for future. */
    40384054
    40394055    /** 32-bit fields. */
     
    40874103    RTUINT64U       u64ProcCtls3;                /**< 0x328 - Tertiary-Processor based VM-execution controls. */
    40884104    RTUINT64U       u64EnclvExitBitmap;          /**< 0x330 - ENCLV-exiting bitmap. */
    4089     RTUINT64U       au64Reserved0[13];           /**< 0x338 - Reserved for future. */
     4105    RTUINT64U       u64PconfigExitBitmap;        /**< 0x338 - PCONFIG-exiting bitmap. */
     4106    RTUINT64U       u64HlatPtr;                  /**< 0x340 - HLAT pointer. */
     4107    RTUINT64U       u64ExitCtls2;                /**< 0x348 - Secondary VM-exit controls. */
     4108    RTUINT64U       au64Reserved0[10];           /**< 0x350 - Reserved for future. */
    40904109
    40914110    /** Natural-width fields. */
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