Commit 84d4616c authored by chenjiajun's avatar chenjiajun Committed by liangtian
Browse files

kvm: debugfs: add fastpath msr_wr exits to debugfs statistics

virt inclusion
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I919BF


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: default avatarchenjiajun <chenjiajun8@huawei.com>
Signed-off-by: default avatarliangtian <liangtian13@huawei.com>
parent a6a49491
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -7216,6 +7216,7 @@ static fastpath_t vmx_exit_handlers_fastpath(struct kvm_vcpu *vcpu)
{
	switch (to_vmx(vcpu)->exit_reason.basic) {
	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);