]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
KVM: arm64: Fix nVHE/pKVM hyp tracing error on invalid desc
authorVincent Donnefort <vdonnefort@google.com>
Thu, 14 May 2026 16:26:24 +0000 (17:26 +0100)
committerMarc Zyngier <maz@kernel.org>
Wed, 20 May 2026 07:08:37 +0000 (08:08 +0100)
commit1702da76e017ae0fbe1a92b07bc332972c293e89
treea13a36048f57d8cb87f0bc2c2f177ce41055112c
parentf19c354dbd457759dfcf1195ab4bdba2bb568323
KVM: arm64: Fix nVHE/pKVM hyp tracing error on invalid desc

pKVM must validate the host-provided tracing buffer descriptor.
However, if an error is found, the hypervisor would just return 0 to the
host. Fix the return value on validation failure.

While at it, rename the function to hyp_trace_desc_is_valid() and skip
validation for the nVHE mode as we trust host-provided data in that
case.

Signed-off-by: Vincent Donnefort <vdonnefort@google.com>
Fixes: 680a04c333fa ("KVM: arm64: Add tracing capability for the nVHE/pKVM hyp")
Link: https://lore.kernel.org/r/20260514162624.3477857-1-vdonnefort@google.com
Signed-off-by: Marc Zyngier <maz@kernel.org>
arch/arm64/kvm/hyp/nvhe/trace.c