[PATCH v3] KVM: arm64: nv: Fix incorrect VNCR invalidation range calculation
Oliver Upton
oliver.upton at linux.dev
Fri Sep 5 23:11:29 PDT 2025
On Sat, 06 Sep 2025 13:07:24 +0900, p at sswd.pw wrote:
> The code for invalidating VNCR entries in both kvm_invalidate_vncr_ipa()
> and invalidate_vncr_va() incorrectly uses a bitwise AND with `(size - 1)`
> instead of `~(size - 1)` to align the start address. This results
> in masking the address bits instead of aligning them down to the start
> of the block.
>
> This bug may cause stale VNCR TLB entries to remain valid even after a
> TLBI or MMU notifier, leading to incorrect memory translation and
> unexpected guest behavior.
>
> [...]
Applied to fixes, thanks!
[1/1] KVM: arm64: nv: Fix incorrect VNCR invalidation range calculation
https://git.kernel.org/kvmarm/kvmarm/c/5b9c1beaa1fd
--
Best,
Oliver
More information about the linux-arm-kernel
mailing list