[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH V6 1/6] hw/block/nvme: introduce nvme-subsys device
From: |
Klaus Jensen |
Subject: |
Re: [PATCH V6 1/6] hw/block/nvme: introduce nvme-subsys device |
Date: |
Mon, 25 Jan 2021 20:58:53 +0100 |
On Jan 24 11:54, Minwoo Im wrote:
> To support multi-path in QEMU NVMe device model, We need to have NVMe
> subsystem hierarchy to map controllers and namespaces to a NVMe
> subsystem.
>
> This patch introduced a simple nvme-subsys device model. The subsystem
> will be prepared with subsystem NQN with <subsys_id> provided in
> nvme-subsys device:
>
> ex) -device nvme-subsys,id=subsys0: nqn.2019-08.org.qemu:subsys0
>
> Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
> ---
> hw/block/meson.build | 2 +-
> hw/block/nvme-subsys.c | 60 ++++++++++++++++++++++++++++++++++++++++++
> hw/block/nvme-subsys.h | 25 ++++++++++++++++++
> hw/block/nvme.c | 3 +++
> 4 files changed, 89 insertions(+), 1 deletion(-)
> create mode 100644 hw/block/nvme-subsys.c
> create mode 100644 hw/block/nvme-subsys.h
>
> diff --git a/hw/block/meson.build b/hw/block/meson.build
> index 602ca6c8541d..83ea2d37978d 100644
> --- a/hw/block/meson.build
> +++ b/hw/block/meson.build
> @@ -13,7 +13,7 @@ softmmu_ss.add(when: 'CONFIG_SSI_M25P80', if_true:
> files('m25p80.c'))
> softmmu_ss.add(when: 'CONFIG_SWIM', if_true: files('swim.c'))
> softmmu_ss.add(when: 'CONFIG_XEN', if_true: files('xen-block.c'))
> softmmu_ss.add(when: 'CONFIG_SH4', if_true: files('tc58128.c'))
> -softmmu_ss.add(when: 'CONFIG_NVME_PCI', if_true: files('nvme.c',
> 'nvme-ns.c'))
> +softmmu_ss.add(when: 'CONFIG_NVME_PCI', if_true: files('nvme.c',
> 'nvme-ns.c', 'nvme-subsys.c'))
>
> specific_ss.add(when: 'CONFIG_VIRTIO_BLK', if_true: files('virtio-blk.c'))
> specific_ss.add(when: 'CONFIG_VHOST_USER_BLK', if_true:
> files('vhost-user-blk.c'))
> diff --git a/hw/block/nvme-subsys.c b/hw/block/nvme-subsys.c
> new file mode 100644
> index 000000000000..aa82911b951c
> --- /dev/null
> +++ b/hw/block/nvme-subsys.c
> @@ -0,0 +1,60 @@
> +/*
> + * QEMU NVM Express Subsystem: nvme-subsys
> + *
> + * Copyright (c) 2021 Minwoo Im <minwoo.im.dev@gmail.com>
> + *
> + * This code is licensed under the GNU GPL v2. Refer COPYING.
> + */
> +
> +#include "qemu/units.h"
> +#include "qemu/osdep.h"
> +#include "qemu/uuid.h"
> +#include "qemu/iov.h"
> +#include "qemu/cutils.h"
> +#include "qapi/error.h"
> +#include "hw/qdev-properties.h"
> +#include "hw/qdev-core.h"
> +#include "hw/block/block.h"
> +#include "block/aio.h"
> +#include "block/accounting.h"
> +#include "sysemu/sysemu.h"
> +#include "hw/pci/pci.h"
> +#include "nvme.h"
> +#include "nvme-subsys.h"
> +
This can be slimmed down to
#include "qemu/osdep.h"
#include "qapi/error.h"
#include "hw/block/block.h"
#include "sysemu/sysemu.h"
#include "hw/pci/pci.h"
#include "nvme.h"
#include "nvme-subsys.h"
signature.asc
Description: PGP signature
[PATCH V6 5/6] hw/block/nvme: add NMIC enum value for Identify Namespace, Minwoo Im, 2021/01/23
[PATCH V6 6/6] hw/block/nvme: support for shared namespace in subsystem, Minwoo Im, 2021/01/23