VirtualBox

Changeset 103583 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Feb 27, 2024 7:33:35 AM (12 months ago)
Author:
vboxsync
Message:

VMM/PGM: Nested VMX: bugref:10607 Fix EPT permission checks when EPT VPID capability MSR indicates support for execute-only translations.

File:
1 edited

Legend:

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

    r100232 r103583  
    3636 * @param   pVCpu   The cross context virtual CPU structure of the calling EMT.
    3737 * @param   uEntry  The EPT page table entry to check.
     38 *
     39 * @remarks Current this ASSUMES @c uEntry is present (debug asserted)!
    3840 */
    3941DECLINLINE(bool) PGM_GST_SLAT_NAME_EPT(WalkIsPermValid)(PCVMCPUCC pVCpu, uint64_t uEntry)
     
    4143    if (!(uEntry & EPT_E_READ))
    4244    {
     45        if (uEntry & EPT_E_WRITE)
     46            return false;
     47
     48        /*
     49         * Currently all callers of this function check for the present mask prior
     50         * to calling this function. Hence, the execute bit must be set now.
     51         */
     52        Assert(uEntry & EPT_E_EXECUTE);
    4353        Assert(!pVCpu->CTX_SUFF(pVM)->cpum.ro.GuestFeatures.fVmxModeBasedExecuteEpt);
    44         Assert(!RT_BF_GET(pVCpu->pgm.s.uEptVpidCapMsr, VMX_BF_EPT_VPID_CAP_EXEC_ONLY));
    45         NOREF(pVCpu);
    46         if (uEntry & (EPT_E_WRITE | EPT_E_EXECUTE))
    47             return false;
     54        if (pVCpu->pgm.s.uEptVpidCapMsr & VMX_BF_EPT_VPID_CAP_EXEC_ONLY_MASK)
     55            return true;
     56        return false;
    4857    }
    4958    return true;
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