qdev: release parent properties on dc->init failure
[qemu/ar7.git] / hw / msix.h
blob50aee8221a9b73b25080434dc8f9b5733d6d7e0f
1 #ifndef QEMU_MSIX_H
2 #define QEMU_MSIX_H
4 #include "qemu-common.h"
5 #include "pci.h"
7 int msix_init(PCIDevice *pdev, unsigned short nentries,
8 MemoryRegion *bar,
9 unsigned bar_nr, unsigned bar_size);
11 void msix_write_config(PCIDevice *pci_dev, uint32_t address,
12 uint32_t val, int len);
14 int msix_uninit(PCIDevice *d, MemoryRegion *bar);
16 unsigned int msix_nr_vectors_allocated(const PCIDevice *dev);
18 void msix_save(PCIDevice *dev, QEMUFile *f);
19 void msix_load(PCIDevice *dev, QEMUFile *f);
21 int msix_enabled(PCIDevice *dev);
22 int msix_present(PCIDevice *dev);
24 uint32_t msix_bar_size(PCIDevice *dev);
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);
30 void msix_notify(PCIDevice *dev, unsigned vector);
32 void msix_reset(PCIDevice *dev);
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