Changeset 36940 in vbox for trunk/src/VBox/VMM/include
- Timestamp:
- May 3, 2011 2:55:19 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/include/PGMInternal.h
r36939 r36940 694 694 struct 695 695 { 696 /** The physical address and the Page ID. */ 697 RTHCPHYS HCPhysAndPageID; 698 699 /** 1:0 - The physical handler state 700 * (PGM_PAGE_HNDL_PHYS_STATE_*). */ 701 uint32_t u2HandlerPhysStateY : 2; 702 /** 7:2 - Currently unused. */ 703 uint32_t u6Unused1 : 6; 704 /** 9:8 - The physical handler state 705 * (PGM_PAGE_HNDL_VIRT_STATE_*). */ 706 uint32_t u2HandlerVirtStateY : 2; 707 /** 10 - Indicator of dirty page for fault tolerance 708 * tracking. */ 709 uint32_t fFTDirtyY : 1; 710 /** 12:11 - Currently unused. */ 711 uint32_t u2Unused2 : 2; 712 /** 14:13 - Paging structure needed to map the page 696 /** 1:0 - The physical handler state (PGM_PAGE_HNDL_PHYS_STATE_*). */ 697 uint64_t u2HandlerPhysStateY : 2; 698 /** 3:2 - Paging structure needed to map the page 713 699 * (PGM_PAGE_PDE_TYPE_*). */ 714 uint32_t u2PDETypeY : 2; 715 /** 15 - Flag indicating that a write monitored page was written 716 * to when set. */ 717 uint32_t fWrittenToY : 1; 718 /** 18:16 - The page state. */ 719 uint32_t uStateY : 3; 720 /** 21:19 - The page type (PGMPAGETYPE). */ 721 uint32_t uTypeY : 3; 722 /** 31:22 - PTE index for usage tracking (page pool). */ 723 uint32_t u10PteIdx : 10; 724 700 uint64_t u2PDETypeY : 2; 701 /** 4 - Indicator of dirty page for fault tolerance tracking. */ 702 uint64_t fFTDirtyY : 1; 703 /** 5 - Flag indicating that a write monitored page was written to 704 * when set. */ 705 uint64_t fWrittenToY : 1; 706 /** 7:6 - Unused. */ 707 uint64_t u2Unused0 : 2; 708 /** 9:8 - The physical handler state (PGM_PAGE_HNDL_VIRT_STATE_*). */ 709 uint64_t u2HandlerVirtStateY : 2; 710 /** 11:10 - Unused. */ 711 uint64_t u2Unused1 : 2; 712 /** 12:48 - The host physical frame number (shift left to get the 713 * address). */ 714 uint64_t HCPhysFN : 36; 715 /** 50:48 - The page state. */ 716 uint64_t uStateY : 3; 717 /** 51:53 - The page type (PGMPAGETYPE). */ 718 uint64_t uTypeY : 3; 719 /** 63:54 - PTE index for usage tracking (page pool). */ 720 uint64_t u10PteIdx : 10; 721 722 /** The GMM page ID. */ 723 uint32_t idPage; 725 724 /** Usage tracking (page pool). */ 726 725 uint16_t u16TrackingY; … … 765 764 #define PGM_PAGE_INIT(a_pPage, a_HCPhys, a_idPage, a_uType, a_uState) \ 766 765 do { \ 767 (a_pPage)->au64[1] = 0; \768 766 RTHCPHYS SetHCPhysTmp = (a_HCPhys); \ 769 767 AssertFatal(!(SetHCPhysTmp & ~UINT64_C(0x0000fffffffff000))); \ 770 (a_pPage)->s.HCPhysAndPageID = (SetHCPhysTmp << (28-12)) | ((a_idPage) & UINT32_C(0x0fffffff)); \ 768 (a_pPage)->au64[0] = SetHCPhysTmp; \ 769 (a_pPage)->au64[1] = 0; \ 770 (a_pPage)->s.idPage = (a_idPage); \ 771 771 (a_pPage)->s.uStateY = (a_uState); \ 772 772 (a_pPage)->s.uTypeY = (a_uType); \ … … 826 826 * @param a_pPage Pointer to the physical guest page tracking structure. 827 827 */ 828 #define PGM_PAGE_GET_HCPHYS(a_pPage) ( ((a_pPage)->s.HCPhysAndPageID >> 28) << 12 ) 828 #if 0 829 #define PGM_PAGE_GET_HCPHYS(a_pPage) ( (a_pPage)->s.HCPhysFN << 12 ) 830 #else 831 #define PGM_PAGE_GET_HCPHYS(a_pPage) ( (a_pPage)->au64[0] & UINT64_C(0x0000fffffffff000) ) 832 #endif 829 833 830 834 /** … … 837 841 RTHCPHYS const SetHCPhysTmp = (a_HCPhys); \ 838 842 AssertFatal(!(SetHCPhysTmp & ~UINT64_C(0x0000fffffffff000))); \ 839 (a_pPage)->s.HCPhysAndPageID = ((a_pPage)->s.HCPhysAndPageID & UINT32_C(0x0fffffff)) \ 840 | (SetHCPhysTmp << (28-12)); \ 843 (a_pPage)->s.HCPhysFN = SetHCPhysTmp >> 12; \ 841 844 } while (0) 842 845 … … 846 849 * @param a_pPage Pointer to the physical guest page tracking structure. 847 850 */ 848 #define PGM_PAGE_GET_PAGEID(a_pPage) ( (uint32_t)( (a_pPage)->s.HCPhysAndPageID & UINT32_C(0x0fffffff)))851 #define PGM_PAGE_GET_PAGEID(a_pPage) ( (uint32_t)(a_pPage)->s.idPage ) 849 852 850 853 /** … … 855 858 #define PGM_PAGE_SET_PAGEID(a_pPage, a_idPage) \ 856 859 do { \ 857 (a_pPage)->s.HCPhysAndPageID = (((a_pPage)->s.HCPhysAndPageID) & UINT64_C(0xfffffffff0000000)) \ 858 | ((a_idPage) & UINT32_C(0x0fffffff)); \ 860 (a_pPage)->s.idPage = (a_idPage); \ 859 861 } while (0) 860 862 … … 871 873 * @param a_pPage Pointer to the physical guest page tracking structure. 872 874 */ 873 #define PGM_PAGE_GET_PAGE_IN_CHUNK(a_pPage) ( (uint32_t)((a_pPage)->s.HCPhysAndPageID & GMM_PAGEID_IDX_MASK))875 #define PGM_PAGE_GET_PAGE_IN_CHUNK(a_pPage) ( PGM_PAGE_GET_PAGEID(a_pPage) & GMM_PAGEID_IDX_MASK ) 874 876 875 877 /** … … 1111 1113 #ifdef PGM_PAGE_WITH_OPTIMIZED_HANDLER_ACCESS 1112 1114 # define PGM_PAGE_HAS_ANY_HANDLERS(a_pPage) \ 1113 ( ((a_pPage)->au32[ 2] & UINT16_C(0x0303)) != 0 )1115 ( ((a_pPage)->au32[0] & UINT16_C(0x0303)) != 0 ) 1114 1116 #else 1115 1117 # define PGM_PAGE_HAS_ANY_HANDLERS(a_pPage) \ … … 1125 1127 #ifdef PGM_PAGE_WITH_OPTIMIZED_HANDLER_ACCESS 1126 1128 # define PGM_PAGE_HAS_ACTIVE_HANDLERS(a_pPage) \ 1127 ( ((a_pPage)->au32[ 2] & UINT16_C(0x0202)) != 0 )1129 ( ((a_pPage)->au32[0] & UINT16_C(0x0202)) != 0 ) 1128 1130 #else 1129 1131 # define PGM_PAGE_HAS_ACTIVE_HANDLERS(a_pPage) \ … … 1139 1141 #ifdef PGM_PAGE_WITH_OPTIMIZED_HANDLER_ACCESS 1140 1142 # define PGM_PAGE_HAS_ACTIVE_ALL_HANDLERS(a_pPage) \ 1141 ( ( ((a_pPage)->au8[ 8] | (a_pPage)->au8[9]) & UINT8_C(0x3) ) \1143 ( ( ((a_pPage)->au8[0] | (a_pPage)->au8[1]) & UINT8_C(0x3) ) \ 1142 1144 == PGM_PAGE_HNDL_PHYS_STATE_ALL ) 1143 1145 #else
Note:
See TracChangeset
for help on using the changeset viewer.