Changeset 36427 in vbox for trunk/src/VBox/VMM
- Timestamp:
- Mar 25, 2011 12:43:49 PM (14 years ago)
- svn:sync-xref-src-repo-rev:
- 70789
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR0/GMMR0.cpp
r36400 r36427 1423 1423 1424 1424 /** 1425 * Gets the host physical address for a page given by it's ID. 1426 * 1427 * @returns The host physical address or NIL_RTHCPHYS. 1428 * @param pGMM Pointer to the GMM instance. 1429 * @param idPage The ID of the page to find. 1430 */ 1431 DECLINLINE(RTHCPHYS) gmmR0GetPageHCPhys(PGMM pGMM, uint32_t idPage) 1432 { 1433 PGMMCHUNK pChunk = gmmR0GetChunk(pGMM, idPage >> GMM_CHUNKID_SHIFT); 1434 if (RT_LIKELY(pChunk)) 1435 return RTR0MemObjGetPagePhysAddr(pChunk->MemObj, idPage & GMM_PAGEID_IDX_MASK); 1436 return NIL_RTHCPHYS; 1437 } 1438 1439 1440 /** 1425 1441 * Unlinks the chunk from the free list it's currently on (if any). 1426 1442 * … … 2089 2105 AssertCompile(NIL_RTHCPHYS > GMM_GCPHYS_LAST && GMM_GCPHYS_UNSHAREABLE > GMM_GCPHYS_LAST); 2090 2106 if (RT_LIKELY(paPages[iPage].HCPhysGCPhys <= GMM_GCPHYS_LAST)) 2107 { 2091 2108 pPage->Private.pfn = paPages[iPage].HCPhysGCPhys >> PAGE_SHIFT; 2109 #if 0 /* Not sure if this is the right place to tell pciraw about mappings. */ 2110 if (PciRawIsEnabled(pGVM/pVM)) 2111 PciRawR0NotifyGuestPageAssignment(pGVM, paPages[iPage].HCPhysGCPhys, 2112 gmmR0GetPageHCPhys(pGMM, paPages[iPage].idPage)); 2113 #endif 2114 } 2092 2115 else if (paPages[iPage].HCPhysGCPhys == GMM_GCPHYS_UNSHAREABLE) 2093 2116 pPage->Private.pfn = GMM_PAGE_PFN_UNSHAREABLE; 2094 2117 /* else: NIL_RTHCPHYS nothing */ 2095 #if 02096 #ifdef VBOX_WITH_PCI_PASSTHROUGH2097 if (pVM->rawpci.s.pfnContigMemInfo)2098 pVM->rawpci.s.pfnContigMemInfo(pVM, paPages[iPage].HCPhysGCPhys, 0, PAGE_SIZE, PCIRAW_MEMINFO_MAP);2099 #endif2100 #endif2101 2118 2102 2119 paPages[iPage].idPage = NIL_GMM_PAGEID;
Note:
See TracChangeset
for help on using the changeset viewer.