]> Git Repo - qemu.git/blobdiff - hw/msi.c
msi: Guard msi_reset with msi_present
[qemu.git] / hw / msi.c
index 5d6ceb6df01655607393630de770277d683638fa..b2903fc93c28185c8865a60534e581a0db5756f5 100644 (file)
--- a/hw/msi.c
+++ b/hw/msi.c
@@ -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;
This page took 0.023795 seconds and 4 git commands to generate.