VirtualBox

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


Ignore:
Timestamp:
May 28, 2012 10:11:53 AM (13 years ago)
Author:
vboxsync
Message:

PGMPool: PGMPOOLPAGE adjustments and cleanups, no real code changes intended.

Location:
trunk/src/VBox/VMM/include
Files:
2 edited

Legend:

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

    r39034 r41456  
    8686
    8787
    88 
    8988/**
    9089 * Gets the PGMPAGE structure for a guest page.
     
    132131    return VINF_SUCCESS;
    133132}
    134 
    135 
    136133
    137134
     
    417414}
    418415
     416
    419417/**
    420418 * Maps the page into current context (RC and maybe R0).
     
    503501
    504502#endif /* !IN_RC */
    505 
    506503
    507504/**
     
    667664    return VINF_SUCCESS;
    668665}
     666
    669667
    670668/**
     
    11741172
    11751173#endif /* !IN_RC */
    1176 
    11771174
    11781175/**
     
    14311428}
    14321429
     1430
    14331431/**
    14341432 * Locks a page to prevent flushing (important for cr3 root pages or shadow pae pd pages).
  • trunk/src/VBox/VMM/include/PGMInternal.h

    r41437 r41456  
    21142114    R3R0PTRTYPE(void *) pvPageR3;
    21152115#endif
    2116     /** The guest physical address. */
    21172116#if HC_ARCH_BITS == 32 && GC_ARCH_BITS == 64
    21182117    uint32_t            Alignment0;
    21192118#endif
     2119    /** The guest physical address. */
    21202120    RTGCPHYS            GCPhys;
    2121 
    2122     /** Access handler statistics to determine whether the guest is (re)initializing a page table. */
    2123     RTGCPTR             pvLastAccessHandlerRip;
    2124     RTGCPTR             pvLastAccessHandlerFault;
    2125     uint64_t            cLastAccessHandlerCount;
    2126 
    21272121    /** The kind of page we're shadowing. (This is really a PGMPOOLKIND enum.) */
    21282122    uint8_t             enmKind;
    21292123    /** The subkind of page we're shadowing. (This is really a PGMPOOLACCESS enum.) */
    21302124    uint8_t             enmAccess;
     2125    /** This supplements enmKind and enmAccess */
     2126    bool                fA20Enabled : 1;
     2127
     2128    /** Used to indicate that the page is zeroed. */
     2129    bool                fZeroed : 1;
     2130    /** Used to indicate that a PT has non-global entries. */
     2131    bool                fSeenNonGlobal : 1;
     2132    /** Used to indicate that we're monitoring writes to the guest page. */
     2133    bool                fMonitored : 1;
     2134    /** Used to indicate that the page is in the cache (e.g. in the GCPhys hash).
     2135     * (All pages are in the age list.) */
     2136    bool                fCached : 1;
     2137    /** This is used by the R3 access handlers when invoked by an async thread.
     2138     * It's a hack required because of REMR3NotifyHandlerPhysicalDeregister. */
     2139    bool volatile       fReusedFlushPending : 1;
     2140    /** Used to mark the page as dirty (write monitoring is temporarily
     2141     *  off). */
     2142    bool                fDirty : 1;
     2143    bool                afPadding1 : 1+8;
     2144
    21312145    /** The index of this page. */
    21322146    uint16_t            idx;
     
    21542168    /** The previous page in the age list. */
    21552169    uint16_t            iAgePrev;
    2156     /** Used to indicate that the page is zeroed. */
    2157     bool                fZeroed;
    2158     /** Used to indicate that a PT has non-global entries. */
    2159     bool                fSeenNonGlobal;
    2160     /** Used to indicate that we're monitoring writes to the guest page. */
    2161     bool                fMonitored;
    2162     /** Used to indicate that the page is in the cache (e.g. in the GCPhys hash).
    2163      * (All pages are in the age list.) */
    2164     bool                fCached;
    2165     /** This is used by the R3 access handlers when invoked by an async thread.
    2166      * It's a hack required because of REMR3NotifyHandlerPhysicalDeregister. */
    2167     bool volatile       fReusedFlushPending;
    2168     /** Used to mark the page as dirty (write monitoring is temporarily
    2169      *  off). */
    2170     bool                fDirty;
    2171 
    2172     /** Used to indicate that this page can't be flushed. Important for cr3 root pages or shadow pae pd pages). */
    2173     uint32_t            cLocked;
    2174     uint32_t            idxDirty;
    2175     RTGCPTR             pvDirtyFault;
    2176 } PGMPOOLPAGE, *PPGMPOOLPAGE, **PPPGMPOOLPAGE;
     2170    /** Index into PGMPOOL::aDirtyPages if fDirty is set. */
     2171    uint8_t             idxDirtyEntry;
     2172
     2173    /** @name Access handler statistics to determine whether the guest is
     2174     *        (re)initializing a page table.
     2175     * @{ */
     2176    RTGCPTR             GCPtrLastAccessHandlerRip;
     2177    RTGCPTR             GCPtrLastAccessHandlerFault;
     2178    uint64_t            cLastAccessHandler;
     2179    /** @}  */
     2180    /** Used to indicate that this page can't be flushed. Important for cr3 root pages or shadow pae pd pages. */
     2181    uint32_t volatile   cLocked;
     2182#if GC_ARCH_BITS == 64
     2183    uint32_t            Alignment2;
     2184#endif
     2185# ifdef VBOX_STRICT
     2186    RTGCPTR             GCPtrDirtyFault;
     2187# endif
     2188} PGMPOOLPAGE;
     2189/** Pointer to a pool page. */
     2190typedef PGMPOOLPAGE *PPGMPOOLPAGE;
    21772191/** Pointer to a const pool page. */
    21782192typedef PGMPOOLPAGE const *PCPGMPOOLPAGE;
     2193/** Pointer to a pool page pointer. */
     2194typedef PGMPOOLPAGE **PPPGMPOOLPAGE;
    21792195
    21802196
     
    22562272    uint32_t                    u32Padding2;
    22572273# endif
    2258     /* Next available slot. */
     2274    /** Next available slot (in aDirtyPages). */
    22592275    uint32_t                    idxFreeDirtyPage;
    2260     /* Number of active dirty pages. */
     2276    /** Number of active dirty pages. */
    22612277    uint32_t                    cDirtyPages;
    2262     /* Array of current dirty pgm pool page indices. */
     2278    /** Array of current dirty pgm pool page indices. */
    22632279    struct
    22642280    {
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