Commit 675acb75 authored by Jason Wang's avatar Jason Wang Committed by Avi Kivity

KVM: SVM: count all irq windows exit

Also count the exits of fast-path.
Signed-off-by: default avatarJason Wang <jasowang@redhat.com>
Acked-by: default avatarJoerg Roedel <joerg.roedel@amd.com>
Signed-off-by: default avatarMarcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: default avatarAvi Kivity <avi@redhat.com>
parent 786a9f88
...@@ -3240,6 +3240,7 @@ static int interrupt_window_interception(struct vcpu_svm *svm) ...@@ -3240,6 +3240,7 @@ static int interrupt_window_interception(struct vcpu_svm *svm)
svm_clear_vintr(svm); svm_clear_vintr(svm);
svm->vmcb->control.int_ctl &= ~V_IRQ_MASK; svm->vmcb->control.int_ctl &= ~V_IRQ_MASK;
mark_dirty(svm->vmcb, VMCB_INTR); mark_dirty(svm->vmcb, VMCB_INTR);
++svm->vcpu.stat.irq_window_exits;
/* /*
* If the user space waits to inject interrupts, exit as soon as * If the user space waits to inject interrupts, exit as soon as
* possible * possible
...@@ -3247,7 +3248,6 @@ static int interrupt_window_interception(struct vcpu_svm *svm) ...@@ -3247,7 +3248,6 @@ static int interrupt_window_interception(struct vcpu_svm *svm)
if (!irqchip_in_kernel(svm->vcpu.kvm) && if (!irqchip_in_kernel(svm->vcpu.kvm) &&
kvm_run->request_interrupt_window && kvm_run->request_interrupt_window &&
!kvm_cpu_has_interrupt(&svm->vcpu)) { !kvm_cpu_has_interrupt(&svm->vcpu)) {
++svm->vcpu.stat.irq_window_exits;
kvm_run->exit_reason = KVM_EXIT_IRQ_WINDOW_OPEN; kvm_run->exit_reason = KVM_EXIT_IRQ_WINDOW_OPEN;
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment