VirtualBox

Changeset 18861 in vbox


Ignore:
Timestamp:
Apr 10, 2009 9:21:46 AM (16 years ago)
Author:
vboxsync
Message:

PGM: Increased saved state version and deal with the MMIO description strings (ignore the strings, unless current saved state).

File:
1 edited

Legend:

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

    r18665 r18861  
    609609*   Defined Constants And Macros                                               *
    610610*******************************************************************************/
    611 /** Saved state data unit version. */
    612 #define PGM_SAVED_STATE_VERSION                 7
    613 /** Saved state data unit version. */
     611/** Saved state data unit version for 2.2.2 and later. */
     612#define PGM_SAVED_STATE_VERSION                 8
     613/** Saved state data unit version for 2.2.0. */
     614#define PGM_SAVED_STATE_VERSION_RR_DESC         7
     615/** Saved state data unit version 2.1.x and earlier. */
    614616#define PGM_SAVED_STATE_VERSION_OLD_PHYS_CODE   6
    615617
     
    25062508     * Load basic data (required / unaffected by relocation).
    25072509     */
    2508     if (u32Version >= PGM_SAVED_STATE_VERSION)
     2510    if (u32Version >= PGM_SAVED_STATE_VERSION_RR_DESC)
    25092511    {
    25102512        rc = SSMR3GetStruct(pSSM, pPGM, &s_aPGMFields[0]);
     
    26292631            return VERR_SSM_DATA_UNIT_FORMAT_CHANGED;
    26302632        }
    2631         char szDesc[256];
     2633        size_t  cchDesc = 0;
     2634        char    szDesc[256];
    26322635        szDesc[0] = '\0';
    2633         if (u32Version >= PGM_SAVED_STATE_VERSION)
     2636        if (u32Version >= PGM_SAVED_STATE_VERSION_RR_DESC)
    26342637        {
    26352638            rc = SSMR3GetStrZ(pSSM, szDesc, sizeof(szDesc));
    26362639            if (RT_FAILURE(rc))
    26372640                return rc;
     2641            /* Since we've modified the description strings in r45878, only compare
     2642               them if the saved state is more recent. */
     2643            if (u32Version != PGM_SAVED_STATE_VERSION_RR_DESC)
     2644                cchDesc = strlen(szDesc);
    26382645        }
    26392646
     
    26482655                 || GCPhysLast != pRam->GCPhysLast
    26492656                 || cb         != pRam->cb
    2650                  ||  (szDesc[0] && strcmp(szDesc, pRam->pszDesc)) )
     2657                 ||  (   cchDesc
     2658                      && strcmp(szDesc, pRam->pszDesc)) )
    26512659                /* Hack for PDMDevHlpPhysReserve(pDevIns, 0xfff80000, 0x80000, "High ROM Region"); */
    26522660            &&  (   u32Version != PGM_SAVED_STATE_VERSION_OLD_PHYS_CODE
     
    26752683
    26762684        uint32_t cPages = (GCPhysLast - GCPhys + 1) >> PAGE_SHIFT;
    2677         if (u32Version >= PGM_SAVED_STATE_VERSION)
     2685        if (u32Version >= PGM_SAVED_STATE_VERSION_RR_DESC)
    26782686        {
    26792687            /*
     
    28312839     */
    28322840    if (    u32Version != PGM_SAVED_STATE_VERSION
     2841        &&  u32Version != PGM_SAVED_STATE_VERSION_RR_DESC
    28332842        &&  u32Version != PGM_SAVED_STATE_VERSION_OLD_PHYS_CODE)
    28342843    {
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