Changeset 24463 in vbox
- Timestamp:
- Nov 6, 2009 4:22:42 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/CPUM.cpp
r24453 r24463 68 68 *******************************************************************************/ 69 69 /** The current saved state version. */ 70 #ifdef VBOX_WITH_LIVE_MIGRATION71 70 #define CPUM_SAVED_STATE_VERSION 11 72 #else73 #define CPUM_SAVED_STATE_VERSION 1074 #endif75 71 /** The saved state version of 3.0 and 3.1 trunk before the teleportation 76 72 * changes. */ … … 106 102 static CPUMCPUVENDOR cpumR3DetectVendor(uint32_t uEAX, uint32_t uEBX, uint32_t uECX, uint32_t uEDX); 107 103 static int cpumR3CpuIdInit(PVM pVM); 108 #ifdef VBOX_WITH_LIVE_MIGRATION109 104 static DECLCALLBACK(int) cpumR3LiveExec(PVM pVM, PSSMHANDLE pSSM, uint32_t uPass); 110 #endif111 105 static DECLCALLBACK(int) cpumR3SaveExec(PVM pVM, PSSMHANDLE pSSM); 112 106 static DECLCALLBACK(int) cpumR3LoadExec(PVM pVM, PSSMHANDLE pSSM, uint32_t uVersion, uint32_t uPass); … … 217 211 * Register saved state data item. 218 212 */ 219 #ifdef VBOX_WITH_LIVE_MIGRATION220 213 int rc = SSMR3RegisterInternal(pVM, "cpum", 1, CPUM_SAVED_STATE_VERSION, sizeof(CPUM), 221 214 NULL, cpumR3LiveExec, NULL, 222 215 NULL, cpumR3SaveExec, NULL, 223 216 NULL, cpumR3LoadExec, NULL); 224 #else225 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 #endif230 217 if (RT_FAILURE(rc)) 231 218 return rc; … … 984 971 } 985 972 986 #ifdef VBOX_WITH_LIVE_MIGRATION987 973 988 974 /** … … 1749 1735 } 1750 1736 1751 #endif /* VBOX_WITH_LIVE_MIGRATION */1752 1737 1753 1738 /** … … 1781 1766 } 1782 1767 1783 #ifdef VBOX_WITH_LIVE_MIGRATION1784 1768 cpumR3SaveCpuId(pVM, pSSM); 1785 1769 return VINF_SUCCESS; 1786 #else1787 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 #endif1805 1770 } 1806 1771 … … 1987 1952 } 1988 1953 1989 #ifdef VBOX_WITH_LIVE_MIGRATION1990 1954 /* 1991 1955 * Guest CPUIDs. … … 1996 1960 /** @todo Merge the code below into cpumR3LoadCpuId when we've found out what is 1997 1961 * actually required. */ 1998 #endif1999 1962 2000 1963 /*
Note:
See TracChangeset
for help on using the changeset viewer.