VirtualBox

Changeset 40054 in vbox for trunk/include/VBox


Ignore:
Timestamp:
Feb 9, 2012 3:37:11 PM (13 years ago)
Author:
vboxsync
Message:

VMM,VMMDev: Page sharing cleanup.

Location:
trunk/include/VBox
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/err.h

    r39944 r40054  
    500500/** Don't mess around with ballooned pages. */
    501501#define VERR_PGM_PHYS_PAGE_BALLOONED            (-1646)
    502 /** Shared module already registered. */
    503 #define VINF_PGM_SHARED_MODULE_ALREADY_REGISTERED   (1647)
    504 /** Shared module not found. */
    505 #define VERR_PGM_SHARED_MODULE_NOT_FOUND        (-1648)
    506 /** Shared module different from previously registered module. */
    507 #define VINF_PGM_SHARED_MODULE_COLLISION        (1649)
    508 /** Inconsistent local and global registration records. */
    509 #define VERR_PGM_SHARED_MODULE_REGISTRATION_INCONSISTENCY (-1650)
     502
     503
    510504/** pgmPhysPageMapCommon encountered PGMPAGETYPE_MMIO2_ALIAS_MMIO. */
    511505#define VERR_PGM_MAP_MMIO2_ALIAS_MMIO           (-1651)
     
    17191713/** Invalid page count given to GMMR3FreePagesPerform.  */
    17201714#define VERR_GMM_ACTUAL_PAGES_IPE                   (-3821)
     1715/** The shared module name is too long. */
     1716#define VERR_GMM_MODULE_NAME_TOO_LONG               (-3822)
     1717/** The shared module version string is too long. */
     1718#define VERR_GMM_MODULE_VERSION_TOO_LONG            (-3823)
     1719/** The shared module has too many regions. */
     1720#define VERR_GMM_TOO_MANY_REGIONS                   (-3824)
     1721/** The guest has reported too many modules. */
     1722#define VERR_GMM_TOO_MANY_PER_VM_MODULES            (-3825)
     1723/** The guest has reported too many modules. */
     1724#define VERR_GMM_TOO_MANY_GLOBAL_MODULES            (-3826)
     1725/** The shared module is already registered. */
     1726#define VINF_GMM_SHARED_MODULE_ALREADY_REGISTERED   (3827)
     1727/** The shared module clashed address wise with a previously registered
     1728 * module. */
     1729#define VERR_GMM_SHARED_MODULE_ADDRESS_CLASH        (-3828)
     1730/** The shared module was not found. */
     1731#define VERR_GMM_SHARED_MODULE_NOT_FOUND            (-3829)
     1732/** The size of the shared module was out of range. */
     1733#define VERR_GMM_BAD_SHARED_MODULE_SIZE             (-3830)
     1734/** The size of the one or more regions in the shared module was out of
     1735 * range. */
     1736#define VERR_GMM_SHARED_MODULE_BAD_REGIONS_SIZE     (-3831)
    17211737/** @} */
    17221738
  • trunk/include/VBox/vmm/gmm.h

    r40006 r40054  
    412412GMMR0DECL(int)  GMMR0RegisterSharedModule(PVM pVM, VMCPUID idCpu, VBOXOSFAMILY enmGuestOS, char *pszModuleName, char *pszVersion,
    413413                                          RTGCPTR GCBaseAddr,  uint32_t cbModule, uint32_t cRegions,
    414                                           struct VMMDEVSHAREDREGIONDESC *pRegions);
     414                                          struct VMMDEVSHAREDREGIONDESC const *paRegions);
    415415GMMR0DECL(int)  GMMR0UnregisterSharedModule(PVM pVM, VMCPUID idCpu, char *pszModuleName, char *pszVersion, RTGCPTR GCBaseAddr, uint32_t cbModule);
    416416GMMR0DECL(int)  GMMR0UnregisterAllSharedModules(PVM pVM, VMCPUID idCpu);
     
    582582GMMR0DECL(int) GMMR0FreeLargePageReq(PVM pVM, VMCPUID idCpu, PGMMFREELARGEPAGEREQ pReq);
    583583
    584 /** Maximum length of the shared module name string. */
     584/** Maximum length of the shared module name string, terminator included. */
    585585#define GMM_SHARED_MODULE_MAX_NAME_STRING       128
    586 /** Maximum length of the shared module version string. */
     586/** Maximum length of the shared module version string, terminator included. */
    587587#define GMM_SHARED_MODULE_MAX_VERSION_STRING    16
    588588
     
    622622typedef struct GMMSHAREDREGIONDESC
    623623{
    624     /** Region base address. */
    625     RTGCPTR64                   GCRegionAddr;
    626     /** Region size. */
    627     uint32_t                    cbRegion;
    628     /** Alignment. */
    629     uint32_t                    u32Alignment;
     624    /** The page offset where the region starts. */
     625    uint32_t                    off;
     626    /** Region size - adjusted by the region offset and rounded up to a
     627     * page. */
     628    uint32_t                    cb;
    630629    /** Pointer to physical GMM page ID array. */
    631630    uint32_t                   *paidPages;
     
    640639typedef struct GMMSHAREDMODULE
    641640{
    642     /** Tree node. */
    643     AVLGCPTRNODECORE            Core;
     641    /** Tree node (keyed by a hash of name & version). */
     642    AVLLU32NODECORE             Core;
    644643    /** Shared module size. */
    645644    uint32_t                    cbModule;
     
    677676typedef GMMSHAREDPAGEDESC *PGMMSHAREDPAGEDESC;
    678677
    679 GMMR0DECL(int) GMMR0SharedModuleCheckPage(PGVM pGVM, PGMMSHAREDMODULE pModule, unsigned idxRegion, unsigned idxPage,
     678GMMR0DECL(int) GMMR0SharedModuleCheckPage(PGVM pGVM, PGMMSHAREDMODULE pModule, uint32_t idxRegion, uint32_t idxPage,
    680679                                          PGMMSHAREDPAGEDESC pPageDesc);
    681680
  • trunk/include/VBox/vmm/pgm.h

    r40005 r40054  
    427427VMMR0DECL(int)      PGMR0PhysAllocateLargeHandyPage(PVM pVM, PVMCPU pVCpu);
    428428VMMR0_INT_DECL(int) PGMR0PhysSetupIommu(PVM pVM);
    429 VMMR0DECL(int)      PGMR0SharedModuleCheck(PVM pVM, PGVM pGVM, VMCPUID idCpu, PGMMSHAREDMODULE pModule, uint32_t cRegions, PGMMSHAREDREGIONDESC paRegions);
     429VMMR0DECL(int)      PGMR0SharedModuleCheck(PVM pVM, PGVM pGVM, VMCPUID idCpu, PGMMSHAREDMODULE pModule, PCRTGCPTR64 paRegionsGCPtrs);
    430430VMMR0DECL(int)      PGMR0Trap0eHandlerNestedPaging(PVM pVM, PVMCPU pVCpu, PGMMODE enmShwPagingMode, RTGCUINT uErr, PCPUMCTXCORE pRegFrame, RTGCPHYS pvFault);
    431431VMMR0DECL(VBOXSTRICTRC) PGMR0Trap0eHandlerNPMisconfig(PVM pVM, PVMCPU pVCpu, PGMMODE enmShwPagingMode, PCPUMCTXCORE pRegFrame, RTGCPHYS GCPhysFault, uint32_t uErr);
     
    566566/** @name Page sharing
    567567 * @{ */
    568 VMMR3DECL(int)     PGMR3SharedModuleRegister(PVM pVM, VBOXOSFAMILY enmGuestOS, char *pszModuleName, char *pszVersion, RTGCPTR GCBaseAddr, uint32_t cbModule, unsigned cRegions, VMMDEVSHAREDREGIONDESC *pRegions);
    569 VMMR3DECL(int)     PGMR3SharedModuleUnregister(PVM pVM, char *pszModuleName, char *pszVersion, RTGCPTR GCBaseAddr, uint32_t cbModule);
     568VMMR3DECL(int)     PGMR3SharedModuleRegister(PVM pVM, VBOXOSFAMILY enmGuestOS, char *pszModuleName, char *pszVersion,
     569                                             RTGCPTR GCBaseAddr, uint32_t cbModule,
     570                                             uint32_t cRegions, VMMDEVSHAREDREGIONDESC const *paRegions);
     571VMMR3DECL(int)     PGMR3SharedModuleUnregister(PVM pVM, char *pszModuleName, char *pszVersion,
     572                                               RTGCPTR GCBaseAddr, uint32_t cbModule);
    570573VMMR3DECL(int)     PGMR3SharedModuleCheckAll(PVM pVM);
    571574VMMR3DECL(int)     PGMR3SharedModuleGetPageState(PVM pVM, RTGCPTR GCPtrPage, bool *pfShared, uint64_t *pfPageFlags);
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