diff options
author | Michael S. Tsirkin <mst@redhat.com> | 2009-11-24 16:44:15 +0200 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2009-12-01 17:58:27 +0200 |
commit | b5f28bcaeec3ca54755f24ae665c4028fc598d77 (patch) | |
tree | 162776a498635135b044f9f4cd123ab2fe8336b5 | |
parent | 88a9556430df57cbe7666e4e4cf78c3bd3bc8220 (diff) |
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>
-rw-r--r-- | hw/msix.c | 7 | ||||
-rw-r--r-- | hw/msix.h | 1 |
2 files changed, 8 insertions, 0 deletions
@@ -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); +} @@ -25,6 +25,7 @@ uint32_t msix_bar_size(PCIDevice *dev); int msix_vector_use(PCIDevice *dev, unsigned vector); void msix_vector_unuse(PCIDevice *dev, unsigned vector); +void msix_unuse_all_vectors(PCIDevice *dev); void msix_notify(PCIDevice *dev, unsigned vector); |