Revision a5d1fd20

b/hw/pci.c
25 25
#include "pci.h"
26 26
#include "pci_bridge.h"
27 27
#include "pci_internals.h"
28
#include "msix.h"
29
#include "msi.h"
28 30
#include "monitor.h"
29 31
#include "net.h"
30 32
#include "sysemu.h"
......
1034 1036
    pci_change_irq_level(pci_dev, irq_num, change);
1035 1037
}
1036 1038

  
1039
bool pci_msi_enabled(PCIDevice *dev)
1040
{
1041
    return msix_enabled(dev) || msi_enabled(dev);
1042
}
1043

  
1044
void pci_msi_notify(PCIDevice *dev, unsigned int vector)
1045
{
1046
    if (msix_enabled(dev)) {
1047
        msix_notify(dev, vector);
1048
    } else if (msi_enabled(dev)) {
1049
        msi_notify(dev, vector);
1050
    } else {
1051
        /* MSI/MSI-X must be enabled */
1052
        abort();
1053
    }
1054
}
1055

  
1037 1056
/***********************************************************/
1038 1057
/* monitor info on PCI */
1039 1058

  
b/hw/pci.h
239 239
void do_pci_info(Monitor *mon, QObject **ret_data);
240 240
void pci_bridge_update_mappings(PCIBus *b);
241 241

  
242
bool pci_msi_enabled(PCIDevice *dev);
243
void pci_msi_notify(PCIDevice *dev, unsigned int vector);
244

  
242 245
static inline void
243 246
pci_set_byte(uint8_t *config, uint8_t val)
244 247
{

Also available in: Unified diff