aboutsummaryrefslogtreecommitdiff
path: root/hw/msix.h
diff options
context:
space:
mode:
authorAlex Williamson <alex.williamson@redhat.com>2012-06-14 12:15:51 -0600
committerMichael S. Tsirkin <mst@robin.(none)>2012-06-18 10:21:05 +0300
commit53f949254ad2435bfd45cb0dee96f246a0bdd7e3 (patch)
tree280a5d7b4b69818743f9023a175788f828cc9856 /hw/msix.h
parent118f2c2b48b9758a3a2967868b337eb388d1531b (diff)
msix: Add simple BAR allocation MSIX setup functions
msi_init() takes over a BAR without really specifying or allowing specification of how it does so. Instead, let's split it into two interfaces, one fully specified, and one trivially easy. This implements the latter. msix_init_exclusive_bar() takes over allocating and filling a PCI BAR _exclusively_ for the use of MSIX. When used, the matching msi_uninit_exclusive_bar() should be used to tear it down. Signed-off-by: Alex Williamson <alex.williamson@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/msix.h')
-rw-r--r--hw/msix.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/hw/msix.h b/hw/msix.h
index 4a17f94540..f681bb0855 100644
--- a/hw/msix.h
+++ b/hw/msix.h
@@ -7,10 +7,13 @@
int msix_init(PCIDevice *pdev, unsigned short nentries,
MemoryRegion *bar,
unsigned bar_nr, unsigned bar_size);
+int msix_init_exclusive_bar(PCIDevice *dev, unsigned short nentries,
+ uint8_t bar_nr);
void msix_write_config(PCIDevice *dev, uint32_t address, uint32_t val, int len);
int msix_uninit(PCIDevice *d, MemoryRegion *bar);
+void msix_uninit_exclusive_bar(PCIDevice *dev);
unsigned int msix_nr_vectors_allocated(const PCIDevice *dev);