]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
KVM: arm64: nv: Respect stage-2 write permssion when setting stage-1 AF
authorOliver Upton <oupton@kernel.org>
Thu, 8 Jan 2026 20:42:30 +0000 (12:42 -0800)
committerOliver Upton <oupton@kernel.org>
Fri, 9 Jan 2026 23:40:34 +0000 (15:40 -0800)
commit9e27085c33cca7ad26bec0af2c17aab072dd802e
treeabdc0ae6f0459cb4f2fe0733d58cac1b740f118e
parent9cb2c20f06c300f92a831e4c374e353b33c5582b
KVM: arm64: nv: Respect stage-2 write permssion when setting stage-1 AF

Naturally, updating the Access Flag in a stage-1 descriptor requires
write permission at stage-2, although this isn't actually enforced in
KVM's software PTW.

Generate a stage-2 permission fault if the stage-1 walk attempts to
update the descriptor and its corresponding stage-2 translation lacks
write permission.

Fixes: bff8aa213dee ("KVM: arm64: Implement HW access flag management in stage-1 SW PTW")
Reviewed-by: Marc Zyngier <maz@kernel.org>
Link: https://msgid.link/20260108204230.677172-1-oupton@kernel.org
Signed-off-by: Oliver Upton <oupton@kernel.org>
arch/arm64/kvm/at.c