Statistics
| Branch: | Revision:

root / hw / msix.h @ 0834c9ea

History | View | Annotate | Download (1.4 kB)

1 02eb84d0 Michael S. Tsirkin
#ifndef QEMU_MSIX_H
2 02eb84d0 Michael S. Tsirkin
#define QEMU_MSIX_H
3 02eb84d0 Michael S. Tsirkin
4 02eb84d0 Michael S. Tsirkin
#include "qemu-common.h"
5 6e355d90 Isaku Yamahata
#include "pci.h"
6 02eb84d0 Michael S. Tsirkin
7 932d4a42 Alexey Kardashevskiy
void msix_set_message(PCIDevice *dev, int vector, MSIMessage msg);
8 5a2c2029 Alex Williamson
int msix_init(PCIDevice *dev, unsigned short nentries,
9 5a2c2029 Alex Williamson
              MemoryRegion *table_bar, uint8_t table_bar_nr,
10 5a2c2029 Alex Williamson
              unsigned table_offset, MemoryRegion *pba_bar,
11 5a2c2029 Alex Williamson
              uint8_t pba_bar_nr, unsigned pba_offset, uint8_t cap_pos);
12 53f94925 Alex Williamson
int msix_init_exclusive_bar(PCIDevice *dev, unsigned short nentries,
13 53f94925 Alex Williamson
                            uint8_t bar_nr);
14 02eb84d0 Michael S. Tsirkin
15 118f2c2b Alex Williamson
void msix_write_config(PCIDevice *dev, uint32_t address, uint32_t val, int len);
16 02eb84d0 Michael S. Tsirkin
17 572992ee Alex Williamson
void msix_uninit(PCIDevice *dev, MemoryRegion *table_bar,
18 572992ee Alex Williamson
                 MemoryRegion *pba_bar);
19 53f94925 Alex Williamson
void msix_uninit_exclusive_bar(PCIDevice *dev);
20 02eb84d0 Michael S. Tsirkin
21 cb697aaa Jan Kiszka
unsigned int msix_nr_vectors_allocated(const PCIDevice *dev);
22 cb697aaa Jan Kiszka
23 02eb84d0 Michael S. Tsirkin
void msix_save(PCIDevice *dev, QEMUFile *f);
24 02eb84d0 Michael S. Tsirkin
void msix_load(PCIDevice *dev, QEMUFile *f);
25 02eb84d0 Michael S. Tsirkin
26 02eb84d0 Michael S. Tsirkin
int msix_enabled(PCIDevice *dev);
27 02eb84d0 Michael S. Tsirkin
int msix_present(PCIDevice *dev);
28 02eb84d0 Michael S. Tsirkin
29 02eb84d0 Michael S. Tsirkin
int msix_vector_use(PCIDevice *dev, unsigned vector);
30 02eb84d0 Michael S. Tsirkin
void msix_vector_unuse(PCIDevice *dev, unsigned vector);
31 b5f28bca Michael S. Tsirkin
void msix_unuse_all_vectors(PCIDevice *dev);
32 02eb84d0 Michael S. Tsirkin
33 02eb84d0 Michael S. Tsirkin
void msix_notify(PCIDevice *dev, unsigned vector);
34 02eb84d0 Michael S. Tsirkin
35 02eb84d0 Michael S. Tsirkin
void msix_reset(PCIDevice *dev);
36 02eb84d0 Michael S. Tsirkin
37 2cdfe53c Jan Kiszka
int msix_set_vector_notifiers(PCIDevice *dev,
38 2cdfe53c Jan Kiszka
                              MSIVectorUseNotifier use_notifier,
39 2cdfe53c Jan Kiszka
                              MSIVectorReleaseNotifier release_notifier);
40 2cdfe53c Jan Kiszka
void msix_unset_vector_notifiers(PCIDevice *dev);
41 02eb84d0 Michael S. Tsirkin
#endif