VirtualBox

Changeset 16882 in vbox for trunk


Ignore:
Timestamp:
Feb 18, 2009 10:11:10 AM (16 years ago)
Author:
vboxsync
Message:

VBOX_WITH_PGMPOOL_PAGING_ONLY: deal with missing PDPEs

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/PGMInternal.h

    r16879 r16882  
    29832983void            pgmMapSetShadowPDEs(PVM pVM, PPGMMAPPING pMap, unsigned iNewPDE);
    29842984int             pgmMapDeactivateCR3(PVM pVM, PPGMPOOLPAGE pShwPageCR3);
    2985 #endif
     2985int             pgmShwSyncPaePDPtr(PVM pVM, RTGCPTR GCPtr, PX86PDPE pGstPdpe, PX86PDPAE *ppPD);
     2986#endif
     2987#ifndef IN_RC
     2988int             pgmShwSyncLongModePDPtr(PVM pVM, RTGCPTR64 GCPtr, PX86PML4E pGstPml4e, PX86PDPE pGstPdpe, PX86PDPAE *ppPD);
     2989#endif
     2990int             pgmShwGetEPTPDPtr(PVM pVM, RTGCPTR64 GCPtr, PEPTPDPT *ppPdpt, PEPTPD *ppPD);
    29862991
    29872992__END_DECLS
  • trunk/src/VBox/VMM/VMMAll/PGMAll.cpp

    r16865 r16882  
    7070*******************************************************************************/
    7171DECLINLINE(int) pgmShwGetLongModePDPtr(PVM pVM, RTGCPTR64 GCPtr, PX86PML4E *ppPml4e, PX86PDPT *ppPdpt, PX86PDPAE *ppPD);
    72 DECLINLINE(int) pgmShwSyncLongModePDPtr(PVM pVM, RTGCPTR64 GCPtr, PX86PML4E pGstPml4e, PX86PDPE pGstPdpe, PX86PDPAE *ppPD);
    73 DECLINLINE(int) pgmShwGetEPTPDPtr(PVM pVM, RTGCPTR64 GCPtr, PEPTPDPT *ppPdpt, PEPTPD *ppPD);
    7472DECLINLINE(int) pgmShwGetPAEPDPtr(PVM pVM, RTGCPTR GCPtr, PX86PDPT *ppPdpt, PX86PDPAE *ppPD);
    7573#ifdef VBOX_WITH_PGMPOOL_PAGING_ONLY
    7674DECLINLINE(int) pgmShwGetPaePoolPagePD(PPGM pPGM, RTGCPTR GCPtr, PPGMPOOLPAGE *ppShwPde);
    77 DECLINLINE(int) pgmShwSyncPaePDPtr(PVM pVM, RTGCPTR GCPtr, PX86PDPE pGstPdpe, PX86PDPAE *ppPD);
    7875#endif
    7976
     
    870867 * @param   ppPD        Receives address of page directory
    871868 */
    872 DECLINLINE(int) pgmShwSyncPaePDPtr(PVM pVM, RTGCPTR GCPtr, PX86PDPE pGstPdpe, PX86PDPAE *ppPD)
     869int pgmShwSyncPaePDPtr(PVM pVM, RTGCPTR GCPtr, PX86PDPE pGstPdpe, PX86PDPAE *ppPD)
    873870{
    874871    const unsigned iPdPt    = (GCPtr >> X86_PDPT_SHIFT) & X86_PDPT_MASK_PAE;
     
    976973 * @param   ppPD        Receives address of page directory
    977974 */
    978 DECLINLINE(int) pgmShwSyncLongModePDPtr(PVM pVM, RTGCPTR64 GCPtr, PX86PML4E pGstPml4e, PX86PDPE pGstPdpe, PX86PDPAE *ppPD)
     975int pgmShwSyncLongModePDPtr(PVM pVM, RTGCPTR64 GCPtr, PX86PML4E pGstPml4e, PX86PDPE pGstPdpe, PX86PDPAE *ppPD)
    979976{
    980977    PPGM           pPGM          = &pVM->pgm.s;
     
    11641161 * @param   ppPD        Receives address of page directory
    11651162 */
    1166 DECLINLINE(int) pgmShwGetEPTPDPtr(PVM pVM, RTGCPTR64 GCPtr, PEPTPDPT *ppPdpt, PEPTPD *ppPD)
     1163int pgmShwGetEPTPDPtr(PVM pVM, RTGCPTR64 GCPtr, PEPTPDPT *ppPdpt, PEPTPD *ppPD)
    11671164{
    11681165    PPGM           pPGM  = &pVM->pgm.s;
  • trunk/src/VBox/VMM/VMMAll/PGMAllMap.cpp

    r16843 r16882  
    270270                Assert(pShwPdpt);
    271271                pShwPaePd = pgmShwGetPaePDPtr(&pVM->pgm.s, (iPdPt << X86_PDPT_SHIFT));
     272#ifdef VBOX_WITH_PGMPOOL_PAGING_ONLY
     273                if (!pShwPaePd)
     274                {
     275                    X86PDPE GstPdpe;
     276
     277                    if (PGMGetGuestMode(pVM) < PGMMODE_PAE)
     278                    {
     279                        /* Fake PDPT entry; access control handled on the page table level, so allow everything. */
     280                        GstPdpe.u  = X86_PDPE_P;   /* rw/us are reserved for PAE pdpte's; accessed bit causes invalid VT-x guest state errors */
     281                    }
     282                    else
     283                    {
     284                        PX86PDPE pGstPdpe;
     285                        pGstPdpe = pgmGstGetPaePDPEPtr(&pVM->pgm.s, (iPdPt << X86_PDPT_SHIFT));
     286                        AssertFatal(pGstPdpe);
     287                        GstPdpe = *pGstPdpe;
     288                    }
     289                    rc = pgmShwSyncPaePDPtr(pVM, (iPdPt << X86_PDPT_SHIFT), &GstPdpe, &pShwPaePd);
     290                }
     291#endif
    272292                AssertFatal(pShwPaePd);
    273293
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