aboutsummaryrefslogtreecommitdiff
path: root/hw/msix.c
diff options
context:
space:
mode:
authorJan Kiszka <jan.kiszka@siemens.com>2012-05-17 10:32:38 -0300
committerAvi Kivity <avi@redhat.com>2012-05-21 19:22:50 +0300
commitcb697aaab9c1d8078721513a11cb1ce2729b9c92 (patch)
tree1b19040226f8ed9b03f601ad679636918d01942b /hw/msix.c
parentbbf3b80401d55ac3339160cefa17f0015317f512 (diff)
downloadqemu-cb697aaab9c1d8078721513a11cb1ce2729b9c92.zip
qemu-cb697aaab9c1d8078721513a11cb1ce2729b9c92.tar.gz
qemu-cb697aaab9c1d8078721513a11cb1ce2729b9c92.tar.bz2
msix: Add msix_nr_vectors_allocated
Analogously to msi_nr_vectors_allocated, add a service for MSI-X. Will be used by the virtio-pci layer. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'hw/msix.c')
-rw-r--r--hw/msix.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/hw/msix.c b/hw/msix.c
index 1622e16..59c7a83 100644
--- a/hw/msix.c
+++ b/hw/msix.c
@@ -452,6 +452,11 @@ void msix_unuse_all_vectors(PCIDevice *dev)
msix_free_irq_entries(dev);
}
+unsigned int msix_nr_vectors_allocated(const PCIDevice *dev)
+{
+ return dev->msix_entries_nr;
+}
+
static int msix_set_notifier_for_vector(PCIDevice *dev, unsigned int vector)
{
MSIMessage msg;