Lines Matching refs:pe
287 static inline void pasid_clear_entry(struct pasid_entry *pe) in pasid_clear_entry() argument
289 WRITE_ONCE(pe->val[0], 0); in pasid_clear_entry()
290 WRITE_ONCE(pe->val[1], 0); in pasid_clear_entry()
291 WRITE_ONCE(pe->val[2], 0); in pasid_clear_entry()
292 WRITE_ONCE(pe->val[3], 0); in pasid_clear_entry()
293 WRITE_ONCE(pe->val[4], 0); in pasid_clear_entry()
294 WRITE_ONCE(pe->val[5], 0); in pasid_clear_entry()
295 WRITE_ONCE(pe->val[6], 0); in pasid_clear_entry()
296 WRITE_ONCE(pe->val[7], 0); in pasid_clear_entry()
299 static inline void pasid_clear_entry_with_fpd(struct pasid_entry *pe) in pasid_clear_entry_with_fpd() argument
301 WRITE_ONCE(pe->val[0], PASID_PTE_FPD); in pasid_clear_entry_with_fpd()
302 WRITE_ONCE(pe->val[1], 0); in pasid_clear_entry_with_fpd()
303 WRITE_ONCE(pe->val[2], 0); in pasid_clear_entry_with_fpd()
304 WRITE_ONCE(pe->val[3], 0); in pasid_clear_entry_with_fpd()
305 WRITE_ONCE(pe->val[4], 0); in pasid_clear_entry_with_fpd()
306 WRITE_ONCE(pe->val[5], 0); in pasid_clear_entry_with_fpd()
307 WRITE_ONCE(pe->val[6], 0); in pasid_clear_entry_with_fpd()
308 WRITE_ONCE(pe->val[7], 0); in pasid_clear_entry_with_fpd()
314 struct pasid_entry *pe; in intel_pasid_clear_entry() local
316 pe = intel_pasid_get_entry(dev, pasid); in intel_pasid_clear_entry()
317 if (WARN_ON(!pe)) in intel_pasid_clear_entry()
320 if (fault_ignore && pasid_pte_is_present(pe)) in intel_pasid_clear_entry()
321 pasid_clear_entry_with_fpd(pe); in intel_pasid_clear_entry()
323 pasid_clear_entry(pe); in intel_pasid_clear_entry()
339 pasid_set_domain_id(struct pasid_entry *pe, u64 value) in pasid_set_domain_id() argument
341 pasid_set_bits(&pe->val[1], GENMASK_ULL(15, 0), value); in pasid_set_domain_id()
348 pasid_get_domain_id(struct pasid_entry *pe) in pasid_get_domain_id() argument
350 return (u16)(READ_ONCE(pe->val[1]) & GENMASK_ULL(15, 0)); in pasid_get_domain_id()
358 pasid_set_slptr(struct pasid_entry *pe, u64 value) in pasid_set_slptr() argument
360 pasid_set_bits(&pe->val[0], VTD_PAGE_MASK, value); in pasid_set_slptr()
368 pasid_set_address_width(struct pasid_entry *pe, u64 value) in pasid_set_address_width() argument
370 pasid_set_bits(&pe->val[0], GENMASK_ULL(4, 2), value << 2); in pasid_set_address_width()
378 pasid_set_translation_type(struct pasid_entry *pe, u64 value) in pasid_set_translation_type() argument
380 pasid_set_bits(&pe->val[0], GENMASK_ULL(8, 6), value << 6); in pasid_set_translation_type()
387 static inline void pasid_set_fault_enable(struct pasid_entry *pe) in pasid_set_fault_enable() argument
389 pasid_set_bits(&pe->val[0], 1 << 1, 0); in pasid_set_fault_enable()
396 static inline void pasid_set_sre(struct pasid_entry *pe) in pasid_set_sre() argument
398 pasid_set_bits(&pe->val[2], 1 << 0, 1); in pasid_set_sre()
405 static inline void pasid_set_wpe(struct pasid_entry *pe) in pasid_set_wpe() argument
407 pasid_set_bits(&pe->val[2], 1 << 4, 1 << 4); in pasid_set_wpe()
414 static inline void pasid_set_present(struct pasid_entry *pe) in pasid_set_present() argument
416 pasid_set_bits(&pe->val[0], 1 << 0, 1); in pasid_set_present()
423 static inline void pasid_set_page_snoop(struct pasid_entry *pe, bool value) in pasid_set_page_snoop() argument
425 pasid_set_bits(&pe->val[1], 1 << 23, value << 23); in pasid_set_page_snoop()
433 pasid_set_pgsnp(struct pasid_entry *pe) in pasid_set_pgsnp() argument
435 pasid_set_bits(&pe->val[1], 1ULL << 24, 1ULL << 24); in pasid_set_pgsnp()
443 pasid_set_flptr(struct pasid_entry *pe, u64 value) in pasid_set_flptr() argument
445 pasid_set_bits(&pe->val[2], VTD_PAGE_MASK, value); in pasid_set_flptr()
453 pasid_set_flpm(struct pasid_entry *pe, u64 value) in pasid_set_flpm() argument
455 pasid_set_bits(&pe->val[2], GENMASK_ULL(3, 2), value << 2); in pasid_set_flpm()
463 pasid_set_eafe(struct pasid_entry *pe) in pasid_set_eafe() argument
465 pasid_set_bits(&pe->val[2], 1 << 7, 1 << 7); in pasid_set_eafe()