qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Alan Adamson <alan.adamson@oracle.com>
To: qemu-devel@nongnu.org
Cc: alan.adamson@oracle.com, foss@defmacro.it, kbusch@kernel.org,
	its@irrelevant.dk, qemu-block@nongnu.org
Subject: [PATCH 0/2] Add support for NVMe Namespace and Boundary Atomic Parameters
Date: Mon,  2 Jun 2025 16:04:56 -0700	[thread overview]
Message-ID: <20250602230458.1073148-1-alan.adamson@oracle.com> (raw)

This patch set is a follow on to commit ebd1568fc732 ("hw/nvme: add atomic
write support").  These patches introduces two updates to the NVMe subsystem in QEMU,
both aimed at enhancing atomic write support for namespaces.

hw/nvme: enable ns atomic writes
--------------------------------
This patch introduces support for namespace-specific atomic write parameters: NAWUN
and NAWUPF, as defined by the NVMe specification. The atomic parameters are
utilized to guarantee that writes conforming to these boundaries will be atomic,
improving data integrity for namespaces that require atomic operations.

The patch introduces new NVMe QEMU parameters:
	atomic.nawun (default: 0)
	atomic.nawupf (default: 0)
	atomic.nsfeat (default: off)

The addition of atomic.nsfeat sets the Namespace Supported Atomic Boundary &
Power (NSABP) bit in the Identify Namespace Data Structure, enabling namespace-specific
atomic write features. The patch also ensures that atomic write behavior adheres to the
NACWU and NAWUPF parameters.

hw/nvme: add atomic boundary support
------------------------------------
The second patch expands on the atomic write capabilities by adding support for atomic
boundary parameters: NABO, NABSN, and NABSPF. These parameters define the atomic
boundary size for writes and ensure that any writes crossing these boundaries are
treated atomically, based on the AWUN and AWUPF values.

The following parameters are added:
	atomic.nabo (default: 0)
	atomic.nabsn (default: 0)
	atomic.nabspf (default: 0)

If the atomic boundary is crossed, the writes are guaranteed to be atomic only if their
size does not exceed the values defined by AWUN and AWUPF. This ensures that larger
writes crossing atomic boundaries are 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/nvme/ctrl.c | 76 ++++++++++++++++++++++++++++++++++++++++++++++++++
 hw/nvme/ns.c   | 74 ++++++++++++++++++++++++++++++++++++++++++++++++
 hw/nvme/nvme.h | 14 ++++++++++
 3 files changed, 164 insertions(+)

-- 
2.43.5



             reply	other threads:[~2025-06-02 22:56 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-02 23:04 Alan Adamson [this message]
2025-06-02 23:04 ` [PATCH 1/2] hw/nvme: enable ns atomic writes Alan Adamson
2025-06-02 23:04 ` [PATCH 2/2] hw/nvme: add atomic boundary support Alan Adamson
2025-09-23 15:23 ` [PATCH 0/2] Add support for NVMe Namespace and Boundary Atomic Parameters Jesper Devantier
2025-10-30  8:08 ` Klaus Jensen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250602230458.1073148-1-alan.adamson@oracle.com \
    --to=alan.adamson@oracle.com \
    --cc=foss@defmacro.it \
    --cc=its@irrelevant.dk \
    --cc=kbusch@kernel.org \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).