提交 aa35c00a 编写于 作者: C chenjiajun 提交者: Zheng Zengkai

kvm: debugfs: add fastpath msr_wr exits to debugfs statistics

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: Nchenjiajun <chenjiajun8@huawei.com>
Reviewed-by: NXiangyou Xie <xiexiangyou@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 eb634f3d
...@@ -6595,6 +6595,7 @@ static fastpath_t vmx_exit_handlers_fastpath(struct kvm_vcpu *vcpu) ...@@ -6595,6 +6595,7 @@ static fastpath_t vmx_exit_handlers_fastpath(struct kvm_vcpu *vcpu)
{ {
switch (to_vmx(vcpu)->exit_reason) { switch (to_vmx(vcpu)->exit_reason) {
case EXIT_REASON_MSR_WRITE: case EXIT_REASON_MSR_WRITE:
++vcpu->stat.msr_wr_exits;
return handle_fastpath_set_msr_irqoff(vcpu); return handle_fastpath_set_msr_irqoff(vcpu);
case EXIT_REASON_PREEMPTION_TIMER: case EXIT_REASON_PREEMPTION_TIMER:
return handle_fastpath_preemption_timer(vcpu); return handle_fastpath_preemption_timer(vcpu);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册