]> www.infradead.org Git - users/hch/misc.git/commit
KVM: arm64: Only read HPFAR_EL2 when value is architecturally valid
authorOliver Upton <oliver.upton@linux.dev>
Wed, 2 Apr 2025 20:17:23 +0000 (13:17 -0700)
committerOliver Upton <oliver.upton@linux.dev>
Thu, 3 Apr 2025 07:28:51 +0000 (00:28 -0700)
commitfb8a3eba9c812b67f9cf5531e5b55d13a51e938e
treeb69d02f65e73d6017f5bc7f6d766ed20f9bc59c7
parent1f5bdd3b0c7000156d99faeed19bd522615b38e3
KVM: arm64: Only read HPFAR_EL2 when value is architecturally valid

KVM's logic for deciding when HPFAR_EL2 is UNKNOWN doesn't align with
the architecture. Most notably, KVM assumes HPFAR_EL2 contains the
faulting IPA even in the case of an SEA.

Align the logic with the architecture rather than attempting to
paraphrase it. Additionally, take the opportunity to improve the
language around ARM erratum #834220 such that it actually describes the
bug.

Reviewed-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20250402201725.2963645-2-oliver.upton@linux.dev
Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
arch/arm64/include/asm/esr.h
arch/arm64/kvm/hyp/include/hyp/fault.h