qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH] virtio-pci: Clear IRQ at reset


From: Fam Zheng
Subject: [Qemu-devel] [PATCH] virtio-pci: Clear IRQ at reset
Date: Thu, 12 Mar 2015 14:40:55 +0800

Currently we could leave PCI IRQ asserted even after reset, it is safer
to clear it.

In the case that a buggy driver has disabled MSI-X unintentially, we may
have already injected IRQ in previous virtio_pci_notify, which will not
be cleared by guest because it doesn't expect it (i.e. no irq handler).
However the driver may eventually notice the unresponsiveness and reset
the device, at that point, clearing the irq is meaningful.

Signed-off-by: Fam Zheng <address@hidden>
---
 hw/virtio/virtio-pci.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c
index e7baf7b..2600f1e 100644
--- a/hw/virtio/virtio-pci.c
+++ b/hw/virtio/virtio-pci.c
@@ -988,6 +988,7 @@ static void virtio_pci_reset(DeviceState *qdev)
     virtio_pci_stop_ioeventfd(proxy);
     virtio_bus_reset(bus);
     msix_unuse_all_vectors(&proxy->pci_dev);
+    pci_irq_deassert(&proxy->pci_dev);
 }
 
 static Property virtio_pci_properties[] = {
-- 
1.9.3




reply via email to

[Prev in Thread] Current Thread [Next in Thread]