- Timestamp:
- Feb 2, 2021 11:27:43 AM (4 years ago)
- svn:sync-xref-src-repo-rev:
- 142556
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR0/HMVMXR0.cpp
r87529 r87530 1845 1845 * Frees pages allocated using hmR0VmxPagesAllocZ. 1846 1846 * 1847 * @param hMemObj The ring-0 memory object associated with the allocation. 1848 */ 1849 DECL_FORCE_INLINE(void) hmR0VmxPagesFree(RTR0MEMOBJ hMemObj) 1847 * @param phMemObj Pointer to the memory object handle. Will be set to 1848 * NIL. 1849 */ 1850 DECL_FORCE_INLINE(void) hmR0VmxPagesFree(PRTR0MEMOBJ phMemObj) 1850 1851 { 1851 1852 /* We can cleanup wholesale since it's all one allocation. */ 1852 RTR0MemObjFree(hMemObj, true /* fFreeMappings */); 1853 if (*phMemObj != NIL_RTR0MEMOBJ) 1854 { 1855 RTR0MemObjFree(*phMemObj, true /* fFreeMappings */); 1856 *phMemObj = NIL_RTR0MEMOBJ; 1857 } 1853 1858 } 1854 1859 … … 1889 1894 static void hmR0VmxVmcsInfoFree(PVMXVMCSINFO pVmcsInfo, PVMXVMCSINFOSHARED pVmcsInfoShared) 1890 1895 { 1891 if (pVmcsInfo->hMemObj != NIL_RTR0MEMOBJ) 1892 { 1893 hmR0VmxPagesFree(pVmcsInfo->hMemObj); 1894 hmR0VmxVmcsInfoInit(pVmcsInfo, pVmcsInfoShared); 1895 } 1896 hmR0VmxPagesFree(&pVmcsInfo->hMemObj); 1897 hmR0VmxVmcsInfoInit(pVmcsInfo, pVmcsInfoShared); 1896 1898 } 1897 1899 … … 1974 1976 static void hmR0VmxStructsFree(PVMCC pVM) 1975 1977 { 1976 hmR0VmxPagesFree( pVM->hm.s.vmx.hMemObj);1978 hmR0VmxPagesFree(&pVM->hmr0.s.vmx.hMemObj); 1977 1979 #ifdef VBOX_WITH_NESTED_HWVIRT_VMX 1978 1980 if (pVM->hm.s.vmx.fUseVmcsShadowing) 1979 1981 { 1980 1982 RTMemFree(pVM->hm.s.vmx.paShadowVmcsFields); 1983 pVM->hm.s.vmx.paShadowVmcsFields = NULL; 1981 1984 RTMemFree(pVM->hm.s.vmx.paShadowVmcsRoFields); 1985 pVM->hm.s.vmx.paShadowVmcsRoFields = NULL; 1982 1986 } 1983 1987 #endif … … 2035 2039 }; 2036 2040 2037 int rc = hmR0VmxPagesAllocZ(&pVM->hm .s.vmx.hMemObj, &aAllocInfo[0], RT_ELEMENTS(aAllocInfo));2041 int rc = hmR0VmxPagesAllocZ(&pVM->hmr0.s.vmx.hMemObj, &aAllocInfo[0], RT_ELEMENTS(aAllocInfo)); 2038 2042 if (RT_SUCCESS(rc)) 2039 2043 { -
trunk/src/VBox/VMM/include/HMInternal.h
r87523 r87530 589 589 * mode without paging emulation in EPT mode. */ 590 590 R3PTRTYPE(PX86PD) pNonPagingModeEPTPageTable; 591 592 /** Ring-0 memory object for per-VM VMX structures. */593 RTR0MEMOBJ hMemObj;594 591 } vmx; 595 592 … … 679 676 uint32_t fHostKernelFeatures; 680 677 681 /** SVM specific data. */ 678 /** VT-x specific data. */ 679 struct HMR0VMXVM 680 { 681 /** Ring-0 memory object for per-VM VMX structures. */ 682 RTR0MEMOBJ hMemObj; 683 684 } vmx; 685 686 /** AMD-V specific data. */ 682 687 struct HMR0SVMVM 683 688 {
Note:
See TracChangeset
for help on using the changeset viewer.