mirror-linux/arch/arm64/kvm/hyp/nvhe
Vincent Donnefort 1702da76e0 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: 680a04c333 ("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>
2026-05-20 08:08:37 +01:00
..
.gitignore KVM: arm64: Generate hyp relocation data 2021-01-23 14:01:00 +00:00
Makefile Merge branch kvm-arm64/vgic-v5-ppi into kvmarm-master/next 2026-04-08 12:22:35 +01:00
cache.S KVM: arm64: Provide I-cache invalidation by virtual address at EL2 2022-11-11 17:16:25 +00:00
clock.c KVM: arm64: Remove potential UB on nvhe tracing clock update 2026-05-06 17:09:48 +01:00
debug-sr.c KVM: arm64: Don't pass host_debug_state to BRBE world-switch routines 2026-03-28 17:07:50 +00:00
early_alloc.c KVM: arm64: Provide {get,put}_page() stubs for early hyp allocator 2021-12-16 12:58:55 +00:00
events.c KVM: arm64: Add event support to the nVHE/pKVM hyp and trace remote 2026-03-11 08:51:17 +00:00
ffa.c KVM: arm64: Add hyp_enter/hyp_exit events to nVHE/pKVM hyp 2026-03-11 08:51:17 +00:00
gen-hyprel.c KVM: arm64: nVHE: gen-hyprel: Skip R_AARCH64_ABS32 2024-06-20 17:40:54 +00:00
host.S Merge branch kvm-arm64/pkvm-psci into kvmarm-master/next 2026-04-08 12:23:24 +01:00
hyp-init.S Arm: 2026-04-17 07:18:03 -07:00
hyp-main.c KVM: arm64: Reject non compliant SMCCC function calls in pKVM 2026-04-24 12:03:57 +01:00
hyp-smp.c KVM: arm64: Unmap 'kvm_arm_hyp_percpu_base' from the host 2022-11-11 17:19:35 +00:00
hyp.lds.S KVM: arm64: Add event support to the nVHE/pKVM hyp and trace remote 2026-03-11 08:51:17 +00:00
list_debug.c kvm: arm64: use BUG() instead of BUG_ON(1) 2025-08-08 01:28:57 -07:00
mem_protect.c KVM: arm64: Pre-check vcpu memcache for host->guest donate 2026-05-07 14:12:42 +01:00
mm.c Arm: 2026-04-17 07:18:03 -07:00
page_alloc.c KVM: arm64: Make hyp_page::order a u8 2024-12-20 09:43:59 +00:00
pkvm.c KVM: arm64: Seed pkvm_ownership_selftest vcpu memcache 2026-05-07 14:12:41 +01:00
psci-relay.c Merge branch kvm-arm64/pkvm-psci into kvmarm-master/next 2026-04-08 12:23:24 +01:00
setup.c KVM: arm64: Fix initialisation order in __pkvm_init_finalise() 2026-04-24 12:03:57 +01:00
stacktrace.c KVM: arm64: Add PKVM_DISABLE_STAGE2_ON_PANIC 2026-03-11 08:51:16 +00:00
switch.c Merge branch kvm-arm64/pkvm-protected-guest into kvmarm-master/next 2026-04-08 12:25:39 +01:00
sys_regs.c Merge branch kvm-arm64/vgic-fixes-7.1 into kvmarm-master/next 2026-04-08 12:26:00 +01:00
sysreg-sr.c KVM: arm64: Load VPIDR_EL2 with the VM's MIDR_EL1 value 2025-02-26 01:32:05 -08:00
timer-sr.c KVM: arm64: Work around x1e's CNTVOFF_EL2 bogosity 2025-01-02 19:19:10 +00:00
tlb.c arm64: mm: Push __TLBI_VADDR() into __tlbi_level() 2026-03-13 17:23:03 +00:00
trace.c KVM: arm64: Fix nVHE/pKVM hyp tracing error on invalid desc 2026-05-20 08:08:37 +01:00