VirtualBox

Changeset 36427 in vbox for trunk/src/VBox/VMM


Ignore:
Timestamp:
Mar 25, 2011 12:43:49 PM (14 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
70789
Message:

updated sketches a bit.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMR0/GMMR0.cpp

    r36400 r36427  
    14231423
    14241424/**
     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 */
     1431DECLINLINE(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/**
    14251441 * Unlinks the chunk from the free list it's currently on (if any).
    14261442 *
     
    20892105                                AssertCompile(NIL_RTHCPHYS > GMM_GCPHYS_LAST && GMM_GCPHYS_UNSHAREABLE > GMM_GCPHYS_LAST);
    20902106                                if (RT_LIKELY(paPages[iPage].HCPhysGCPhys <= GMM_GCPHYS_LAST))
     2107                                {
    20912108                                    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                                }
    20922115                                else if (paPages[iPage].HCPhysGCPhys == GMM_GCPHYS_UNSHAREABLE)
    20932116                                    pPage->Private.pfn = GMM_PAGE_PFN_UNSHAREABLE;
    20942117                                /* else: NIL_RTHCPHYS nothing */
    2095 #if 0
    2096 #ifdef VBOX_WITH_PCI_PASSTHROUGH
    2097                                 if (pVM->rawpci.s.pfnContigMemInfo)
    2098                                     pVM->rawpci.s.pfnContigMemInfo(pVM, paPages[iPage].HCPhysGCPhys, 0, PAGE_SIZE, PCIRAW_MEMINFO_MAP);
    2099 #endif
    2100 #endif
    21012118
    21022119                                paPages[iPage].idPage = NIL_GMM_PAGEID;
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette