]> git.proxmox.com Git - mirror_qemu.git/blob - hw/msix.h
msix: Add simple BAR allocation MSIX setup functions
[mirror_qemu.git] / hw / msix.h
1 #ifndef QEMU_MSIX_H
2 #define QEMU_MSIX_H
3
4 #include "qemu-common.h"
5 #include "pci.h"
6
7 int msix_init(PCIDevice *pdev, unsigned short nentries,
8 MemoryRegion *bar,
9 unsigned bar_nr, unsigned bar_size);
10 int msix_init_exclusive_bar(PCIDevice *dev, unsigned short nentries,
11 uint8_t bar_nr);
12
13 void msix_write_config(PCIDevice *dev, uint32_t address, uint32_t val, int len);
14
15 int msix_uninit(PCIDevice *d, MemoryRegion *bar);
16 void msix_uninit_exclusive_bar(PCIDevice *dev);
17
18 unsigned int msix_nr_vectors_allocated(const PCIDevice *dev);
19
20 void msix_save(PCIDevice *dev, QEMUFile *f);
21 void msix_load(PCIDevice *dev, QEMUFile *f);
22
23 int msix_enabled(PCIDevice *dev);
24 int msix_present(PCIDevice *dev);
25
26 int msix_vector_use(PCIDevice *dev, unsigned vector);
27 void msix_vector_unuse(PCIDevice *dev, unsigned vector);
28 void msix_unuse_all_vectors(PCIDevice *dev);
29
30 void msix_notify(PCIDevice *dev, unsigned vector);
31
32 void msix_reset(PCIDevice *dev);
33
34 int msix_set_vector_notifiers(PCIDevice *dev,
35 MSIVectorUseNotifier use_notifier,
36 MSIVectorReleaseNotifier release_notifier);
37 void msix_unset_vector_notifiers(PCIDevice *dev);
38 #endif