VirtualBox

Changeset 24463 in vbox


Ignore:
Timestamp:
Nov 6, 2009 4:22:42 PM (15 years ago)
Author:
vboxsync
Message:

CPUM: Enabled the last bit of live migration code.

File:
1 edited

Legend:

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

    r24453 r24463  
    6868*******************************************************************************/
    6969/** The current saved state version. */
    70 #ifdef VBOX_WITH_LIVE_MIGRATION
    7170#define CPUM_SAVED_STATE_VERSION                11
    72 #else
    73 #define CPUM_SAVED_STATE_VERSION                10
    74 #endif
    7571/** The saved state version of 3.0 and 3.1 trunk before the teleportation
    7672 * changes. */
     
    106102static CPUMCPUVENDOR cpumR3DetectVendor(uint32_t uEAX, uint32_t uEBX, uint32_t uECX, uint32_t uEDX);
    107103static int cpumR3CpuIdInit(PVM pVM);
    108 #ifdef VBOX_WITH_LIVE_MIGRATION
    109104static DECLCALLBACK(int)  cpumR3LiveExec(PVM pVM, PSSMHANDLE pSSM, uint32_t uPass);
    110 #endif
    111105static DECLCALLBACK(int)  cpumR3SaveExec(PVM pVM, PSSMHANDLE pSSM);
    112106static DECLCALLBACK(int)  cpumR3LoadExec(PVM pVM, PSSMHANDLE pSSM, uint32_t uVersion, uint32_t uPass);
     
    217211     * Register saved state data item.
    218212     */
    219 #ifdef VBOX_WITH_LIVE_MIGRATION
    220213    int rc = SSMR3RegisterInternal(pVM, "cpum", 1, CPUM_SAVED_STATE_VERSION, sizeof(CPUM),
    221214                                   NULL, cpumR3LiveExec, NULL,
    222215                                   NULL, cpumR3SaveExec, NULL,
    223216                                   NULL, cpumR3LoadExec, NULL);
    224 #else
    225     int rc = SSMR3RegisterInternal(pVM, "cpum", 1, CPUM_SAVED_STATE_VERSION, sizeof(CPUM),
    226                                    NULL, NULL, NULL,
    227                                    NULL, cpumR3SaveExec, NULL,
    228                                    NULL, cpumR3LoadExec, NULL);
    229 #endif
    230217    if (RT_FAILURE(rc))
    231218        return rc;
     
    984971}
    985972
    986 #ifdef VBOX_WITH_LIVE_MIGRATION
    987973
    988974/**
     
    17491735}
    17501736
    1751 #endif /* VBOX_WITH_LIVE_MIGRATION */
    17521737
    17531738/**
     
    17811766    }
    17821767
    1783 #ifdef VBOX_WITH_LIVE_MIGRATION
    17841768    cpumR3SaveCpuId(pVM, pSSM);
    17851769    return VINF_SUCCESS;
    1786 #else
    1787 
    1788     SSMR3PutU32(pSSM, RT_ELEMENTS(pVM->cpum.s.aGuestCpuIdStd));
    1789     SSMR3PutMem(pSSM, &pVM->cpum.s.aGuestCpuIdStd[0], sizeof(pVM->cpum.s.aGuestCpuIdStd));
    1790 
    1791     SSMR3PutU32(pSSM, RT_ELEMENTS(pVM->cpum.s.aGuestCpuIdExt));
    1792     SSMR3PutMem(pSSM, &pVM->cpum.s.aGuestCpuIdExt[0], sizeof(pVM->cpum.s.aGuestCpuIdExt));
    1793 
    1794     SSMR3PutU32(pSSM, RT_ELEMENTS(pVM->cpum.s.aGuestCpuIdCentaur));
    1795     SSMR3PutMem(pSSM, &pVM->cpum.s.aGuestCpuIdCentaur[0], sizeof(pVM->cpum.s.aGuestCpuIdCentaur));
    1796 
    1797     SSMR3PutMem(pSSM, &pVM->cpum.s.GuestCpuIdDef, sizeof(pVM->cpum.s.GuestCpuIdDef));
    1798 
    1799     /* Add the cpuid for checking that the cpu is unchanged. */
    1800     uint32_t au32CpuId[8] = {0};
    1801     ASMCpuId(0, &au32CpuId[0], &au32CpuId[1], &au32CpuId[2], &au32CpuId[3]);
    1802     ASMCpuId(1, &au32CpuId[4], &au32CpuId[5], &au32CpuId[6], &au32CpuId[7]);
    1803     return SSMR3PutMem(pSSM, &au32CpuId[0], sizeof(au32CpuId));
    1804 #endif
    18051770}
    18061771
     
    19871952    }
    19881953
    1989 #ifdef VBOX_WITH_LIVE_MIGRATION
    19901954    /*
    19911955     * Guest CPUIDs.
     
    19961960    /** @todo Merge the code below into cpumR3LoadCpuId when we've found out what is
    19971961     *        actually required. */
    1998 #endif
    19991962
    20001963    /*
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