[PATCH 0/1] hw/nvme: add atomic write support

2024-08-20 Thread Alan Adamson
ite support, this error no longer happens. Future Work --- - Namespace support (NAWUN, NAWUPF and NACWU) - Namespace Boundary support (NABSN, NABO, and NABSPF) - Atomic Compare and Write Unit (ACWU) Alan Adamson (1): hw/nvme: add atomic write support hw/nvme/c

[PATCH 1/1] hw/nvme: add atomic write support

2024-08-20 Thread Alan Adamson
. Signed-off-by: Alan Adamson --- hw/nvme/ctrl.c | 161 + hw/nvme/nvme.h | 12 2 files changed, 173 insertions(+) diff --git a/hw/nvme/ctrl.c b/hw/nvme/ctrl.c index c6d4f61a47f9..ac0efa95588d 100644 --- a/hw/nvme/ctrl.c +++ b/hw/nvme/ctrl.c

Re: [PATCH 0/1] hw/nvme: add atomic write support

2024-09-17 Thread alan . adamson
On 9/17/24 12:59 AM, Klaus Jensen wrote: On Aug 20 09:11, Alan Adamson wrote: Since there is work in the Linux NVMe Driver community to add Atomic Write support, it would be desirable to be able to test it with qemu nvme emulation. This patch will focus on supporting NVMe controller atomic

Re: [PATCH 0/1] hw/nvme: add atomic write support

2024-09-17 Thread alan . adamson
On 9/17/24 9:21 AM, alan.adam...@oracle.com wrote: On 9/17/24 12:59 AM, Klaus Jensen wrote: On Aug 20 09:11, Alan Adamson wrote: Since there is work in the Linux NVMe Driver community to add Atomic Write support, it would be desirable to be able to test it with qemu nvme emulation.   This

[RFC 0/1] hw/nvme: add atomic write support

2024-04-15 Thread Alan Adamson
as the max atomic write size. Future Work --- - Namespace support (NAWUN, NAWUPF and NACWU) - Namespace Boundary support (NABSN, NABO, and NABSPF) - Atomic Compare and Write Unit (ACWU) Alan Adamson (1): nvme: add atomic write support hw

[RFC 1/1] hw/nvme: add atomic write support

2024-04-15 Thread Alan Adamson
=UINT16 (default: 0) Signed-off-by: Alan Adamson --- hw/nvme/ctrl.c | 147 - hw/nvme/nvme.h | 17 ++ 2 files changed, 163 insertions(+), 1 deletion(-) diff --git a/hw/nvme/ctrl.c b/hw/nvme/ctrl.c index 127c3d238346..5d19965122d0 100644 --- a/hw

Re: [PATCH v2 1/1] hw/nvme: add atomic write support

2024-09-26 Thread alan . adamson
On 9/24/24 5:15 AM, Klaus Jensen wrote: On Sep 19 17:07, Alan Adamson wrote: Adds support for the controller atomic parameters: AWUN and AWUPF. Atomic Compare and Write Unit (ACWU) is not currently supported. Writes that adhere to the ACWU and AWUPF parameters are guaranteed to be atomic

[PATCH v3 0/1] hw/nvme: add atomic write support

2024-09-26 Thread Alan Adamson
536 (requested block: offset=347799552, length=65536, flags=88) Expected CRC: d54d5f50d2569c94 Received CRC: 691e1aed4669ba33 Future Work --- - Namespace support (NAWUN, NAWUPF and NACWU) - Namespace Boundary support (NABSN, NABO, and NABSPF) - Atomic Compare and Write Unit

[PATCH v3 1/1] hw/nvme: add atomic write support

2024-09-26 Thread Alan Adamson
. Signed-off-by: Alan Adamson Reviewed-by: Klaus Jensen --- hw/nvme/ctrl.c | 157 - hw/nvme/nvme.h | 11 2 files changed, 167 insertions(+), 1 deletion(-) diff --git a/hw/nvme/ctrl.c b/hw/nvme/ctrl.c index 9e94a2405407..c8346709a20d 100644 --- a

[PATCH v2 0/1] hw/nvme: add atomic write support

2024-09-19 Thread Alan Adamson
- Atomic Compare and Write Unit (ACWU) Alan Adamson (1): hw/nvme: add atomic write support hw/nvme/ctrl.c | 164 - hw/nvme/nvme.h | 12 2 files changed, 175 insertions(+), 1 deletion(-) -- 2.43.5

[PATCH v2 1/1] hw/nvme: add atomic write support

2024-09-19 Thread Alan Adamson
. Signed-off-by: Alan Adamson Reviewed-by: Klaus Jensen --- hw/nvme/ctrl.c | 164 - hw/nvme/nvme.h | 12 2 files changed, 175 insertions(+), 1 deletion(-) diff --git a/hw/nvme/ctrl.c b/hw/nvme/ctrl.c index 9e94a2405407..0af46c57ee86 100644 --- a

[PATCH 1/1] hw/nvme: create parameter to enable/disable cmic on subsystem

2025-04-08 Thread Alan Adamson
Allow the value of CMIC to to be set via a new subsystem specific parameter. This removes the requirement that all subsystems must have the CMIC bit enabled. New NVMe Subsystem QEMU Parameter (See NVMe Specification for details): ,cmic=BOOLEAN (default: off) Signed-off-by: Alan Adamson

Re: [PATCH 0/1] hw/nvme: create parameter to enable/disable cmic on subsystem

2025-04-09 Thread alan . adamson
On 4/8/25 11:47 PM, Klaus Jensen wrote: On Apr 8 15:56, Alan Adamson wrote: While testing Linux atomic writes with qemu-nvme v10.0.0-rc1, Linux was incorrectly displaying atomic_write_max_bytes # cat /sys/block/nvme0n1/queue/atomic_write_max_bytes 0 # nvme id-ctrl /dev/nvme0n1 | grep awupf

Re: [PATCH] hw/nvme: fix attachment of private namespaces

2025-04-08 Thread alan . adamson
Tested-by: Alan Adamson Reviewed-by: Alan Adamson

[PATCH 0/1] hw/nvme: create parameter to enable/disable cmic on subsystem

2025-04-08 Thread Alan Adamson
le: -device nvme-subsys,id=subsys0,cmic=on \ -device nvme,serial=deadbeef,id=nvme0,subsys=subsys0,atomic.dn=off,atomic.awun=31,atomic.awupf=15 \ -drive id=ns1,file=/dev/nullb3,if=none \ -device nvme-ns,drive=ns1,bus=nvme0,nsid=1,shared=false Alan Adamson (1): hw/nvme: create

[PATCH v2 0/1] hw/nvme: CMIC.MCTRS should be set automatically for multi-controller subsystems or by parameter

2025-04-10 Thread Alan Adamson
v2: - Change the parameter name from "cmic" to "cmic-mctrs". - If there is more than 1 controller in a subsystem, set CMIC.MCTRS for each controller whether or not the cmic-mctrs parameter is set. While testing Linux atomic writes with qemu-nvme v10.0.0-rc1, Linux was incorrectly displa

[PATCH v2] hw/nvme: CMIC.MCTRS should be set automatically for multi-controller subsystems or by parameter

2025-04-10 Thread Alan Adamson
Parameter (See NVMe Specification for details): ,cmic-mctrs=BOOLEAN (default: off) Signed-off-by: Alan Adamson --- hw/nvme/ctrl.c | 15 ++- hw/nvme/nvme.h | 2 ++ hw/nvme/subsys.c | 1 + 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/hw/nvme/ctrl.c b/hw/nvme

[PATCH v3 0/1] hw/nvme: CMIC.MCTRS should be set automatically for multi-controller subsystems or by parameter

2025-05-01 Thread Alan Adamson
systems. ,cmic-mctrs=BOOLEAN (default: off) Example: -device nvme-subsys,id=subsys0,cmic-mctrs=on \ -device nvme,serial=deadbeef,id=nvme0,subsys=subsys0,atomic.dn=off,atomic.awun=31,atomic.awupf=15 \ -drive id=ns1,file=/dev/nullb0,if=none \ -device nvme-ns,drive=ns1,bus=nvm

[PATCH v3 1/1] hw/nvme: CMIC.MCTRS should be set automatically for multi-controller subsystems or by parameter

2025-05-01 Thread Alan Adamson
Parameter (See NVMe Specification for details): ,cmic-mctrs=BOOLEAN (default: off) Signed-off-by: Alan Adamson --- hw/nvme/ctrl.c | 15 ++- hw/nvme/nvme.h | 2 ++ hw/nvme/subsys.c | 1 + 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/hw/nvme/ctrl.c b/hw/nvme

hw/nvme: Issue with multiple controllers behind a subsystem

2025-04-04 Thread alan . adamson
llers. I'm sending out diffs that resolve the problem but would like to get some feedback before sending a formal patch. See below. Thanks, Alan Adamson [root@localhost qemu-subsys]# git describe v10.0.0-rc2 [root@localhost qemu-subsys]# QEMU NVMe Config -device n

Re: [PATCH v3 1/1] hw/nvme: CMIC.MCTRS should be set automatically for multi-controller subsystems or by parameter

2025-05-20 Thread alan . adamson
Reposting. Alan On 5/1/25 11:45 AM, Alan Adamson wrote: If there are multiple controllers in a subsystem, CMIC.MCTRS should be set to on for all controllers. For single controller subsystems, CMIC.MCTRS will be off by default. A new subsystem specific parameter will allow setting CMIC.MCTRS

[PATCH 2/2] hw/nvme: add atomic boundary support

2025-06-02 Thread Alan Adamson
=UINT16 (default: 0) See the NVMe Specification for more information. Signed-off-by: Alan Adamson --- hw/nvme/ctrl.c | 53 ++ hw/nvme/ns.c | 36 ++ hw/nvme/nvme.h | 8 3 files changed, 97 insertions(+) diff

[PATCH 0/2] Add support for NVMe Namespace and Boundary Atomic Parameters

2025-06-02 Thread Alan Adamson
not subject to partial updates, thereby improving the robustness of atomic operations across boundaries. See the NVMe Specification for more information. Alan Adamson (2): hw/nvme: enable ns atomic writes hw/nvme: add atomic boundary support hw/nv

[PATCH 1/2] hw/nvme: enable ns atomic writes

2025-06-02 Thread Alan Adamson
NVMe Specification for more information. Signed-off-by: Alan Adamson --- hw/nvme/ctrl.c | 23 +++ hw/nvme/ns.c | 38 ++ hw/nvme/nvme.h | 6 ++ 3 files changed, 67 insertions(+) diff --git a/hw/nvme/ctrl.c b/hw/nvme/ctrl.c index fd935507

Re: [PATCH 2/2] hw/nvme: revert CMIC behavior

2025-06-03 Thread alan . adamson
where this was only set if an nvme-subsys device was explicitly created (to configure a subsystem with multiple controllers/namespaces). Revert the behavior to only set CMIC.MCTRS if an nvme-subsys device is created explicitly. Reported-by: Alan Adamson Fixes: cd59f50ab017 ("hw/nvme: alwa