VirtualBox

Changeset 86458 in vbox for trunk


Ignore:
Timestamp:
Oct 6, 2020 3:09:55 PM (4 years ago)
Author:
vboxsync
Message:

VMM/pgmR0BthEPT*SyncPT: Don't use the bit fields as gcc may sometimes get them wrong (10), use new EPT_E_XXX constants instead. bugref:9841 bugref:9746

File:
1 edited

Legend:

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

    r86453 r86458  
    30393039            if (HCPhys != NIL_RTHCPHYS)
    30403040            {
     3041#  if PGM_SHW_TYPE == PGM_TYPE_EPT
     3042                PdeDst.u = HCPhys | EPT_E_READ | EPT_E_WRITE | EPT_E_EXECUTE | EPT_E_LEAF | EPT_E_IGNORE_PAT | EPT_E_TYPE_WB
     3043                         | (PdeDst.u & X86_PDE_AVL_MASK) /** @todo do we need this? */;
     3044#  else
    30413045                PdeDst.u &= X86_PDE_AVL_MASK;
    30423046                PdeDst.n.u1Present   = 1;
    30433047                PdeDst.n.u1Write     = 1;
    30443048                PdeDst.b.u1Size      = 1;
    3045 #  if  PGM_SHW_TYPE == PGM_TYPE_EPT
    3046                 PdeDst.n.u1Execute   = 1;
    3047                 PdeDst.b.u1IgnorePAT = 1;
    3048                 PdeDst.b.u3EMT       = VMX_EPT_MEMTYPE_WB;
    3049 #  else
    30503049                PdeDst.n.u1User      = 1;
    3051 #  endif
    30523050                PdeDst.u |= HCPhys; /* Note! Must be done last of gcc v10.2.1 20200723 (Red Hat 10.2.1-1) may drop the top 32 bits. */
     3051#  endif
    30533052                SHW_PDE_ATOMIC_SET2(*pPdeDst, PdeDst);
    30543053
     
    31123111
    31133112    /* Save the new PDE. */
     3113# if PGM_SHW_TYPE == PGM_TYPE_EPT
     3114    PdeDst.u = pShwPage->Core.Key | EPT_E_READ | EPT_E_WRITE | EPT_E_EXECUTE
     3115             | (PdeDst.u & X86_PDE_AVL_MASK /** @todo do we really need this? */);
     3116# else
    31143117    PdeDst.u &= X86_PDE_AVL_MASK;
    31153118    PdeDst.n.u1Present  = 1;
    31163119    PdeDst.n.u1Write    = 1;
    3117 # if PGM_SHW_TYPE == PGM_TYPE_EPT
    3118     PdeDst.n.u1Execute  = 1;
    3119 # else
    31203120    PdeDst.n.u1User     = 1;
    31213121    PdeDst.n.u1Accessed = 1;
    3122 # endif
    31233122    PdeDst.u |= pShwPage->Core.Key; /* Note! Must be done last of gcc v10.2.1 20200723 (Red Hat 10.2.1-1) drops the top 32 bits. */
    31243123    /** @todo r=bird: Stop using bitfields.  But we need to defined/find the EPT flags then. */
     3124# endif
    31253125    SHW_PDE_ATOMIC_SET2(*pPdeDst, PdeDst);
    31263126
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