diff options
author | Anthony Liguori <aliguori@us.ibm.com> | 2010-12-17 08:21:29 -0600 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2010-12-17 08:21:29 -0600 |
commit | b254b0d15d48efc3bd43ae535158ded3c1519257 (patch) | |
tree | 856460106817ca5ccbab285b474a52cdcac2a46e /hw/pci.c | |
parent | 36888c6335422f07bbc50bf3443a39f24b90c7c6 (diff) | |
parent | 513691b7ff20262efe9aafb85c8dd4615588ad48 (diff) | |
download | qemu-b254b0d15d48efc3bd43ae535158ded3c1519257.zip qemu-b254b0d15d48efc3bd43ae535158ded3c1519257.tar.gz qemu-b254b0d15d48efc3bd43ae535158ded3c1519257.tar.bz2 |
Merge remote branch 'mst/for_anthony' into staging
Diffstat (limited to 'hw/pci.c')
-rw-r--r-- | hw/pci.c | 24 |
1 files changed, 5 insertions, 19 deletions
@@ -25,8 +25,6 @@ #include "pci.h" #include "pci_bridge.h" #include "pci_internals.h" -#include "msix.h" -#include "msi.h" #include "monitor.h" #include "net.h" #include "sysemu.h" @@ -59,6 +57,8 @@ struct BusInfo pci_bus_info = { DEFINE_PROP_UINT32("rombar", PCIDevice, rom_bar, 1), DEFINE_PROP_BIT("multifunction", PCIDevice, cap_present, QEMU_PCI_CAP_MULTIFUNCTION_BITNR, false), + DEFINE_PROP_BIT("command_serr_enable", PCIDevice, cap_present, + QEMU_PCI_CAP_SERR_BITNR, true), DEFINE_PROP_END_OF_LIST() } }; @@ -570,6 +570,9 @@ static void pci_init_wmask(PCIDevice *dev) pci_set_word(dev->wmask + PCI_COMMAND, PCI_COMMAND_IO | PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER | PCI_COMMAND_INTX_DISABLE); + if (dev->cap_present & QEMU_PCI_CAP_SERR) { + pci_word_test_and_set_mask(dev->wmask + PCI_COMMAND, PCI_COMMAND_SERR); + } memset(dev->wmask + PCI_CONFIG_HEADER_SIZE, 0xff, config_size - PCI_CONFIG_HEADER_SIZE); @@ -1096,23 +1099,6 @@ static void pci_set_irq(void *opaque, int irq_num, int level) pci_change_irq_level(pci_dev, irq_num, change); } -bool pci_msi_enabled(PCIDevice *dev) -{ - return msix_enabled(dev) || msi_enabled(dev); -} - -void pci_msi_notify(PCIDevice *dev, unsigned int vector) -{ - if (msix_enabled(dev)) { - msix_notify(dev, vector); - } else if (msi_enabled(dev)) { - msi_notify(dev, vector); - } else { - /* MSI/MSI-X must be enabled */ - abort(); - } -} - /***********************************************************/ /* monitor info on PCI */ |