aboutsummaryrefslogtreecommitdiffstats
path: root/rust/helpers/helpers.c
diff options
context:
space:
mode:
authorMarc Zyngier <[email protected]>2025-05-20 14:41:16 +0000
committerMarc Zyngier <[email protected]>2025-05-21 08:53:08 +0000
commitd43548f422f27219eff5ce1897336af2c4f15091 (patch)
treeac243af94ceb55f7a6c908f5c0781543516ad27a /rust/helpers/helpers.c
parentKVM: arm64: Document NV caps and vcpu flags (diff)
downloadkernel-d43548f422f27219eff5ce1897336af2c4f15091.tar.gz
kernel-d43548f422f27219eff5ce1897336af2c4f15091.zip
KVM: arm64: nv: Hold mmu_lock when invalidating VNCR SW-TLB before translating
When translating a VNCR translation fault, we start by marking the current SW-managed TLB as invalid, so that we can populate it in place. This is, however, done without the mmu_lock held. A consequence of this is that another CPU dealing with TLBI emulation can observe a translation still flagged as valid, but with invalid walk results (such as pgshift being 0). Bad things can result from this, such as a BUG() in pgshift_level_to_ttl(). Fix it by taking the mmu_lock for write to perform this local invalidation, and use invalidate_vncr() instead of open-coding the write to the 'valid' flag. Fixes: 069a05e535496 ("KVM: arm64: nv: Handle VNCR_EL2-triggered faults") Reviewed-by: Oliver Upton <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Marc Zyngier <[email protected]>
Diffstat (limited to 'rust/helpers/helpers.c')
0 files changed, 0 insertions, 0 deletions