VirtualBox

Changeset 87563 in vbox for trunk/src/VBox/VMM/VMMAll


Ignore:
Timestamp:
Feb 3, 2021 1:23:13 PM (4 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
142590
Message:

VMM/HM: Moved the 'ForRing3' and 'ForLog' bits to the back of the HM structure. Configuration bits too, except for VMX/SVM specific ones as those fit in alignment space (can be moved later if needed). bugref:9217

Location:
trunk/src/VBox/VMM/VMMAll
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMAll/HMAll.cpp

    r87547 r87563  
    683683
    684684        if (   pVM->hm.s.vmx.fSupported
    685             && (  CTX_EXPR(pVM->hm.s.vmx.MsrsForRing3.ProcCtls.n.allowed1, g_HmMsrs.u.vmx.ProcCtls.n.allowed1, RT_NOTHING)
     685            && (  CTX_EXPR(pVM->hm.s.ForR3.vmx.Msrs.ProcCtls.n.allowed1, g_HmMsrs.u.vmx.ProcCtls.n.allowed1, RT_NOTHING)
    686686                & VMX_PROC_CTLS_USE_MSR_BITMAPS))
    687687            return true;
  • trunk/src/VBox/VMM/VMMAll/HMSVMAll.cpp

    r87538 r87563  
    186186    bool const fVGif    = RT_BOOL(g_fHmSvmFeatures & X86_CPUID_SVM_FEATURE_EDX_VGIF);
    187187#else
    188     bool const fVGif    = RT_BOOL(pVM->hm.s.svm.fFeaturesForRing3 & X86_CPUID_SVM_FEATURE_EDX_VGIF);
     188    bool const fVGif    = RT_BOOL(pVM->hm.s.ForR3.svm.fFeatures & X86_CPUID_SVM_FEATURE_EDX_VGIF);
    189189#endif
    190190    return fVGif && pVM->hm.s.svm.fVGif;
  • trunk/src/VBox/VMM/VMMAll/HMVMXAll.cpp

    r87547 r87563  
    768768    {
    769769        /* If bit N is set in cr0_fixed0, then it must be set in the guest's cr0. */
    770         uint32_t uCr0Mask = (uint32_t)CTX_EXPR(pVM->hm.s.vmx.MsrsForRing3.u64Cr0Fixed0, g_HmMsrs.u.vmx.u64Cr0Fixed0, RT_NOTHING);
     770        uint32_t uCr0Mask = (uint32_t)CTX_EXPR(pVM->hm.s.ForR3.vmx.Msrs.u64Cr0Fixed0, g_HmMsrs.u.vmx.u64Cr0Fixed0, RT_NOTHING);
    771771
    772772        /* We ignore the NE bit here on purpose; see HMR0.cpp for details. */
     
    787787
    788788        /* If bit N is cleared in cr0_fixed1, then it must be zero in the guest's cr0. */
    789         uCr0Mask = (uint32_t)~CTX_EXPR(pVM->hm.s.vmx.MsrsForRing3.u64Cr0Fixed1, g_HmMsrs.u.vmx.u64Cr0Fixed1, RT_NOTHING);
     789        uCr0Mask = (uint32_t)~CTX_EXPR(pVM->hm.s.ForR3.vmx.Msrs.u64Cr0Fixed1, g_HmMsrs.u.vmx.u64Cr0Fixed1, RT_NOTHING);
    790790        if ((pCtx->cr0 & uCr0Mask) != 0)
    791791            return false;
    792792
    793793        /* If bit N is set in cr4_fixed0, then it must be set in the guest's cr4. */
    794         uCr0Mask  = (uint32_t)CTX_EXPR(pVM->hm.s.vmx.MsrsForRing3.u64Cr4Fixed0, g_HmMsrs.u.vmx.u64Cr4Fixed0, RT_NOTHING);
     794        uCr0Mask  = (uint32_t)CTX_EXPR(pVM->hm.s.ForR3.vmx.Msrs.u64Cr4Fixed0, g_HmMsrs.u.vmx.u64Cr4Fixed0, RT_NOTHING);
    795795        uCr0Mask &= ~X86_CR4_VMXE;
    796796        if ((pCtx->cr4 & uCr0Mask) != uCr0Mask)
     
    798798
    799799        /* If bit N is cleared in cr4_fixed1, then it must be zero in the guest's cr4. */
    800         uCr0Mask = (uint32_t)~CTX_EXPR(pVM->hm.s.vmx.MsrsForRing3.u64Cr4Fixed1, g_HmMsrs.u.vmx.u64Cr4Fixed1, RT_NOTHING);
     800        uCr0Mask = (uint32_t)~CTX_EXPR(pVM->hm.s.ForR3.vmx.Msrs.u64Cr4Fixed1, g_HmMsrs.u.vmx.u64Cr4Fixed1, RT_NOTHING);
    801801        if ((pCtx->cr4 & uCr0Mask) != 0)
    802802            return false;
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette