VirtualBox

Changeset 23484 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Oct 1, 2009 1:42:50 PM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
53106
Message:

PGMPAGE: Removed the non-PGM_PAGE_WITH_U16MISCY bits.

File:
1 edited

Legend:

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

    r23483 r23484  
    641641    uint8_t     uTypeY;
    642642
    643 #define PGM_PAGE_WITH_U16MISCY 1
    644 #ifdef PGM_PAGE_WITH_U16MISCY
    645643    /** Combination of:
    646644     *  - [0-7]: u2HandlerPhysStateY - the physical handler state
     
    654652     */
    655653    RTUINT16U   u16MiscY;
    656 #else
    657     /** The physical handler state (PGM_PAGE_HNDL_PHYS_STATE*).
    658      * Only 2 bits are really needed for this.  */
    659     uint8_t     uHandlerPhysStateY;
    660     /** Combination of:
    661      *  - u2HandlerVirtStateY - the virtual handler state
    662      *    (PGM_PAGE_HNDL_VIRT_STATE_*).
    663      *  - fWrittenToY - flag indicating that a write monitored page was written to
    664      *    when set.
    665      *  - 5 unused bits. */
    666     uint8_t     f8MiscY;
    667 #endif
    668654
    669655    /** Usage tracking (page pool). */
     
    687673 * @param   pPage       Pointer to the physical guest page tracking structure.
    688674 */
    689 #ifdef PGM_PAGE_WITH_U16MISCY
    690675#define PGM_PAGE_CLEAR(pPage) \
    691676    do { \
     
    698683        (pPage)->cWriteLocksY        = 0; \
    699684    } while (0)
    700 #else
    701 #define PGM_PAGE_CLEAR(pPage) \
    702     do { \
    703         (pPage)->HCPhysAndPageID     = 0; \
    704         (pPage)->uStateY             = 0; \
    705         (pPage)->uTypeY              = 0; \
    706         (pPage)->uHandlerPhysStateY  = 0; \
    707         (pPage)->f8MiscY             = 0; \
    708         (pPage)->u16TrackingY        = 0; \
    709         (pPage)->cReadLocksY         = 0; \
    710         (pPage)->cWriteLocksY        = 0; \
    711     } while (0)
    712 #endif
    713685
    714686/**
     
    716688 * @param   pPage       Pointer to the physical guest page tracking structure.
    717689 */
    718 #ifdef PGM_PAGE_WITH_U16MISCY
    719690#define PGM_PAGE_INIT(pPage, _HCPhys, _idPage, _uType, _uState) \
    720691    do { \
     
    729700        (pPage)->cWriteLocksY        = 0; \
    730701    } while (0)
    731 #else
    732 #define PGM_PAGE_INIT(pPage, _HCPhys, _idPage, _uType, _uState) \
    733     do { \
    734         RTHCPHYS SetHCPhysTmp = (_HCPhys); \
    735         AssertFatal(!(SetHCPhysTmp & ~UINT64_C(0x0000fffffffff000))); \
    736         (pPage)->HCPhysAndPageID     = (SetHCPhysTmp << (28-12)) | ((_idPage) & UINT32_C(0x0fffffff)); \
    737         (pPage)->uStateY             = (_uState); \
    738         (pPage)->uTypeY              = (_uType); \
    739         (pPage)->uHandlerPhysStateY  = 0; \
    740         (pPage)->f8MiscY             = 0; \
    741         (pPage)->u16TrackingY        = 0; \
    742         (pPage)->cReadLocksY         = 0; \
    743         (pPage)->cWriteLocksY        = 0; \
    744     } while (0)
    745 #endif
    746702
    747703/**
     
    882838 * @param   pPage       Pointer to the physical guest page tracking structure.
    883839 */
    884 #ifdef PGM_PAGE_WITH_U16MISCY
    885840#define PGM_PAGE_SET_WRITTEN_TO(pPage)      do { (pPage)->u16MiscY.au8[1] |= UINT8_C(0x80); } while (0)
    886 #else
    887 #define PGM_PAGE_SET_WRITTEN_TO(pPage)      do { (pPage)->f8MiscY |= UINT8_C(0x80); } while (0)
    888 #endif
    889841
    890842/**
     
    892844 * @param   pPage       Pointer to the physical guest page tracking structure.
    893845 */
    894 #ifdef PGM_PAGE_WITH_U16MISCY
    895846#define PGM_PAGE_CLEAR_WRITTEN_TO(pPage)    do { (pPage)->u16MiscY.au8[1] &= UINT8_C(0x7f); } while (0)
    896 #else
    897 #define PGM_PAGE_CLEAR_WRITTEN_TO(pPage)    do { (pPage)->f8MiscY &= UINT8_C(0x7f); } while (0)
    898 #endif
    899847
    900848/**
     
    903851 * @param   pPage       Pointer to the physical guest page tracking structure.
    904852 */
    905 #ifdef PGM_PAGE_WITH_U16MISCY
    906853#define PGM_PAGE_IS_WRITTEN_TO(pPage)       ( !!((pPage)->u16MiscY.au8[1] & UINT8_C(0x80)) )
    907 #else
    908 #define PGM_PAGE_IS_WRITTEN_TO(pPage)       ( !!((pPage)->f8MiscY & UINT8_C(0x80)) )
    909 #endif
    910854
    911855
     
    930874 * @param   pPage       Pointer to the physical guest page tracking structure.
    931875 */
    932 #ifdef PGM_PAGE_WITH_U16MISCY
    933876#define PGM_PAGE_GET_HNDL_PHYS_STATE(pPage)  \
    934877    ( (pPage)->u16MiscY.au8[0] )
    935 #else
    936 #define PGM_PAGE_GET_HNDL_PHYS_STATE(pPage)  \
    937     ( (pPage)->uHandlerPhysStateY )
    938 #endif
    939878
    940879/**
     
    943882 * @param   _uState     The new state value.
    944883 */
    945 #ifdef PGM_PAGE_WITH_U16MISCY
    946884#define PGM_PAGE_SET_HNDL_PHYS_STATE(pPage, _uState) \
    947885    do { (pPage)->u16MiscY.au8[0] = (_uState); } while (0)
    948 #else
    949 #define PGM_PAGE_SET_HNDL_PHYS_STATE(pPage, _uState) \
    950     do { (pPage)->uHandlerPhysStateY = (_uState); } while (0)
    951 #endif
    952886
    953887/**
     
    987921 * @param   pPage       Pointer to the physical guest page tracking structure.
    988922 */
    989 #ifdef PGM_PAGE_WITH_U16MISCY
    990923#define PGM_PAGE_GET_HNDL_VIRT_STATE(pPage) ( (pPage)->u16MiscY.au8[1] & UINT8_C(0x03) )
    991 #else
    992 #define PGM_PAGE_GET_HNDL_VIRT_STATE(pPage) ( (pPage)->f8MiscY & UINT8_C(0x03) )
    993 #endif
    994924
    995925/**
     
    998928 * @param   _uState     The new state value.
    999929 */
    1000 #ifdef PGM_PAGE_WITH_U16MISCY
    1001930#define PGM_PAGE_SET_HNDL_VIRT_STATE(pPage, _uState) \
    1002931    do { \
     
    1004933                                 | ((_uState)                & UINT8_C(0x03)); \
    1005934    } while (0)
    1006 #else
    1007 #define PGM_PAGE_SET_HNDL_VIRT_STATE(pPage, _uState) \
    1008     do { \
    1009         (pPage)->f8MiscY = ((pPage)->f8MiscY & UINT8_C(0xfc)) \
    1010                          | ((_uState)        & UINT8_C(0x03)); \
    1011     } while (0)
    1012 #endif
    1013935
    1014936/**
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