Lines Matching full:pe
224 static inline void pasid_clear_entry(struct pasid_entry *pe) in pasid_clear_entry() argument
226 WRITE_ONCE(pe->val[0], 0); in pasid_clear_entry()
227 WRITE_ONCE(pe->val[1], 0); in pasid_clear_entry()
228 WRITE_ONCE(pe->val[2], 0); in pasid_clear_entry()
229 WRITE_ONCE(pe->val[3], 0); in pasid_clear_entry()
230 WRITE_ONCE(pe->val[4], 0); in pasid_clear_entry()
231 WRITE_ONCE(pe->val[5], 0); in pasid_clear_entry()
232 WRITE_ONCE(pe->val[6], 0); in pasid_clear_entry()
233 WRITE_ONCE(pe->val[7], 0); in pasid_clear_entry()
236 static inline void pasid_clear_entry_with_fpd(struct pasid_entry *pe) in pasid_clear_entry_with_fpd() argument
238 WRITE_ONCE(pe->val[0], PASID_PTE_FPD); in pasid_clear_entry_with_fpd()
239 WRITE_ONCE(pe->val[1], 0); in pasid_clear_entry_with_fpd()
240 WRITE_ONCE(pe->val[2], 0); in pasid_clear_entry_with_fpd()
241 WRITE_ONCE(pe->val[3], 0); in pasid_clear_entry_with_fpd()
242 WRITE_ONCE(pe->val[4], 0); in pasid_clear_entry_with_fpd()
243 WRITE_ONCE(pe->val[5], 0); in pasid_clear_entry_with_fpd()
244 WRITE_ONCE(pe->val[6], 0); in pasid_clear_entry_with_fpd()
245 WRITE_ONCE(pe->val[7], 0); in pasid_clear_entry_with_fpd()
251 struct pasid_entry *pe; in intel_pasid_clear_entry() local
253 pe = intel_pasid_get_entry(dev, pasid); in intel_pasid_clear_entry()
254 if (WARN_ON(!pe)) in intel_pasid_clear_entry()
257 if (fault_ignore && pasid_pte_is_present(pe)) in intel_pasid_clear_entry()
258 pasid_clear_entry_with_fpd(pe); in intel_pasid_clear_entry()
260 pasid_clear_entry(pe); in intel_pasid_clear_entry()
276 pasid_set_domain_id(struct pasid_entry *pe, u64 value) in pasid_set_domain_id() argument
278 pasid_set_bits(&pe->val[1], GENMASK_ULL(15, 0), value); in pasid_set_domain_id()
285 pasid_get_domain_id(struct pasid_entry *pe) in pasid_get_domain_id() argument
287 return (u16)(READ_ONCE(pe->val[1]) & GENMASK_ULL(15, 0)); in pasid_get_domain_id()
295 pasid_set_slptr(struct pasid_entry *pe, u64 value) in pasid_set_slptr() argument
297 pasid_set_bits(&pe->val[0], VTD_PAGE_MASK, value); in pasid_set_slptr()
305 pasid_set_address_width(struct pasid_entry *pe, u64 value) in pasid_set_address_width() argument
307 pasid_set_bits(&pe->val[0], GENMASK_ULL(4, 2), value << 2); in pasid_set_address_width()
315 pasid_set_translation_type(struct pasid_entry *pe, u64 value) in pasid_set_translation_type() argument
317 pasid_set_bits(&pe->val[0], GENMASK_ULL(8, 6), value << 6); in pasid_set_translation_type()
324 static inline void pasid_set_fault_enable(struct pasid_entry *pe) in pasid_set_fault_enable() argument
326 pasid_set_bits(&pe->val[0], 1 << 1, 0); in pasid_set_fault_enable()
333 static inline void pasid_set_sre(struct pasid_entry *pe) in pasid_set_sre() argument
335 pasid_set_bits(&pe->val[2], 1 << 0, 1); in pasid_set_sre()
342 static inline void pasid_set_wpe(struct pasid_entry *pe) in pasid_set_wpe() argument
344 pasid_set_bits(&pe->val[2], 1 << 4, 1 << 4); in pasid_set_wpe()
351 static inline void pasid_set_present(struct pasid_entry *pe) in pasid_set_present() argument
353 pasid_set_bits(&pe->val[0], 1 << 0, 1); in pasid_set_present()
360 static inline void pasid_set_page_snoop(struct pasid_entry *pe, bool value) in pasid_set_page_snoop() argument
362 pasid_set_bits(&pe->val[1], 1 << 23, value << 23); in pasid_set_page_snoop()
370 pasid_set_pgsnp(struct pasid_entry *pe) in pasid_set_pgsnp() argument
372 pasid_set_bits(&pe->val[1], 1ULL << 24, 1ULL << 24); in pasid_set_pgsnp()
380 pasid_set_flptr(struct pasid_entry *pe, u64 value) in pasid_set_flptr() argument
382 pasid_set_bits(&pe->val[2], VTD_PAGE_MASK, value); in pasid_set_flptr()
390 pasid_set_flpm(struct pasid_entry *pe, u64 value) in pasid_set_flpm() argument
392 pasid_set_bits(&pe->val[2], GENMASK_ULL(3, 2), value << 2); in pasid_set_flpm()