VirtualBox

Changeset 23478 in vbox for trunk/src


Ignore:
Timestamp:
Oct 1, 2009 1:12:06 PM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
53100
Message:

PGMPAGE: Removed the PGM_PAGE_WITH_BIT_FIELD bits.

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

Legend:

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

    r23477 r23478  
    620620/** @} */
    621621
     622
    622623/**
    623624 * A Physical Guest Page tracking structure.
     
    635636    /** The page state.
    636637     * Only 2 bits are really needed for this. */
    637 #ifdef PGM_PAGE_WITH_BIT_FIELD
    638     uint32_t    uStateY : 8;
    639 #else
    640638    uint8_t     uStateY;
    641 #endif
    642639    /** The page type (PGMPAGETYPE).
    643640     * Only 3 bits are really needed for this. */
    644 #ifdef PGM_PAGE_WITH_BIT_FIELD
    645     uint32_t    uTypeY : 8;
    646 #else
    647641    uint8_t     uTypeY;
    648 #endif
    649642
    650643    /** The physical handler state (PGM_PAGE_HNDL_PHYS_STATE*).
    651644     * Only 2 bits are really needed for this.  */
    652 #ifdef PGM_PAGE_WITH_BIT_FIELD
    653     uint32_t    uHandlerPhysStateY : 8;
    654 #else
    655645    uint8_t     uHandlerPhysStateY;
    656 #endif
    657 
    658 #ifdef PGM_PAGE_WITH_BIT_FIELD
    659     /** The virtual handler state (PGM_PAGE_HNDL_VIRT_STATE*) */
    660     uint32_t    u2HandlerVirtStateY : 2;
    661     /** For later. */
    662     uint32_t    afSomethingElse0 : 5;
    663     /** Flag indicating that a write monitored page was written to when set. */
    664     uint32_t    fWrittenToY : 1;
    665 #else
    666     /** Combination of u2HandlerVirtStateY, fWrittenToY and 5 unused bits. */
     646    /** Combination of:
     647     *  - u2HandlerVirtStateY - the virtual handler state
     648     *    (PGM_PAGE_HNDL_VIRT_STATE_*).
     649     *  - fWrittenToY - flag indicating that a write monitored page was written to
     650     *    when set.
     651     *  - 5 unused bits. */
    667652    uint8_t     f8MiscY;
    668 #endif
    669653
    670654    /** Usage tracking (page pool). */
     
    688672 * @param   pPage       Pointer to the physical guest page tracking structure.
    689673 */
    690 #ifdef PGM_PAGE_WITH_BIT_FIELD
    691 # define PGM_PAGE_CLEAR(pPage) \
    692     do { \
    693         (pPage)->HCPhysAndPageID     = 0; \
    694         (pPage)->uStateY             = 0; \
    695         (pPage)->fWrittenToY         = 0; \
    696         (pPage)->afSomethingElse0    = 0; \
    697         (pPage)->uTypeY              = 0; \
    698         (pPage)->uHandlerPhysStateY  = 0; \
    699         (pPage)->u2HandlerVirtStateY = 0; \
    700         (pPage)->u16TrackingY        = 0; \
    701         (pPage)->cReadLocksY         = 0; \
    702         (pPage)->cWriteLocksY        = 0; \
    703     } while (0)
    704 #else
    705 # define PGM_PAGE_CLEAR(pPage) \
     674#define PGM_PAGE_CLEAR(pPage) \
    706675    do { \
    707676        (pPage)->HCPhysAndPageID     = 0; \
     
    714683        (pPage)->cWriteLocksY        = 0; \
    715684    } while (0)
    716 #endif
    717685
    718686/**
     
    720688 * @param   pPage       Pointer to the physical guest page tracking structure.
    721689 */
    722 #ifdef PGM_PAGE_WITH_BIT_FIELD
    723 # define PGM_PAGE_INIT(pPage, _HCPhys, _idPage, _uType, _uState) \
     690#define PGM_PAGE_INIT(pPage, _HCPhys, _idPage, _uType, _uState) \
    724691    do { \
    725692        RTHCPHYS SetHCPhysTmp = (_HCPhys); \
     
    736703        (pPage)->cWriteLocksY        = 0; \
    737704    } while (0)
    738 #else
    739 # define PGM_PAGE_INIT(pPage, _HCPhys, _idPage, _uType, _uState) \
    740     do { \
    741         RTHCPHYS SetHCPhysTmp = (_HCPhys); \
    742         AssertFatal(!(SetHCPhysTmp & ~UINT64_C(0x0000fffffffff000))); \
    743         (pPage)->HCPhysAndPageID     = (SetHCPhysTmp << (28-12)) | ((_idPage) & UINT32_C(0x0fffffff)); \
    744         (pPage)->uStateY             = (_uState); \
    745         (pPage)->uTypeY              = (_uType); \
    746         (pPage)->uHandlerPhysStateY  = 0; \
    747         (pPage)->f8MiscY             = 0; \
    748         (pPage)->u16TrackingY        = 0; \
    749         (pPage)->cReadLocksY         = 0; \
    750         (pPage)->cWriteLocksY        = 0; \
    751     } while (0)
    752 #endif
    753705
    754706/**
     
    889841 * @param   pPage       Pointer to the physical guest page tracking structure.
    890842 */
    891 #ifdef PGM_PAGE_WITH_BIT_FIELD
    892 #define PGM_PAGE_SET_WRITTEN_TO(pPage)      do { (pPage)->fWrittenToY = 1; } while (0)
    893 #else
    894843#define PGM_PAGE_SET_WRITTEN_TO(pPage)      do { (pPage)->f8MiscY |= UINT8_C(0x80); } while (0)
    895 #endif
    896844
    897845/**
     
    899847 * @param   pPage       Pointer to the physical guest page tracking structure.
    900848 */
    901 #ifdef PGM_PAGE_WITH_BIT_FIELD
    902 #define PGM_PAGE_CLEAR_WRITTEN_TO(pPage)    do { (pPage)->fWrittenToY = 0; } while (0)
    903 #else
    904849#define PGM_PAGE_CLEAR_WRITTEN_TO(pPage)    do { (pPage)->f8MiscY &= UINT8_C(0x7f); } while (0)
    905 #endif
    906850
    907851/**
     
    910854 * @param   pPage       Pointer to the physical guest page tracking structure.
    911855 */
    912 #ifdef PGM_PAGE_WITH_BIT_FIELD
    913 #define PGM_PAGE_IS_WRITTEN_TO(pPage)       ( (pPage)->fWrittenToY )
    914 #else
    915856#define PGM_PAGE_IS_WRITTEN_TO(pPage)       ( !!((pPage)->f8MiscY & UINT8_C(0x80)) )
    916 #endif
    917857
    918858
     
    984924 * @param   pPage       Pointer to the physical guest page tracking structure.
    985925 */
    986 #ifdef PGM_PAGE_WITH_BIT_FIELD
    987 #define PGM_PAGE_GET_HNDL_VIRT_STATE(pPage) ( (pPage)->u2HandlerVirtStateY )
    988 #else
    989926#define PGM_PAGE_GET_HNDL_VIRT_STATE(pPage) ( (pPage)->f8MiscY & UINT8_C(0x03) )
    990 #endif
    991927
    992928/**
     
    995931 * @param   _uState     The new state value.
    996932 */
    997 #ifdef PGM_PAGE_WITH_BIT_FIELD
    998 #define PGM_PAGE_SET_HNDL_VIRT_STATE(pPage, _uState) \
    999     do { (pPage)->u2HandlerVirtStateY = (_uState); } while (0)
    1000 #else
    1001933#define PGM_PAGE_SET_HNDL_VIRT_STATE(pPage, _uState) \
    1002934    do { \
     
    1004936                         | ((_uState)        & UINT8_C(0x03)); \
    1005937    } while (0)
    1006 #endif
    1007938
    1008939/**
  • trunk/src/VBox/VMM/PGMPhys.cpp

    r23471 r23478  
    33283328}
    33293329
    3330 
    3331 
Note: See TracChangeset for help on using the changeset viewer.

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