Skip to content

Refine AArch64 BBM modelling and add regression coverage#1864

Open
relokin wants to merge 10 commits into
herd:masterfrom
relokin:bbm
Open

Refine AArch64 BBM modelling and add regression coverage#1864
relokin wants to merge 10 commits into
herd:masterfrom
relokin:bbm

Conversation

@relokin

@relokin relokin commented Jun 16, 2026

Copy link
Copy Markdown
Member

Summary

This branch refines the AArch64 Break-Before-Make (BBM) modelling in herd, fixes related helper logic used by the model checker/interpreter, and adds a dedicated regression catalogue for BBM-oriented tests.

Compared to github/master, the branch includes 7 commits covering:

  • BBM rule updates in the AArch64 cat files
  • a fix for writable2 in machModelChecker
  • support for domain in miaou
  • documentation/macros for the new BBM relations
  • a new catalogue/aarch64-BBM regression suite
  • a typo fix in aarch64fences.cat

Main changes

  • Move the definition of ca out of aarch64.cat into cos.cat so it can be reused by the BBM-specific logic.
  • Rework BBM detection in aarch64.cat / aarch64bbm.cat around TTD/TLB-cacheability concepts rather than the older PTE* naming, including:
    • TLBCacheableTTD / TLBUncacheableTTD
    • TTD-update-needsBBM
    • updated BBM sequencing check and warning flag
  • Fix writable2 in herd/machModelChecker.ml so writability is evaluated per event using the correct dirty-bit context.
  • Simplify the interpreter helpers by introducing shared relation filtering logic, and use it to implement same_oa, oa_changes, and at_least_one_writable.
  • Extend tools/miaou.ml to handle the domain procedure.
  • Add TeX macros documenting the new BBM/TTD relations in catdefinitions.tex.
  • Add a new catalogue/aarch64-BBM/tests suite with expected outputs and a cata-test-all target for running it.
  • Update the affected AArch64 KVM expected output to match the revised BBM behaviour.
  • Fix the typo in the deprecated DSB-ST maintenance-scope warning.

Testing

  • make test.herd.cata-ext.aarch64-BBM

relokin added 7 commits June 16, 2026 15:17
Signed-off-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Signed-off-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
writable2 e1 e2 was intended to return true if either e1 or e2 or both
are writable PteVals.

A PteVal is consider to give writeable access to the OA, if it is valid
and the af the db are set. If hardware updates are enabled for the CPU
that uses the PteVal, the af and the db can be set automatically on
access. In this case the PteVal can be writable even when the af and db
are not set.

This patches fixes the function writable to consider whether hardware
update for the right CPU or for no CPU is the event is due to an
initialisation.

Signed-off-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
This allows other cat files to use ca.

Signed-off-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Signed-off-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Signed-off-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
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