Changeset 23484 in vbox for trunk/src/VBox
- Timestamp:
- Oct 1, 2009 1:42:50 PM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 53106
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/PGMInternal.h
r23483 r23484 641 641 uint8_t uTypeY; 642 642 643 #define PGM_PAGE_WITH_U16MISCY 1644 #ifdef PGM_PAGE_WITH_U16MISCY645 643 /** Combination of: 646 644 * - [0-7]: u2HandlerPhysStateY - the physical handler state … … 654 652 */ 655 653 RTUINT16U u16MiscY; 656 #else657 /** 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 state662 * (PGM_PAGE_HNDL_VIRT_STATE_*).663 * - fWrittenToY - flag indicating that a write monitored page was written to664 * when set.665 * - 5 unused bits. */666 uint8_t f8MiscY;667 #endif668 654 669 655 /** Usage tracking (page pool). */ … … 687 673 * @param pPage Pointer to the physical guest page tracking structure. 688 674 */ 689 #ifdef PGM_PAGE_WITH_U16MISCY690 675 #define PGM_PAGE_CLEAR(pPage) \ 691 676 do { \ … … 698 683 (pPage)->cWriteLocksY = 0; \ 699 684 } while (0) 700 #else701 #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 #endif713 685 714 686 /** … … 716 688 * @param pPage Pointer to the physical guest page tracking structure. 717 689 */ 718 #ifdef PGM_PAGE_WITH_U16MISCY719 690 #define PGM_PAGE_INIT(pPage, _HCPhys, _idPage, _uType, _uState) \ 720 691 do { \ … … 729 700 (pPage)->cWriteLocksY = 0; \ 730 701 } while (0) 731 #else732 #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 #endif746 702 747 703 /** … … 882 838 * @param pPage Pointer to the physical guest page tracking structure. 883 839 */ 884 #ifdef PGM_PAGE_WITH_U16MISCY885 840 #define PGM_PAGE_SET_WRITTEN_TO(pPage) do { (pPage)->u16MiscY.au8[1] |= UINT8_C(0x80); } while (0) 886 #else887 #define PGM_PAGE_SET_WRITTEN_TO(pPage) do { (pPage)->f8MiscY |= UINT8_C(0x80); } while (0)888 #endif889 841 890 842 /** … … 892 844 * @param pPage Pointer to the physical guest page tracking structure. 893 845 */ 894 #ifdef PGM_PAGE_WITH_U16MISCY895 846 #define PGM_PAGE_CLEAR_WRITTEN_TO(pPage) do { (pPage)->u16MiscY.au8[1] &= UINT8_C(0x7f); } while (0) 896 #else897 #define PGM_PAGE_CLEAR_WRITTEN_TO(pPage) do { (pPage)->f8MiscY &= UINT8_C(0x7f); } while (0)898 #endif899 847 900 848 /** … … 903 851 * @param pPage Pointer to the physical guest page tracking structure. 904 852 */ 905 #ifdef PGM_PAGE_WITH_U16MISCY906 853 #define PGM_PAGE_IS_WRITTEN_TO(pPage) ( !!((pPage)->u16MiscY.au8[1] & UINT8_C(0x80)) ) 907 #else908 #define PGM_PAGE_IS_WRITTEN_TO(pPage) ( !!((pPage)->f8MiscY & UINT8_C(0x80)) )909 #endif910 854 911 855 … … 930 874 * @param pPage Pointer to the physical guest page tracking structure. 931 875 */ 932 #ifdef PGM_PAGE_WITH_U16MISCY933 876 #define PGM_PAGE_GET_HNDL_PHYS_STATE(pPage) \ 934 877 ( (pPage)->u16MiscY.au8[0] ) 935 #else936 #define PGM_PAGE_GET_HNDL_PHYS_STATE(pPage) \937 ( (pPage)->uHandlerPhysStateY )938 #endif939 878 940 879 /** … … 943 882 * @param _uState The new state value. 944 883 */ 945 #ifdef PGM_PAGE_WITH_U16MISCY946 884 #define PGM_PAGE_SET_HNDL_PHYS_STATE(pPage, _uState) \ 947 885 do { (pPage)->u16MiscY.au8[0] = (_uState); } while (0) 948 #else949 #define PGM_PAGE_SET_HNDL_PHYS_STATE(pPage, _uState) \950 do { (pPage)->uHandlerPhysStateY = (_uState); } while (0)951 #endif952 886 953 887 /** … … 987 921 * @param pPage Pointer to the physical guest page tracking structure. 988 922 */ 989 #ifdef PGM_PAGE_WITH_U16MISCY990 923 #define PGM_PAGE_GET_HNDL_VIRT_STATE(pPage) ( (pPage)->u16MiscY.au8[1] & UINT8_C(0x03) ) 991 #else992 #define PGM_PAGE_GET_HNDL_VIRT_STATE(pPage) ( (pPage)->f8MiscY & UINT8_C(0x03) )993 #endif994 924 995 925 /** … … 998 928 * @param _uState The new state value. 999 929 */ 1000 #ifdef PGM_PAGE_WITH_U16MISCY1001 930 #define PGM_PAGE_SET_HNDL_VIRT_STATE(pPage, _uState) \ 1002 931 do { \ … … 1004 933 | ((_uState) & UINT8_C(0x03)); \ 1005 934 } while (0) 1006 #else1007 #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 #endif1013 935 1014 936 /**
Note:
See TracChangeset
for help on using the changeset viewer.