Lines Matching refs:m
110 static int iommu_regset_show(struct seq_file *m, void *unused) in iommu_regset_show() argument
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()
128 seq_puts(m, "Name\t\t\tOffset\t\tContents\n"); in iommu_regset_show()
136 seq_printf(m, "%-16s\t0x%02x\t\t0x%016llx\n", in iommu_regset_show()
142 seq_printf(m, "%-16s\t0x%02x\t\t0x%016llx\n", in iommu_regset_show()
147 seq_putc(m, '\n'); in iommu_regset_show()
156 static inline void print_tbl_walk(struct seq_file *m) in print_tbl_walk() argument
158 struct tbl_walk *tbl_wlk = m->private; in print_tbl_walk()
160 seq_printf(m, "%02x:%02x.%x\t0x%016llx:0x%016llx\t0x%016llx:0x%016llx\t", in print_tbl_walk()
172 seq_printf(m, "%-6d\t0x%016llx:0x%016llx:0x%016llx\n", -1, in print_tbl_walk()
175 seq_printf(m, "%-6d\t0x%016llx:0x%016llx:0x%016llx\n", in print_tbl_walk()
181 static void pasid_tbl_walk(struct seq_file *m, struct pasid_entry *tbl_entry, in pasid_tbl_walk() argument
184 struct tbl_walk *tbl_wlk = m->private; in pasid_tbl_walk()
191 print_tbl_walk(m); in pasid_tbl_walk()
198 static void pasid_dir_walk(struct seq_file *m, u64 pasid_dir_ptr, in pasid_dir_walk() argument
208 pasid_tbl_walk(m, pasid_tbl, dir_idx); in pasid_dir_walk()
214 static void ctx_tbl_walk(struct seq_file *m, struct intel_iommu *iommu, u16 bus) in ctx_tbl_walk() argument
247 m->private = &tbl_wlk; in ctx_tbl_walk()
252 pasid_dir_walk(m, pasid_dir_ptr, pasid_dir_size); in ctx_tbl_walk()
256 print_tbl_walk(m); in ctx_tbl_walk()
260 static void root_tbl_walk(struct seq_file *m, struct intel_iommu *iommu) in root_tbl_walk() argument
266 seq_printf(m, "IOMMU %s: Root Table Address: 0x%llx\n", iommu->name, in root_tbl_walk()
268 seq_puts(m, "B.D.F\tRoot_entry\t\t\t\tContext_entry\t\t\t\tPASID\tPASID_table_entry\n"); in root_tbl_walk()
276 ctx_tbl_walk(m, iommu, bus); in root_tbl_walk()
281 static int dmar_translation_struct_show(struct seq_file *m, void *unused) in dmar_translation_struct_show() argument
291 seq_printf(m, "DMA Remapping is not enabled on %s\n", in dmar_translation_struct_show()
295 root_tbl_walk(m, iommu); in dmar_translation_struct_show()
296 seq_putc(m, '\n'); in dmar_translation_struct_show()
310 dump_page_info(struct seq_file *m, unsigned long iova, u64 *path) in dump_page_info() argument
312 seq_printf(m, "0x%013lx |\t0x%016llx\t0x%016llx\t0x%016llx\t0x%016llx\t0x%016llx\n", in dump_page_info()
317 static void pgtable_walk_level(struct seq_file *m, struct dma_pte *pde, in pgtable_walk_level() argument
333 dump_page_info(m, start, path); in pgtable_walk_level()
335 pgtable_walk_level(m, phys_to_virt(dma_pte_addr(pde)), in pgtable_walk_level()
344 struct seq_file *m = data; in show_device_domain_translation() local
350 seq_printf(m, "Device %s with pasid %d @0x%llx\n", in show_device_domain_translation()
353 seq_puts(m, "IOVA_PFN\t\tPML5E\t\t\tPML4E\t\t\tPDPE\t\t\tPDE\t\t\tPTE\n"); in show_device_domain_translation()
355 pgtable_walk_level(m, domain->pgd, domain->agaw + 2, 0, path); in show_device_domain_translation()
356 seq_putc(m, '\n'); in show_device_domain_translation()
361 static int domain_translation_struct_show(struct seq_file *m, void *unused) in domain_translation_struct_show() argument
367 ret = bus_for_each_dev(&pci_bus_type, NULL, m, in domain_translation_struct_show()
375 static void invalidation_queue_entry_show(struct seq_file *m, in invalidation_queue_entry_show() argument
383 seq_puts(m, "Index\t\tqw0\t\t\tqw1\t\t\tqw2\t\t\tqw3\t\t\tstatus\n"); in invalidation_queue_entry_show()
385 seq_puts(m, "Index\t\tqw0\t\t\tqw1\t\t\tstatus\n"); in invalidation_queue_entry_show()
391 seq_printf(m, "%5d\t%016llx\t%016llx\t%016llx\t%016llx\t%016x\n", in invalidation_queue_entry_show()
396 seq_printf(m, "%5d\t%016llx\t%016llx\t%016x\n", in invalidation_queue_entry_show()
402 static int invalidation_queue_show(struct seq_file *m, void *unused) in invalidation_queue_show() argument
418 seq_printf(m, "Invalidation queue on IOMMU: %s\n", iommu->name); in invalidation_queue_show()
421 seq_printf(m, " Base: 0x%llx\tHead: %lld\tTail: %lld\n", in invalidation_queue_show()
425 invalidation_queue_entry_show(m, iommu); in invalidation_queue_show()
427 seq_putc(m, '\n'); in invalidation_queue_show()
436 static void ir_tbl_remap_entry_show(struct seq_file *m, in ir_tbl_remap_entry_show() argument
443 seq_puts(m, " Entry SrcID DstID Vct IRTE_high\t\tIRTE_low\n"); in ir_tbl_remap_entry_show()
451 seq_printf(m, " %-5d %02x:%02x.%01x %08x %02x %016llx\t%016llx\n", in ir_tbl_remap_entry_show()
460 static void ir_tbl_posted_entry_show(struct seq_file *m, in ir_tbl_posted_entry_show() argument
467 seq_puts(m, " Entry SrcID PDA_high PDA_low Vct IRTE_high\t\tIRTE_low\n"); in ir_tbl_posted_entry_show()
475 seq_printf(m, " %-5d %02x:%02x.%01x %08x %08x %02x %016llx\t%016llx\n", in ir_tbl_posted_entry_show()
490 static int ir_translation_struct_show(struct seq_file *m, void *unused) in ir_translation_struct_show() argument
502 seq_printf(m, "Remapped Interrupt supported on IOMMU: %s\n", in ir_translation_struct_show()
508 seq_printf(m, " IR table address:%llx\n", irta); in ir_translation_struct_show()
509 ir_tbl_remap_entry_show(m, iommu); in ir_translation_struct_show()
511 seq_puts(m, "Interrupt Remapping is not enabled\n"); in ir_translation_struct_show()
513 seq_putc(m, '\n'); in ir_translation_struct_show()
516 seq_puts(m, "****\n\n"); in ir_translation_struct_show()
522 seq_printf(m, "Posted Interrupt supported on IOMMU: %s\n", in ir_translation_struct_show()
527 seq_printf(m, " IR table address:%llx\n", irta); in ir_translation_struct_show()
528 ir_tbl_posted_entry_show(m, iommu); in ir_translation_struct_show()
530 seq_puts(m, "Interrupt Remapping is not enabled\n"); in ir_translation_struct_show()
532 seq_putc(m, '\n'); in ir_translation_struct_show()