From: chenjiajun chenjiajun8@huawei.com
virt inclusion category: feature bugzilla: 46853 CVE: NA
At present, there is a flaw in the statistics of KVM exits by debugfs, which only counts trigger times of exits processing function in kvm_vmx_exit_handlers. The kvm exits handles in vmx_exit_handlers_fastpath is omitted, so there is a large numerical error in EXIT_REASON_MSR_WRITE statistics sometimes.
Signed-off-by: chenjiajun chenjiajun8@huawei.com --- arch/x86/kvm/vmx/vmx.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c index 7556a380a148..3a0964619070 100644 --- a/arch/x86/kvm/vmx/vmx.c +++ b/arch/x86/kvm/vmx/vmx.c @@ -6595,6 +6595,7 @@ static fastpath_t vmx_exit_handlers_fastpath(struct kvm_vcpu *vcpu) { switch (to_vmx(vcpu)->exit_reason) { case EXIT_REASON_MSR_WRITE: + ++vcpu->stat.msr_wr_exits; return handle_fastpath_set_msr_irqoff(vcpu); case EXIT_REASON_PREEMPTION_TIMER: return handle_fastpath_preemption_timer(vcpu);