summaryrefslogtreecommitdiff
path: root/hw/block
diff options
context:
space:
mode:
authorKlaus Jensen <k.jensen@samsung.com>2021-02-11 11:50:19 +0100
committerKlaus Jensen <k.jensen@samsung.com>2021-02-11 14:11:17 +0100
commit886188a9c11ff9518c8f20e265e7a98439c14d32 (patch)
tree0e476a221c9ac2f094acb7f6289dfde1f7b0b9e9 /hw/block
parent83339e21d05c824ebc9131d644f25c23d0e41ecf (diff)
downloadqemu-886188a9c11ff9518c8f20e265e7a98439c14d32.zip
hw/block/nvme: fix legacy namespace registration
Moving namespace registration to the nvme-ns realization function had the unintended side-effect of breaking legacy namespace registration. Fix this. Fixes: 15d024d4aa9b ("hw/block/nvme: split setup and register for namespace") Reported-by: Alexander Graf <agraf@csgraf.de> Cc: Minwoo Im <minwoo.im.dev@gmail.com> Tested-by: Alexander Graf <agraf@csgraf.de> Reviewed-by: Minwoo Im <minwoo.im.dev@gmail.com> Signed-off-by: Klaus Jensen <k.jensen@samsung.com>
Diffstat (limited to 'hw/block')
-rw-r--r--hw/block/nvme.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/hw/block/nvme.c b/hw/block/nvme.c
index 5ce21b7100..02390f1f52 100644
--- a/hw/block/nvme.c
+++ b/hw/block/nvme.c
@@ -4507,6 +4507,10 @@ static void nvme_realize(PCIDevice *pci_dev, Error **errp)
if (nvme_ns_setup(ns, errp)) {
return;
}
+
+ if (nvme_register_namespace(n, ns, errp)) {
+ return;
+ }
}
}