diff options
author | Jan Kiszka <jan.kiszka@siemens.com> | 2012-05-11 11:42:37 -0300 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2012-06-07 17:18:59 +0300 |
commit | 520064c8b15504fb75babce7be6b5800b54ec490 (patch) | |
tree | 2f49fb5097dcb158f18b25f33e31e27eddd90768 | |
parent | 8ab60a0703d182d61a0c4e3db35cf70ab57d89aa (diff) | |
download | qemu-520064c8b15504fb75babce7be6b5800b54ec490.zip qemu-520064c8b15504fb75babce7be6b5800b54ec490.tar.gz qemu-520064c8b15504fb75babce7be6b5800b54ec490.tar.bz2 |
msi: Guard msi_reset with msi_present
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
-rw-r--r-- | hw/msi.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -191,6 +191,10 @@ void msi_reset(PCIDevice *dev) uint16_t flags; bool msi64bit; + if (!msi_present(dev)) { + return; + } + flags = pci_get_word(dev->config + msi_flags_off(dev)); flags &= ~(PCI_MSI_FLAGS_QSIZE | PCI_MSI_FLAGS_ENABLE); msi64bit = flags & PCI_MSI_FLAGS_64BIT; |