Lines Matching full:iommu

13 #include <linux/intel-iommu.h>
113 struct intel_iommu *iommu; in iommu_regset_show() local
119 for_each_active_iommu(iommu, drhd) { in iommu_regset_show()
121 seq_puts(m, "IOMMU: Invalid base address\n"); in iommu_regset_show()
126 seq_printf(m, "IOMMU: %s Register Base Address: %llx\n", in iommu_regset_show()
127 iommu->name, drhd->reg_base_addr); in iommu_regset_show()
133 raw_spin_lock_irqsave(&iommu->register_lock, flag); in iommu_regset_show()
135 value = dmar_readl(iommu->reg + iommu_regs_32[i].offset); in iommu_regset_show()
141 value = dmar_readq(iommu->reg + iommu_regs_64[i].offset); in iommu_regset_show()
146 raw_spin_unlock_irqrestore(&iommu->register_lock, flag); in iommu_regset_show()
214 static void ctx_tbl_walk(struct seq_file *m, struct intel_iommu *iommu, u16 bus) in ctx_tbl_walk() argument
236 context = iommu_context_addr(iommu, bus, devfn, 0); in ctx_tbl_walk()
245 tbl_wlk.rt_entry = &iommu->root_entry[bus]; in ctx_tbl_walk()
249 if (dmar_readq(iommu->reg + DMAR_RTADDR_REG) & DMA_RTADDR_SMT) { in ctx_tbl_walk()
260 static void root_tbl_walk(struct seq_file *m, struct intel_iommu *iommu) in root_tbl_walk() argument
265 spin_lock_irqsave(&iommu->lock, flags); in root_tbl_walk()
266 seq_printf(m, "IOMMU %s: Root Table Address: 0x%llx\n", iommu->name, in root_tbl_walk()
267 (u64)virt_to_phys(iommu->root_entry)); in root_tbl_walk()
276 ctx_tbl_walk(m, iommu, bus); in root_tbl_walk()
278 spin_unlock_irqrestore(&iommu->lock, flags); in root_tbl_walk()
284 struct intel_iommu *iommu; in dmar_translation_struct_show() local
288 for_each_active_iommu(iommu, drhd) { in dmar_translation_struct_show()
289 sts = dmar_readl(iommu->reg + DMAR_GSTS_REG); in dmar_translation_struct_show()
292 iommu->name); in dmar_translation_struct_show()
295 root_tbl_walk(m, iommu); in dmar_translation_struct_show()
376 struct intel_iommu *iommu) in invalidation_queue_entry_show() argument
378 int index, shift = qi_shift(iommu); in invalidation_queue_entry_show()
382 if (ecap_smts(iommu->ecap)) in invalidation_queue_entry_show()
389 desc = iommu->qi->desc + offset; in invalidation_queue_entry_show()
390 if (ecap_smts(iommu->ecap)) in invalidation_queue_entry_show()
394 iommu->qi->desc_status[index]); in invalidation_queue_entry_show()
398 iommu->qi->desc_status[index]); in invalidation_queue_entry_show()
405 struct intel_iommu *iommu; in invalidation_queue_show() local
411 for_each_active_iommu(iommu, drhd) { in invalidation_queue_show()
412 qi = iommu->qi; in invalidation_queue_show()
413 shift = qi_shift(iommu); in invalidation_queue_show()
415 if (!qi || !ecap_qis(iommu->ecap)) in invalidation_queue_show()
418 seq_printf(m, "Invalidation queue on IOMMU: %s\n", iommu->name); in invalidation_queue_show()
423 dmar_readq(iommu->reg + DMAR_IQH_REG) >> shift, in invalidation_queue_show()
424 dmar_readq(iommu->reg + DMAR_IQT_REG) >> shift); in invalidation_queue_show()
425 invalidation_queue_entry_show(m, iommu); in invalidation_queue_show()
437 struct intel_iommu *iommu) in ir_tbl_remap_entry_show() argument
447 ri_entry = &iommu->ir_table->base[idx]; in ir_tbl_remap_entry_show()
461 struct intel_iommu *iommu) in ir_tbl_posted_entry_show() argument
471 pi_entry = &iommu->ir_table->base[idx]; in ir_tbl_posted_entry_show()
493 struct intel_iommu *iommu; in ir_translation_struct_show() local
498 for_each_active_iommu(iommu, drhd) { in ir_translation_struct_show()
499 if (!ecap_ir_support(iommu->ecap)) in ir_translation_struct_show()
502 seq_printf(m, "Remapped Interrupt supported on IOMMU: %s\n", in ir_translation_struct_show()
503 iommu->name); in ir_translation_struct_show()
505 sts = dmar_readl(iommu->reg + DMAR_GSTS_REG); in ir_translation_struct_show()
506 if (iommu->ir_table && (sts & DMA_GSTS_IRES)) { in ir_translation_struct_show()
507 irta = virt_to_phys(iommu->ir_table->base); in ir_translation_struct_show()
509 ir_tbl_remap_entry_show(m, iommu); in ir_translation_struct_show()
518 for_each_active_iommu(iommu, drhd) { in ir_translation_struct_show()
519 if (!cap_pi_support(iommu->cap)) in ir_translation_struct_show()
522 seq_printf(m, "Posted Interrupt supported on IOMMU: %s\n", in ir_translation_struct_show()
523 iommu->name); in ir_translation_struct_show()
525 if (iommu->ir_table) { in ir_translation_struct_show()
526 irta = virt_to_phys(iommu->ir_table->base); in ir_translation_struct_show()
528 ir_tbl_posted_entry_show(m, iommu); in ir_translation_struct_show()