Changeset 76290 in vbox for trunk/src/VBox/VMM/VMMR3
- Timestamp:
- Dec 19, 2018 9:11:47 AM (6 years ago)
- svn:sync-xref-src-repo-rev:
- 127568
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR3/HM.cpp
r76198 r76290 46 46 #include <VBox/vmm/pgm.h> 47 47 #include <VBox/vmm/ssm.h> 48 #include <VBox/vmm/gim.h> 48 49 #include <VBox/vmm/trpm.h> 49 50 #include <VBox/vmm/dbgf.h> … … 400 401 static DECLCALLBACK(void) hmR3Info(PVM pVM, PCDBGFINFOHLP pHlp, const char *pszArgs); 401 402 static DECLCALLBACK(void) hmR3InfoEventPending(PVM pVM, PCDBGFINFOHLP pHlp, const char *pszArgs); 402 static int hmR3Init CPU(PVM pVM);403 static int hmR3InitFinalizeR3(PVM pVM); 403 404 static int hmR3InitFinalizeR0(PVM pVM); 404 405 static int hmR3InitFinalizeR0Intel(PVM pVM); … … 702 703 if (fCaps & SUPVTCAPS_AMD_V) 703 704 { 705 rc = SUPR3CallVMMR0Ex(pVM->pVMR0, 0 /*idCpu*/, VMMR0_DO_HM_PRE_INIT, 0, NULL); 706 AssertRCReturn(rc, rc); 707 Assert(pVM->hm.s.svm.fSupported); 708 704 709 LogRel(("HM: HMR3Init: AMD-V%s\n", fCaps & SUPVTCAPS_NESTED_PAGING ? " w/ nested paging" : "")); 705 pVM->hm.s.svm.fSupported = true;706 710 VM_SET_MAIN_EXECUTION_ENGINE(pVM, VM_EXEC_ENGINE_HW_VIRT); 707 711 } … … 712 716 if (RT_SUCCESS(rc)) 713 717 { 718 rc = SUPR3CallVMMR0Ex(pVM->pVMR0, 0 /*idCpu*/, VMMR0_DO_HM_PRE_INIT, 0, NULL); 719 AssertRCReturn(rc, rc); 720 Assert(pVM->hm.s.vmx.fSupported); 721 714 722 LogRel(("HM: HMR3Init: VT-x%s%s%s\n", 715 723 fCaps & SUPVTCAPS_NESTED_PAGING ? " w/ nested paging" : "", 716 724 fCaps & SUPVTCAPS_VTX_UNRESTRICTED_GUEST ? " and unrestricted guest execution" : "", 717 725 (fCaps & (SUPVTCAPS_NESTED_PAGING | SUPVTCAPS_VTX_UNRESTRICTED_GUEST)) ? " hw support" : "")); 718 pVM->hm.s.vmx.fSupported = true;719 726 VM_SET_MAIN_EXECUTION_ENGINE(pVM, VM_EXEC_ENGINE_HW_VIRT); 720 727 } … … 844 851 845 852 /** 846 * Initializes the per-VCPU HM.853 * Initializes HM components after ring-3 phase has been fully initialized. 847 854 * 848 855 * @returns VBox status code. 849 856 * @param pVM The cross context VM structure. 850 857 */ 851 static int hmR3Init CPU(PVM pVM)858 static int hmR3InitFinalizeR3(PVM pVM) 852 859 { 853 860 LogFlow(("HMR3InitCPU\n")); … … 860 867 PVMCPU pVCpu = &pVM->aCpus[i]; 861 868 pVCpu->hm.s.fActive = false; 869 pVCpu->hm.s.fGIMTrapXcptUD = GIMShouldTrapXcptUD(pVCpu); /* Is safe to call now since GIMR3Init() has completed. */ 862 870 } 863 871 … … 1180 1188 { 1181 1189 case VMINITCOMPLETED_RING3: 1182 return hmR3Init CPU(pVM);1190 return hmR3InitFinalizeR3(pVM); 1183 1191 case VMINITCOMPLETED_RING0: 1184 1192 return hmR3InitFinalizeR0(pVM);
Note:
See TracChangeset
for help on using the changeset viewer.