VirtualBox

Ignore:
Timestamp:
Jun 11, 2008 12:25:36 PM (17 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
31923
Message:

X86_CR4_PSE changes for long mode (bit is ignored there)

File:
1 edited

Legend:

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

    r9575 r9606  
    194194
    195195    if (    !Pde.b.u1Size
    196         ||  !(CPUMGetGuestCR4(pVM) & X86_CR4_PSE))
     196# if PGM_GST_TYPE != PGM_TYPE_AMD64
     197        ||  !(CPUMGetGuestCR4(pVM) & X86_CR4_PSE)
     198# endif
     199        )
    197200    {
    198201        PGSTPT pPT;
     
    276279         * Get the PD entry.
    277280         */
    278 #if PGM_GST_TYPE == PGM_TYPE_32BIT
     281# if PGM_GST_TYPE == PGM_TYPE_32BIT
    279282        PX86PDE pPde = &CTXSUFF(pVM->pgm.s.pGuestPD)->a[GCPtr >> X86_PD_SHIFT];
    280 #elif PGM_GST_TYPE == PGM_TYPE_PAE
     283# elif PGM_GST_TYPE == PGM_TYPE_PAE
    281284        /* pgmGstGetPaePDEPtr will return 0 if the PDPTE is marked as not present
    282285         * All the other bits in the PDPTE are only valid in long mode (r/w, u/s, nx)
     
    286289        if (!pPde)
    287290            return VERR_PAGE_TABLE_NOT_PRESENT;
    288 #elif PGM_GST_TYPE == PGM_TYPE_AMD64
     291# elif PGM_GST_TYPE == PGM_TYPE_AMD64
    289292        /** @todo Setting the r/w, u/s & nx bits might have no effect depending on the pdpte & pml4 values */
    290293        PX86PDEPAE pPde = pgmGstGetLongModePDEPtr(&pVM->pgm.s, GCPtr);
     
    292295        if (!pPde)
    293296            return VERR_PAGE_TABLE_NOT_PRESENT;
    294 #endif
     297# endif
    295298        GSTPDE Pde = *pPde;
    296299        Assert(Pde.n.u1Present);
     
    299302
    300303        if (    !Pde.b.u1Size
    301             ||  !(CPUMGetGuestCR4(pVM) & X86_CR4_PSE))
     304# if PGM_GST_TYPE != PGM_TYPE_AMD64
     305            ||  !(CPUMGetGuestCR4(pVM) & X86_CR4_PSE)
     306# endif
     307            )
    302308        {
    303309            /*
     
    728734        if (Pde.n.u1Present)
    729735        {
    730             if (!Pde.b.u1Size || !(pState->cr4 & X86_CR4_PSE))
     736            if (    !Pde.b.u1Size
     737# if PGM_GST_TYPE != PGM_TYPE_AMD64
     738                ||  !(pState->cr4 & X86_CR4_PSE)
     739# endif
     740                )
    731741            {
    732742                /*
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