mirror-linux/arch/arm64/kvm
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
..
hyp KVM: arm64: Fix nVHE/pKVM hyp tracing error on invalid desc 2026-05-20 08:08:37 +01:00
vgic KVM: arm64: vgic-its: Reject restored DTE with out-of-range num_eventid_bits 2026-05-20 08:08:11 +01:00
.gitignore
Kconfig KVM: arm64: tracing: add ftrace dependency 2026-03-12 15:19:30 +00:00
Makefile KVM: arm64: Add trace remote for the nVHE/pKVM hyp 2026-03-11 08:51:16 +00:00
arch_timer.c KVM: arm64: Move GICv5 timer PPI validation into timer_irqs_are_valid() 2026-04-01 15:42:26 +01:00
arm.c KVM: arm64: vgic: Free private_irqs when init fails after allocation 2026-05-20 08:08:17 +01:00
at.c arm64 updates for 7.1: 2026-04-14 16:48:56 -07:00
config.c KVM: arm64: Fix FEAT_SPE_FnE to use PMSIDR_EL1.FnE, not PMSVer 2026-04-24 12:03:57 +01:00
debug.c KVM: arm64: Read PMUVer as unsigned 2026-03-24 12:33:48 +00:00
emulate-nested.c KVM: arm64: gic-v5: Support GICv5 FGTs & FGUs 2026-03-19 18:21:27 +00:00
fpsimd.c KVM: arm64: Remove kvm_arch_vcpu_run_map_fp() 2025-07-03 10:39:24 +01:00
guest.c KVM: Remove subtle "struct kvm_stats_desc" pseudo-overlay 2026-01-08 10:40:48 -08:00
handle_exit.c KVM: arm64: Add PKVM_DISABLE_STAGE2_ON_PANIC 2026-03-11 08:51:16 +00:00
hyp_trace.c KVM: arm64: avoid unused-variable warning 2026-03-17 09:16:35 +00:00
hyp_trace.h KVM: arm64: Add trace remote for the nVHE/pKVM hyp 2026-03-11 08:51:16 +00:00
hypercalls.c arm64: kvm, smccc: Introduce and use API for getting hypervisor UUID 2025-05-23 16:30:55 +00:00
inject_fault.c Merge branch kvm-arm64/pkvm-features-6.20 into kvmarm-master/next 2026-01-23 10:04:47 +00:00
mmio.c KVM: arm64: Add exit to userspace on {LD,ST}64B* outside of memslots 2026-01-22 13:24:49 +00:00
mmu.c KVM: arm64: Handle permission faults with guest_memfd 2026-05-06 17:08:39 +01:00
nested.c Merge branch kvm-arm64/nv-s2-debugfs into kvmarm-master/next 2026-04-08 12:22:55 +01:00
pauth.c KVM: arm64: nv: Work around lack of pauth support in old toolchains 2024-04-23 19:27:11 +01:00
pkvm.c KVM: arm64: Allow userspace to create protected VMs when pKVM is enabled 2026-03-30 16:58:09 +01:00
pmu-emul.c KVM: arm64: gic-v5: Mandate architected PPI for PMU emulation on GICv5 2026-03-19 18:21:29 +00:00
pmu.c KVM: arm64: Use a cpucap to determine if system supports FEAT_PMUv3 2025-03-11 12:54:23 -07:00
psci.c KVM: arm64: Add support for PSCI v1.2 and v1.3 2024-10-24 16:38:07 -07:00
ptdump.c KVM: arm64: ptdump: Initialize parser_state before pgtable walk 2026-03-28 10:02:55 +00:00
pvtime.c
reset.c KVM: arm64: Discard PC update state on vcpu reset 2026-03-15 15:11:22 +00:00
stacktrace.c KVM: arm64: Add PKVM_DISABLE_STAGE2_ON_PANIC 2026-03-11 08:51:16 +00:00
sys_regs.c Arm: 2026-04-17 07:18:03 -07:00
sys_regs.h KVM: arm64: Handle FEAT_IDST for sysregs without specific handlers 2026-01-15 11:58:57 +00:00
trace.h
trace_arm.h KVM: arm64: Replace ternary flags with str_on_off() helper 2025-05-06 09:38:37 +01:00
trace_handle_exit.h arm64: kvm: trace_handle_exit: use string choices helper 2025-07-23 23:36:55 -07:00
trng.c
va_layout.c KVM: arm64: Calculate hyp VA size only once 2026-01-14 10:40:11 +00:00
vgic-sys-reg-v3.c KVM: arm64: Enforce the sorting of the GICv3 system register table 2025-07-26 08:36:58 -07:00
vmid.c KVM: arm64: Ensure a VMID is allocated before programming VTTBR_EL2 2025-02-20 16:29:28 +00:00