diff options
author | Marc Zyngier <maz@kernel.org> | 2025-07-30 13:18:28 +0300 |
---|---|---|
committer | Oliver Upton <oliver.upton@linux.dev> | 2025-08-05 08:15:29 +0300 |
commit | 07f557f60a9a4e15288c29a2924e19e44200db51 (patch) | |
tree | 1ccb698a1b2c94aff9d41fb347482d9345a122a6 /tools/testing/selftests/bpf/prog_tests/autoload.c | |
parent | 7b8346bd9fce6b76a96c6780d2e5bba76687f97f (diff) | |
download | linux-07f557f60a9a4e15288c29a2924e19e44200db51.tar.xz |
KVM: arm64: nv: Properly check ESR_EL2.VNCR on taking a VNCR_EL2 related fault
Instead of checking for the ESR_EL2.VNCR bit being set (the only case
we should be here), we are actually testing random bits in ESR_EL2.DFSC.
13 obviously being a lucky number, it matches both permission and
translation fault status codes, which explains why we never saw it
failing. This was found by inspection, while reviewing a vaguely
related patch.
Whilst we're at it, turn the BUG_ON() into a WARN_ON_ONCE(), as
exploding here is just silly.
Fixes: 069a05e535496 ("KVM: arm64: nv: Handle VNCR_EL2-triggered faults")
Signed-off-by: Marc Zyngier <maz@kernel.org>
Reviewed-by: Joey Gouly <joey.gouly@arm.com>
Link: https://lore.kernel.org/r/20250730101828.1168707-1-maz@kernel.org
Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/autoload.c')
0 files changed, 0 insertions, 0 deletions