Re: [RFC 1/3] x86: KVM: stats: Add a stat to report status of APICv inhibition
From: Paolo Bonzini
Date: Tue Apr 16 2024 - 15:53:46 EST
On Tue, Apr 16, 2024 at 8:19 PM Sean Christopherson <seanjc@xxxxxxxxxx> 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