On Feb 11 10:53, Alexander Graf wrote: > Hi Klaus, > > On 09.02.21 08:30, Klaus Jensen wrote: > > From: Minwoo Im <minwoo.im....@gmail.com> > > > > In NVMe, namespace is being attached to process I/O. We register NVMe > > namespace to a controller via nvme_register_namespace() during > > nvme_ns_setup(). This is main reason of receiving NvmeCtrl object > > instance to this function to map the namespace to a controller. > > > > To make namespace instance more independent, it should be split into two > > parts: setup and register. This patch split them into two differnt > > parts, and finally nvme_ns_setup() does not have nothing to do with > > NvmeCtrl instance at all. > > > > This patch is a former patch to introduce NVMe subsystem scheme to the > > existing design especially for multi-path. In that case, it should be > > split into two to make namespace independent from a controller. > > > > Signed-off-by: Minwoo Im <minwoo.im....@gmail.com> > > Signed-off-by: Klaus Jensen <k.jen...@samsung.com> > > > In latest master, I can no longer access NVMe devices from edk2. Git bisect > pointed me to this commit. >
Hi Alexander, Thanks for reporting this. This patch should fix it, I'll queue it up. diff --git i/hw/block/nvme.c w/hw/block/nvme.c index 5ce21b7100b3..d36e14fe13e2 100644 --- i/hw/block/nvme.c +++ w/hw/block/nvme.c @@ -4507,6 +4507,12 @@ static void nvme_realize(PCIDevice *pci_dev, Error **errp) if (nvme_ns_setup(ns, errp)) { return; } + + if (nvme_register_namespace(n, ns, errp)) { + error_propagate_prepend(errp, local_err, + "could not register namespace: "); + return; + } } }
signature.asc
Description: PGP signature