On 12/02/2009 04:44 PM, Gleb Natapov wrote: > On Tue, Dec 01, 2009 at 03:36:41PM +0100, Chris Lalancette wrote: >> Make sure that we kick the appropriate vcpu when delivering >> an interrupt. This makes sure that we wake any idle cpus >> to cause a "vcpu_run" and an interrupt injection to occur. >> >> Signed-off-by: Chris Lalancette <clalance@xxxxxxxxxx> >> --- >> virt/kvm/irq_comm.c | 5 ++++- >> 1 files changed, 4 insertions(+), 1 deletions(-) >> >> diff --git a/virt/kvm/irq_comm.c b/virt/kvm/irq_comm.c >> index 9b07734..96df854 100644 >> --- a/virt/kvm/irq_comm.c >> +++ b/virt/kvm/irq_comm.c >> @@ -98,6 +98,7 @@ int kvm_irq_delivery_to_apic(struct kvm *kvm, struct kvm_lapic *src, >> if (r < 0) >> r = 0; >> r += kvm_apic_set_irq(vcpu, irq); >> + kvm_vcpu_kick(vcpu); >> } else { >> if (!lowest) >> lowest = vcpu; >> @@ -106,8 +107,10 @@ int kvm_irq_delivery_to_apic(struct kvm *kvm, struct kvm_lapic *src, >> } >> } >> >> - if (lowest) >> + if (lowest) { >> r = kvm_apic_set_irq(lowest, irq); >> + kvm_vcpu_kick(lowest); >> + } >> >> return r; >> } > kvm_vcpu_kick() is done inside kvm_apic_set_irq(), so why is this > needed? Yeah, you are absolutely right. I mis-read it before. I'll remove this bit. -- Chris Lalancette -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html