diff options
author | Jason Wang <jasowang@redhat.com> | 2012-03-08 05:07:56 -0500 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2012-04-08 05:47:01 -0400 |
commit | 675acb758ab2381c72fe3ceb5c091cbd0879d4dd (patch) | |
tree | de9d37640471e3902e8b6bd6ad891ef6e5eb83ca /arch/x86/kvm | |
parent | 786a9f888bfbe70a36d0592b26037ca1e8c8da7f (diff) |
KVM: SVM: count all irq windows exit
Also count the exits of fast-path.
Signed-off-by: Jason Wang <jasowang@redhat.com>
Acked-by: Joerg Roedel <joerg.roedel@amd.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/x86/kvm')
-rw-r--r-- | arch/x86/kvm/svm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c index e334389e1c7..f3167208562 100644 --- a/arch/x86/kvm/svm.c +++ b/arch/x86/kvm/svm.c | |||
@@ -3240,6 +3240,7 @@ static int interrupt_window_interception(struct vcpu_svm *svm) | |||
3240 | svm_clear_vintr(svm); | 3240 | svm_clear_vintr(svm); |
3241 | svm->vmcb->control.int_ctl &= ~V_IRQ_MASK; | 3241 | svm->vmcb->control.int_ctl &= ~V_IRQ_MASK; |
3242 | mark_dirty(svm->vmcb, VMCB_INTR); | 3242 | mark_dirty(svm->vmcb, VMCB_INTR); |
3243 | ++svm->vcpu.stat.irq_window_exits; | ||
3243 | /* | 3244 | /* |
3244 | * If the user space waits to inject interrupts, exit as soon as | 3245 | * If the user space waits to inject interrupts, exit as soon as |
3245 | * possible | 3246 | * possible |
@@ -3247,7 +3248,6 @@ static int interrupt_window_interception(struct vcpu_svm *svm) | |||
3247 | if (!irqchip_in_kernel(svm->vcpu.kvm) && | 3248 | if (!irqchip_in_kernel(svm->vcpu.kvm) && |
3248 | kvm_run->request_interrupt_window && | 3249 | kvm_run->request_interrupt_window && |
3249 | !kvm_cpu_has_interrupt(&svm->vcpu)) { | 3250 | !kvm_cpu_has_interrupt(&svm->vcpu)) { |
3250 | ++svm->vcpu.stat.irq_window_exits; | ||
3251 | kvm_run->exit_reason = KVM_EXIT_IRQ_WINDOW_OPEN; | 3251 | kvm_run->exit_reason = KVM_EXIT_IRQ_WINDOW_OPEN; |
3252 | return 0; | 3252 | return 0; |
3253 | } | 3253 | } |