Lines Matching full:pe
233 static inline void pasid_clear_entry(struct pasid_entry *pe) in pasid_clear_entry() argument
235 WRITE_ONCE(pe->val[0], 0); in pasid_clear_entry()
236 WRITE_ONCE(pe->val[1], 0); in pasid_clear_entry()
237 WRITE_ONCE(pe->val[2], 0); in pasid_clear_entry()
238 WRITE_ONCE(pe->val[3], 0); in pasid_clear_entry()
239 WRITE_ONCE(pe->val[4], 0); in pasid_clear_entry()
240 WRITE_ONCE(pe->val[5], 0); in pasid_clear_entry()
241 WRITE_ONCE(pe->val[6], 0); in pasid_clear_entry()
242 WRITE_ONCE(pe->val[7], 0); in pasid_clear_entry()
245 static inline void pasid_clear_entry_with_fpd(struct pasid_entry *pe) in pasid_clear_entry_with_fpd() argument
247 WRITE_ONCE(pe->val[0], PASID_PTE_FPD); in pasid_clear_entry_with_fpd()
248 WRITE_ONCE(pe->val[1], 0); in pasid_clear_entry_with_fpd()
249 WRITE_ONCE(pe->val[2], 0); in pasid_clear_entry_with_fpd()
250 WRITE_ONCE(pe->val[3], 0); in pasid_clear_entry_with_fpd()
251 WRITE_ONCE(pe->val[4], 0); in pasid_clear_entry_with_fpd()
252 WRITE_ONCE(pe->val[5], 0); in pasid_clear_entry_with_fpd()
253 WRITE_ONCE(pe->val[6], 0); in pasid_clear_entry_with_fpd()
254 WRITE_ONCE(pe->val[7], 0); in pasid_clear_entry_with_fpd()
260 struct pasid_entry *pe; in intel_pasid_clear_entry() local
262 pe = intel_pasid_get_entry(dev, pasid); in intel_pasid_clear_entry()
263 if (WARN_ON(!pe)) in intel_pasid_clear_entry()
266 if (fault_ignore && pasid_pte_is_present(pe)) in intel_pasid_clear_entry()
267 pasid_clear_entry_with_fpd(pe); in intel_pasid_clear_entry()
269 pasid_clear_entry(pe); in intel_pasid_clear_entry()
285 pasid_set_domain_id(struct pasid_entry *pe, u64 value) in pasid_set_domain_id() argument
287 pasid_set_bits(&pe->val[1], GENMASK_ULL(15, 0), value); in pasid_set_domain_id()
294 pasid_get_domain_id(struct pasid_entry *pe) in pasid_get_domain_id() argument
296 return (u16)(READ_ONCE(pe->val[1]) & GENMASK_ULL(15, 0)); in pasid_get_domain_id()
304 pasid_set_slptr(struct pasid_entry *pe, u64 value) in pasid_set_slptr() argument
306 pasid_set_bits(&pe->val[0], VTD_PAGE_MASK, value); in pasid_set_slptr()
314 pasid_set_address_width(struct pasid_entry *pe, u64 value) in pasid_set_address_width() argument
316 pasid_set_bits(&pe->val[0], GENMASK_ULL(4, 2), value << 2); in pasid_set_address_width()
324 pasid_set_translation_type(struct pasid_entry *pe, u64 value) in pasid_set_translation_type() argument
326 pasid_set_bits(&pe->val[0], GENMASK_ULL(8, 6), value << 6); in pasid_set_translation_type()
333 static inline void pasid_set_fault_enable(struct pasid_entry *pe) in pasid_set_fault_enable() argument
335 pasid_set_bits(&pe->val[0], 1 << 1, 0); in pasid_set_fault_enable()
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 static inline void pasid_set_nxe(struct pasid_entry *pe) in pasid_set_nxe() argument
372 pasid_set_bits(&pe->val[2], 1 << 5, 1 << 5); in pasid_set_nxe()
380 pasid_set_pgsnp(struct pasid_entry *pe) in pasid_set_pgsnp() argument
382 pasid_set_bits(&pe->val[1], 1ULL << 24, 1ULL << 24); in pasid_set_pgsnp()
390 pasid_set_flptr(struct pasid_entry *pe, u64 value) in pasid_set_flptr() argument
392 pasid_set_bits(&pe->val[2], VTD_PAGE_MASK, value); in pasid_set_flptr()
400 pasid_set_flpm(struct pasid_entry *pe, u64 value) in pasid_set_flpm() argument
402 pasid_set_bits(&pe->val[2], GENMASK_ULL(3, 2), value << 2); in pasid_set_flpm()