]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
KVM: arm64: nv: Re-translate VNCR before injecting abort
authorOliver Upton <oupton@kernel.org>
Thu, 18 Jun 2026 23:42:04 +0000 (16:42 -0700)
committerMarc Zyngier <maz@kernel.org>
Mon, 22 Jun 2026 09:43:25 +0000 (10:43 +0100)
commitbb645aa0a4caeaf7f9cd32e9a948594d434c1a8f
tree58dc0591879ea1c3b3a789129e278bafa9452ab6
parent9f3e83345a56280efffe235c65593c7e544c0fcc
KVM: arm64: nv: Re-translate VNCR before injecting abort

KVM faults in the VNCR page with FOLL_WRITE whenever the guest aborts
for a write, similar to how a regular stage-2 mapping is handled. It is
entirely possible that the guest reads from the VNCR before writing to
it, in which case the PFN could only be read-only.

Invalidate the VNCR TLB and re-fetch the translation upon taking a VNCR
abort, allowing the host mapping to be faulted in for write the second
time around. Interestingly enough, this also satisfies the ordering
requirements of FEAT_ETS2/3 between descriptor updates and MMU faults.

Cc: stable@vger.kernel.org
Fixes: 2a359e072596 ("KVM: arm64: nv: Handle mapping of VNCR_EL2 at EL2")
Reported-by: Sashiko <sashiko-bot@kernel.org>
Signed-off-by: Oliver Upton <oupton@kernel.org>
Link: https://patch.msgid.link/20260618234207.1063941-4-oupton@kernel.org
Signed-off-by: Marc Zyngier <maz@kernel.org>
arch/arm64/kvm/nested.c