root / include / hw / pci / msix.h @ f487b677
History | View | Annotate | Download (2.1 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 | c759b24f | Michael S. Tsirkin | #include "hw/pci/pci.h" |
6 | 02eb84d0 | Michael S. Tsirkin | |
7 | 932d4a42 | Alexey Kardashevskiy | void msix_set_message(PCIDevice *dev, int vector, MSIMessage msg); |
8 | 4c93bfa9 | Michael S. Tsirkin | MSIMessage msix_get_message(PCIDevice *dev, unsigned int vector); |
9 | 5a2c2029 | Alex Williamson | int msix_init(PCIDevice *dev, unsigned short nentries, |
10 | 5a2c2029 | Alex Williamson | MemoryRegion *table_bar, uint8_t table_bar_nr, |
11 | 5a2c2029 | Alex Williamson | unsigned table_offset, MemoryRegion *pba_bar,
|
12 | 5a2c2029 | Alex Williamson | uint8_t pba_bar_nr, unsigned pba_offset, uint8_t cap_pos);
|
13 | 53f94925 | Alex Williamson | int msix_init_exclusive_bar(PCIDevice *dev, unsigned short nentries, |
14 | 53f94925 | Alex Williamson | uint8_t bar_nr); |
15 | 02eb84d0 | Michael S. Tsirkin | |
16 | 118f2c2b | Alex Williamson | void msix_write_config(PCIDevice *dev, uint32_t address, uint32_t val, int len); |
17 | 02eb84d0 | Michael S. Tsirkin | |
18 | 572992ee | Alex Williamson | void msix_uninit(PCIDevice *dev, MemoryRegion *table_bar,
|
19 | 572992ee | Alex Williamson | MemoryRegion *pba_bar); |
20 | 53f94925 | Alex Williamson | void msix_uninit_exclusive_bar(PCIDevice *dev);
|
21 | 02eb84d0 | Michael S. Tsirkin | |
22 | cb697aaa | Jan Kiszka | unsigned int msix_nr_vectors_allocated(const PCIDevice *dev); |
23 | cb697aaa | Jan Kiszka | |
24 | 02eb84d0 | Michael S. Tsirkin | void msix_save(PCIDevice *dev, QEMUFile *f);
|
25 | 02eb84d0 | Michael S. Tsirkin | void msix_load(PCIDevice *dev, QEMUFile *f);
|
26 | 02eb84d0 | Michael S. Tsirkin | |
27 | 02eb84d0 | Michael S. Tsirkin | int msix_enabled(PCIDevice *dev);
|
28 | 02eb84d0 | Michael S. Tsirkin | int msix_present(PCIDevice *dev);
|
29 | 02eb84d0 | Michael S. Tsirkin | |
30 | 70f8ee39 | Michael S. Tsirkin | bool msix_is_masked(PCIDevice *dev, unsigned vector); |
31 | 70f8ee39 | Michael S. Tsirkin | void msix_set_pending(PCIDevice *dev, unsigned vector); |
32 | 70f8ee39 | Michael S. Tsirkin | |
33 | 02eb84d0 | Michael S. Tsirkin | int msix_vector_use(PCIDevice *dev, unsigned vector); |
34 | 02eb84d0 | Michael S. Tsirkin | void msix_vector_unuse(PCIDevice *dev, unsigned vector); |
35 | b5f28bca | Michael S. Tsirkin | void msix_unuse_all_vectors(PCIDevice *dev);
|
36 | 02eb84d0 | Michael S. Tsirkin | |
37 | 02eb84d0 | Michael S. Tsirkin | void msix_notify(PCIDevice *dev, unsigned vector); |
38 | 02eb84d0 | Michael S. Tsirkin | |
39 | 02eb84d0 | Michael S. Tsirkin | void msix_reset(PCIDevice *dev);
|
40 | 02eb84d0 | Michael S. Tsirkin | |
41 | 2cdfe53c | Jan Kiszka | int msix_set_vector_notifiers(PCIDevice *dev,
|
42 | 2cdfe53c | Jan Kiszka | MSIVectorUseNotifier use_notifier, |
43 | bbef882c | Michael S. Tsirkin | MSIVectorReleaseNotifier release_notifier, |
44 | bbef882c | Michael S. Tsirkin | MSIVectorPollNotifier poll_notifier); |
45 | 2cdfe53c | Jan Kiszka | void msix_unset_vector_notifiers(PCIDevice *dev);
|
46 | 340b50c7 | Gerd Hoffmann | |
47 | 340b50c7 | Gerd Hoffmann | extern const VMStateDescription vmstate_msix; |
48 | 340b50c7 | Gerd Hoffmann | |
49 | 340b50c7 | Gerd Hoffmann | #define VMSTATE_MSIX(_field, _state) { \
|
50 | 340b50c7 | Gerd Hoffmann | .name = (stringify(_field)), \ |
51 | 340b50c7 | Gerd Hoffmann | .size = sizeof(PCIDevice), \
|
52 | 340b50c7 | Gerd Hoffmann | .vmsd = &vmstate_msix, \ |
53 | 340b50c7 | Gerd Hoffmann | .flags = VMS_STRUCT, \ |
54 | 340b50c7 | Gerd Hoffmann | .offset = vmstate_offset_value(_state, _field, PCIDevice), \ |
55 | 340b50c7 | Gerd Hoffmann | } |
56 | 340b50c7 | Gerd Hoffmann | |
57 | 02eb84d0 | Michael S. Tsirkin | #endif |