VirtualBox

Changeset 33780 in vbox for trunk/src


Ignore:
Timestamp:
Nov 4, 2010 3:54:03 PM (14 years ago)
Author:
vboxsync
Message:

During state loading; don't free a zero page if it's part of a large page.

Location:
trunk/src/VBox/VMM
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/PGMPhys.cpp

    r33726 r33780  
    41184118        return VMSetError(pVM, VERR_PGM_PHYS_NOT_RAM, RT_SRC_POS, "GCPhys=%RGp type=%d", GCPhys, PGM_PAGE_GET_TYPE(pPage));
    41194119    }
     4120    Assert(PGM_PAGE_GET_PDE_TYPE(pPage) != PGM_PAGE_PDE_TYPE_PDE);
    41204121
    41214122    if (    PGM_PAGE_IS_ZERO(pPage)
  • trunk/src/VBox/VMM/PGMSavedState.cpp

    r33540 r33780  
    26442644                            break;
    26452645                        AssertLogRelMsgReturn(PGM_PAGE_GET_STATE(pPage) == PGM_PAGE_STATE_ALLOCATED, ("GCPhys=%RGp %R[pgmpage]\n", GCPhys, pPage), VERR_INTERNAL_ERROR_5);
    2646                         /* Allocated before (prealloc), so free it now. */
    2647                         rc = pgmPhysFreePage(pVM, pReq, &cPendingPages, pPage, GCPhys);
    2648                         AssertRC(rc);
     2646
     2647                        /* Free it only if it's not part of a previously allocated large page. */
     2648                        if (PGM_PAGE_GET_PDE_TYPE(pPage) != PGM_PAGE_PDE_TYPE_PDE)
     2649                        {
     2650                            /* Allocated before (prealloc), so free it now. */
     2651                            rc = pgmPhysFreePage(pVM, pReq, &cPendingPages, pPage, GCPhys);
     2652                            AssertRC(rc);
     2653                        }
    26492654                        break;
    26502655                    }
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