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 via email to