]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
KVM: arm64: Return -EFAULT from VCPU_RUN on access to a poisoned pte
authorWill Deacon <will@kernel.org>
Mon, 30 Mar 2026 14:48:28 +0000 (15:48 +0100)
committerMarc Zyngier <maz@kernel.org>
Mon, 30 Mar 2026 15:58:09 +0000 (16:58 +0100)
commit5991916392d844ba6ed6c0d320ac6578f52e39b6
tree39ee1327749c849be0bfeee7053e4178bbce7c32
parent281a38ad2920b5ccfbbc2a0ca0caeee110ad5d6b
KVM: arm64: Return -EFAULT from VCPU_RUN on access to a poisoned pte

If a protected vCPU faults on an IPA which appears to be mapped, query
the hypervisor to determine whether or not the faulting pte has been
poisoned by a forceful reclaim. If the pte has been poisoned, return
-EFAULT back to userspace rather than retrying the instruction forever.

Tested-by: Fuad Tabba <tabba@google.com>
Tested-by: Mostafa Saleh <smostafa@google.com>
Signed-off-by: Will Deacon <will@kernel.org>
Link: https://patch.msgid.link/20260330144841.26181-28-will@kernel.org
Signed-off-by: Marc Zyngier <maz@kernel.org>
arch/arm64/include/asm/kvm_asm.h
arch/arm64/kvm/hyp/include/nvhe/mem_protect.h
arch/arm64/kvm/hyp/nvhe/hyp-main.c
arch/arm64/kvm/hyp/nvhe/mem_protect.c
arch/arm64/kvm/pkvm.c