Changeset 15607 in vbox for trunk/src/VBox/VMM
- Timestamp:
- Dec 16, 2008 8:59:43 PM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 41119
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/HWACCM.cpp
r15605 r15607 963 963 } 964 964 } 965 965 return VINF_SUCCESS; 966 } 967 968 /** 969 * Applies relocations to data and code managed by this 970 * component. This function will be called at init and 971 * whenever the VMM need to relocate it self inside the GC. 972 * 973 * @param pVM The VM. 974 */ 975 VMMR3DECL(void) HWACCMR3Relocate(PVM pVM) 976 { 977 Log(("HWACCMR3Relocate to %RGv\n", MMHyperGetArea(pVM, 0))); 978 979 /* Fetch the current paging mode during the relocate callback during state loading. */ 980 if (VMR3GetState(pVM) == VMSTATE_LOADING) 981 { 982 for (unsigned i=0;i<pVM->cCPUs;i++) 983 { 984 PVMCPU pVCpu = &pVM->aCpus[i]; 985 /* @todo SMP */ 986 pVCpu->hwaccm.s.enmShadowMode = PGMGetShadowMode(pVM); 987 pVCpu->hwaccm.s.vmx.enmLastSeenGuestMode = PGMGetGuestMode(pVM); 988 } 989 } 966 990 #if HC_ARCH_BITS == 32 && defined(VBOX_ENABLE_64_BITS_GUESTS) && !defined(VBOX_WITH_HYBRID_32BIT_KERNEL) 967 991 if (pVM->fHWACCMEnabled) 968 992 { 993 int rc; 994 969 995 switch(PGMGetHostMode(pVM)) 970 996 { … … 982 1008 break; 983 1009 } 984 985 1010 rc = PDMR3LdrGetSymbolRC(pVM, NULL, "VMXGCStartVM64", &pVM->hwaccm.s.pfnVMXGCStartVM64); 986 Assert MsgRCReturn(rc, ("VMXGCStartVM64 -> rc=%Rrc\n", rc), rc);1011 AssertReleaseMsgRC(rc, ("VMXGCStartVM64 -> rc=%Rrc\n", rc)); 987 1012 988 1013 rc = PDMR3LdrGetSymbolRC(pVM, NULL, "SVMGCVMRun64", &pVM->hwaccm.s.pfnSVMGCVMRun64); 989 Assert MsgRCReturn(rc, ("SVMGCVMRun64 -> rc=%Rrc\n", rc), rc);1014 AssertReleaseMsgRC(rc, ("SVMGCVMRun64 -> rc=%Rrc\n", rc)); 990 1015 991 1016 rc = PDMR3LdrGetSymbolRC(pVM, NULL, "HWACCMSaveGuestFPU64", &pVM->hwaccm.s.pfnSaveGuestFPU64); 992 Assert MsgRCReturn(rc, ("HWACCMSetupFPU64 -> rc=%Rrc\n", rc), rc);1017 AssertReleaseMsgRC(rc, ("HWACCMSetupFPU64 -> rc=%Rrc\n", rc)); 993 1018 994 1019 rc = PDMR3LdrGetSymbolRC(pVM, NULL, "HWACCMSaveGuestDebug64", &pVM->hwaccm.s.pfnSaveGuestDebug64); 995 Assert MsgRCReturn(rc, ("HWACCMSetupDebug64 -> rc=%Rrc\n", rc), rc);1020 AssertReleaseMsgRC(rc, ("HWACCMSetupDebug64 -> rc=%Rrc\n", rc)); 996 1021 997 1022 # ifdef DEBUG 998 1023 rc = PDMR3LdrGetSymbolRC(pVM, NULL, "HWACCMTestSwitcher64", &pVM->hwaccm.s.pfnTest64); 999 Assert MsgRCReturn(rc, ("HWACCMTestSwitcher64 -> rc=%Rrc\n", rc), rc);1024 AssertReleaseMsgRC(rc, ("HWACCMTestSwitcher64 -> rc=%Rrc\n", rc)); 1000 1025 # endif 1001 1026 } 1002 1027 #endif 1003 return VINF_SUCCESS;1004 }1005 1006 /**1007 * Applies relocations to data and code managed by this1008 * component. This function will be called at init and1009 * whenever the VMM need to relocate it self inside the GC.1010 *1011 * @param pVM The VM.1012 */1013 VMMR3DECL(void) HWACCMR3Relocate(PVM pVM)1014 {1015 Log(("HWACCMR3Relocate to %RGv\n", MMHyperGetArea(pVM, 0)));1016 1017 /* Fetch the current paging mode during the relocate callback during state loading. */1018 if (VMR3GetState(pVM) == VMSTATE_LOADING)1019 {1020 for (unsigned i=0;i<pVM->cCPUs;i++)1021 {1022 PVMCPU pVCpu = &pVM->aCpus[i];1023 /* @todo SMP */1024 pVCpu->hwaccm.s.enmShadowMode = PGMGetShadowMode(pVM);1025 pVCpu->hwaccm.s.vmx.enmLastSeenGuestMode = PGMGetGuestMode(pVM);1026 }1027 }1028 1029 1028 return; 1030 1029 }
Note:
See TracChangeset
for help on using the changeset viewer.