Skip to content

iommu/apple-dart: warn once per stream when a retire invalidate fails - #559

Merged
DjDeveloperr merged 1 commit into
integration/aurorafrom
fix/dart-retire-warn-once
Oct 28, 2026
Merged

DjDeveloperr merged 1 commit into
integration/aurorafrom
fix/dart-retire-warn-once

Conversation

@DjDeveloperr

Copy link
Copy Markdown
Contributor

Follow-up to maralcbr's non-blocking note on omacom/linux-aurora#235 (mirrored here as #546): make a stream whose page tables are being kept visible in a bug report.

When the TLB invalidate that retiring a locked root needs fails, the DART remembers the error per stream (locked_retire_err). apple_dart_domain_free() then keeps the page tables of every domain on that stream until reboot. Until now nothing said so before a domain was freed, and then only as a ratelimited "retaining page tables" error per free.

The first time a stream records such an error, this logs:

apple-dart <dev>: stream <n>: TLB invalidate failed retiring its root (<err>); keeping the page tables of its domains until reboot

The error is never cleared, so the warning fires at most once per stream. The ordinary unmap path, which still drops invalidate errors, predates #546 and isn't changed here.

Testing (host only):

  • tools/asahi/apple-dart-fw-tests.py: 74/74. The timeout cases now also check for exactly one warning, and the new retire-repeat-timeout case checks that a second failed retire on the same stream keeps the first error and doesn't warn again.
  • DART KUnit (minimal arm64 config with APPLE_DART_KUNIT_TEST): 25/25.
  • apple-dart.o builds clean with W=1.

The omacom PR follows once omacom/linux-aurora#235 is merged.

When the TLB invalidate that retiring a locked root needs fails, the
DART remembers the error per stream (locked_retire_err), and
apple_dart_domain_free() keeps the page tables of every domain on that
stream until reboot. Nothing said so until a domain was freed, and then
only as a ratelimited "retaining page tables" error per free.

Log a warning the first time a stream records such an error, naming
the stream and the error and saying its page tables are kept. The error
is never cleared, so this fires at most once per stream.

The host fixture counts the warning in the timeout cases, and a new
retire-repeat-timeout case checks that a second failed retire on the
same stream keeps the first error and does not warn again.

Signed-off-by: DjDeveloperr <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant