[0/2] KVM: x86: Fastpath accounting fixes

Message ID 20230602011920.787844-1-seanjc@google.com
Headers
Series KVM: x86: Fastpath accounting fixes |

Message

Sean Christopherson June 2, 2023, 1:19 a.m. UTC
  Fix two bugs where KVM fails to account/trace exits that are handled
in the super fast fastpath.  SVM doesn't actually utilize the super fast
fastpath, i.e. patch 1 only affects VMX and the bug fixed by patch 2 is
benign in the current code base.

Found by inspection, confirmed by hacking together a small selftest and
manually verifying the stats via sysfs.

Sean Christopherson (2):
  KVM: x86: Account fastpath-only VM-Exits in vCPU stats
  KVM: SVM: Invoke trace_kvm_exit() for fastpath VM-Exits

 arch/x86/kvm/svm/svm.c | 4 ++--
 arch/x86/kvm/x86.c     | 3 +++
 2 files changed, 5 insertions(+), 2 deletions(-)


base-commit: 39428f6ea9eace95011681628717062ff7f5eb5f
  

Comments

Sean Christopherson June 3, 2023, 12:52 a.m. UTC | #1
On Thu, 01 Jun 2023 18:19:18 -0700, Sean Christopherson wrote:
> Fix two bugs where KVM fails to account/trace exits that are handled
> in the super fast fastpath.  SVM doesn't actually utilize the super fast
> fastpath, i.e. patch 1 only affects VMX and the bug fixed by patch 2 is
> benign in the current code base.
> 
> Found by inspection, confirmed by hacking together a small selftest and
> manually verifying the stats via sysfs.
> 
> [...]

Applied patch 1 to kvm-x86 fixes (for 6.4), and patch 2 to kvm-x86 svm (for 6.5).
Should have posted these separately...

[1/2] KVM: x86: Account fastpath-only VM-Exits in vCPU stats
      https://github.com/kvm-x86/linux/commit/8b703a49c9df
[2/2] KVM: SVM: Invoke trace_kvm_exit() for fastpath VM-Exits
      https://github.com/kvm-x86/linux/commit/791a089861fc

--
https://github.com/kvm-x86/linux/tree/next
https://github.com/kvm-x86/linux/tree/fixes
https://github.com/kvm-x86/linux/tree/svm