]> git.ipfire.org Git - thirdparty/linux.git/commit
KVM: arm64: Introduce helper to calculate fault IPA offset
authorFuad Tabba <tabba@google.com>
Thu, 11 Dec 2025 10:47:04 +0000 (10:47 +0000)
committerMarc Zyngier <maz@kernel.org>
Thu, 15 Jan 2026 15:43:15 +0000 (15:43 +0000)
commitc273feee70bd3d8c6c4d5efaf6b3ae945c839378
tree60c875d91f73de8eeb956ec9e45709f84c879396
parentebbcaece84738f71b35f32339bdeb8776004e641
KVM: arm64: Introduce helper to calculate fault IPA offset

This 12-bit FAR fault IPA offset mask is hard-coded as 'GENMASK(11, 0)'
in several places to reconstruct the full fault IPA.

Introduce FAR_TO_FIPA_OFFSET() to calculate this value in a shared
header and replace all open-coded instances to improve readability.

No functional change intended.

Signed-off-by: Fuad Tabba <tabba@google.com>
Link: https://patch.msgid.link/20251211104710.151771-5-tabba@google.com
Signed-off-by: Marc Zyngier <maz@kernel.org>
arch/arm64/include/asm/kvm_arm.h
arch/arm64/kvm/hyp/vgic-v2-cpuif-proxy.c
arch/arm64/kvm/inject_fault.c
arch/arm64/kvm/mmu.c