]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
KVM: x86: Account fastpath-only VM-Exits in vCPU stats
authorSean Christopherson <seanjc@google.com>
Fri, 2 Jun 2023 01:19:19 +0000 (18:19 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 9 Jun 2023 08:48:24 +0000 (10:48 +0200)
commit7ed93eed4a1a742bae2eb967612d1710cd2e2aff
tree23e0460c4b66052b138e2f595a32eb540bb6fe31
parent2b46a2c480e31062715f423837cefca013824f1e
KVM: x86: Account fastpath-only VM-Exits in vCPU stats

commit 8b703a49c9df5e74870381ad7ba9c85d8a74ed2c upstream.

Increment vcpu->stat.exits when handling a fastpath VM-Exit without
going through any part of the "slow" path.  Not bumping the exits stat
can result in wildly misleading exit counts, e.g. if the primary reason
the guest is exiting is to program the TSC deadline timer.

Fixes: 404d5d7bff0d ("KVM: X86: Introduce more exit_fastpath_completion enum values")
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20230602011920.787844-2-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/kvm/x86.c