Changeset 91295 in vbox
- Timestamp:
- Sep 17, 2021 11:05:41 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR3/CPUM.cpp
r91292 r91295 1011 1011 1012 1012 /** 1013 * Frees memory allocated for the SVM hardware virtualization state.1013 * Initialize SVM hardware virtualization state (used to allocate it). 1014 1014 * 1015 1015 * @param pVM The cross context VM structure. 1016 1016 */ 1017 static void cpumR3 FreeSvmHwVirtState(PVM pVM)1017 static void cpumR3InitSvmHwVirtState(PVM pVM) 1018 1018 { 1019 1019 Assert(pVM->cpum.s.GuestFeatures.fSvm); 1020 RT_NOREF(pVM); 1021 } 1022 1023 1024 /** 1025 * Allocates memory for the SVM hardware virtualization state. 1026 * 1027 * @returns VBox status code. 1028 * @param pVM The cross context VM structure. 1029 */ 1030 static int cpumR3AllocSvmHwVirtState(PVM pVM) 1031 { 1032 Assert(pVM->cpum.s.GuestFeatures.fSvm); 1033 1034 int rc = VINF_SUCCESS; 1020 1035 1021 LogRel(("CPUM: Allocating %u pages for the nested-guest SVM MSR and IO permission bitmaps\n", 1036 1022 pVM->cCpus * (SVM_MSRPM_PAGES + SVM_IOPM_PAGES))); … … 1044 1030 AssertCompile(SVM_IOPM_PAGES * X86_PAGE_SIZE == sizeof(pVCpu->cpum.s.Guest.hwvirt.svm.abIoBitmap)); 1045 1031 } 1046 1047 /* On any failure, cleanup. */1048 if (RT_FAILURE(rc))1049 cpumR3FreeSvmHwVirtState(pVM);1050 1051 return rc;1052 1032 } 1053 1033 … … 2267 2247 rc = cpumR3AllocVmxHwVirtState(pVM); 2268 2248 else if (pVM->cpum.s.GuestFeatures.fSvm) 2269 rc = cpumR3AllocSvmHwVirtState(pVM);2249 cpumR3InitSvmHwVirtState(pVM); 2270 2250 else 2271 2251 Assert(pVM->apCpusR3[0]->cpum.s.Guest.hwvirt.enmHwvirt == CPUMHWVIRT_NONE); … … 2328 2308 cpumR3FreeVmxHwVirtState(pVM); 2329 2309 } 2330 else if (pVM->cpum.s.GuestFeatures.fSvm)2331 cpumR3FreeSvmHwVirtState(pVM);2332 2310 return VINF_SUCCESS; 2333 2311 }
Note:
See TracChangeset
for help on using the changeset viewer.