VirtualBox

Changeset 17612 in vbox


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

Always clear pdpt flag when freeing the hypervisor mappings

File:
1 edited

Legend:

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

    r17596 r17612  
    296296                    }
    297297                }
    298                 AssertFatal(pShwPaePd);
     298                Assert(pShwPaePd);
    299299
    300300                PPGMPOOLPAGE pPoolPagePd = pgmPoolGetPageByHCPhys(pVM, pShwPdpt->a[iPdPt].u & X86_PDPE_PG_MASK);
     
    411411                pShwPaePd = pgmShwGetPaePDPtr(&pVM->pgm.s, pShwPdpt, (iPdpt << X86_PDPT_SHIFT));
    412412
     413                /* Clear the PGM_PDFLAGS_MAPPING flag for the page directory pointer entry. (legacy PAE guest mode) */
     414                pShwPdpt->a[iPdpt].u &= ~PGM_PLXFLAGS_MAPPING;
     415
    413416                if (pCurrentShwPdpt)
    414417                {
    415418                    /* If the page directory of the old CR3 is reused in the new one, then don't clear the hypervisor mappings. */
    416419                    if ((pCurrentShwPdpt->a[iPdpt].u & X86_PDPE_PG_MASK) == (pShwPdpt->a[iPdpt].u & X86_PDPE_PG_MASK))
     420                    {
     421                        LogFlow(("pgmMapClearShadowPDEs: Pdpe %d reused -> don't clear hypervisor mappings!\n", iPdpt));
    417422                        break;
     423                    }
    418424                }
    419425                AssertFatal(pShwPaePd);
     
    427433                Assert(!pShwPaePd->a[iPDE].n.u1Present || (pShwPaePd->a[iPDE].u & PGM_PDFLAGS_MAPPING));
    428434                pShwPaePd->a[iPDE].u = 0;
    429                 /* Clear the PGM_PDFLAGS_MAPPING flag for the page directory pointer entry. (legacy PAE guest mode) */
    430                 pShwPdpt->a[iPdpt].u &= ~PGM_PLXFLAGS_MAPPING;
    431435
    432436                PPGMPOOLPAGE pPoolPagePd = pgmPoolGetPageByHCPhys(pVM, pShwPdpt->a[iPdpt].u & X86_PDPE_PG_MASK);
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