1 // SPDX-License-Identifier: GPL-2.0
3 * Copyright © 2018 Intel Corporation.
11 #include <linux/debugfs.h>
12 #include <linux/dmar.h>
13 #include <linux/pci.h>
15 #include <asm/irq_remapping.h>
25 struct root_entry *rt_entry;
26 struct context_entry *ctx_entry;
27 struct pasid_entry *pasid_tbl_entry;
35 #define DEBUG_BUFFER_SIZE 1024
36 static char debug_buf[DEBUG_BUFFER_SIZE];
38 #define IOMMU_REGSET_ENTRY(_reg_) \
39 { DMAR_##_reg_##_REG, __stringify(_reg_) }
41 static const struct iommu_regset iommu_regs_32[] = {
42 IOMMU_REGSET_ENTRY(VER),
43 IOMMU_REGSET_ENTRY(GCMD),
44 IOMMU_REGSET_ENTRY(GSTS),
45 IOMMU_REGSET_ENTRY(FSTS),
46 IOMMU_REGSET_ENTRY(FECTL),
47 IOMMU_REGSET_ENTRY(FEDATA),
48 IOMMU_REGSET_ENTRY(FEADDR),
49 IOMMU_REGSET_ENTRY(FEUADDR),
50 IOMMU_REGSET_ENTRY(PMEN),
51 IOMMU_REGSET_ENTRY(PLMBASE),
52 IOMMU_REGSET_ENTRY(PLMLIMIT),
53 IOMMU_REGSET_ENTRY(ICS),
54 IOMMU_REGSET_ENTRY(PRS),
55 IOMMU_REGSET_ENTRY(PECTL),
56 IOMMU_REGSET_ENTRY(PEDATA),
57 IOMMU_REGSET_ENTRY(PEADDR),
58 IOMMU_REGSET_ENTRY(PEUADDR),
61 static const struct iommu_regset iommu_regs_64[] = {
62 IOMMU_REGSET_ENTRY(CAP),
63 IOMMU_REGSET_ENTRY(ECAP),
64 IOMMU_REGSET_ENTRY(RTADDR),
65 IOMMU_REGSET_ENTRY(CCMD),
66 IOMMU_REGSET_ENTRY(AFLOG),
67 IOMMU_REGSET_ENTRY(PHMBASE),
68 IOMMU_REGSET_ENTRY(PHMLIMIT),
69 IOMMU_REGSET_ENTRY(IQH),
70 IOMMU_REGSET_ENTRY(IQT),
71 IOMMU_REGSET_ENTRY(IQA),
72 IOMMU_REGSET_ENTRY(IRTA),
73 IOMMU_REGSET_ENTRY(PQH),
74 IOMMU_REGSET_ENTRY(PQT),
75 IOMMU_REGSET_ENTRY(PQA),
76 IOMMU_REGSET_ENTRY(MTRRCAP),
77 IOMMU_REGSET_ENTRY(MTRRDEF),
78 IOMMU_REGSET_ENTRY(MTRR_FIX64K_00000),
79 IOMMU_REGSET_ENTRY(MTRR_FIX16K_80000),
80 IOMMU_REGSET_ENTRY(MTRR_FIX16K_A0000),
81 IOMMU_REGSET_ENTRY(MTRR_FIX4K_C0000),
82 IOMMU_REGSET_ENTRY(MTRR_FIX4K_C8000),
83 IOMMU_REGSET_ENTRY(MTRR_FIX4K_D0000),
84 IOMMU_REGSET_ENTRY(MTRR_FIX4K_D8000),
85 IOMMU_REGSET_ENTRY(MTRR_FIX4K_E0000),
86 IOMMU_REGSET_ENTRY(MTRR_FIX4K_E8000),
87 IOMMU_REGSET_ENTRY(MTRR_FIX4K_F0000),
88 IOMMU_REGSET_ENTRY(MTRR_FIX4K_F8000),
89 IOMMU_REGSET_ENTRY(MTRR_PHYSBASE0),
90 IOMMU_REGSET_ENTRY(MTRR_PHYSMASK0),
91 IOMMU_REGSET_ENTRY(MTRR_PHYSBASE1),
92 IOMMU_REGSET_ENTRY(MTRR_PHYSMASK1),
93 IOMMU_REGSET_ENTRY(MTRR_PHYSBASE2),
94 IOMMU_REGSET_ENTRY(MTRR_PHYSMASK2),
95 IOMMU_REGSET_ENTRY(MTRR_PHYSBASE3),
96 IOMMU_REGSET_ENTRY(MTRR_PHYSMASK3),
97 IOMMU_REGSET_ENTRY(MTRR_PHYSBASE4),
98 IOMMU_REGSET_ENTRY(MTRR_PHYSMASK4),
99 IOMMU_REGSET_ENTRY(MTRR_PHYSBASE5),
100 IOMMU_REGSET_ENTRY(MTRR_PHYSMASK5),
101 IOMMU_REGSET_ENTRY(MTRR_PHYSBASE6),
102 IOMMU_REGSET_ENTRY(MTRR_PHYSMASK6),
103 IOMMU_REGSET_ENTRY(MTRR_PHYSBASE7),
104 IOMMU_REGSET_ENTRY(MTRR_PHYSMASK7),
105 IOMMU_REGSET_ENTRY(MTRR_PHYSBASE8),
106 IOMMU_REGSET_ENTRY(MTRR_PHYSMASK8),
107 IOMMU_REGSET_ENTRY(MTRR_PHYSBASE9),
108 IOMMU_REGSET_ENTRY(MTRR_PHYSMASK9),
109 IOMMU_REGSET_ENTRY(VCCAP),
110 IOMMU_REGSET_ENTRY(VCMD),
111 IOMMU_REGSET_ENTRY(VCRSP),
114 static struct dentry *intel_iommu_debug;
116 static int iommu_regset_show(struct seq_file *m, void *unused)
118 struct dmar_drhd_unit *drhd;
119 struct intel_iommu *iommu;
125 for_each_active_iommu(iommu, drhd) {
126 if (!drhd->reg_base_addr) {
127 seq_puts(m, "IOMMU: Invalid base address\n");
132 seq_printf(m, "IOMMU: %s Register Base Address: %llx\n",
133 iommu->name, drhd->reg_base_addr);
134 seq_puts(m, "Name\t\t\tOffset\t\tContents\n");
136 * Publish the contents of the 64-bit hardware registers
137 * by adding the offset to the pointer (virtual address).
139 raw_spin_lock_irqsave(&iommu->register_lock, flag);
140 for (i = 0 ; i < ARRAY_SIZE(iommu_regs_32); i++) {
141 value = dmar_readl(iommu->reg + iommu_regs_32[i].offset);
142 seq_printf(m, "%-16s\t0x%02x\t\t0x%016llx\n",
143 iommu_regs_32[i].regs, iommu_regs_32[i].offset,
146 for (i = 0 ; i < ARRAY_SIZE(iommu_regs_64); i++) {
147 value = dmar_readq(iommu->reg + iommu_regs_64[i].offset);
148 seq_printf(m, "%-16s\t0x%02x\t\t0x%016llx\n",
149 iommu_regs_64[i].regs, iommu_regs_64[i].offset,
152 raw_spin_unlock_irqrestore(&iommu->register_lock, flag);
160 DEFINE_SHOW_ATTRIBUTE(iommu_regset);
162 static inline void print_tbl_walk(struct seq_file *m)
164 struct tbl_walk *tbl_wlk = m->private;
166 seq_printf(m, "%02x:%02x.%x\t0x%016llx:0x%016llx\t0x%016llx:0x%016llx\t",
167 tbl_wlk->bus, PCI_SLOT(tbl_wlk->devfn),
168 PCI_FUNC(tbl_wlk->devfn), tbl_wlk->rt_entry->hi,
169 tbl_wlk->rt_entry->lo, tbl_wlk->ctx_entry->hi,
170 tbl_wlk->ctx_entry->lo);
173 * A legacy mode DMAR doesn't support PASID, hence default it to -1
174 * indicating that it's invalid. Also, default all PASID related fields
177 if (!tbl_wlk->pasid_tbl_entry)
178 seq_printf(m, "%-6d\t0x%016llx:0x%016llx:0x%016llx\n", -1,
179 (u64)0, (u64)0, (u64)0);
181 seq_printf(m, "%-6d\t0x%016llx:0x%016llx:0x%016llx\n",
182 tbl_wlk->pasid, tbl_wlk->pasid_tbl_entry->val[2],
183 tbl_wlk->pasid_tbl_entry->val[1],
184 tbl_wlk->pasid_tbl_entry->val[0]);
187 static void pasid_tbl_walk(struct seq_file *m, struct pasid_entry *tbl_entry,
190 struct tbl_walk *tbl_wlk = m->private;
193 for (tbl_idx = 0; tbl_idx < PASID_TBL_ENTRIES; tbl_idx++) {
194 if (pasid_pte_is_present(tbl_entry)) {
195 tbl_wlk->pasid_tbl_entry = tbl_entry;
196 tbl_wlk->pasid = (dir_idx << PASID_PDE_SHIFT) + tbl_idx;
204 static void pasid_dir_walk(struct seq_file *m, u64 pasid_dir_ptr,
207 struct pasid_dir_entry *dir_entry = phys_to_virt(pasid_dir_ptr);
208 struct pasid_entry *pasid_tbl;
211 for (dir_idx = 0; dir_idx < pasid_dir_size; dir_idx++) {
212 pasid_tbl = get_pasid_table_from_pde(dir_entry);
214 pasid_tbl_walk(m, pasid_tbl, dir_idx);
220 static void ctx_tbl_walk(struct seq_file *m, struct intel_iommu *iommu, u16 bus)
222 struct context_entry *context;
223 u16 devfn, pasid_dir_size;
226 for (devfn = 0; devfn < 256; devfn++) {
227 struct tbl_walk tbl_wlk = {0};
230 * Scalable mode root entry points to upper scalable mode
231 * context table and lower scalable mode context table. Each
232 * scalable mode context table has 128 context entries where as
233 * legacy mode context table has 256 context entries. So in
234 * scalable mode, the context entries for former 128 devices are
235 * in the lower scalable mode context table, while the latter
236 * 128 devices are in the upper scalable mode context table.
237 * In scalable mode, when devfn > 127, iommu_context_addr()
238 * automatically refers to upper scalable mode context table and
239 * hence the caller doesn't have to worry about differences
240 * between scalable mode and non scalable mode.
242 context = iommu_context_addr(iommu, bus, devfn, 0);
246 if (!context_present(context))
250 tbl_wlk.devfn = devfn;
251 tbl_wlk.rt_entry = &iommu->root_entry[bus];
252 tbl_wlk.ctx_entry = context;
253 m->private = &tbl_wlk;
255 if (dmar_readq(iommu->reg + DMAR_RTADDR_REG) & DMA_RTADDR_SMT) {
256 pasid_dir_ptr = context->lo & VTD_PAGE_MASK;
257 pasid_dir_size = get_pasid_dir_size(context);
258 pasid_dir_walk(m, pasid_dir_ptr, pasid_dir_size);
266 static void root_tbl_walk(struct seq_file *m, struct intel_iommu *iommu)
270 spin_lock(&iommu->lock);
271 seq_printf(m, "IOMMU %s: Root Table Address: 0x%llx\n", iommu->name,
272 (u64)virt_to_phys(iommu->root_entry));
273 seq_puts(m, "B.D.F\tRoot_entry\t\t\t\tContext_entry\t\t\t\tPASID\tPASID_table_entry\n");
276 * No need to check if the root entry is present or not because
277 * iommu_context_addr() performs the same check before returning
280 for (bus = 0; bus < 256; bus++)
281 ctx_tbl_walk(m, iommu, bus);
282 spin_unlock(&iommu->lock);
285 static int dmar_translation_struct_show(struct seq_file *m, void *unused)
287 struct dmar_drhd_unit *drhd;
288 struct intel_iommu *iommu;
292 for_each_active_iommu(iommu, drhd) {
293 sts = dmar_readl(iommu->reg + DMAR_GSTS_REG);
294 if (!(sts & DMA_GSTS_TES)) {
295 seq_printf(m, "DMA Remapping is not enabled on %s\n",
299 root_tbl_walk(m, iommu);
306 DEFINE_SHOW_ATTRIBUTE(dmar_translation_struct);
308 static inline unsigned long level_to_directory_size(int level)
310 return BIT_ULL(VTD_PAGE_SHIFT + VTD_STRIDE_SHIFT * (level - 1));
314 dump_page_info(struct seq_file *m, unsigned long iova, u64 *path)
316 seq_printf(m, "0x%013lx |\t0x%016llx\t0x%016llx\t0x%016llx",
317 iova >> VTD_PAGE_SHIFT, path[5], path[4], path[3]);
319 seq_printf(m, "\t0x%016llx", path[2]);
321 seq_printf(m, "\t0x%016llx", path[1]);
326 static void pgtable_walk_level(struct seq_file *m, struct dma_pte *pde,
327 int level, unsigned long start,
332 if (level > 5 || level < 1)
335 for (i = 0; i < BIT_ULL(VTD_STRIDE_SHIFT);
336 i++, pde++, start += level_to_directory_size(level)) {
337 if (!dma_pte_present(pde))
340 path[level] = pde->val;
341 if (dma_pte_superpage(pde) || level == 1)
342 dump_page_info(m, start, path);
344 pgtable_walk_level(m, phys_to_virt(dma_pte_addr(pde)),
345 level - 1, start, path);
350 static int __show_device_domain_translation(struct device *dev, void *data)
352 struct dmar_domain *domain;
353 struct seq_file *m = data;
356 domain = to_dmar_domain(iommu_get_domain_for_dev(dev));
360 seq_printf(m, "Device %s @0x%llx\n", dev_name(dev),
361 (u64)virt_to_phys(domain->pgd));
362 seq_puts(m, "IOVA_PFN\t\tPML5E\t\t\tPML4E\t\t\tPDPE\t\t\tPDE\t\t\tPTE\n");
364 pgtable_walk_level(m, domain->pgd, domain->agaw + 2, 0, path);
371 static int show_device_domain_translation(struct device *dev, void *data)
373 struct iommu_group *group;
375 group = iommu_group_get(dev);
378 * The group->mutex is held across the callback, which will
379 * block calls to iommu_attach/detach_group/device. Hence,
380 * the domain of the device will not change during traversal.
382 * All devices in an iommu group share a single domain, hence
383 * we only dump the domain of the first device. Even though,
384 * this code still possibly races with the iommu_unmap()
385 * interface. This could be solved by RCU-freeing the page
386 * table pages in the iommu_unmap() path.
388 iommu_group_for_each_dev(group, data,
389 __show_device_domain_translation);
390 iommu_group_put(group);
396 static int domain_translation_struct_show(struct seq_file *m, void *unused)
398 return bus_for_each_dev(&pci_bus_type, NULL, m,
399 show_device_domain_translation);
401 DEFINE_SHOW_ATTRIBUTE(domain_translation_struct);
403 static void invalidation_queue_entry_show(struct seq_file *m,
404 struct intel_iommu *iommu)
406 int index, shift = qi_shift(iommu);
407 struct qi_desc *desc;
410 if (ecap_smts(iommu->ecap))
411 seq_puts(m, "Index\t\tqw0\t\t\tqw1\t\t\tqw2\t\t\tqw3\t\t\tstatus\n");
413 seq_puts(m, "Index\t\tqw0\t\t\tqw1\t\t\tstatus\n");
415 for (index = 0; index < QI_LENGTH; index++) {
416 offset = index << shift;
417 desc = iommu->qi->desc + offset;
418 if (ecap_smts(iommu->ecap))
419 seq_printf(m, "%5d\t%016llx\t%016llx\t%016llx\t%016llx\t%016x\n",
420 index, desc->qw0, desc->qw1,
421 desc->qw2, desc->qw3,
422 iommu->qi->desc_status[index]);
424 seq_printf(m, "%5d\t%016llx\t%016llx\t%016x\n",
425 index, desc->qw0, desc->qw1,
426 iommu->qi->desc_status[index]);
430 static int invalidation_queue_show(struct seq_file *m, void *unused)
432 struct dmar_drhd_unit *drhd;
433 struct intel_iommu *iommu;
439 for_each_active_iommu(iommu, drhd) {
441 shift = qi_shift(iommu);
443 if (!qi || !ecap_qis(iommu->ecap))
446 seq_printf(m, "Invalidation queue on IOMMU: %s\n", iommu->name);
448 raw_spin_lock_irqsave(&qi->q_lock, flags);
449 seq_printf(m, " Base: 0x%llx\tHead: %lld\tTail: %lld\n",
450 (u64)virt_to_phys(qi->desc),
451 dmar_readq(iommu->reg + DMAR_IQH_REG) >> shift,
452 dmar_readq(iommu->reg + DMAR_IQT_REG) >> shift);
453 invalidation_queue_entry_show(m, iommu);
454 raw_spin_unlock_irqrestore(&qi->q_lock, flags);
461 DEFINE_SHOW_ATTRIBUTE(invalidation_queue);
463 #ifdef CONFIG_IRQ_REMAP
464 static void ir_tbl_remap_entry_show(struct seq_file *m,
465 struct intel_iommu *iommu)
467 struct irte *ri_entry;
471 seq_puts(m, " Entry SrcID DstID Vct IRTE_high\t\tIRTE_low\n");
473 raw_spin_lock_irqsave(&irq_2_ir_lock, flags);
474 for (idx = 0; idx < INTR_REMAP_TABLE_ENTRIES; idx++) {
475 ri_entry = &iommu->ir_table->base[idx];
476 if (!ri_entry->present || ri_entry->p_pst)
479 seq_printf(m, " %-5d %02x:%02x.%01x %08x %02x %016llx\t%016llx\n",
480 idx, PCI_BUS_NUM(ri_entry->sid),
481 PCI_SLOT(ri_entry->sid), PCI_FUNC(ri_entry->sid),
482 ri_entry->dest_id, ri_entry->vector,
483 ri_entry->high, ri_entry->low);
485 raw_spin_unlock_irqrestore(&irq_2_ir_lock, flags);
488 static void ir_tbl_posted_entry_show(struct seq_file *m,
489 struct intel_iommu *iommu)
491 struct irte *pi_entry;
495 seq_puts(m, " Entry SrcID PDA_high PDA_low Vct IRTE_high\t\tIRTE_low\n");
497 raw_spin_lock_irqsave(&irq_2_ir_lock, flags);
498 for (idx = 0; idx < INTR_REMAP_TABLE_ENTRIES; idx++) {
499 pi_entry = &iommu->ir_table->base[idx];
500 if (!pi_entry->present || !pi_entry->p_pst)
503 seq_printf(m, " %-5d %02x:%02x.%01x %08x %08x %02x %016llx\t%016llx\n",
504 idx, PCI_BUS_NUM(pi_entry->sid),
505 PCI_SLOT(pi_entry->sid), PCI_FUNC(pi_entry->sid),
506 pi_entry->pda_h, pi_entry->pda_l << 6,
507 pi_entry->vector, pi_entry->high,
510 raw_spin_unlock_irqrestore(&irq_2_ir_lock, flags);
514 * For active IOMMUs go through the Interrupt remapping
515 * table and print valid entries in a table format for
516 * Remapped and Posted Interrupts.
518 static int ir_translation_struct_show(struct seq_file *m, void *unused)
520 struct dmar_drhd_unit *drhd;
521 struct intel_iommu *iommu;
526 for_each_active_iommu(iommu, drhd) {
527 if (!ecap_ir_support(iommu->ecap))
530 seq_printf(m, "Remapped Interrupt supported on IOMMU: %s\n",
533 sts = dmar_readl(iommu->reg + DMAR_GSTS_REG);
534 if (iommu->ir_table && (sts & DMA_GSTS_IRES)) {
535 irta = virt_to_phys(iommu->ir_table->base);
536 seq_printf(m, " IR table address:%llx\n", irta);
537 ir_tbl_remap_entry_show(m, iommu);
539 seq_puts(m, "Interrupt Remapping is not enabled\n");
544 seq_puts(m, "****\n\n");
546 for_each_active_iommu(iommu, drhd) {
547 if (!cap_pi_support(iommu->cap))
550 seq_printf(m, "Posted Interrupt supported on IOMMU: %s\n",
553 if (iommu->ir_table) {
554 irta = virt_to_phys(iommu->ir_table->base);
555 seq_printf(m, " IR table address:%llx\n", irta);
556 ir_tbl_posted_entry_show(m, iommu);
558 seq_puts(m, "Interrupt Remapping is not enabled\n");
566 DEFINE_SHOW_ATTRIBUTE(ir_translation_struct);
569 static void latency_show_one(struct seq_file *m, struct intel_iommu *iommu,
570 struct dmar_drhd_unit *drhd)
574 seq_printf(m, "IOMMU: %s Register Base Address: %llx\n",
575 iommu->name, drhd->reg_base_addr);
577 ret = dmar_latency_snapshot(iommu, debug_buf, DEBUG_BUFFER_SIZE);
579 seq_puts(m, "Failed to get latency snapshot");
581 seq_puts(m, debug_buf);
585 static int latency_show(struct seq_file *m, void *v)
587 struct dmar_drhd_unit *drhd;
588 struct intel_iommu *iommu;
591 for_each_active_iommu(iommu, drhd)
592 latency_show_one(m, iommu, drhd);
598 static int dmar_perf_latency_open(struct inode *inode, struct file *filp)
600 return single_open(filp, latency_show, NULL);
603 static ssize_t dmar_perf_latency_write(struct file *filp,
604 const char __user *ubuf,
605 size_t cnt, loff_t *ppos)
607 struct dmar_drhd_unit *drhd;
608 struct intel_iommu *iommu;
615 if (copy_from_user(&buf, ubuf, cnt))
620 if (kstrtoint(buf, 0, &counting))
626 for_each_active_iommu(iommu, drhd) {
627 dmar_latency_disable(iommu, DMAR_LATENCY_INV_IOTLB);
628 dmar_latency_disable(iommu, DMAR_LATENCY_INV_DEVTLB);
629 dmar_latency_disable(iommu, DMAR_LATENCY_INV_IEC);
630 dmar_latency_disable(iommu, DMAR_LATENCY_PRQ);
636 for_each_active_iommu(iommu, drhd)
637 dmar_latency_enable(iommu, DMAR_LATENCY_INV_IOTLB);
642 for_each_active_iommu(iommu, drhd)
643 dmar_latency_enable(iommu, DMAR_LATENCY_INV_DEVTLB);
648 for_each_active_iommu(iommu, drhd)
649 dmar_latency_enable(iommu, DMAR_LATENCY_INV_IEC);
654 for_each_active_iommu(iommu, drhd)
655 dmar_latency_enable(iommu, DMAR_LATENCY_PRQ);
666 static const struct file_operations dmar_perf_latency_fops = {
667 .open = dmar_perf_latency_open,
668 .write = dmar_perf_latency_write,
671 .release = single_release,
674 void __init intel_iommu_debugfs_init(void)
676 intel_iommu_debug = debugfs_create_dir("intel", iommu_debugfs_dir);
678 debugfs_create_file("iommu_regset", 0444, intel_iommu_debug, NULL,
680 debugfs_create_file("dmar_translation_struct", 0444, intel_iommu_debug,
681 NULL, &dmar_translation_struct_fops);
682 debugfs_create_file("invalidation_queue", 0444, intel_iommu_debug,
683 NULL, &invalidation_queue_fops);
684 #ifdef CONFIG_IRQ_REMAP
685 debugfs_create_file("ir_translation_struct", 0444, intel_iommu_debug,
686 NULL, &ir_translation_struct_fops);
688 debugfs_create_file("dmar_perf_latency", 0644, intel_iommu_debug,
689 NULL, &dmar_perf_latency_fops);
693 * Create a debugfs directory for each device, and then create a
694 * debugfs file in this directory for users to dump the page table
695 * of the default domain. e.g.
696 * /sys/kernel/debug/iommu/intel/0000:00:01.0/domain_translation_struct
698 void intel_iommu_debugfs_create_dev(struct device_domain_info *info)
700 info->debugfs_dentry = debugfs_create_dir(dev_name(info->dev), intel_iommu_debug);
702 debugfs_create_file("domain_translation_struct", 0444, info->debugfs_dentry,
703 NULL, &domain_translation_struct_fops);
706 /* Remove the device debugfs directory. */
707 void intel_iommu_debugfs_remove_dev(struct device_domain_info *info)
709 debugfs_remove_recursive(info->debugfs_dentry);
713 * Create a debugfs directory per pair of {device, pasid}, then create the
714 * corresponding debugfs file in this directory for users to dump its page
716 * /sys/kernel/debug/iommu/intel/0000:00:01.0/1/domain_translation_struct
718 * The debugfs only dumps the page tables whose mappings are created and
719 * destroyed by the iommu_map/unmap() interfaces. Check the mapping type
720 * of the domain before creating debugfs directory.
722 void intel_iommu_debugfs_create_dev_pasid(struct dev_pasid_info *dev_pasid)
724 struct device_domain_info *info = dev_iommu_priv_get(dev_pasid->dev);
727 sprintf(dir_name, "%x", dev_pasid->pasid);
728 dev_pasid->debugfs_dentry = debugfs_create_dir(dir_name, info->debugfs_dentry);
731 /* Remove the device pasid debugfs directory. */
732 void intel_iommu_debugfs_remove_dev_pasid(struct dev_pasid_info *dev_pasid)
734 debugfs_remove_recursive(dev_pasid->debugfs_dentry);