Re: [RFC 1/3] x86: KVM: stats: Add a stat to report status of APICv inhibition

Paolo Bonzini
2024-04-16T19:53:36Z

On Tue, Apr 16, 2024 at 8:19 PM Sean Christopherson <seanjc@google.com> wrote:
>
> > + u64 apicv_inhibited;
>
> Tracking the negative is odd, i.e. if we add a stat, KVM should probably track
> if APICv is fully enabled, not if it's inhibited.
>
> This also should be a boolean, not a u64. Precisely enumerating _why_ APICv is
> inhibited is firmly in debug territory, i.e. not in scope for "official" stats.

It is a boolean, but stats are all u64 in the file and the contents of
the file map the stats struct directly. See for example the existing
'u64 guest_mode".

Paolo