VirtualBox

Changeset 99163 in vbox for trunk


Ignore:
Timestamp:
Mar 24, 2023 6:19:19 AM (19 months ago)
Author:
vboxsync
Message:

VMM/CPUM: Nested VMX: bugref:10318 Adjust virtual VMCS for saving/restoring non-zero secondary processor-based execution VM-controls when the 'activate secondary controls' bit is not set.

Location:
trunk
Files:
3 edited

Legend:

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

    r98150 r99163  
    40174017    uint8_t         fVmcsState;                  /**< 0x008 - VMCS launch state, see VMX_V_VMCS_LAUNCH_STATE_XXX. */
    40184018    uint8_t         au8Padding0[3];              /**< 0x009 - Reserved for future. */
    4019     uint32_t        au32Reserved0[12];           /**< 0x00c - Reserved for future. */
     4019    uint32_t        u32RestoreProcCtls2;         /**< 0x00c - Secondary VM-execution controls to restore, see iemVmxVmentryCheckCtls(). */
     4020    uint32_t        au32Reserved0[11];           /**< 0x010 - Reserved for future. */
    40204021    /** @} */
    40214022
  • trunk/src/VBox/VMM/VMMR3/CPUM.cpp

    r98355 r99163  
    358358    SSMFIELD_ENTRY(       VMXVVMCS, fVmcsState),
    359359    SSMFIELD_ENTRY_IGNORE(VMXVVMCS, au8Padding0),
     360    SSMFIELD_ENTRY_VER(   VMXVVMCS, u32RestoreProcCtls2,         CPUM_SAVED_STATE_VERSION_HWVIRT_VMX_4),
    360361    SSMFIELD_ENTRY_IGNORE(VMXVVMCS, au32Reserved0),
    361362
     
    26922693     * Validate version.
    26932694     */
    2694     if (    uVersion != CPUM_SAVED_STATE_VERSION_HWVIRT_VMX_3
     2695    if (    uVersion != CPUM_SAVED_STATE_VERSION_HWVIRT_VMX_4
     2696        &&  uVersion != CPUM_SAVED_STATE_VERSION_HWVIRT_VMX_3
    26952697        &&  uVersion != CPUM_SAVED_STATE_VERSION_PAE_PDPES
    26962698        &&  uVersion != CPUM_SAVED_STATE_VERSION_HWVIRT_VMX_2
  • trunk/src/VBox/VMM/include/CPUMInternal.h

    r98103 r99163  
    106106 * @{ */
    107107/** The current saved state version. */
    108 #define CPUM_SAVED_STATE_VERSION                CPUM_SAVED_STATE_VERSION_HWVIRT_VMX_3
     108#define CPUM_SAVED_STATE_VERSION                CPUM_SAVED_STATE_VERSION_HWVIRT_VMX_4
     109/** The saved state version with u32RestoreProcCtls2 for Nested Microsoft
     110 *  Hyper-V. */
     111#define CPUM_SAVED_STATE_VERSION_HWVIRT_VMX_4   23
    109112/** The saved state version with more virtual VMCS fields (HLAT prefix size,
    110113 *  PCONFIG-exiting bitmap, HLAT ptr, VM-exit ctls2) and a CPUMCTX field (VM-exit
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