Changeset 22891 in vbox
- Timestamp:
- Sep 9, 2009 11:21:06 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/CPUM.cpp
r22890 r22891 1046 1046 if (uVersion >= CPUM_SAVED_STATE_VERSION_VER2_1_NOMSR) 1047 1047 { 1048 /** @todo r=bird: cCPUs: Why are we doing this?!? cCpus is a config value that 1049 * cannot be changed by a saved state. If the saved one differs we 1050 * fail. */ 1051 int rc = SSMR3GetU32(pSSM, &pVM->cCpus); 1052 AssertRCReturn(rc, rc); 1048 uint32_t cCpus; 1049 int rc = SSMR3GetU32(pSSM, &cCpus); AssertRCReturn(rc, rc); 1050 AssertLogRelMsgReturn(cCpus == pVM->cCpus, ("Mismatching CPU counts: saved: %u; configured: %u \n", cCpus, pVM->cCpus), 1051 VERR_SSM_UNEXPECTED_DATA); 1053 1052 } 1054 1055 if ( !pVM->cCpus 1056 || pVM->cCpus > VMM_MAX_CPU_COUNT 1057 || ( uVersion == CPUM_SAVED_STATE_VERSION_VER2_0 1058 && pVM->cCpus != 1)) 1059 { 1060 AssertMsgFailed(("Unexpected number of VMCPUs (%u)\n", pVM->cCpus)); 1061 return VERR_SSM_UNEXPECTED_DATA; 1062 } 1053 AssertLogRelMsgReturn( uVersion != CPUM_SAVED_STATE_VERSION_VER2_0 1054 || pVM->cCpus == 1, 1055 ("cCpus=%u\n", pVM->cCpus), 1056 VERR_SSM_UNEXPECTED_DATA); 1063 1057 1064 1058 for (VMCPUID i = 0; i < pVM->cCpus; i++) … … 1072 1066 } 1073 1067 1074 1068 /* 1069 * Restore the CPUID leaves. 1070 * 1071 * Note that we support restoring less than the current amount of standard 1072 * leaves because we've been allowed more is newer version of VBox. 1073 */ 1075 1074 uint32_t cElements; 1076 1075 int rc = SSMR3GetU32(pSSM, &cElements); AssertRCReturn(rc, rc); 1077 /* Support old saved states with a smaller standard cpuid array. */1078 1076 if (cElements > RT_ELEMENTS(pVM->cpum.s.aGuestCpuIdStd)) 1079 1077 return VERR_SSM_DATA_UNIT_FORMAT_CHANGED;
Note:
See TracChangeset
for help on using the changeset viewer.