Revision a5d1fd20 hw/pci.c
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 |
|
Also available in: Unified diff