diff options
author | Klaus Jensen <k.jensen@samsung.com> | 2021-09-24 08:52:22 +0200 |
---|---|---|
committer | Klaus Jensen <k.jensen@samsung.com> | 2021-11-19 07:31:56 +0100 |
commit | 916b0f0b5264759c581badfdc0e1c5f98362dbda (patch) | |
tree | 2d4fde975e1189783cdfc836ad0d1b0f7524b8e7 /hw | |
parent | 9fc6e86e8b69e2e672cbb9c25cddc3b9deb96afb (diff) | |
download | qemu-916b0f0b5264759c581badfdc0e1c5f98362dbda.zip qemu-916b0f0b5264759c581badfdc0e1c5f98362dbda.tar.gz qemu-916b0f0b5264759c581badfdc0e1c5f98362dbda.tar.bz2 |
hw/nvme: change nvme-ns 'shared' default
Change namespaces to be shared namespaces by default (parameter
shared=on). Keep shared=off for older machine types.
Reviewed-by: Keith Busch <kbusch@kernel.org>
Signed-off-by: Klaus Jensen <k.jensen@samsung.com>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/core/machine.c | 1 | ||||
-rw-r--r-- | hw/nvme/ns.c | 8 |
2 files changed, 2 insertions, 7 deletions
diff --git a/hw/core/machine.c b/hw/core/machine.c index 26ec54e..53a99ab 100644 --- a/hw/core/machine.c +++ b/hw/core/machine.c @@ -39,6 +39,7 @@ GlobalProperty hw_compat_6_1[] = { { "vhost-user-vsock-device", "seqpacket", "off" }, + { "nvme-ns", "shared", "off" }, }; const size_t hw_compat_6_1_len = G_N_ELEMENTS(hw_compat_6_1); diff --git a/hw/nvme/ns.c b/hw/nvme/ns.c index b7cf149..8b5f98c 100644 --- a/hw/nvme/ns.c +++ b/hw/nvme/ns.c @@ -465,12 +465,6 @@ static void nvme_ns_realize(DeviceState *dev, Error **errp) "linked to an nvme-subsys device"); return; } - - if (ns->params.shared) { - error_setg(errp, "shared requires that the nvme device is " - "linked to an nvme-subsys device"); - return; - } } else { /* * If this namespace belongs to a subsystem (through a link on the @@ -532,7 +526,7 @@ static void nvme_ns_realize(DeviceState *dev, Error **errp) static Property nvme_ns_props[] = { DEFINE_BLOCK_PROPERTIES(NvmeNamespace, blkconf), DEFINE_PROP_BOOL("detached", NvmeNamespace, params.detached, false), - DEFINE_PROP_BOOL("shared", NvmeNamespace, params.shared, false), + DEFINE_PROP_BOOL("shared", NvmeNamespace, params.shared, true), DEFINE_PROP_UINT32("nsid", NvmeNamespace, params.nsid, 0), DEFINE_PROP_UUID("uuid", NvmeNamespace, params.uuid), DEFINE_PROP_UINT64("eui64", NvmeNamespace, params.eui64, 0), |