VirtualBox

Changeset 36416 in vbox


Ignore:
Timestamp:
Mar 24, 2011 6:25:59 PM (14 years ago)
Author:
vboxsync
Message:

PGMRZDynMap.cpp: Committed a slightly modified version of pgm_dynmap.patch. See #3862.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMRZ/PGMRZDynMap.cpp

    r35346 r36416  
    55
    66/*
    7  * Copyright (C) 2008-2010 Oracle Corporation
     7 * Copyright (C) 2008-2011 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    206206    /** The number of references. */
    207207    int32_t volatile            cRefs;
     208#ifndef IN_RC
    208209    /** PTE pointer union. */
    209210    union PGMR0DYNMAPENTRY_PPTE
     
    216217        void                   *pv;
    217218    } uPte;
     219#else
     220    /** PTE pointers. */
     221    struct PGMR0DYNMAPENTRY_PPTE
     222    {
     223        /** PTE pointer, 32-bit legacy version. */
     224        PX86PTE                 pLegacy;
     225        /** PTE pointer, PAE version. */
     226        PX86PTEPAE              pPae;
     227    } uPte;
     228#endif
    218229# ifndef IN_RC
    219230    /** CPUs that haven't invalidated this entry after it's last update. */
     
    248259    /** The cache size given as a number of pages. */
    249260    uint32_t                    cPages;
     261# ifndef IN_RC
    250262    /** Whether it's 32-bit legacy or PAE/AMD64 paging mode. */
    251263    bool                        fLegacyMode;
     264# endif
    252265    /** The current load.
    253266     * This does not include guard pages. */
     
    12771290    pThis->paPages      = RT_ALIGN_PT(pThis + 1, 32, PPGMRZDYNMAPENTRY);
    12781291    pThis->cPages       = cPages;
    1279     pThis->fLegacyMode  = PGMGetHostMode(pVM) == PGMMODE_32_BIT;
    12801292    pThis->cLoad        = 0;
    12811293    pThis->cMaxLoad     = 0;
     
    12881300        pThis->paPages[iPage].pvPage = pVM->pgm.s.pbDynPageMapBaseGC + iPage * PAGE_SIZE;
    12891301        pThis->paPages[iPage].cRefs  = 0;
    1290         if (pThis->fLegacyMode)
    1291             pThis->paPages[iPage].uPte.pLegacy = &pVM->pgm.s.paDynPageMap32BitPTEsGC[iPage];
    1292         else
    1293             pThis->paPages[iPage].uPte.pPae    = (PX86PTEPAE)&pVM->pgm.s.paDynPageMapPaePTEsGC[iPage];
     1302        pThis->paPages[iPage].uPte.pLegacy = &pVM->pgm.s.paDynPageMap32BitPTEsGC[iPage];
     1303        pThis->paPages[iPage].uPte.pPae    = (PX86PTEPAE)&pVM->pgm.s.paDynPageMapPaePTEsGC[iPage];
    12941304    }
    12951305
     
    14221432#ifndef IN_RC
    14231433    RTCpuSetFill(&paPages[iFreePage].PendingSet);
    1424 #endif
     1434
    14251435    if (pThis->fLegacyMode)
     1436#endif
    14261437    {
    14271438        X86PGUINT       uOld  = paPages[iFreePage].uPte.pLegacy->u;
     
    14341445        Assert(paPages[iFreePage].uPte.pLegacy->u == uNew);
    14351446    }
     1447#ifndef IN_RC
    14361448    else
     1449#endif
    14371450    {
    14381451        X86PGPAEUINT    uOld  = paPages[iFreePage].uPte.pPae->u;
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