lkml.org 
[lkml]   [2009]   [Sep]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[patch 33/71] KVM: fix ack not being delivered when msi present

    2.6.30-stable review patch. If anyone has any objections, please let us know.

    ------------------
    From: Michael S. Tsirkin <mst@redhat.com>

    (cherry picked from commit 5116d8f6b977970ebefc1932c0f313163a6ec91f)

    kvm_notify_acked_irq does not check irq type, so that it sometimes
    interprets msi vector as irq. As a result, ack notifiers are not
    called, which typially hangs the guest. The fix is to track and
    check irq type.

    Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
    Signed-off-by: Avi Kivity <avi@redhat.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
    ---
    include/linux/kvm_host.h | 1 +
    virt/kvm/irq_comm.c | 4 +++-
    2 files changed, 4 insertions(+), 1 deletion(-)

    --- a/include/linux/kvm_host.h
    +++ b/include/linux/kvm_host.h
    @@ -110,6 +110,7 @@ struct kvm_memory_slot {

    struct kvm_kernel_irq_routing_entry {
    u32 gsi;
    + u32 type;
    int (*set)(struct kvm_kernel_irq_routing_entry *e,
    struct kvm *kvm, int level);
    union {
    --- a/virt/kvm/irq_comm.c
    +++ b/virt/kvm/irq_comm.c
    @@ -141,7 +141,8 @@ void kvm_notify_acked_irq(struct kvm *kv
    unsigned gsi = pin;

    list_for_each_entry(e, &kvm->irq_routing, link)
    - if (e->irqchip.irqchip == irqchip &&
    + if (e->type == KVM_IRQ_ROUTING_IRQCHIP &&
    + e->irqchip.irqchip == irqchip &&
    e->irqchip.pin == pin) {
    gsi = e->gsi;
    break;
    @@ -240,6 +241,7 @@ static int setup_routing_entry(struct kv
    int delta;

    e->gsi = ue->gsi;
    + e->type = ue->type;
    switch (ue->type) {
    case KVM_IRQ_ROUTING_IRQCHIP:
    delta = 0;



    \
     
     \ /
      Last update: 2009-09-05 02:27    [W:4.403 / U:0.380 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site