Skip to content

kernel: strengthen smmu validation for QLI platforms#438

Merged
vnarapar merged 1 commit intoqualcomm-linux:mainfrom
smuppand:kernel-tests
May 6, 2026
Merged

kernel: strengthen smmu validation for QLI platforms#438
vnarapar merged 1 commit intoqualcomm-linux:mainfrom
smuppand:kernel-tests

Conversation

@smuppand
Copy link
Copy Markdown
Contributor

@smuppand smuppand commented May 3, 2026

This PR extends the SMMU testcase under Runner/suites/Kernel/Baseport/smmu.

Why this PR is needed:
The existing smmu test only checked whether dmesg | grep iommu returned any output. That is too weak for QLI platforms and can both miss real issues and misrepresent actual SMMU status. On QLI systems, /sys/kernel/debug/iommu may be absent even when SMMU is functioning correctly, so relying on upstream-style
debugfs expectations is not sufficient.

What this PR changes:

  • replaces the basic dmesg grep logic with stronger runtime validation
  • checks required SMMU and IOMMU kernel configs
  • validates /sys/kernel/iommu_groups presence and group enumeration
  • validates platform devices attached to IOMMU groups
  • checks critical DMA masters such as GPU, display, camera, video, UFS, USB, ethernet, and audio, when present, for IOMMU protection
  • uses shared functestlib helpers instead of raw one-off log parsing
  • uses scan_dmesg_errors and get_kernel_log for SMMU or IOMMU related log analysis instead of a plain dmesg | grep iommu

Why this is useful:
On QLI hardware, the most meaningful SMMU validation is not just whether a log line exists, but whether:

  • IOMMU groups are created
  • DMA-capable devices are actually attached to those groups
  • critical masters are not silently running without protection
  • kernel logs do not show bypass, passthrough, or fault-related issues

This makes the testcase much closer to real SMMU runtime validation on target systems and helps catch regressions that the previous test would not detect.

@smuppand smuppand added the enhancement New feature or request label May 3, 2026
Comment thread Runner/suites/Kernel/Baseport/smmu/run.sh Outdated
Comment thread Runner/suites/Kernel/Baseport/smmu/run.sh Outdated
Extend the smmu testcase to validate iommu_groups, protected platform devices, critical DMA masters, and SMMU or IOMMU kernel log errors using shared functestlib helpers.

Signed-off-by: Srikanth Muppandam <smuppand@qti.qualcomm.com>
@smuppand smuppand requested a review from vnarapar May 6, 2026 06:38
Copy link
Copy Markdown
Contributor

@vnarapar vnarapar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@vnarapar vnarapar merged commit 5feded4 into qualcomm-linux:main May 6, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants