projects
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8ab60a0
)
msi: Guard msi_reset with msi_present
author
Jan Kiszka
<jan.kiszka@siemens.com>
Fri, 11 May 2012 14:42:37 +0000
(11:42 -0300)
committer
Michael S. Tsirkin
<mst@redhat.com>
Thu, 7 Jun 2012 14:18:59 +0000
(17:18 +0300)
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/msi.c
patch
|
blob
|
history
diff --git
a/hw/msi.c
b/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;