VirtualBox

Changeset 96736 in vbox


Ignore:
Timestamp:
Sep 14, 2022 11:57:13 AM (2 years ago)
Author:
vboxsync
Message:

VMM/PGM: Nested VMX: bugref:10092 Adjusted guest EPT masks and comments.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMR3/PGM.cpp

    r96407 r96736  
    17201720        pVCpu->pgm.s.fGstEptMbzBigPdpteMask   = fMbzPageFrameMask | fGstEptMbzBigPdpteMask;
    17211721        pVCpu->pgm.s.fGstEptMbzPml4eMask      = fMbzPageFrameMask | EPT_PML4E_MBZ_MASK;
    1722         pVCpu->pgm.s.fGstEptPresentMask       = EPT_PRESENT_MASK;
    1723 
    1724         /* If any of the features (in the assert below) are enabled, we would have to shadow the relevant bits. */
     1722
     1723        /* If any of the features in the assert below are enabled, additional bits would need to be shadowed. */
    17251724        Assert(   !pVM->cpum.ro.GuestFeatures.fVmxModeBasedExecuteEpt
    17261725               && !pVM->cpum.ro.GuestFeatures.fVmxSppEpt
     
    17281727               && !(fEptVpidCap & MSR_IA32_VMX_EPT_VPID_CAP_ACCESS_DIRTY));
    17291728        /* We need to shadow reserved bits as guest EPT tables can set them to trigger EPT misconfigs.  */
    1730         pVCpu->pgm.s.fGstEptShadowedPteMask   = GCPhysRsvdAddrMask | EPT_PRESENT_MASK | EPT_E_MEMTYPE_MASK;
    1731         pVCpu->pgm.s.fGstEptShadowedPdeMask   = GCPhysRsvdAddrMask | EPT_PRESENT_MASK | EPT_E_MEMTYPE_MASK | EPT_E_LEAF;
    1732         pVCpu->pgm.s.fGstEptShadowedPdpteMask = GCPhysRsvdAddrMask | EPT_PRESENT_MASK | EPT_E_MEMTYPE_MASK | EPT_E_LEAF;
     1729        pVCpu->pgm.s.fGstEptShadowedPteMask   = GCPhysRsvdAddrMask | EPT_PRESENT_MASK | EPT_E_MEMTYPE_MASK | EPT_E_IGNORE_PAT;
     1730        pVCpu->pgm.s.fGstEptShadowedPdeMask   = GCPhysRsvdAddrMask | EPT_PRESENT_MASK | EPT_E_MEMTYPE_MASK | EPT_E_IGNORE_PAT | EPT_E_LEAF;
     1731        pVCpu->pgm.s.fGstEptShadowedPdpteMask = GCPhysRsvdAddrMask | EPT_PRESENT_MASK | EPT_E_MEMTYPE_MASK | EPT_E_IGNORE_PAT | EPT_E_LEAF;
    17331732        pVCpu->pgm.s.fGstEptShadowedPml4eMask = GCPhysRsvdAddrMask | EPT_PRESENT_MASK | EPT_PML4E_MBZ_MASK;
     1733        /* If mode-based execute control for EPT is enabled, we would need to include bit 10 in the present mask. */
     1734        pVCpu->pgm.s.fGstEptPresentMask       = EPT_PRESENT_MASK;
    17341735#endif
    17351736    }
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