fix: latent cache coherency issues in relocation and cache flush - #392
Open
josecm wants to merge 2 commits into
Open
fix: latent cache coherency issues in relocation and cache flush#392josecm wants to merge 2 commits into
josecm wants to merge 2 commits into
Conversation
josecm
requested review from
DavidMCerdeira,
joaopeixoto13,
malejo97 and
ninolomata
as code owners
August 7, 2026 09:20
josecm
force-pushed
the
fix/relocation-cache-coherency
branch
from
August 7, 2026 09:48
482ae50 to
b2454bf
Compare
Signed-off-by: Jose Martins <josemartins90@gmail.com>
Signed-off-by: Jose Martins <josemartins90@gmail.com>
josecm
force-pushed
the
fix/relocation-cache-coherency
branch
from
August 7, 2026 09:50
b2454bf to
1dc70f4
Compare
danielRep
approved these changes
Aug 7, 2026
DavidMCerdeira
self-requested a review
August 28, 2026 08:28
DavidMCerdeira
approved these changes
Aug 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
cache_flush_range()on armv8 ended with admb, which does not guarantee completion of the cache maintenance operations, while its callers rely on it: the relocation flow before other cores fetch the relocated image, the guest image flush, and the psci off state flush before a core powers down. Replace it with adsb.The riscv
switch_space()never executedfence.i, so instruction fetch is not synchronized with the data-side copy of the relocated image, the same problem #391 fixes for aarch64. Execute it just before thesatpwrite, while still fetching from the original pages. This requires enablingzifenceiin the march string.Both qemu-aarch64-virt and qemu-riscv64-virt builds pass.