repository: /home/avi/kvm/linux-2.6
branch: master
commit 1c37fdc33da77df7fbb0affe5c3896d15f6f2702
Author: Avi Kivity <[EMAIL PROTECTED]>
Date:   Tue Oct 16 16:23:22 2007 +0200

    KVM: Move apic timer interrupt backlog processing to common code
    
    Beside the obvious goodness of making code more common, this prevents
    a livelock with the next patch which moves interrupt injection out of the
    critical section.
    
    Signed-off-by: Avi Kivity <[EMAIL PROTECTED]>

diff --git a/drivers/kvm/kvm_main.c b/drivers/kvm/kvm_main.c
index 86cdd83..8eadb6d 100644
--- a/drivers/kvm/kvm_main.c
+++ b/drivers/kvm/kvm_main.c
@@ -2165,6 +2165,8 @@ again:
        if (unlikely(r))
                goto out;
 
+       kvm_inject_pending_timer_irqs(vcpu);
+
        preempt_disable();
 
        kvm_x86_ops->prepare_guest_switch(vcpu);
diff --git a/drivers/kvm/svm.c b/drivers/kvm/svm.c
index f643379..e8ab3b2 100644
--- a/drivers/kvm/svm.c
+++ b/drivers/kvm/svm.c
@@ -1344,7 +1344,6 @@ static void svm_intr_assist(struct kvm_vcpu *vcpu)
        struct vmcb *vmcb = svm->vmcb;
        int intr_vector = -1;
 
-       kvm_inject_pending_timer_irqs(vcpu);
        if ((vmcb->control.exit_int_info & SVM_EVTINJ_VALID) &&
            ((vmcb->control.exit_int_info & SVM_EVTINJ_TYPE_MASK) == 0)) {
                intr_vector = vmcb->control.exit_int_info &
diff --git a/drivers/kvm/vmx.c b/drivers/kvm/vmx.c
index 2d75599..92bc7ee 100644
--- a/drivers/kvm/vmx.c
+++ b/drivers/kvm/vmx.c
@@ -2187,7 +2187,6 @@ static void vmx_intr_assist(struct kvm_vcpu *vcpu)
        int has_ext_irq, interrupt_window_open;
        int vector;
 
-       kvm_inject_pending_timer_irqs(vcpu);
        update_tpr_threshold(vcpu);
 
        has_ext_irq = kvm_cpu_has_interrupt(vcpu);

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
kvm-commits mailing list
kvm-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-commits

Reply via email to