]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
KVM: arm64: Extract stage-2 permission logic in user_mem_abort()
authorFuad Tabba <tabba@google.com>
Fri, 6 Mar 2026 14:02:24 +0000 (14:02 +0000)
committerMarc Zyngier <maz@kernel.org>
Sat, 28 Mar 2026 11:29:40 +0000 (11:29 +0000)
commita6e11bd6e1bd9ea9a42738c5a6ac12881b5fcb36
treeb5d172217c8756384095424558029a4fc6606bf3
parentf5a5bb8de11863bd92f4188b7e823e3fca4d68e6
KVM: arm64: Extract stage-2 permission logic in user_mem_abort()

Extract the logic that computes the stage-2 protections and checks for
various permission faults (e.g., execution faults on non-cacheable
memory) into a new helper function, kvm_s2_fault_compute_prot(). This
helper also handles injecting atomic/exclusive faults back into the
guest when necessary.

This refactoring step separates the permission computation from the
mapping logic, making the main fault handler flow clearer.

Signed-off-by: Fuad Tabba <tabba@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
arch/arm64/kvm/mmu.c