VirtualBox

Changeset 2276 in vbox for trunk


Ignore:
Timestamp:
Apr 20, 2007 2:07:09 PM (18 years ago)
Author:
vboxsync
Message:

VerifyAccessSyncPage: shadow PD might not be present.

File:
1 edited

Legend:

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

    r2274 r2276  
    24032403    LogFlow(("VerifyAccessSyncPage: GCPtrPage=%VGv fPage=%#x uErr=%#x\n", GCPtrPage, fPage, uErr));
    24042404
    2405 #if PGM_GST_TYPE == PGM_TYPE_32BIT
     2405#if (PGM_GST_TYPE == PGM_TYPE_32BIT ||  PGM_GST_TYPE == PGM_TYPE_REAL ||  PGM_GST_TYPE == PGM_TYPE_PROT) && PGM_SHW_TYPE != PGM_TYPE_AMD64
    24062406
    24072407# if PGM_SHW_TYPE != PGM_TYPE_32BIT && PGM_SHW_TYPE != PGM_TYPE_PAE
     
    24272427    int         rc = VINF_SUCCESS;
    24282428
    2429 # ifdef PGM_SYNC_DIRTY_BIT
    2430     /*
    2431      * First check if the page fault was caused by dirty bit tracking
    2432      */
    2433 #  if PGM_SHW_TYPE == PGM_TYPE_32BIT
     2429    /*
     2430     * First check if the shadow pd is present.
     2431     */
     2432# if PGM_SHW_TYPE == PGM_TYPE_32BIT
    24342433    PX86PDE     pPdeDst = &pVM->pgm.s.CTXMID(p,32BitPD)->a[GCPtrPage >> X86_PD_SHIFT];
    2435 #  else
     2434# else
    24362435    PX86PDEPAE  pPdeDst = &pVM->pgm.s.CTXMID(ap,PaePDs)[0]->a[GCPtrPage >> X86_PD_PAE_SHIFT];
    2437 #  endif
     2436# endif
     2437    if (!pPdeDst->n.u1Present)
     2438    {
     2439        rc = PGM_BTH_NAME(SyncPT)(pVM, iPDSrc, pPDSrc, GCPtrPage);
     2440        AssertRC(rc);
     2441        if (rc != VINF_SUCCESS)
     2442            return rc;
     2443    }
     2444
     2445# if PGM_WITH_PAGING(PGM_GST_TYPE)
     2446    /* Check for dirty bit fault */
    24382447    rc = PGM_BTH_NAME(CheckPageFault)(pVM, uErr, pPdeDst, &pPDSrc->a[iPDSrc], GCPtrPage);
    24392448    if (rc == VINF_PGM_HANDLED_DIRTY_BIT_FAULT)
    24402449        Log(("PGMVerifyAccess: success (dirty)\n"));
    24412450    else
    2442 # endif /* PGM_SYNC_DIRTY_BIT */
    2443     {
     2451    {
     2452        VBOXPDE PdeSrc = pPDSrc->a[iPDSrc];
     2453#else
     2454    {
     2455        VBOXPDE PdeSrc;
     2456        PdeSrc.au32[0]      = 0; /* faked so we don't have to #ifdef everything */
     2457        PdeSrc.n.u1Present  = 1;
     2458        PdeSrc.n.u1Write    = 1;
     2459        PdeSrc.n.u1Accessed = 1;
     2460        PdeSrc.n.u1User     = 1;
     2461
     2462#endif /* PGM_WITH_PAGING(PGM_GST_TYPE) */
    24442463        Assert(rc != VINF_EM_RAW_GUEST_TRAP);
    24452464        if (uErr & X86_TRAP_PF_US)
     
    24482467            STAM_COUNTER_INC(&pVM->pgm.s.StatGCPageOutOfSyncSupervisor);
    24492468
    2450         rc = PGM_BTH_NAME(SyncPage)(pVM, pPDSrc->a[iPDSrc], GCPtrPage, 1, 0);
     2469        rc = PGM_BTH_NAME(SyncPage)(pVM, PdeSrc, GCPtrPage, 1, 0);
    24512470        if (VBOX_SUCCESS(rc))
    24522471        {
     
    24612480        }
    24622481    }
    2463     return rc;
    2464 
    2465 #elif PGM_GST_TYPE == PGM_TYPE_REAL || PGM_GST_TYPE == PGM_TYPE_PROT
    2466 
    2467     VBOXPDE PdeSrc;
    2468     PdeSrc.au32[0]      = 0; /* faked so we don't have to #ifdef everything */
    2469     PdeSrc.n.u1Present  = 1;
    2470     PdeSrc.n.u1Write    = 1;
    2471     PdeSrc.n.u1Accessed = 1;
    2472     PdeSrc.n.u1User     = 1;
    2473 
    2474     int rc = PGM_BTH_NAME(SyncPage)(pVM, PdeSrc, GCPtrPage, 1, 0);
    2475     AssertRC(rc);
    2476 
    2477     /* Everything is allowed */
    24782482    return rc;
    24792483
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