Changeset 72460 in vbox
- Timestamp:
- Jun 6, 2018 11:16:12 AM (7 years ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR3/GIM.cpp
r69111 r72460 75 75 static FNSSMINTSAVEEXEC gimR3Save; 76 76 static FNSSMINTLOADEXEC gimR3Load; 77 static FNSSMINTLOADDONE gimR3LoadDone; 77 78 78 79 … … 104 105 NULL /* pfnLivePrep */, NULL /* pfnLiveExec */, NULL /* pfnLiveVote*/, 105 106 NULL /* pfnSavePrep */, gimR3Save, NULL /* pfnSaveDone */, 106 NULL /* pfnLoadPrep */, gimR3Load, NULL /* pfnLoadDone */);107 NULL /* pfnLoadPrep */, gimR3Load, gimR3LoadDone); 107 108 if (RT_FAILURE(rc)) 108 109 return rc; … … 321 322 322 323 return VINF_SUCCESS; 324 } 325 326 327 /** 328 * @callback_method_impl{FNSSMINTLOADDONE} 329 */ 330 static DECLCALLBACK(int) gimR3LoadDone(PVM pVM, PSSMHANDLE pSSM) 331 { 332 switch (pVM->gim.s.enmProviderId) 333 { 334 case GIMPROVIDERID_HYPERV: 335 return gimR3HvLoadDone(pVM, pSSM); 336 337 default: 338 return VINF_SUCCESS; 339 } 323 340 } 324 341 -
trunk/src/VBox/VMM/VMMR3/GIMHv.cpp
r72193 r72460 1025 1025 1026 1026 return rc; 1027 } 1028 1029 1030 /** 1031 * Hyper-V load-done callback. 1032 * 1033 * @returns VBox status code. 1034 * @param pVM The cross context VM structure. 1035 * @param pSSM The saved state handle. 1036 */ 1037 VMMR3_INT_DECL(int) gimR3HvLoadDone(PVM pVM, PSSMHANDLE pSSM) 1038 { 1039 if (RT_SUCCESS(SSMR3HandleGetStatus(pSSM))) 1040 { 1041 /* 1042 * Update EM on whether MSR_GIM_HV_GUEST_OS_ID allows hypercall instructions. 1043 */ 1044 if (pVM->gim.s.u.Hv.u64GuestOsIdMsr) 1045 for (VMCPUID i = 0; i < pVM->cCpus; i++) 1046 VMMHypercallsEnable(&pVM->aCpus[i]); 1047 else 1048 for (VMCPUID i = 0; i < pVM->cCpus; i++) 1049 VMMHypercallsDisable(&pVM->aCpus[i]); 1050 } 1051 return VINF_SUCCESS; 1027 1052 } 1028 1053 -
trunk/src/VBox/VMM/include/GIMHvInternal.h
r72190 r72460 1339 1339 VMMR3_INT_DECL(int) gimR3HvSave(PVM pVM, PSSMHANDLE pSSM); 1340 1340 VMMR3_INT_DECL(int) gimR3HvLoad(PVM pVM, PSSMHANDLE pSSM); 1341 VMMR3_INT_DECL(int) gimR3HvLoadDone(PVM pVM, PSSMHANDLE pSSM); 1341 1342 VMMR3_INT_DECL(int) gimR3HvGetDebugSetup(PVM pVM, PGIMDEBUGSETUP pDbgSetup); 1342 1343
Note:
See TracChangeset
for help on using the changeset viewer.