Lines Matching refs:asid
111 * Given @asid, compute kPCID
113 static inline u16 kern_pcid(u16 asid)
115 VM_WARN_ON_ONCE(asid > MAX_ASID_AVAILABLE);
128 VM_WARN_ON_ONCE(asid & (1 << X86_CR3_PTI_PCID_USER_BIT));
143 return asid + 1;
147 * Given @asid, compute uPCID
149 static inline u16 user_pcid(u16 asid)
151 u16 ret = kern_pcid(asid);
158 static inline unsigned long build_cr3(pgd_t *pgd, u16 asid, unsigned long lam)
163 VM_WARN_ON_ONCE(asid > MAX_ASID_AVAILABLE);
164 cr3 |= kern_pcid(asid);
166 VM_WARN_ON_ONCE(asid != 0);
172 static inline unsigned long build_cr3_noflush(pgd_t *pgd, u16 asid,
181 return build_cr3(pgd, asid, lam) | CR3_NOFLUSH;
192 u16 asid;
203 for (asid = 0; asid < TLB_NR_DYN_ASIDS; asid++) {
204 /* Do not need to flush the current asid */
205 if (asid == this_cpu_read(cpu_tlbstate.loaded_mm_asid))
209 * this asid, we do a flush:
211 this_cpu_write(cpu_tlbstate.ctxs[asid].ctx_id, 0);
222 u16 asid;
233 for (asid = 0; asid < TLB_NR_DYN_ASIDS; asid++) {
234 if (this_cpu_read(cpu_tlbstate.ctxs[asid].ctx_id) !=
238 *new_asid = asid;
239 *need_flush = (this_cpu_read(cpu_tlbstate.ctxs[asid].tlb_gen) <
262 static inline void invalidate_user_asid(u16 asid)
278 __set_bit(kern_pcid(asid),