81 struct as *hat_as;
82 uint_t hat_stats;
83 pgcnt_t hat_pages_mapped[MAX_PAGE_LEVEL + 1];
84 pgcnt_t hat_ism_pgcnt;
85 cpuset_t hat_cpus;
86 uint16_t hat_flags;
87 htable_t *hat_htable; /* top level htable */
88 struct hat *hat_next;
89 struct hat *hat_prev;
90 uint_t hat_num_hash; /* number of htable hash buckets */
91 htable_t **hat_ht_hash; /* htable hash buckets */
92 htable_t *hat_ht_cached; /* cached free htables */
93 x86pte_t hat_vlp_ptes[VLP_NUM_PTES];
94 #if defined(__amd64) && defined(__xpv)
95 pfn_t hat_user_ptable; /* alt top ptable for user mode */
96 #endif
97 };
98 typedef struct hat hat_t;
99
100 #define PGCNT_INC(hat, level) \
101 atomic_add_long(&(hat)->hat_pages_mapped[level], 1);
102 #define PGCNT_DEC(hat, level) \
103 atomic_add_long(&(hat)->hat_pages_mapped[level], -1);
104
105 /*
106 * Flags for the hat_flags field
107 *
108 * HAT_FREEING - set when HAT is being destroyed - mostly used to detect that
109 * demap()s can be avoided.
110 *
111 * HAT_VLP - indicates a 32 bit process has a virtual address range less than
112 * the hardware's physical address range. (VLP->Virtual Less-than Physical)
113 * Note - never used on the hypervisor.
114 *
115 * HAT_VICTIM - This is set while a hat is being examined for page table
116 * stealing and prevents it from being freed.
117 *
118 * HAT_SHARED - The hat has exported it's page tables via hat_share()
119 *
120 * HAT_PINNED - On the hypervisor, indicates the top page table has been pinned.
121 */
122 #define HAT_FREEING (0x0001)
123 #define HAT_VLP (0x0002)
|
81 struct as *hat_as;
82 uint_t hat_stats;
83 pgcnt_t hat_pages_mapped[MAX_PAGE_LEVEL + 1];
84 pgcnt_t hat_ism_pgcnt;
85 cpuset_t hat_cpus;
86 uint16_t hat_flags;
87 htable_t *hat_htable; /* top level htable */
88 struct hat *hat_next;
89 struct hat *hat_prev;
90 uint_t hat_num_hash; /* number of htable hash buckets */
91 htable_t **hat_ht_hash; /* htable hash buckets */
92 htable_t *hat_ht_cached; /* cached free htables */
93 x86pte_t hat_vlp_ptes[VLP_NUM_PTES];
94 #if defined(__amd64) && defined(__xpv)
95 pfn_t hat_user_ptable; /* alt top ptable for user mode */
96 #endif
97 };
98 typedef struct hat hat_t;
99
100 #define PGCNT_INC(hat, level) \
101 atomic_inc_ulong(&(hat)->hat_pages_mapped[level]);
102 #define PGCNT_DEC(hat, level) \
103 atomic_dec_ulong(&(hat)->hat_pages_mapped[level]);
104
105 /*
106 * Flags for the hat_flags field
107 *
108 * HAT_FREEING - set when HAT is being destroyed - mostly used to detect that
109 * demap()s can be avoided.
110 *
111 * HAT_VLP - indicates a 32 bit process has a virtual address range less than
112 * the hardware's physical address range. (VLP->Virtual Less-than Physical)
113 * Note - never used on the hypervisor.
114 *
115 * HAT_VICTIM - This is set while a hat is being examined for page table
116 * stealing and prevents it from being freed.
117 *
118 * HAT_SHARED - The hat has exported it's page tables via hat_share()
119 *
120 * HAT_PINNED - On the hypervisor, indicates the top page table has been pinned.
121 */
122 #define HAT_FREEING (0x0001)
123 #define HAT_VLP (0x0002)
|