From: Jan Kiszka <jan.kiszka@web.de>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: qemu-devel <qemu-devel@nongnu.org>
Subject: [Qemu-devel] [PATCH 2/6] msi: Guard msi_reset with msi_present
Date: Sun, 4 Dec 2011 14:22:10 +0100 [thread overview]
Message-ID: <386fa9bdf110ff45b83e64d6c6c3d2caf75cf62f.1323004933.git.jan.kiszka@web.de> (raw)
In-Reply-To: <cover.1323004933.git.jan.kiszka@web.de>
In-Reply-To: <cover.1323004933.git.jan.kiszka@web.de>
From: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
hw/msi.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/hw/msi.c b/hw/msi.c
index 541e4e1..612b168 100644
--- a/hw/msi.c
+++ b/hw/msi.c
@@ -183,6 +183,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;
--
1.7.3.4
next prev parent reply other threads:[~2011-12-04 13:22 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-04 13:22 [Qemu-devel] [PATCH 0/6] msi: Small refactoring Jan Kiszka
2011-12-04 13:22 ` [Qemu-devel] [PATCH 1/6] msi: Guard msi/msix_write_config with msi_present Jan Kiszka
2011-12-04 13:22 ` Jan Kiszka [this message]
2011-12-04 13:22 ` [Qemu-devel] [PATCH 3/6] msi: Use msi/msix_present more consistently Jan Kiszka
2011-12-04 13:22 ` [Qemu-devel] [PATCH 4/6] msi: Invoke msi/msix_reset from PCI core Jan Kiszka
2011-12-04 14:24 ` Michael S. Tsirkin
2011-12-04 14:35 ` Jan Kiszka
2011-12-04 14:48 ` Michael S. Tsirkin
2011-12-04 14:47 ` Jan Kiszka
2011-12-04 13:22 ` [Qemu-devel] [PATCH 5/6] msi: Invoke msi/msix_write_config " Jan Kiszka
2011-12-04 13:22 ` [Qemu-devel] [PATCH 6/6] msi: Generalize msix_supported to msi_supported Jan Kiszka
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=386fa9bdf110ff45b83e64d6c6c3d2caf75cf62f.1323004933.git.jan.kiszka@web.de \
--to=jan.kiszka@web.de \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).