Skip to content

hw/block/nvme: zoned namespace command set

Klaus Jensen qemu-devel 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest12 patches 4 repliesIn review
  2. v39 patches 0 repliesSuperseded
  3. v214 patches 0 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v116 patches6 repliesSuperseded

Changes in v5 from the cover letter

~~~~~~~~~~~~~~

* Rebased to work with the DULBE support, recently merged in nvme-next.

* "hw/block/nvme: Separate read and write handlers"
* "hw/block/nvme: Merge nvme_write_zeroes() with nvme_write()"
* "hw/block/nvme: Generate namespace UUIDs"
- Picked from Dmitry' series.

* "hw/block/nvme: add commands supported and effects log page"
* "hw/block/nvme: support namespace types"
- Refactored and cribbed Keith's approach to CSE from the kb-zns branch and getting rid of the ugly macro initializers.

* "hw/block/nvme: add persistence for zone info"
- Marked RFC for obvious reasons.

Patches in v5 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/12hw/block/nvme: Separate read and write handlershw/block/nvme.c hw/block/trace-events+73 -350 replies
2/12hw/block/nvme: Merge nvme_write_zeroes() with nvme_write()hw/block/nvme.c hw/block/trace-events+27 -430 replies
3/12hw/block/nvme: add commands supported and effects log pagehw/block/nvme.c include/block/nvme.h+83 -30 replies
4/12hw/block/nvme: Generate namespace UUIDshw/block/nvme-ns.c hw/block/nvme-ns.h hw/block/nvme.c+7 -40 replies
5/12hw/block/nvme: support namespace typesblock/nvme.c docs/specs/nvme.txt hw/block/nvme-ns.c +5 more+256 -530 replies
6/12hw/block/nvme: add basic read/write for zoned namespacesdocs/specs/nvme.txt hw/block/nvme-ns.c hw/block/nvme-ns.h +3 more+635 -200 replies
7/12hw/block/nvme: add the zone management receive commandhw/block/nvme-ns.c hw/block/nvme-ns.h hw/block/nvme.c +3 more+214 -00 replies
8/12hw/block/nvme: add the zone management send commandhw/block/nvme.c hw/block/nvme.h hw/block/trace-events +1 more+426 -00 replies
9/12hw/block/nvme: add the zone append commandhw/block/nvme.c hw/block/nvme.h hw/block/trace-events +1 more+66 -00 replies
10/12hw/block/nvme: track and enforce zone resourcesdocs/specs/nvme.txt hw/block/nvme-ns.c hw/block/nvme-ns.h +2 more+95 -20 replies
11/12hw/block/nvme: allow open to close zone transitions by controllerhw/block/nvme-ns.c hw/block/nvme-ns.h hw/block/nvme.c +1 more+63 -30 replies
12/12hw/block/nvme: add persistence for zone infodocs/specs/nvme.txt hw/block/nvme-ns.c hw/block/nvme-ns.h +2 more+331 -14 replies

Reviews trailers per patch

3 of 12 patches have a Reviewed-by or Acked-by.

PatchNiklas CasselKlaus JensenKeith Busch
1/12R-b
2/12R-b
3/12
4/12R-b R-b R-b
5/12
6/12
7/12
8/12
9/12
10/12
11/12
12/12

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v5 thread

Cover letter [PATCH v5 00/12] hw/block/nvme: zoned namespace command set

From: Klaus Jensen <[email protected]>

Oi,

Things seem to have slowed down a bit on the zoned front, so in the interest of moving things forward and catalyzing the process, I'm posting a v5 of my series (v4 never got posted, but it's in my repo for posterity, see below). I picked some preparatory patches from Dmitry and rebased on that.

These patches apply on top of the "pmr/cmb coexist", "compare" and "simple copy" series that I've posted previously.

An applied version is available here:

https://irrelevant.dk/g/pci-nvme.git/tag/?h=zoned-v5

Changed for v5
~~~~~~~~~~~~~~

* Rebased to work with the DULBE support, recently merged in nvme-next.

* "hw/block/nvme: Separate read and write handlers"
* "hw/block/nvme: Merge nvme_write_zeroes() with nvme_write()"
* "hw/block/nvme: Generate namespace UUIDs"
- Picked from Dmitry' series.

* "hw/block/nvme: add commands supported and effects log page"
* "hw/block/nvme: support namespace types"
- Refactored and cribbed Keith's approach to CSE from the kb-zns branch and getting rid of the ugly macro initializers.

* "hw/block/nvme: add persistence for zone info"
- Marked RFC for obvious reasons.

Changes for v4
~~~~~~~~~~~~~~

* "hw/block/nvme: add the zone management send command"
- Use a pwrite_zeroes for zone reset instead of a discard.

Changes for v3
~~~~~~~~~~~~~~

* Rebased on nvme-next with "[PATCH v2] hw/block/nvme: add dulbe support" applied.

* "hw/block/nvme: add support for dulbe and block utilization tracking"
- Dropped from this series. This series instead builds on the support for DULBE that I added in "[PATCH v2] hw/block/nvme: add dulbe support", previously posted.

* "hw/block/nvme: add the zone management send command"
- Use asynchronous discards.

* "hw/block/nvme: add basic read/write for zoned namespaces"
* "hw/block/nvme: add the zone management receive command"
* "hw/block/nvme: add the zone management send command"
* "hw/block/nvme: add the zone append command"
* "hw/block/nvme: track and enforce zone resources"
* "hw/block/nvme: allow open to close zone transitions by controller"
- In compliance with the concensus I dropped zone persistence support from all patches.

Changes for v2
~~~~~~~~~~~~~~

* "hw/block/nvme: add support for dulbe and block utilization tracking"
- Factor out pstate init/load into separate functions.

- Fixed a stupid off-by-1 bug that would trigger when resetting the last zone.

- I added a more formalized pstate file format that includes a header. This is pretty similar to what is done in Dmitry's series, but with fewer fields. The device parameters for nvme-ns are still the "authoritative" ones, so if any parameters that influence LBA size, number of zones, etc. do not match, an error indicating the discrepancy will be produced. IIRC, Dmitry's version does the same.

It is set up such that newer versions can load pstate files from older versions. The file format header is not unlike a standard nvme datastructure with reserved areas. This means that when adding new command sets that require persistent state, it is not needed to bump the version number, unless the header has to change dramatically. This is demonstrated when the zoned namespace command set support is added in "hw/block/nvme: add basic read/write for zoned namespaces".

* "hw/block/nvme: add basic read/write for zoned namespaces"
- The device will now transition all opened zones to Closed on "normal shutdown". You can force the "transition to Full" behavior by killing QEMU from the monitor.

* "hw/block/nvme: add the zone append command"
- Slightly reordered the logic so a LBA Out of Range error is returned before Invalid Field in Command for normal read/write commands.

* "hw/block/nvme: support zone active excursions"
- Dropped. Optional and non-critical.

* "hw/block/nvme: support reset/finish recommended limits"
- Dropped. Optional and non-critical.

Dmitry Fomichev (3):
hw/block/nvme: Separate read and write handlers hw/block/nvme: Merge nvme_write_zeroes() with nvme_write() hw/block/nvme: Generate namespace UUIDs

Gollu Appalanaidu (1):
hw/block/nvme: add commands supported and effects log page

Klaus Jensen (8):
hw/block/nvme: support namespace types
hw/block/nvme: add basic read/write for zoned namespaces hw/block/nvme: add the zone management receive command hw/block/nvme: add the zone management send command hw/block/nvme: add the zone append command hw/block/nvme: track and enforce zone resources hw/block/nvme: allow open to close zone transitions by controller hw/block/nvme: add persistence for zone info

 docs/specs/nvme.txt   |   32 +
 hw/block/nvme-ns.h    |  127 +++-
 hw/block/nvme.h       |   10 +
 include/block/nvme.h  |  218 +++++-
 block/nvme.c          |    4 +-
 hw/block/nvme-ns.c    |  341 ++++++++-
 hw/block/nvme.c       | 1613 ++++++++++++++++++++++++++++++++++++++---
 hw/block/trace-events |   35 +-
 8 files changed, 2246 insertions(+), 134 deletions(-)
Signature · 1 line
2.29.2