From: Klaus Jensen <its@irrelevant.dk>
To: Peter Maydell <peter.maydell@linaro.org>, qemu-devel@nongnu.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 v2 2/2] hw/block/nvme: disable hotplugging for subsystem-linked controllers
Date: Fri, 23 Apr 2021 07:21:27 +0200 [thread overview]
Message-ID: <20210423052127.512489-3-its@irrelevant.dk> (raw)
In-Reply-To: <20210423052127.512489-1-its@irrelevant.dk>
From: Klaus Jensen <k.jensen@samsung.com>
If a controller is linked to a subsystem, do not allow it to be
hotplugged since this will mess up the (possibly shared) namespaces.
Signed-off-by: Klaus Jensen <k.jensen@samsung.com>
---
hw/block/nvme.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/hw/block/nvme.c b/hw/block/nvme.c
index 5fe082ec34c5..7606b58a39b9 100644
--- a/hw/block/nvme.c
+++ b/hw/block/nvme.c
@@ -6140,12 +6140,16 @@ static void nvme_init_ctrl(NvmeCtrl *n, PCIDevice *pci_dev)
static int nvme_init_subsys(NvmeCtrl *n, Error **errp)
{
+ DeviceClass *dc;
int cntlid;
if (!n->subsys) {
return 0;
}
+ dc = DEVICE_GET_CLASS(n);
+ dc->hotpluggable = false;
+
cntlid = nvme_subsys_register_ctrl(n, errp);
if (cntlid < 0) {
return -1;
--
2.31.1
next prev parent reply other threads:[~2021-04-23 5:31 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-23 5:21 [PATCH for-6.0 v2 0/2] hw/block/nvme: fix msix uninit Klaus Jensen
2021-04-23 5:21 ` [PATCH for-6.0 v2 1/2] hw/block/nvme: fix invalid msix exclusive uninit Klaus Jensen
2021-04-23 15:46 ` Peter Maydell
2021-04-26 4:40 ` Klaus Jensen
2021-04-26 9:27 ` Philippe Mathieu-Daudé
2021-04-26 9:39 ` Klaus Jensen
2021-04-26 13:08 ` Michael S. Tsirkin
2021-04-26 15:23 ` Peter Maydell
2021-04-23 5:21 ` Klaus Jensen [this message]
2021-04-23 13:21 ` [PATCH for-6.0 v2 2/2] hw/block/nvme: disable hotplugging for subsystem-linked controllers Peter Maydell
2021-04-23 13:25 ` Klaus Jensen
2021-04-23 13:25 ` Peter Maydell
2021-04-23 13:33 ` Klaus Jensen
2021-04-23 10:38 ` [PATCH for-6.0 v2 0/2] hw/block/nvme: fix msix uninit Klaus Jensen
2021-04-23 10:50 ` Peter Maydell
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=20210423052127.512489-3-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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.