]> git.proxmox.com Git - mirror_ubuntu-kernels.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)
committerStefan Bader <stefan.bader@canonical.com>
Mon, 4 Sep 2023 09:10:33 +0000 (11:10 +0200)
commitf987bca271b9cb688a7832e54d498c6af8272d47
tree0f49df04307c4e59f455f692e01150d8b8c6f329
parent8d6c2a277d3d594884ea16adcd6ee9f5cf9cfa9e
KVM: x86: Account fastpath-only VM-Exits in vCPU stats

BugLink: https://bugs.launchpad.net/bugs/2029808
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>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
arch/x86/kvm/x86.c