VirtualBox

Changeset 92062 in vbox for trunk/src


Ignore:
Timestamp:
Oct 26, 2021 7:34:48 AM (3 years ago)
Author:
vboxsync
Message:

VMM: Nested VMX: bugref:10092 Macro for present paging entry check GST_IS_PGENTRY_PRESENT.

Location:
trunk/src/VBox/VMM
Files:
2 edited

Legend:

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

    r92059 r92062  
    148148        pWalk->Pml4e.u = Pml4e.u = pPml4e->u;
    149149
    150         if (Pml4e.u & X86_PML4E_P) { /* probable */ }
     150        if (GST_IS_PGENTRY_PRESENT(pVCpu, Pml4e)) { /* probable */ }
    151151        else return PGM_GST_NAME(WalkReturnNotPresent)(pVCpu, pWalk, 4);
    152152
     
    210210        pWalk->Pdpe.u = Pdpe.u = pPdpe->u;
    211211
    212         if (Pdpe.u & X86_PDPE_P) { /* probable */ }
     212        if (GST_IS_PGENTRY_PRESENT(pVCpu, Pdpe)) { /* probable */ }
    213213        else return PGM_GST_NAME(WalkReturnNotPresent)(pVCpu, pWalk, 3);
    214214
     
    300300        GSTPDE  Pde;
    301301        pWalk->Pde.u = Pde.u = pPde->u;
    302         if (Pde.u & X86_PDE_P) { /* probable */ }
     302        if (GST_IS_PGENTRY_PRESENT(pVCpu, Pde)) { /* probable */ }
    303303        else return PGM_GST_NAME(WalkReturnNotPresent)(pVCpu, pWalk, 2);
    304304        if ((Pde.u & X86_PDE_PS) && GST_IS_PSE_ACTIVE(pVCpu))
     
    358358        pWalk->Pte.u = Pte.u = pPte->u;
    359359
    360         if (Pte.u & X86_PTE_P) { /* probable */ }
     360        if (GST_IS_PGENTRY_PRESENT(pVCpu, Pte)) { /* probable */ }
    361361        else return PGM_GST_NAME(WalkReturnNotPresent)(pVCpu, pWalk, 1);
    362362
  • trunk/src/VBox/VMM/include/PGMGstDefs.h

    r92046 r92062  
    132132# define GST_IS_BIG_PDPE_VALID(pVCpu, Pdpe)     (true)
    133133# define GST_IS_PML4E_VALID(pVCpu, Pml4e)       (true)
     134# define GST_IS_PGENTRY_PRESENT(pVCpu, Pge)     ((Pge.u) & X86_PTE_P)
    134135# define GST_IS_PSE_ACTIVE(pVCpu)               (false && This_should_not_be_used_in_this_context)
    135136
     
    173174//# define GST_IS_BIG_PDPE_VALID(pVCpu, Pdpe)     (false)
    174175//# define GST_IS_PML4E_VALID(pVCpu, Pml4e)       (false)
     176# define GST_IS_PGENTRY_PRESENT(pVCpu, Pge)     ((Pge.u) & X86_PTE_P)
    175177# define GST_IS_PSE_ACTIVE(pVCpu)               pgmGst32BitIsPageSizeExtActive(pVCpu)
    176178# define GST_IS_NX_ACTIVE(pVCpu)                (false)
     
    236238#  define GST_IS_PML4E_VALID(pVCpu, Pml4e)      (!( (Pml4e).u & (pVCpu)->pgm.s.fGstAmd64MbzPml4eMask ))
    237239# endif
     240# define GST_IS_PGENTRY_PRESENT(pVCpu, Pge)     ((Pge.u) & X86_PTE_P)
    238241# define GST_PT_SHIFT                           X86_PT_PAE_SHIFT
    239242# define GST_PT_MASK                            X86_PT_PAE_MASK
     
    287290# define GST_IS_BIG_PDPE_VALID(pVCpu, Pdpe)     (!( (Pdpe).u  & (pVCpu)->pgm.s.fGstEptMbzBigPdpteMask ))
    288291# define GST_IS_PML4E_VALID(pVCpu, Pml4e)       (!( (Pml4e).u & (pVCpu)->pgm.s.fGstEptMbzPml4eMask ))
    289 # define GST_IS_PGENTRY_PRESENT(pVCpu, Entry)   (!( (Entry).u & (pVCpu)->pgm.s.fGstEptPresentMask ))
     292# define GST_IS_PGENTRY_PRESENT(pVCpu, Pge)     ((Pge).u & (pVCpu)->pgm.s.fGstEptPresentMask)
    290293# define GST_IS_PSE_ACTIVE(pVCpu)               (true)
    291294# define GST_IS_NX_ACTIVE(pVCpu)                (pgmGstIsNoExecuteActive(pVCpu))
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