mirror of
https://github.com/Motorhead1991/qemu.git
synced 2026-01-05 14:07:41 -07:00
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>
This commit is contained in:
parent
88a9556430
commit
b5f28bcaee
2 changed files with 8 additions and 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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue