qemu/hw/pci/msix.h
<<
>>
Prefs
   1#ifndef QEMU_MSIX_H
   2#define QEMU_MSIX_H
   3
   4#include "qemu-common.h"
   5#include "hw/pci/pci.h"
   6
   7void msix_set_message(PCIDevice *dev, int vector, MSIMessage msg);
   8MSIMessage msix_get_message(PCIDevice *dev, unsigned int vector);
   9int msix_init(PCIDevice *dev, unsigned short nentries,
  10              MemoryRegion *table_bar, uint8_t table_bar_nr,
  11              unsigned table_offset, MemoryRegion *pba_bar,
  12              uint8_t pba_bar_nr, unsigned pba_offset, uint8_t cap_pos);
  13int msix_init_exclusive_bar(PCIDevice *dev, unsigned short nentries,
  14                            uint8_t bar_nr);
  15
  16void msix_write_config(PCIDevice *dev, uint32_t address, uint32_t val, int len);
  17
  18void msix_uninit(PCIDevice *dev, MemoryRegion *table_bar,
  19                 MemoryRegion *pba_bar);
  20void msix_uninit_exclusive_bar(PCIDevice *dev);
  21
  22unsigned int msix_nr_vectors_allocated(const PCIDevice *dev);
  23
  24void msix_save(PCIDevice *dev, QEMUFile *f);
  25void msix_load(PCIDevice *dev, QEMUFile *f);
  26
  27int msix_enabled(PCIDevice *dev);
  28int msix_present(PCIDevice *dev);
  29
  30bool msix_is_masked(PCIDevice *dev, unsigned vector);
  31void msix_set_pending(PCIDevice *dev, unsigned vector);
  32
  33int msix_vector_use(PCIDevice *dev, unsigned vector);
  34void msix_vector_unuse(PCIDevice *dev, unsigned vector);
  35void msix_unuse_all_vectors(PCIDevice *dev);
  36
  37void msix_notify(PCIDevice *dev, unsigned vector);
  38
  39void msix_reset(PCIDevice *dev);
  40
  41int msix_set_vector_notifiers(PCIDevice *dev,
  42                              MSIVectorUseNotifier use_notifier,
  43                              MSIVectorReleaseNotifier release_notifier,
  44                              MSIVectorPollNotifier poll_notifier);
  45void msix_unset_vector_notifiers(PCIDevice *dev);
  46#endif
  47