Changeset 67994 in vbox
- Timestamp:
- Jul 17, 2017 12:57:08 PM (8 years ago)
- svn:sync-xref-src-repo-rev:
- 117003
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/vmm/gmm.h
r67993 r67994 406 406 uint32_t cPagesToAlloc, PGMMPAGEDESC paPages); 407 407 GMMR0DECL(int) GMMR0AllocatePages(PVM pVM, VMCPUID idCpu, uint32_t cPages, PGMMPAGEDESC paPages, GMMACCOUNT enmAccount); 408 GMMR0DECL(int) GMMR0AllocateLargePage(P VM pVM, VMCPUID idCpu, uint32_t cbPage, uint32_t *pIdPage, RTHCPHYS *pHCPhys);408 GMMR0DECL(int) GMMR0AllocateLargePage(PGVM pGVM, PVM pVM, VMCPUID idCpu, uint32_t cbPage, uint32_t *pIdPage, RTHCPHYS *pHCPhys); 409 409 GMMR0DECL(int) GMMR0FreePages(PVM pVM, VMCPUID idCpu, uint32_t cPages, PGMMFREEPAGEDESC paPages, GMMACCOUNT enmAccount); 410 410 GMMR0DECL(int) GMMR0FreeLargePage(PVM pVM, VMCPUID idCpu, uint32_t idPage); -
trunk/include/VBox/vmm/pgm.h
r67993 r67994 694 694 VMMR0_INT_DECL(int) PGMR0PhysAllocateHandyPages(PGVM pGVM, PVM pVM, VMCPUID idCpu); 695 695 VMMR0_INT_DECL(int) PGMR0PhysFlushHandyPages(PGVM pGVM, PVM pVM, VMCPUID idCpu); 696 VMMR0_INT_DECL(int) PGMR0PhysAllocateLargeHandyPage(P VM pVM, PVMCPU pVCpu);696 VMMR0_INT_DECL(int) PGMR0PhysAllocateLargeHandyPage(PGVM pGVM, PVM pVM, VMCPUID idCpu); 697 697 VMMR0_INT_DECL(int) PGMR0PhysSetupIommu(PVM pVM); 698 698 VMMR0DECL(int) PGMR0SharedModuleCheck(PVM pVM, PGVM pGVM, VMCPUID idCpu, PGMMSHAREDMODULE pModule, PCRTGCPTR64 paRegionsGCPtrs); -
trunk/src/VBox/VMM/VMMR0/GMMR0.cpp
r67993 r67994 3020 3020 * @returns see GMMR0AllocatePages. 3021 3021 * 3022 * @param pGVM The global (ring-0) VM structure. 3022 3023 * @param pVM The cross context VM structure. 3023 3024 * @param idCpu The VCPU id. … … 3026 3027 * @param pHCPhys Where to return the host physical address of the page. 3027 3028 */ 3028 GMMR0DECL(int) GMMR0AllocateLargePage(P VM pVM, VMCPUID idCpu, uint32_t cbPage, uint32_t *pIdPage, RTHCPHYS *pHCPhys)3029 { 3030 LogFlow(("GMMR0AllocateLargePage: p VM=%p cbPage=%x\n", pVM, cbPage));3029 GMMR0DECL(int) GMMR0AllocateLargePage(PGVM pGVM, PVM pVM, VMCPUID idCpu, uint32_t cbPage, uint32_t *pIdPage, RTHCPHYS *pHCPhys) 3030 { 3031 LogFlow(("GMMR0AllocateLargePage: pGVM=%p pVM=%p cbPage=%x\n", pGVM, pVM, cbPage)); 3031 3032 3032 3033 AssertReturn(cbPage == GMM_CHUNK_SIZE, VERR_INVALID_PARAMETER); … … 3039 3040 PGMM pGMM; 3040 3041 GMM_GET_VALID_INSTANCE(pGMM, VERR_GMM_INSTANCE); 3041 PGVM pGVM; 3042 int rc = GVMMR0ByVMAndEMT(pVM, idCpu, &pGVM); 3042 int rc = GVMMR0ValidateGVMandVMandEMT(pGVM, pVM, idCpu); 3043 3043 if (RT_FAILURE(rc)) 3044 3044 return rc; -
trunk/src/VBox/VMM/VMMR0/PGMR0.cpp
r67993 r67994 228 228 * @retval VINF_EM_NO_MEMORY if we're out of memory. 229 229 * 230 * @param pGVM The global (ring-0) VM structure. 230 231 * @param pVM The cross context VM structure. 231 * @param pVCpu The cross context virtual CPU structure. 232 * @param idCpu The ID of the calling EMT. 233 * 234 * @thread EMT(idCpu) 232 235 * 233 236 * @remarks Must be called from within the PGM critical section. The caller 234 237 * must clear the new pages. 235 238 */ 236 VMMR0_INT_DECL(int) PGMR0PhysAllocateLargeHandyPage(PVM pVM, PVMCPU pVCpu) 237 { 239 VMMR0_INT_DECL(int) PGMR0PhysAllocateLargeHandyPage(PGVM pGVM, PVM pVM, VMCPUID idCpu) 240 { 241 /* 242 * Validate inputs. 243 */ 244 AssertReturn(idCpu < pGVM->cCpus, VERR_INVALID_CPU_ID); /* caller already checked this, but just to be sure. */ 245 AssertReturn(pGVM->aCpus[idCpu].hEMT == RTThreadNativeSelf(), VERR_NOT_OWNER); 246 PVMCPU pVCpu = &pVM->aCpus[idCpu]; 247 238 248 PGM_LOCK_ASSERT_OWNER_EX(pVM, pVCpu); 249 239 250 Assert(!pVM->pgm.s.cLargeHandyPages); 240 251 241 int rc = GMMR0AllocateLargePage(pVM, pVCpu->idCpu, _2M, 252 /* 253 * Do the job. 254 */ 255 int rc = GMMR0AllocateLargePage(pGVM, pVM, idCpu, _2M, 242 256 &pVM->pgm.s.aLargeHandyPage[0].idPage, 243 257 &pVM->pgm.s.aLargeHandyPage[0].HCPhysGCPhys); -
trunk/src/VBox/VMM/VMMR0/VMMR0.cpp
r67993 r67994 1648 1648 if (idCpu == NIL_VMCPUID) 1649 1649 return VERR_INVALID_CPU_ID; 1650 rc = PGMR0PhysAllocateLargeHandyPage(p VM, &pVM->aCpus[idCpu]);1650 rc = PGMR0PhysAllocateLargeHandyPage(pGVM, pVM, idCpu); 1651 1651 VMM_CHECK_SMAP_CHECK2(pVM, RT_NOTHING); 1652 1652 break;
Note:
See TracChangeset
for help on using the changeset viewer.