Skip to content

UefiTestingPkg: SmmuV3 DMA Protection Audit Tests - #811

Merged
Eeshan Londhe (eeshanl) merged 6 commits into
microsoft:release/202511from
eeshanl:smmu_audit_test
Aug 3, 2026
Merged

UefiTestingPkg: SmmuV3 DMA Protection Audit Tests#811
Eeshan Londhe (eeshanl) merged 6 commits into
microsoft:release/202511from
eeshanl:smmu_audit_test

Conversation

@eeshanl

@eeshanl Eeshan Londhe (eeshanl) commented Jan 8, 2026

Copy link
Copy Markdown
Contributor

Description

Add SmmuV3 DMA Protection Audit Tests

Extends the DMA Protection Audit suite (previously VT-d and IVRS only) with an AArch64 DMASmmuProtectionUnitTestApp that plugs SMMUv3-specific implementations into the existing shared test entry point. The app parses the IORT (EFI_ACPI_6_0_IO_REMAPPING_TABLE_SIGNATURE) to enumerate SMMUv3 nodes and their Reserved Memory Range (RMR) associations, then registers three test cases:

  1. CheckIOMMUEnabled - IOMMU.StatusRegister
    For each SMMUv3 unit discovered in the IORT, verifies the unit is in a DMA-safe state.
    If translation is on (CR0.SMMUEN == 1), the test additionally confirms:
    CR0.CMDQEN == 1 (command queue enabled)
    CR0.EVTQEN == 1 (event queue enabled)
    STRTAB_BASE != 0 (stream table configured)
    GERROR == 0 (no global errors)

  2. CheckExcludedRegions - IOMMU.ExcludedRangeTest
    SMMU equivalent of the VT-d / IVRS "excluded regions" check. Walks every RMR node in the IORT and, for each one, verifies:
    An EFI memory map descriptor fully encompasses the RMR's [BaseAddress, BaseAddress + Length) range, and
    That descriptor's memory type is EfiReservedMemoryType.
    An RMR that is missing from the memory map, or is present but marked with a non-reserved type, fails the test. Platforms with no RMRs in the IORT pass trivially.

  3. CheckBMETeardown - IOMMU.BMETeardown (shared)
    Unchanged behavior - the existing "bus mastering disabled at ExitBootServices" test is reused as-is. Test registration order was adjusted so this reboot-triggering test runs last, and a PASSED log line was added on the success path.

For details on how to complete these options and their meaning refer to CONTRIBUTING.md.

  • Impacts functionality?
  • Impacts security?
  • Breaking change?
  • Includes tests?
  • Includes documentation?

How This Was Tested

Tested on physical ARM device

Integration Instructions

N/A

@mu-automation mu-automation Bot added the impact:non-functional Does not have a functional impact label Jan 8, 2026
@eeshanl
Eeshan Londhe (eeshanl) force-pushed the smmu_audit_test branch 9 times, most recently from 5e58e84 to d0d4513 Compare January 9, 2026 05:13
@mu-automation

mu-automation Bot commented Mar 10, 2026

Copy link
Copy Markdown
Contributor

This PR has been automatically marked as stale because it has not had activity in 60 days. It will be closed if no further activity occurs within 7 days. Thank you for your contributions.

@mu-automation mu-automation Bot added the state:stale Has not been updated in a long time label Mar 10, 2026
@mu-automation

mu-automation Bot commented Mar 17, 2026

Copy link
Copy Markdown
Contributor

This pull request has been automatically been closed because it did not have any activity in 60 days and no follow up within 7 days after being marked stale. Thank you for your contributions.

@mu-automation

mu-automation Bot commented Apr 8, 2026

Copy link
Copy Markdown
Contributor

✅ QEMU Validation Passed

Source Dependencies

Repository Commit
mu_plus 62575d1
mu_tiano_platforms b15d1f8

Results

Platform Target Build Boot Overall Boot Time Build Logs Boot Logs
Q35 DEBUG ✅ success ✅ success 0m 20s Build Logs Boot Logs
ArmVirt DEBUG ✅ success ✅ success 0m 14s Build Logs Boot Logs

Workflow run: https://github.com/microsoft/mu_plus/actions/runs/30850786272

This comment was automatically generated by the Mu QEMU PR Validation workflow.

@mu-automation mu-automation Bot removed the state:stale Has not been updated in a long time label Apr 8, 2026
@mu-automation

mu-automation Bot commented Jun 7, 2026

Copy link
Copy Markdown
Contributor

This PR has been automatically marked as stale because it has not had activity in 60 days. It will be closed if no further activity occurs within 7 days. Thank you for your contributions.

@mu-automation mu-automation Bot added the state:stale Has not been updated in a long time label Jun 7, 2026
@eeshanl Eeshan Londhe (eeshanl) removed the state:stale Has not been updated in a long time label Jun 13, 2026
@mu-automation mu-automation Bot added the language:python Pull requests that update Python code label Jun 16, 2026
@eeshanl
Eeshan Londhe (eeshanl) changed the base branch from release/202502 to release/202511 June 16, 2026 04:39
@mu-automation mu-automation Bot removed the language:python Pull requests that update Python code label Jun 16, 2026
@eeshanl
Eeshan Londhe (eeshanl) force-pushed the smmu_audit_test branch 2 times, most recently from 172a9be to 17f60ec Compare June 16, 2026 05:22
@mu-automation mu-automation Bot added the impact:testing Affects testing label Jul 30, 2026
@eeshanl Eeshan Londhe (eeshanl) changed the title SmmuV3 DMA Protection Audit Tests UefiTestingPkg: SmmuV3 DMA Protection Audit Tests Jul 30, 2026
@eeshanl
Eeshan Londhe (eeshanl) marked this pull request as ready for review July 30, 2026 20:35
@eeshanl
Eeshan Londhe (eeshanl) force-pushed the smmu_audit_test branch 2 times, most recently from 5614ecb to f288cf7 Compare July 30, 2026 21:32
Comment thread UefiTestingPkg/AuditTests/DMAProtectionAudit/UEFI/SMMU/DmaProtection.h Outdated
@eeshanl
Eeshan Londhe (eeshanl) force-pushed the smmu_audit_test branch 2 times, most recently from 772975a to 43916de Compare July 30, 2026 22:23
@eeshanl
Eeshan Londhe (eeshanl) merged commit 484e502 into microsoft:release/202511 Aug 3, 2026
44 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

impact:non-functional Does not have a functional impact impact:testing Affects testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants