VirtualBox

Changeset 92162 in vbox for trunk/src/VBox/VMM/include


Ignore:
Timestamp:
Oct 31, 2021 11:34:31 PM (3 years ago)
Author:
vboxsync
Message:

VMM/PGM,DevVGA: Baked MMIO2 dirty page tracking into PGM, moving it out of DevVGA. Using the handler state to record a page as dirty (PGM_PAGE_HNDL_PHYS_STATE_DISABLED). bugref:10122

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/include/PGMInternal.h

    r92157 r92162  
    489489    PGMPHYSHANDLERKIND                  enmKind;
    490490    /** The PGM_PAGE_HNDL_PHYS_STATE_XXX value corresponding to enmKind. */
    491     uint32_t                            uState;
     491    uint8_t                             uState;
     492    /** Whether to keep the PGM lock when calling the handler. */
     493    bool                                fKeepPgmLock;
     494    bool                                afPadding[2];
    492495    /** Pointer to R3 callback function. */
    493496    R3PTRTYPE(PFNPGMPHYSHANDLER)        pfnHandlerR3;
     
    14321435 * @{ */
    14331436/** Set if this is the first chunk in the MMIO2 range. */
    1434 #define PGMREGMMIO2RANGE_F_FIRST_CHUNK      UINT16_C(0x0001)
     1437#define PGMREGMMIO2RANGE_F_FIRST_CHUNK          UINT16_C(0x0001)
    14351438/** Set if this is the last chunk in the MMIO2 range. */
    1436 #define PGMREGMMIO2RANGE_F_LAST_CHUNK       UINT16_C(0x0002)
     1439#define PGMREGMMIO2RANGE_F_LAST_CHUNK           UINT16_C(0x0002)
    14371440/** Set if the whole range is mapped. */
    1438 #define PGMREGMMIO2RANGE_F_MAPPED           UINT16_C(0x0004)
     1441#define PGMREGMMIO2RANGE_F_MAPPED               UINT16_C(0x0004)
    14391442/** Set if it's overlapping, clear if not. */
    1440 #define PGMREGMMIO2RANGE_F_OVERLAPPING      UINT16_C(0x0008)
     1443#define PGMREGMMIO2RANGE_F_OVERLAPPING          UINT16_C(0x0008)
     1444/** This mirrors the PGMPHYS_MMIO2_FLAGS_TRACK_DIRTY_PAGES creation flag.*/
     1445#define PGMREGMMIO2RANGE_F_TRACK_DIRTY_PAGES    UINT16_C(0x0010)
     1446/** Set if the access handler is registered.   */
     1447#define PGMREGMMIO2RANGE_F_IS_TRACKING          UINT16_C(0x0020)
     1448/** Set if dirty page tracking is currently enabled. */
     1449#define PGMREGMMIO2RANGE_F_TRACKING_ENABLED     UINT16_C(0x0040)
     1450/** Set if there are dirty pages in the range.   */
     1451#define PGMREGMMIO2RANGE_F_IS_DIRTY             UINT16_C(0x0080)
    14411452/** @} */
    14421453
     
    30433054    /** Physical access handler type for ROM protection. */
    30443055    PGMPHYSHANDLERTYPE              hRomPhysHandlerType;
    3045     /** Alignment padding.  */
    3046     uint32_t                        u32Padding;
     3056    /** Physical access handler type for MMIO2 dirty page tracing. */
     3057    PGMPHYSHANDLERTYPE              hMmio2DirtyPhysHandlerType;
    30473058
    30483059    /** 4 MB page mask; 32 or 36 bits depending on PSE-36 (identical for all VCPUs) */
     
    37393750bool            pgmHandlerPhysicalIsAll(PVMCC pVM, RTGCPHYS GCPhys);
    37403751void            pgmHandlerPhysicalResetAliasedPage(PVMCC pVM, PPGMPAGE pPage, RTGCPHYS GCPhysPage, PPGMRAMRANGE pRam, bool fDoAccounting);
     3752DECLHIDDEN(int) pgmHandlerPhysicalResetMmio2WithBitmap(PVMCC pVM, RTGCPHYS GCPhys, void *pvBitmap, uint32_t offBitmap);
    37413753DECLCALLBACK(void) pgmR3InfoHandlers(PVM pVM, PCDBGFINFOHLP pHlp, const char *pszArgs);
    37423754int             pgmR3InitSavedState(PVM pVM, uint64_t cbRam);
     
    37603772void            pgmPhysReleaseInternalPageMappingLock(PVMCC pVM, PPGMPAGEMAPLOCK pLock);
    37613773PGM_ALL_CB2_PROTO(FNPGMPHYSHANDLER) pgmPhysRomWriteHandler;
     3774PGM_ALL_CB2_PROTO(FNPGMPHYSHANDLER) pgmPhysMmio2WriteHandler;
    37623775#ifndef IN_RING3
    37633776DECLEXPORT(FNPGMPHYSHANDLER)        pgmPhysHandlerRedirectToHC;
    37643777DECLEXPORT(FNPGMRZPHYSPFHANDLER)    pgmPhysPfHandlerRedirectToHC;
    37653778DECLEXPORT(FNPGMRZPHYSPFHANDLER)    pgmPhysRomWritePfHandler;
     3779DECLEXPORT(FNPGMRZPHYSPFHANDLER)    pgmPhysMmio2WritePfHandler;
    37663780#endif
    37673781int             pgmPhysFreePage(PVM pVM, PGMMFREEPAGESREQ pReq, uint32_t *pcPendingPages, PPGMPAGE pPage, RTGCPHYS GCPhys,
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