Lines Matching refs:asid
101 * Given @asid, compute kPCID
103 static inline u16 kern_pcid(u16 asid)
105 VM_WARN_ON_ONCE(asid > MAX_ASID_AVAILABLE);
118 VM_WARN_ON_ONCE(asid & (1 << X86_CR3_PTI_PCID_USER_BIT));
133 return asid + 1;
137 * Given @asid, compute uPCID
139 static inline u16 user_pcid(u16 asid)
141 u16 ret = kern_pcid(asid);
148 static inline unsigned long build_cr3(pgd_t *pgd, u16 asid)
151 return __sme_pa(pgd) | kern_pcid(asid);
153 VM_WARN_ON_ONCE(asid != 0);
158 static inline unsigned long build_cr3_noflush(pgd_t *pgd, u16 asid)
160 VM_WARN_ON_ONCE(asid > MAX_ASID_AVAILABLE);
167 return __sme_pa(pgd) | kern_pcid(asid) | CR3_NOFLUSH;
178 u16 asid;
189 for (asid = 0; asid < TLB_NR_DYN_ASIDS; asid++) {
190 /* Do not need to flush the current asid */
191 if (asid == this_cpu_read(cpu_tlbstate.loaded_mm_asid))
195 * this asid, we do a flush:
197 this_cpu_write(cpu_tlbstate.ctxs[asid].ctx_id, 0);
208 u16 asid;
219 for (asid = 0; asid < TLB_NR_DYN_ASIDS; asid++) {
220 if (this_cpu_read(cpu_tlbstate.ctxs[asid].ctx_id) !=
224 *new_asid = asid;
225 *need_flush = (this_cpu_read(cpu_tlbstate.ctxs[asid].tlb_gen) <
248 static inline void invalidate_user_asid(u16 asid)
264 __set_bit(kern_pcid(asid),