VirtualBox

Changeset 74258 in vbox for trunk/include/VBox


Ignore:
Timestamp:
Sep 14, 2018 4:20:16 AM (6 years ago)
Author:
vboxsync
Message:

VMM/IEM, CPUM: Nested VMX: bugref:9180 vmlaunch/vmresume bits.

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

Legend:

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

    r74155 r74258  
    602602                uint32_t                uVmwriteBitmapR3Padding;
    603603#endif
    604                 /** 0x348 - Padding. */
    605                 uint8_t             abPadding[0x3f0 - 0x348];
     604                /** 0x348 - The MSR auto-load/store area - R0 ptr. */
     605                R0PTRTYPE(PVMXAUTOMSR)  pAutoMsrAreaR0;
     606#if HC_ARCH_BITS == 32
     607                uint32_t                uAutoMsrAreaR0;
     608#endif
     609                /** 0x350 - The MSR auto-load/store area - R3 ptr. */
     610                R3PTRTYPE(PVMXAUTOMSR)  pAutoMsrAreaR3;
     611#if HC_ARCH_BITS == 32
     612                uint32_t                uAutoMsrAreaR3;
     613#endif
     614                /** 0x358 - Padding. */
     615                uint8_t             abPadding[0x3f0 - 0x358];
    606616            } vmx;
    607617        } CPUM_UNION_NM(s);
  • trunk/include/VBox/vmm/hm_vmx.h

    r74227 r74258  
    29222922 */
    29232923
    2924 /** CR0 bits set here must always be set when in VMX operation. */
    2925 #define VMX_V_CR0_FIXED0                                        (X86_CR0_PE | X86_CR0_NE | X86_CR0_PG)
    2926 /** VMX_V_CR0_FIXED0 when unrestricted-guest execution is supported for the guest. */
    2927 #define VMX_V_CR0_FIXED0_UX                                     (VMX_V_CR0_FIXED0 & ~(X86_CR0_PE | X86_CR0_PG))
    2928 /** CR4 bits set here must always be set when in VMX operation. */
    2929 #define VMX_V_CR4_FIXED0                                        (X86_CR4_VMXE)
    2930 
    2931 /** Virtual VMCS revision ID. Bump this arbitarily chosen identifier if incompatible
    2932  *  changes to the layout of VMXVVMCS is done.  Bit 31 MBZ.  */
    2933 #define VMX_V_VMCS_REVISION_ID                                  UINT32_C(0x1d000001)
    2934 AssertCompile(!(VMX_V_VMCS_REVISION_ID & RT_BIT(31)));
    2935 
    2936 /** The size of the virtual VMCS region (we use the maximum allowed size to avoid
    2937  *  complications when teleporation may be implemented). */
    2938 #define VMX_V_VMCS_SIZE                                         X86_PAGE_4K_SIZE
    2939 /** The size of the virtual VMCS region (in pages). */
    2940 #define VMX_V_VMCS_PAGES                                        1
    2941 
    2942 /** The size of the Virtual-APIC page (in bytes).  */
    2943 #define VMX_V_VIRT_APIC_SIZE                                    X86_PAGE_4K_SIZE
    2944 /** The size of the Virtual-APIC page (in pages). */
    2945 #define VMX_V_VIRT_APIC_PAGES                                   1
    2946 
    2947 /** The size of the VMREAD/VMWRITE bitmap (in bytes). */
    2948 #define VMX_V_VMREAD_VMWRITE_BITMAP_SIZE                        X86_PAGE_4K_SIZE
    2949 /** The size of the VMREAD/VMWRITE-bitmap (in pages). */
    2950 #define VMX_V_VMREAD_VMWRITE_BITMAP_PAGES                       1
    2951 
    2952 /** The highest index value used for supported virtual VMCS field encoding. */
    2953 #define VMX_V_VMCS_MAX_INDEX                                    RT_BF_GET(VMX_VMCS64_CTRL_TSC_MULTIPLIER_HIGH, VMX_BF_VMCS_ENC_INDEX)
    2954 
    29552924/** @name Virtual VMX MSR - Miscellaneous data.
    29562925 * @{ */
     
    29622931#define VMX_V_PREEMPT_TIMER_SHIFT                               5
    29632932/** Maximum number of MSRs in the auto-load/store MSR areas, (n+1) * 512. */
    2964 #define VMX_V_MAX_MSRS                                          0
     2933#define VMX_V_AUTOMSR_COUNT_MAX                                 0
    29652934/** SMM MSEG revision ID. */
    29662935#define VMX_V_MSEG_REV_ID                                       0
     
    29742943#define VMX_V_VMCS_STATE_LAUNCHED       RT_BIT(2)
    29752944/** @} */
     2945
     2946/** CR0 bits set here must always be set when in VMX operation. */
     2947#define VMX_V_CR0_FIXED0                                        (X86_CR0_PE | X86_CR0_NE | X86_CR0_PG)
     2948/** VMX_V_CR0_FIXED0 when unrestricted-guest execution is supported for the guest. */
     2949#define VMX_V_CR0_FIXED0_UX                                     (VMX_V_CR0_FIXED0 & ~(X86_CR0_PE | X86_CR0_PG))
     2950/** CR4 bits set here must always be set when in VMX operation. */
     2951#define VMX_V_CR4_FIXED0                                        (X86_CR4_VMXE)
     2952
     2953/** Virtual VMCS revision ID. Bump this arbitarily chosen identifier if incompatible
     2954 *  changes to the layout of VMXVVMCS is done.  Bit 31 MBZ.  */
     2955#define VMX_V_VMCS_REVISION_ID                                  UINT32_C(0x1d000001)
     2956AssertCompile(!(VMX_V_VMCS_REVISION_ID & RT_BIT(31)));
     2957
     2958/** The size of the virtual VMCS region (we use the maximum allowed size to avoid
     2959 *  complications when teleporation may be implemented). */
     2960#define VMX_V_VMCS_SIZE                                         X86_PAGE_4K_SIZE
     2961/** The size of the virtual VMCS region (in pages). */
     2962#define VMX_V_VMCS_PAGES                                        1
     2963
     2964/** The size of the Virtual-APIC page (in bytes).  */
     2965#define VMX_V_VIRT_APIC_SIZE                                    X86_PAGE_4K_SIZE
     2966/** The size of the Virtual-APIC page (in pages). */
     2967#define VMX_V_VIRT_APIC_PAGES                                   1
     2968
     2969/** The size of the VMREAD/VMWRITE bitmap (in bytes). */
     2970#define VMX_V_VMREAD_VMWRITE_BITMAP_SIZE                        X86_PAGE_4K_SIZE
     2971/** The size of the VMREAD/VMWRITE-bitmap (in pages). */
     2972#define VMX_V_VMREAD_VMWRITE_BITMAP_PAGES                       1
     2973
     2974/** The size of the auto-load/store MSR area (in bytes). */
     2975#define VMX_V_AUTOMSR_AREA_SIZE                                 ((512 * (VMX_V_AUTOMSR_COUNT_MAX + 1)) * sizeof(VMXAUTOMSR))
     2976/* Assert that the size is page aligned or adjust the VMX_V_AUTOMSR_AREA_PAGES macro below. */
     2977AssertCompile(RT_ALIGN_Z(VMX_V_AUTOMSR_AREA_SIZE, X86_PAGE_4K_SIZE) == VMX_V_AUTOMSR_AREA_SIZE);
     2978/** The size of the auto-load/store MSR area (in pages). */
     2979#define VMX_V_AUTOMSR_AREA_PAGES                                ((VMX_V_AUTOMSR_AREA_SIZE) >> X86_PAGE_4K_SHIFT)
     2980
     2981/** The highest index value used for supported virtual VMCS field encoding. */
     2982#define VMX_V_VMCS_MAX_INDEX                                    RT_BF_GET(VMX_VMCS64_CTRL_TSC_MULTIPLIER_HIGH, VMX_BF_VMCS_ENC_INDEX)
    29762983
    29772984/**
     
    37613768    kVmxVDiag_Vmentry_HostSysenterEspEip,
    37623769    kVmxVDiag_Vmentry_LongModeCS,
     3770    kVmxVDiag_Vmentry_MsrLoad,
     3771    kVmxVDiag_Vmentry_MsrLoadCount,
     3772    kVmxVDiag_Vmentry_MsrLoadPtrReadPhys,
     3773    kVmxVDiag_Vmentry_MsrLoadRing3,
     3774    kVmxVDiag_Vmentry_MsrLoadRsvd,
    37633775    kVmxVDiag_Vmentry_NmiWindowExit,
    37643776    kVmxVDiag_Vmentry_PinCtlsAllowed1,
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