VirtualBox

Changeset 74389 in vbox for trunk/include/VBox


Ignore:
Timestamp:
Sep 20, 2018 4:25:26 PM (6 years ago)
Author:
vboxsync
Message:

VMM/CPUM, IEM, HM: Nested VMX: bugref:9180 VM-exit bits.

Location:
trunk/include/VBox
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/err.h

    r74043 r74389  
    21022102/** Generic VM-entry failure. */
    21032103#define VERR_VMX_VMENTRY_FAILED                     (-4033)
     2104/** Generic VM-exit failure. */
     2105#define VERR_VMX_VMEXIT_FAILED                      (-4034)
    21042106/** @} */
    21052107
  • trunk/include/VBox/vmm/cpumctx.h

    r74337 r74389  
    548548                /** 0x2f8 - Last emulated VMX instruction/VM-exit diagnostic. */
    549549                VMXVDIAG                enmDiag;
    550                 /** 0x2fc - Whether the guest is in VMX root mode. */
     550                /** 0x2fc - VMX abort reason. */
     551                VMXABORT                enmAbort;
     552                /** 0x300 - VMX abort auxiliary information field. */
     553                uint32_t                uAbortAux;
     554                /** 0x304 - Whether the guest is in VMX root mode. */
    551555                bool                    fInVmxRootMode;
    552                 /** 0x2fd - Whether the guest is in VMX non-root mode. */
     556                /** 0x305 - Whether the guest is in VMX non-root mode. */
    553557                bool                    fInVmxNonRootMode;
    554                 /** 0x2fe - Whether the injected events are subjected to event intercepts.  */
     558                /** 0x306 - Whether the injected events are subjected to event intercepts.  */
    555559                bool                    fInterceptEvents;
    556                 bool                    fPadding0;
    557                 /** 0x300 - Cache of the nested-guest current VMCS - R0 ptr. */
     560                bool                    afPadding0[1];
     561                /** 0x308 - Cache of the nested-guest current VMCS - R0 ptr. */
    558562                R0PTRTYPE(PVMXVVMCS)    pVmcsR0;
    559563#if HC_ARCH_BITS == 32
    560564                uint32_t                uVmcsR0Padding;
    561565#endif
    562                 /** 0x308 - Cache of the nested-guest curent VMCS - R3 ptr. */
     566                /** 0x310 - Cache of the nested-guest curent VMCS - R3 ptr. */
    563567                R3PTRTYPE(PVMXVVMCS)    pVmcsR3;
    564568#if HC_ARCH_BITS == 32
    565569                uint32_t                uVmcsR3Padding;
    566570#endif
    567                 /** 0X310 - Cache of the nested-guest shadow VMCS - R0 ptr. */
     571                /** 0X318 - Cache of the nested-guest shadow VMCS - R0 ptr. */
    568572                R0PTRTYPE(PVMXVVMCS)    pShadowVmcsR0;
    569573#if HC_ARCH_BITS == 32
    570574                uint32_t                uShadowVmcsR0Padding;
    571575#endif
    572                 /** 0x318 - Cache of the nested-guest shadow VMCS - R3 ptr. */
     576                /** 0x320 - Cache of the nested-guest shadow VMCS - R3 ptr. */
    573577                R3PTRTYPE(PVMXVVMCS)    pShadowVmcsR3;
    574578#if HC_ARCH_BITS == 32
    575579                uint32_t                uShadowVmcsR3Padding;
    576580#endif
    577                 /** 0x320 - Cache of the nested-guest Virtual-APIC page - R0 ptr. */
     581                /** 0x328 - Cache of the nested-guest Virtual-APIC page - R0 ptr. */
    578582                R0PTRTYPE(void *)       pvVirtApicPageR0;
    579583#if HC_ARCH_BITS == 32
    580584                uint32_t                uVirtApicPageR0Padding;
    581585#endif
    582                 /** 0x328 - Cache of the nested-guest Virtual-APIC page - R3 ptr. */
     586                /** 0x330 - Cache of the nested-guest Virtual-APIC page - R3 ptr. */
    583587                R3PTRTYPE(void *)       pvVirtApicPageR3;
    584588#if HC_ARCH_BITS == 32
    585589                uint32_t                uVirtApicPageR3Padding;
    586590#endif
    587                 /** 0x330 - Cache of the nested-guest VMREAD-bitmap - R0 ptr. */
     591                /** 0x338 - Cache of the nested-guest VMREAD-bitmap - R0 ptr. */
    588592                R0PTRTYPE(void *)       pvVmreadBitmapR0;
    589593#if HC_ARCH_BITS == 32
    590594                uint32_t                uVmreadBitmapR0Padding;
    591595#endif
    592                 /** 0x338 - Cache of the nested-guest VMREAD-bitmap - R3 ptr. */
     596                /** 0x340 - Cache of the nested-guest VMREAD-bitmap - R3 ptr. */
    593597                R3PTRTYPE(void *)       pvVmreadBitmapR3;
    594598#if HC_ARCH_BITS == 32
    595599                uint32_t                uVmreadBitmapR3Padding;
    596600#endif
    597                 /** 0x340 - Cache of the nested-guest VMWRITE-bitmap - R0 ptr. */
     601                /** 0x348 - Cache of the nested-guest VMWRITE-bitmap - R0 ptr. */
    598602                R0PTRTYPE(void *)       pvVmwriteBitmapR0;
    599603#if HC_ARCH_BITS == 32
    600604                uint32_t                uVmwriteBitmapR0Padding;
    601605#endif
    602                 /** 0x348 - Cache of the nested-guest VMWRITE-bitmap - R3 ptr. */
     606                /** 0x350 - Cache of the nested-guest VMWRITE-bitmap - R3 ptr. */
    603607                R3PTRTYPE(void *)       pvVmwriteBitmapR3;
    604608#if HC_ARCH_BITS == 32
    605609                uint32_t                uVmwriteBitmapR3Padding;
    606610#endif
    607                 /** 0x350 - The MSR auto-load/store area - R0 ptr. */
     611                /** 0x358 - The MSR auto-load/store area - R0 ptr. */
    608612                R0PTRTYPE(PVMXAUTOMSR)  pAutoMsrAreaR0;
    609613#if HC_ARCH_BITS == 32
    610614                uint32_t                uAutoMsrAreaR0;
    611615#endif
    612                 /** 0x358 - The MSR auto-load/store area - R3 ptr. */
     616                /** 0x360 - The MSR auto-load/store area - R3 ptr. */
    613617                R3PTRTYPE(PVMXAUTOMSR)  pAutoMsrAreaR3;
    614618#if HC_ARCH_BITS == 32
    615619                uint32_t                uAutoMsrAreaR3;
    616620#endif
    617                 /** 0x360 - Padding. */
    618                 uint8_t             abPadding[0x3f0 - 0x360];
     621                /** 0x368 - Padding. */
     622                uint8_t             abPadding[0x3f0 - 0x368];
    619623            } vmx;
    620624        } CPUM_UNION_NM(s);
     
    699703AssertCompileMemberOffset(CPUMCTX, hwvirt.CPUM_UNION_NM(s.) vmx.GCPhysShadowVmcs,       0x2f0);
    700704AssertCompileMemberOffset(CPUMCTX, hwvirt.CPUM_UNION_NM(s.) vmx.enmDiag,                0x2f8);
    701 AssertCompileMemberOffset(CPUMCTX, hwvirt.CPUM_UNION_NM(s.) vmx.fInVmxRootMode,         0x2fc);
    702 AssertCompileMemberOffset(CPUMCTX, hwvirt.CPUM_UNION_NM(s.) vmx.fInVmxNonRootMode,      0x2fd);
    703 AssertCompileMemberOffset(CPUMCTX, hwvirt.CPUM_UNION_NM(s.) vmx.fInterceptEvents,       0x2fe);
    704 AssertCompileMemberOffset(CPUMCTX, hwvirt.CPUM_UNION_NM(s.) vmx.pVmcsR0,                0x300);
    705 AssertCompileMemberOffset(CPUMCTX, hwvirt.CPUM_UNION_NM(s.) vmx.pVmcsR3,                0x308);
    706 AssertCompileMemberOffset(CPUMCTX, hwvirt.CPUM_UNION_NM(s.) vmx.pShadowVmcsR0,          0x310);
    707 AssertCompileMemberOffset(CPUMCTX, hwvirt.CPUM_UNION_NM(s.) vmx.pShadowVmcsR3,          0x318);
    708 AssertCompileMemberOffset(CPUMCTX, hwvirt.CPUM_UNION_NM(s.) vmx.pvVirtApicPageR0,       0x320);
    709 AssertCompileMemberOffset(CPUMCTX, hwvirt.CPUM_UNION_NM(s.) vmx.pvVirtApicPageR3,       0x328);
    710 AssertCompileMemberOffset(CPUMCTX, hwvirt.CPUM_UNION_NM(s.) vmx.pvVmreadBitmapR0,       0x330);
    711 AssertCompileMemberOffset(CPUMCTX, hwvirt.CPUM_UNION_NM(s.) vmx.pvVmreadBitmapR3,       0x338);
    712 AssertCompileMemberOffset(CPUMCTX, hwvirt.CPUM_UNION_NM(s.) vmx.pvVmwriteBitmapR0,      0x340);
    713 AssertCompileMemberOffset(CPUMCTX, hwvirt.CPUM_UNION_NM(s.) vmx.pvVmwriteBitmapR3,      0x348);
    714 AssertCompileMemberOffset(CPUMCTX, hwvirt.CPUM_UNION_NM(s.) vmx.pAutoMsrAreaR0,         0x350);
    715 AssertCompileMemberOffset(CPUMCTX, hwvirt.CPUM_UNION_NM(s.) vmx.pAutoMsrAreaR3,         0x358);
     705AssertCompileMemberOffset(CPUMCTX, hwvirt.CPUM_UNION_NM(s.) vmx.enmAbort,               0x2fc);
     706AssertCompileMemberOffset(CPUMCTX, hwvirt.CPUM_UNION_NM(s.) vmx.uAbortAux,              0x300);
     707AssertCompileMemberOffset(CPUMCTX, hwvirt.CPUM_UNION_NM(s.) vmx.fInVmxRootMode,         0x304);
     708AssertCompileMemberOffset(CPUMCTX, hwvirt.CPUM_UNION_NM(s.) vmx.fInVmxNonRootMode,      0x305);
     709AssertCompileMemberOffset(CPUMCTX, hwvirt.CPUM_UNION_NM(s.) vmx.fInterceptEvents,       0x306);
     710AssertCompileMemberOffset(CPUMCTX, hwvirt.CPUM_UNION_NM(s.) vmx.pVmcsR0,                0x308);
     711AssertCompileMemberOffset(CPUMCTX, hwvirt.CPUM_UNION_NM(s.) vmx.pVmcsR3,                0x310);
     712AssertCompileMemberOffset(CPUMCTX, hwvirt.CPUM_UNION_NM(s.) vmx.pShadowVmcsR0,          0x318);
     713AssertCompileMemberOffset(CPUMCTX, hwvirt.CPUM_UNION_NM(s.) vmx.pShadowVmcsR3,          0x320);
     714AssertCompileMemberOffset(CPUMCTX, hwvirt.CPUM_UNION_NM(s.) vmx.pvVirtApicPageR0,       0x328);
     715AssertCompileMemberOffset(CPUMCTX, hwvirt.CPUM_UNION_NM(s.) vmx.pvVirtApicPageR3,       0x330);
     716AssertCompileMemberOffset(CPUMCTX, hwvirt.CPUM_UNION_NM(s.) vmx.pvVmreadBitmapR0,       0x338);
     717AssertCompileMemberOffset(CPUMCTX, hwvirt.CPUM_UNION_NM(s.) vmx.pvVmreadBitmapR3,       0x340);
     718AssertCompileMemberOffset(CPUMCTX, hwvirt.CPUM_UNION_NM(s.) vmx.pvVmwriteBitmapR0,      0x348);
     719AssertCompileMemberOffset(CPUMCTX, hwvirt.CPUM_UNION_NM(s.) vmx.pvVmwriteBitmapR3,      0x350);
     720AssertCompileMemberOffset(CPUMCTX, hwvirt.CPUM_UNION_NM(s.) vmx.pAutoMsrAreaR0,         0x358);
     721AssertCompileMemberOffset(CPUMCTX, hwvirt.CPUM_UNION_NM(s.) vmx.pAutoMsrAreaR3,         0x360);
    716722AssertCompileMemberAlignment(CPUMCTX, hwvirt.CPUM_UNION_NM(s.) vmx.pVmcsR0,           8);
    717723AssertCompileMemberAlignment(CPUMCTX, hwvirt.CPUM_UNION_NM(s.) vmx.pShadowVmcsR0,     8);
  • trunk/include/VBox/vmm/hm.h

    r74287 r74389  
    136136VMM_INT_DECL(bool)              HMIsVmxSupported(PVM pVM);
    137137VMM_INT_DECL(const char *)      HMVmxGetDiagDesc(VMXVDIAG enmDiag);
     138VMM_INT_DECL(const char *)      HMVmxGetAbortDesc(VMXABORT enmAbort);
    138139VMM_INT_DECL(void)              HMHCPagingModeChanged(PVM pVM, PVMCPU pVCpu, PGMMODE enmShadowMode, PGMMODE enmGuestMode);
    139140/** @} */
  • trunk/include/VBox/vmm/hm_vmx.h

    r74381 r74389  
    13531353/** @name VMX abort reasons.
    13541354 * See Intel spec. "27.7 VMX Aborts".
     1355 * Update HMVmxGetAbortDesc() if new reasons are added.
    13551356 * @{
    13561357 */
    13571358typedef enum
    13581359{
     1360    /** None - don't use this / uninitialized value. */
     1361    VMXABORT_NONE                 = 0,
     1362    /** VMX abort caused during saving of guest MSRs. */
    13591363    VMXABORT_SAVE_GUEST_MSRS      = 1,
     1364    /** VMX abort caused during host PDPTE checks. */
    13601365    VMXBOART_HOST_PDPTE           = 2,
     1366    /** VMX abort caused due to current VMCS being corrupted. */
    13611367    VMXABORT_CURRENT_VMCS_CORRUPT = 3,
     1368    /** VMX abort caused during loading of host MSRs. */
    13621369    VMXABORT_LOAD_HOST_MSR        = 4,
     1370    /** VMX abort caused due to a machine-check exception during VM-exit. */
    13631371    VMXABORT_MACHINE_CHECK_XCPT   = 5,
    1364     VMXABORT_HOST_LONG_MODE       = 6
     1372    /** VMX abort caused due to invalid return to long mode. */
     1373    VMXABORT_HOST_LONG_MODE       = 6,
     1374    /* Type size hack. */
     1375    VMXABORT_32BIT_HACK           = 0x7fffffff
    13651376} VMXABORT;
     1377AssertCompileSize(VMXABORT, 4);
    13661378/** @} */
    13671379
     
    38223834    kVmxVDiag_Vmentry_VmxRoot,
    38233835    kVmxVDiag_Vmentry_Vpid,
     3836    kVmxVDiag_Vmexit_MsrStore,
     3837    kVmxVDiag_Vmexit_MsrStoreCount,
     3838    kVmxVDiag_Vmexit_MsrStorePtrReadPhys,
     3839    kVmxVDiag_Vmexit_MsrStoreRing3,
     3840    kVmxVDiag_Vmexit_MsrStoreRsvd,
    38243841    /* Last member for determining array index limit. */
    38253842    kVmxVDiag_End
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