VirtualBox

Changeset 29510 in vbox


Ignore:
Timestamp:
May 17, 2010 8:57:02 AM (15 years ago)
Author:
vboxsync
Message:

Deal with freed shared pages

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMR0/GMMR0.cpp

    r29509 r29510  
    37763776            if (pGlobalRegion->paHCPhysPageID[i] == NIL_GMM_PAGEID)
    37773777            {
     3778new_shared_page:
    37783779                /* Easy case: just change the internal page type. */
    37793780                PGMMPAGE pPage = gmmR0GetPage(pGMM, paPageDesc[i].uHCPhysPageId);
     
    38093810                    goto end;
    38103811                }
    3811                 Assert(pPage->Common.u2State == GMM_PAGE_STATE_SHARED);
     3812                if (pPage->Common.u2State != GMM_PAGE_STATE_SHARED)
     3813                {
     3814                    /* Page was freed at some point; invalidate this entry. */
     3815                    /** todo this isn't really bullet proof. */
     3816                    Log(("Old shared page was freed -> create a new one\n"));
     3817                    pGlobalRegion->paHCPhysPageID[i] = NIL_GMM_PAGEID;
     3818                    goto new_shared_page; /* ugly goto */
     3819                }
    38123820
    38133821                Log(("Replace existing page guest %RGp host %RHp -> %RHp\n", paPageDesc[i].GCPhys, paPageDesc[i].HCPhys, pPage->Shared.pfn << PAGE_SHIFT));
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