VirtualBox

Changeset 17611 in vbox for trunk


Ignore:
Timestamp:
Mar 10, 2009 10:15:50 AM (16 years ago)
Author:
vboxsync
Message:

Fixed PAE PDPT dereferencing.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMAll/PGMAllPool.cpp

    r17595 r17611  
    34993499}
    35003500
    3501 
    3502 /**
    3503  * Clear references to shadowed pages in a 64-bit page directory pointer table.
     3501/**
     3502 * Clear references to shadowed pages in a PAE page directory pointer table.
    35043503 *
    35053504 * @param   pPool       The pool.
     
    35073506 * @param   pShwPDPT   The shadow page directory pointer table (mapping of the page).
    35083507 */
    3509 DECLINLINE(void) pgmPoolTrackDerefPDPT64Bit(PPGMPOOL pPool, PPGMPOOLPAGE pPage, PX86PDPT pShwPDPT)
    3510 {
    3511     for (unsigned i = 0; i < RT_ELEMENTS(pShwPDPT->a); i++)
     3508DECLINLINE(void) pgmPoolTrackDerefPDPTPae(PPGMPOOL pPool, PPGMPOOLPAGE pPage, PX86PDPT pShwPDPT)
     3509{
     3510    for (unsigned i = 0; i < X86_PG_PAE_PDPE_ENTRIES; i++)
    35123511    {
    35133512        if (    pShwPDPT->a[i].n.u1Present
    35143513            &&  !(pShwPDPT->a[i].u & PGM_PLXFLAGS_MAPPING)
    35153514           )
     3515        {
     3516            PPGMPOOLPAGE pSubPage = (PPGMPOOLPAGE)RTAvloHCPhysGet(&pPool->HCPhysTree, pShwPDPT->a[i].u & X86_PDPE_PG_MASK);
     3517            if (pSubPage)
     3518                pgmPoolTrackFreeUser(pPool, pSubPage, pPage->idx, i);
     3519            else
     3520                AssertFatalMsgFailed(("%RX64\n", pShwPDPT->a[i].u & X86_PDPE_PG_MASK));
     3521        }
     3522    }
     3523}
     3524
     3525
     3526/**
     3527 * Clear references to shadowed pages in a 64-bit page directory pointer table.
     3528 *
     3529 * @param   pPool       The pool.
     3530 * @param   pPage       The page.
     3531 * @param   pShwPDPT   The shadow page directory pointer table (mapping of the page).
     3532 */
     3533DECLINLINE(void) pgmPoolTrackDerefPDPT64Bit(PPGMPOOL pPool, PPGMPOOLPAGE pPage, PX86PDPT pShwPDPT)
     3534{
     3535    for (unsigned i = 0; i < RT_ELEMENTS(pShwPDPT->a); i++)
     3536    {
     3537        Assert(!(pShwPDPT->a[i].u & PGM_PLXFLAGS_MAPPING));
     3538        if (pShwPDPT->a[i].n.u1Present)
    35163539        {
    35173540            PPGMPOOLPAGE pSubPage = (PPGMPOOLPAGE)RTAvloHCPhysGet(&pPool->HCPhysTree, pShwPDPT->a[i].u & X86_PDPE_PG_MASK);
     
    37153738        case PGMPOOLKIND_PAE_PDPT:
    37163739        case PGMPOOLKIND_PAE_PDPT_PHYS:
     3740            pgmPoolTrackDerefPDPTPae(pPool, pPage, (PX86PDPT)pvShw);
     3741            break;
     3742
    37173743        case PGMPOOLKIND_64BIT_PDPT_FOR_PHYS:
    37183744        case PGMPOOLKIND_64BIT_PDPT_FOR_64BIT_PDPT:
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