KVM: SVM: count all irq windows exit
authorJason Wang <jasowang@redhat.com>
Thu, 8 Mar 2012 10:07:56 +0000 (18:07 +0800)
committerAvi Kivity <avi@redhat.com>
Sun, 8 Apr 2012 09:47:01 +0000 (12:47 +0300)
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>
arch/x86/kvm/svm.c

index e334389e1c755eb471c146264e4bf1021ca5333a..f3167208562e90240712794229a603c8f7bb9f3f 100644 (file)
@@ -3240,6 +3240,7 @@ static int interrupt_window_interception(struct vcpu_svm *svm)
        svm_clear_vintr(svm);
        svm->vmcb->control.int_ctl &= ~V_IRQ_MASK;
        mark_dirty(svm->vmcb, VMCB_INTR);
+       ++svm->vcpu.stat.irq_window_exits;
        /*
         * If the user space waits to inject interrupts, exit as soon as
         * possible
@@ -3247,7 +3248,6 @@ static int interrupt_window_interception(struct vcpu_svm *svm)
        if (!irqchip_in_kernel(svm->vcpu.kvm) &&
            kvm_run->request_interrupt_window &&
            !kvm_cpu_has_interrupt(&svm->vcpu)) {
-               ++svm->vcpu.stat.irq_window_exits;
                kvm_run->exit_reason = KVM_EXIT_IRQ_WINDOW_OPEN;
                return 0;
        }
This page took 0.028618 seconds and 5 git commands to generate.