Skip to content

Small fix to platform::dicachesync() - #578

Merged
syntactically merged 2 commits into
mainfrom
lm/coherency-fix
Nov 18, 2026
Merged

syntactically merged 2 commits into
mainfrom
lm/coherency-fix

Conversation

@syntactically

Copy link
Copy Markdown
Member

See the commit message for more detail on why this is needed.

- Update Nightly rust toolchain to 1.100
- Use binary wasi-sdk since Docker is no longer used to build wasm
  modules
- Support `RUSTUP_TOOLCHAIN` env var

Signed-off-by: Lucy Menon <168595099+syntactically@users.noreply.github.com>
The data/instruction-cache synchronising routine used to ensure cache
coherence uses a specific protocol to communicate with the host
because KVM does not support cache maintenance operations on readonly
memslots (see
hyperlight_host:src/hypervisor/virtual_machine/kvm/aarch64.rs), which
includes, among other things, the requirement that PSTATE.Z should be
unset whenever a cache maintenance instruction is encountered.

The assembly stub used for cache maintenance successfully ensured this
was true during its first `dc cvau` loop, but the condition to exit
that loop set the Z flag, so it was incorrect on the first iteration
of the `ic ivau` loop. This could lead to difficult-to-diagnose
failures in KVM.

This commit modifies the assembly stub to correctly reset the Z flag
before beginning the `ic ivau`-loop.

Signed-off-by: Lucy Menon <168595099+syntactically@users.noreply.github.com>
@syntactically
syntactically merged commit c59bb46 into main Nov 18, 2026
51 of 52 checks passed
@syntactically
syntactically deleted the lm/coherency-fix branch November 18, 2026 01:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants