Skip to content

Commit e8aa45f

Browse files
nuttyliujoergroedel
authored andcommitted
iommu/vt-d: debugfs: Dump entry pointing to huge page
For the page table entry pointing to a huge page, the data below the level of the huge page is meaningless and does not need to be dumped. Signed-off-by: Jingqi Liu <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Lu Baolu <[email protected]> Signed-off-by: Joerg Roedel <[email protected]>
1 parent c61c255 commit e8aa45f

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

drivers/iommu/intel/debugfs.c

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -311,9 +311,14 @@ static inline unsigned long level_to_directory_size(int level)
311311
static inline void
312312
dump_page_info(struct seq_file *m, unsigned long iova, u64 *path)
313313
{
314-
seq_printf(m, "0x%013lx |\t0x%016llx\t0x%016llx\t0x%016llx\t0x%016llx\t0x%016llx\n",
315-
iova >> VTD_PAGE_SHIFT, path[5], path[4],
316-
path[3], path[2], path[1]);
314+
seq_printf(m, "0x%013lx |\t0x%016llx\t0x%016llx\t0x%016llx",
315+
iova >> VTD_PAGE_SHIFT, path[5], path[4], path[3]);
316+
if (path[2]) {
317+
seq_printf(m, "\t0x%016llx", path[2]);
318+
if (path[1])
319+
seq_printf(m, "\t0x%016llx", path[1]);
320+
}
321+
seq_putc(m, '\n');
317322
}
318323

319324
static void pgtable_walk_level(struct seq_file *m, struct dma_pte *pde,

0 commit comments

Comments
 (0)