VirtualBox

Changeset 29424 in vbox for trunk/include


Ignore:
Timestamp:
May 12, 2010 3:11:09 PM (15 years ago)
Author:
vboxsync
Message:

Shared paging updates

Location:
trunk/include/VBox
Files:
3 edited

Legend:

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

    r29308 r29424  
    3131#include <VBox/sup.h>
    3232#include <VBox/VMMDev.h> /* for VMMDEVSHAREDREGIONDESC */
    33 
     33#include <iprt/avl.h>
    3434RT_C_DECLS_BEGIN
    3535
     
    279279#endif
    280280
     281
    281282GMMR0DECL(int)  GMMR0Init(void);
    282283GMMR0DECL(void) GMMR0Term(void);
     
    297298GMMR0DECL(int)  GMMR0UnregisterSharedModule(PVM pVM, VMCPUID idCpu, char *pszModuleName, char *pszVersion, RTGCPTR GCBaseAddr, uint32_t cbModule);
    298299GMMR0DECL(int)  GMMR0UnregisterAllSharedModules(PVM pVM, VMCPUID idCpu);
     300GMMR0DECL(int)  GMMR0CheckSharedModules(PVM pVM, VMCPUID idCpu);
    299301GMMR0DECL(int)  GMMR0ResetSharedModules(PVM pVM, VMCPUID idCpu);
    300302
     
    495497
    496498/**
     499 * Shared region descriptor
     500 */
     501typedef struct GMMSHAREDREGIONDESC
     502{
     503    /** Region base address. */
     504    RTGCPTR64           GCRegionAddr;
     505    /** Region size. */
     506    uint32_t            cbRegion;
     507    /** Alignment. */
     508    uint32_t            u32Alignment;
     509    /** Pointer to physical page id array. */
     510    uint32_t           *paHCPhysPageID;
     511} GMMSHAREDREGIONDESC;
     512/** Pointer to a GMMSHAREDREGIONDESC. */
     513typedef GMMSHAREDREGIONDESC *PGMMSHAREDREGIONDESC;
     514
     515
     516/**
     517 * Shared module registration info (global)
     518 */
     519typedef struct GMMSHAREDMODULE
     520{
     521    /* Tree node. */
     522    AVLGCPTRNODECORE            Core;
     523    /** Shared module size. */
     524    uint32_t                    cbModule;
     525    /** Number of included region descriptors */
     526    uint32_t                    cRegions;
     527    /** Number of users (VMs). */
     528    uint32_t                    cUsers;
     529    /** Guest OS family type. */
     530    VBOXOSFAMILY                enmGuestOS;
     531    /** Module name */
     532    char                        szName[GMM_SHARED_MODULE_MAX_NAME_STRING];
     533    /** Module version */
     534    char                        szVersion[GMM_SHARED_MODULE_MAX_VERSION_STRING];
     535    /** Shared region descriptor(s). */
     536    GMMSHAREDREGIONDESC         aRegions[1];
     537} GMMSHAREDMODULE;
     538/** Pointer to a GMMSHAREDMODULE. */
     539typedef GMMSHAREDMODULE *PGMMSHAREDMODULE;
     540
     541/**
    497542 * Page descriptor for GMMR0SharedModuleCheckRange
    498543 */
     
    511556typedef GMMSHAREDPAGEDESC *PGMMSHAREDPAGEDESC;
    512557
    513 GMMR0DECL(int) GMMR0SharedModuleCheckRange(PVM pVM, VMCPUID idCpu, PGMMREGISTERSHAREDMODULEREQ pReq, unsigned idxRegion, unsigned cPages, PGMMSHAREDPAGEDESC paPageDesc);
     558GMMR0DECL(int) GMMR0SharedModuleCheckRange(PGVM pGVM, PGMMSHAREDMODULE pModule, unsigned idxRegion, unsigned cPages, PGMMSHAREDPAGEDESC paPageDesc);
    514559
    515560/**
     
    562607GMMR3DECL(int)  GMMR3BalloonedPages(PVM pVM, GMMBALLOONACTION enmAction, uint32_t cBalloonedPages);
    563608GMMR3DECL(int)  GMMR3RegisterSharedModule(PVM pVM, PGMMREGISTERSHAREDMODULEREQ pReq);
    564 GMMR3DECL(int)  GMMR3UnregisterSharedModule(PVM pVM, PGMMREGISTERSHAREDMODULEREQ pReq);
     609GMMR3DECL(int)  GMMR3UnregisterSharedModule(PVM pVM, PGMMUNREGISTERSHAREDMODULEREQ pReq);
     610GMMR3DECL(int)  GMMR3CheckSharedModules(PVM pVM);
    565611GMMR3DECL(int)  GMMR3ResetSharedModules(PVM pVM);
    566612/** @} */
  • trunk/include/VBox/pgm.h

    r29307 r29424  
    433433VMMR0DECL(int)      PGMR0PhysAllocateHandyPages(PVM pVM, PVMCPU pVCpu);
    434434VMMR0DECL(int)      PGMR0PhysAllocateLargeHandyPage(PVM pVM, PVMCPU pVCpu);
    435 VMMR0DECL(int)      PGMR0SharedModuleCheck(PVM pVM, PVMCPU pVCpu, PGMMREGISTERSHAREDMODULEREQ pReq);
     435VMMR0DECL(int)      PGMR0SharedModuleCheckRegion(PVM pVM, VMCPUID idCpu, PGMMSHAREDMODULE pModule, PGVM pGVM);
    436436VMMR0DECL(int)      PGMR0Trap0eHandlerNestedPaging(PVM pVM, PVMCPU pVCpu, PGMMODE enmShwPagingMode, RTGCUINT uErr, PCPUMCTXCORE pRegFrame, RTGCPHYS pvFault);
    437437# ifdef VBOX_WITH_2X_4GB_ADDR_SPACE
     
    569569VMMR3DECL(int)     PGMR3SharedModuleRegister(PVM pVM, VBOXOSFAMILY enmGuestOS, char *pszModuleName, char *pszVersion, RTGCPTR GCBaseAddr, uint32_t cbModule, unsigned cRegions, VMMDEVSHAREDREGIONDESC *pRegions);
    570570VMMR3DECL(int)     PGMR3SharedModuleUnregister(PVM pVM, char *pszModuleName, char *pszVersion, RTGCPTR GCBaseAddr, uint32_t cbModule);
     571VMMR3DECL(int)     PGMR3SharedModuleCheckAll(PVM pVM);
    571572/** @} */
    572573
  • trunk/include/VBox/vmm.h

    r29201 r29424  
    285285    /** Call PGMR0AllocateLargePage(). */
    286286    VMMR0_DO_PGM_ALLOCATE_LARGE_HANDY_PAGE,
    287     /** Call PGMR0CheckSharedModule(). */
    288     VMMR0_DO_PGM_CHECK_SHARED_MODULE,
    289287
    290288    /** Call GMMR0InitialReservation(). */
     
    314312    /** Call GMMR0ResetSharedModules. */
    315313    VMMR0_DO_GMM_RESET_SHARED_MODULES,
     314    /** Call GMMR0CheckSharedModules. */
     315    VMMR0_DO_GMM_CHECK_SHARED_MODULES,
    316316
    317317    /** Set a GVMM or GMM configuration value. */
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