linux/drivers/iommu
Dheeraj Kumar Srivastava fb3af1f4fe iommu/amd: Add debugfs support to dump IOMMU command buffer
IOMMU driver sends command to IOMMU hardware via command buffer. In cases
where IOMMU hardware fails to process commands in command buffer, dumping
it is a valuable input to debug the issue.

IOMMU hardware processes command buffer entry at offset equals to the head
pointer. Dumping just the entry at the head pointer may not always be
useful. The current head may not be pointing to the entry of the command
buffer which is causing the issue. IOMMU Hardware may have processed the
entry and updated the head pointer. So dumping the entire command buffer
gives a broad understanding of what hardware was/is doing. The command
buffer dump will have all entries from start to end of the command buffer.
Along with that, it will have a head and tail command buffer pointer
register dump to facilitate where the IOMMU driver and hardware are in
the command buffer for injecting and processing the entries respectively.

Command buffer is a per IOMMU data structure. So dumping on per IOMMU
basis.
eg.
-> To get command buffer dump for iommu<x> (say, iommu00)
   #cat /sys/kernel/debug/iommu/amd/iommu00/cmdbuf

Signed-off-by: Dheeraj Kumar Srivastava <dheerajkumar.srivastava@amd.com>
Reviewed-by: Vasant Hegde <vasant.hegde@amd.com>
Link: https://lore.kernel.org/r/20250702093804.849-5-dheerajkumar.srivastava@amd.com
Signed-off-by: Will Deacon <will@kernel.org>
2025-07-15 11:41:52 +01:00
..
amd iommu/amd: Add debugfs support to dump IOMMU command buffer 2025-07-15 11:41:52 +01:00
arm Revert "iommu: make inclusion of arm/arm-smmu-v3 directory conditional" 2025-05-31 07:43:16 -07:00
intel Merge branches 'fixes', 'apple/dart', 'arm/smmu/updates', 'arm/smmu/bindings', 'fsl/pamu', 'mediatek', 'renesas/ipmmu', 's390', 'intel/vt-d', 'amd/amd-vi' and 'core' into next 2025-05-23 17:14:32 +02:00
iommufd iommufd: Remove unnecessary IOMMU_DEV_FEAT_IOPF 2025-04-28 13:04:34 +02:00
riscv iommu: make inclusion of riscv directory conditional 2025-05-16 08:46:47 +02:00
apple-dart.c iommu: apple-dart: Remove unnecessary NULL check before free_io_pgtable_ops() 2025-04-28 13:11:26 +02:00
dma-iommu.c treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
dma-iommu.h iommu: Drop sw_msi from iommu_domain 2025-03-25 10:18:19 -03:00
exynos-iommu.c iommu/pages: Remove iommu_alloc_page/pages() 2025-04-17 16:22:50 +02:00
fsl_pamu_domain.c iommu/fsl_pamu: remove trailing space after \n 2025-05-16 08:39:04 +02:00
fsl_pamu_domain.h
fsl_pamu.c iommu/fsl: fix all kernel-doc warnings in fsl_pamu.c 2023-03-22 14:50:15 +01:00
fsl_pamu.h
hyperv-iommu.c hyperv: Log hypercall status codes as strings 2025-03-20 21:23:03 +00:00
io-pgfault.c iommu: Fix potential memory leak in iopf_queue_remove_device() 2025-02-10 14:49:30 +01:00
io-pgtable-arm-v7s.c iommu/io-pgtable-arm-v7s: Remove split on unmap behavior 2024-11-06 15:42:36 +00:00
io-pgtable-arm.c Merge branches 'fixes', 'apple/dart', 'arm/smmu/updates', 'arm/smmu/bindings', 'fsl/pamu', 'mediatek', 'renesas/ipmmu', 's390', 'intel/vt-d', 'amd/amd-vi' and 'core' into next 2025-05-23 17:14:32 +02:00
io-pgtable-arm.h
io-pgtable-dart.c iommu: Update various drivers to pass in lg2sz instead of order to iommu pages 2025-04-17 16:22:48 +02:00
io-pgtable.c iommu: Allow passing custom allocators to pgtable drivers 2023-11-27 11:10:12 +01:00
iommu-debugfs.c
iommu-pages.c iommu: Clear the freelist after iommu_put_pages_list() 2025-05-16 14:29:16 +02:00
iommu-pages.h iommu/vtd: Remove iommu_alloc_pages_node() 2025-04-17 16:22:54 +02:00
iommu-priv.h iommufd 6.15 merge window pull 2025-04-01 18:03:46 -07:00
iommu-sva.c iommu: Do not call domain_alloc() in iommu_sva_domain_alloc() 2025-04-28 13:14:59 +02:00
iommu-sysfs.c iommu/sysfs: constify the class struct 2024-10-29 09:50:24 +01:00
iommu-traces.c iommu: Remove detach_dev callback 2023-01-13 16:39:18 +01:00
iommu.c IOMMU Updates for Linux v6.16: 2025-05-30 10:44:20 -07:00
iova.c - The series "zram: optimal post-processing target selection" from 2024-11-23 09:58:07 -08:00
ipmmu-vmsa.c iommu: ipmmu-vmsa: avoid Wformat-security warning 2025-04-28 13:20:09 +02:00
irq_remapping.c IOMMU Updates for Linux v6.10 2024-05-18 10:55:13 -07:00
irq_remapping.h iommu/vt-d: Allocate DMAR fault interrupts locally 2024-04-26 11:57:36 +02:00
Kconfig iommu: remove duplicate selection of DMAR_TABLE 2025-05-16 08:46:45 +02:00
Makefile iommu: make inclusion of riscv directory conditional 2025-05-16 08:46:47 +02:00
msm_iommu_hw-8xxx.h
msm_iommu.c iommu/msm: Use helper function devm_clk_get_prepared() 2025-01-06 12:41:00 +01:00
msm_iommu.h
mtk_iommu_v1.c iommu/mediatek-v1: Support COMPILE_TEST 2025-03-13 12:17:30 +01:00
mtk_iommu.c iommu/mediatek: Fix compatible typo for mediatek,mt6893-iommu-mm 2025-05-22 09:13:06 +02:00
of_iommu.c iommu: Get DT/ACPI parsing into the proper probe path 2025-03-11 14:05:43 +01:00
omap-iommu-debug.c iommu/omap: Fix buffer overflow in debugfs 2022-09-07 10:42:28 +02:00
omap-iommu.c Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
omap-iommu.h iommu/omap: Convert to generic_single_device_group() 2023-09-25 11:52:08 +02:00
omap-iopgtable.h
rockchip-iommu.c iommu/pages: Remove iommu_alloc_page/pages() 2025-04-17 16:22:50 +02:00
s390-iommu.c iommu/s390: allow larger region tables 2025-04-17 16:43:12 +02:00
sprd-iommu.c Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
sun50i-iommu.c iommu: Update various drivers to pass in lg2sz instead of order to iommu pages 2025-04-17 16:22:48 +02:00
tegra-smmu.c iommu/tegra: Fix incorrect size calculation 2025-06-13 17:02:31 +02:00
virtio-iommu.c iommu/virtio: Move to domain_alloc_paging() 2025-04-28 13:14:58 +02:00