On 15.10.2021 14:51, Juergen Gross wrote:
> The HVM hypercall handler is missing incrementing the per hypercall
> counters. Add that.
> 
> The counters for PV are handled wrong, as they are not using
> perf_incra() with the number of the hypercall as index, but are
> incrementing the total number of hypercalls only. Fix that.

Why do you say "total number"? Isn't it that all accounting goes into
set_trap_table's slot, effectively making that slot a "total number"
despite not being labeled that way?

Also this fix renders largely redundant the calls_to_multicall counter.
Could I talk you into deleting that at the same time? (As to the "not
fully redundant": I consider it suspicious that this counter gets
incremented at the bottom of the function, not at the top.)

Finally I take it that with the Kconfig setting being under DEBUG, we
don't consider security supported builds with PERF_COUNTERS enabled.
Otherwise as a prereq I would think perfc_incra() would need teaching
of array_index_nospec().

In any event, preferably with at least the description slightly
adjusted,
Reviewed-by: Jan Beulich <jbeul...@suse.com>

Jan


Reply via email to