[PATCH v8 24/28] KVM: arm64: Add trace reset to the pKVM hyp
Marc Zyngier
maz at kernel.org
Sun Nov 30 10:33:58 PST 2025
On Fri, 07 Nov 2025 09:38:36 +0000,
Vincent Donnefort <vdonnefort at google.com> wrote:
>
[...]
> +int __pkvm_reset_tracing(unsigned int cpu)
> +{
> + int ret = 0;
> +
> + if (cpu >= hyp_nr_cpus)
> + return -EINVAL;
> +
> + hyp_spin_lock(&trace_buffer.lock);
> +
> + if (hyp_trace_buffer_loaded(&trace_buffer))
> + ret = simple_ring_buffer_reset(per_cpu_ptr(trace_buffer.simple_rbs, cpu));
> + else
> + ret = -ENODEV;
> +
> + hyp_spin_unlock(&trace_buffer.lock);
> +
> + return ret;
nit; there is no case where the 'ret' default value can be used.
Either drop the init or make it so that the default value is
meaningful (-ENODEV).
Thanks,
M.
--
Jazz isn't dead. It just smells funny.
More information about the linux-arm-kernel
mailing list