From: Klaus Jensen <its@irrelevant.dk>
To: qemu-devel@nongnu.org, Peter Maydell <peter.maydell@linaro.org>
Cc: Kevin Wolf <kwolf@redhat.com>,
qemu-block@nongnu.org, Klaus Jensen <k.jensen@samsung.com>,
Max Reitz <mreitz@redhat.com>, Klaus Jensen <its@irrelevant.dk>,
Keith Busch <kbusch@kernel.org>
Subject: [PATCH for-6.0? 1/1] hw/block/nvme: fix invalid msix exclusive uninit
Date: Thu, 22 Apr 2021 15:58:34 +0200 [thread overview]
Message-ID: <20210422135834.406688-2-its@irrelevant.dk> (raw)
In-Reply-To: <20210422135834.406688-1-its@irrelevant.dk>
From: Klaus Jensen <k.jensen@samsung.com>
Commit 1901b4967c3f changed the nvme device from using a bar exclusive
for MSI-x to sharing it on bar0.
Unfortunately, the msix_uninit_exclusive_bar() call remains in
nvme_exit() which causes havoc when the device is removed with, say,
device_del.
Fix this.
Fixes: 1901b4967c3f ("hw/block/nvme: move msix table and pba to BAR 0")
Signed-off-by: Klaus Jensen <k.jensen@samsung.com>
---
hw/block/nvme.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/block/nvme.c b/hw/block/nvme.c
index 624a1431d072..31a1a59d88c9 100644
--- a/hw/block/nvme.c
+++ b/hw/block/nvme.c
@@ -6235,7 +6235,7 @@ static void nvme_exit(PCIDevice *pci_dev)
if (n->pmr.dev) {
host_memory_backend_set_mapped(n->pmr.dev, false);
}
- msix_uninit_exclusive_bar(pci_dev);
+ msix_uninit(pci_dev, &n->bar0, &n->bar0);
}
static Property nvme_props[] = {
--
2.31.1
next prev parent reply other threads:[~2021-04-22 14:03 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-22 13:58 [PATCH for-6.0? 0/1] hw/block/nvme: fix msix uninit Klaus Jensen
2021-04-22 13:58 ` Klaus Jensen [this message]
2021-04-22 15:40 ` [PATCH for-6.0? 1/1] hw/block/nvme: fix invalid msix exclusive uninit Klaus Jensen
2021-04-22 14:07 ` [PATCH for-6.0? 0/1] hw/block/nvme: fix msix uninit Klaus Jensen
2021-04-22 18:58 ` Peter Maydell
2021-04-22 19:17 ` Klaus Jensen
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=20210422135834.406688-2-its@irrelevant.dk \
--to=its@irrelevant.dk \
--cc=k.jensen@samsung.com \
--cc=kbusch@kernel.org \
--cc=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-block@nongnu.org \
--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).