summaryrefslogtreecommitdiff
path: root/hw/msix.c
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@redhat.com>2009-11-24 16:44:15 +0200
committerMichael S. Tsirkin <mst@redhat.com>2009-12-01 17:58:27 +0200
commitb5f28bcaeec3ca54755f24ae665c4028fc598d77 (patch)
tree162776a498635135b044f9f4cd123ab2fe8336b5 /hw/msix.c
parentpci: convert goto into scope in bridge_filter (diff)
downloadqemu-kvm-b5f28bcaeec3ca54755f24ae665c4028fc598d77.tar.gz
qemu-kvm-b5f28bcaeec3ca54755f24ae665c4028fc598d77.tar.bz2
qemu-kvm-b5f28bcaeec3ca54755f24ae665c4028fc598d77.zip
msix: add helper to unuse all msix entries
will be used by virtio on soft reset Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/msix.c')
-rw-r--r--hw/msix.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/hw/msix.c b/hw/msix.c
index 548ffd5c8..d49944111 100644
--- a/hw/msix.c
+++ b/hw/msix.c
@@ -378,3 +378,10 @@ void msix_vector_unuse(PCIDevice *dev, unsigned vector)
if (vector < dev->msix_entries_nr && dev->msix_entry_used[vector])
--dev->msix_entry_used[vector];
}
+
+void msix_unuse_all_vectors(PCIDevice *dev)
+{
+ if (!(dev->cap_present & QEMU_PCI_CAP_MSIX))
+ return;
+ msix_free_irq_entries(dev);
+}