Skip to content

nvme: support NVMe v1.3d, SGLs and multiple namespaces

Klaus Jensen qemu-devel 5 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v7 Latest48 patches 21 repliesIn review
  2. v642 patches 77 repliesSuperseded
  3. v3 posting 2/20 of 20 patches 0 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v3 posting 1/221 patches0 repliesSuperseded
v220 patches29 repliesSuperseded

Changes in v7 from the cover letter · 29 lines

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

* 01/48 ("nvme: rename trace events to nvme_dev")
- indentation nitpicks (Maxim)

* 04/48 ("nvme: bump spec data structures to v1.3")
- added defines for temperature threshold and sensor selection (Maxim)
- added defines for the EUI64 and NGUID NIDT types (Maxim)

* 09/48 ("nvme: add max_ioqpairs device parameter")
- hoisted a bugfix out (Maxim)

* 11/48 ("nvme: refactor device realization")
- pulled the removal of the duplicated cmbsz/cmbloc struct members to separate patch (Maxim)
- fixed an incomplete error message (Maxim)

* 12/48 ("nvme: add temperature threshold feature")
- use the defines added in 04/48 (Maxim)
- remove the addition of the unused 'temperature' NvmeCtrl member

* 13/48 ("nvme: add support for the get log page command")
- use the already defined NvmeErrorLog type (Maxim)
- add the 'temperature' NvmeCtrl member here instead (Maxim)

* 15/48 ("nvme: add missing mandatory features")
- fix off-by-one when validating dw11 for the interrupt vector config feature (Maxim)
- some nitpicks (Maxim)

* 16/48 ("nvme: additional tracing")
- moved some traces (that was added in later patches) to here

* 19/48 ("nvme: support identify namespace descriptor list")
- refactored for the nth time; I think I'm finally kind of happy with it

* 20/48 ("nvme: enforce valid queue creation sequence")
- added a comment (Maxim)

* 24/48 ("nvme: add mapping helpers")
- fixed an off-by-one error that would cause valid read/writes to the CMB to be rejected (Maxim)
- add a check on len so we don't add 0 sized elements to the iovec

Patches in v7 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/48nvme: rename trace events to nvme_devhw/block/nvme.c hw/block/trace-events+180 -1820 replies
2/48nvme: remove superfluous breakshw/block/nvme.c+0 -41 reply
3/48nvme: move device parameters to separate structhw/block/nvme.c hw/block/nvme.h+35 -251 reply
4/48nvme: bump spec data structures to v1.3block/nvme.c hw/block/nvme.c include/block/nvme.h+160 -320 replies
5/48nvme: use constants in identifyhw/block/nvme.c+4 -41 reply
6/48nvme: refactor nvme_addr_readhw/block/nvme.c+12 -42 replies
7/48nvme: add support for the abort commandhw/block/nvme.c+27 -00 replies
8/48nvme: fix pci doorbell size calculationhw/block/nvme.c+1 -10 replies
9/48nvme: add max_ioqpairs device parameterhw/block/nvme.c hw/block/nvme.h+29 -200 replies
10/48nvme: remove redundant cmbloc/cmbsz membershw/block/nvme.c hw/block/nvme.h+2 -73 replies
11/48nvme: refactor device realizationhw/block/nvme.c hw/block/nvme.h+136 -634 replies
12/48nvme: add temperature threshold featurehw/block/nvme.c hw/block/nvme.h include/block/nvme.h+56 -14 replies
13/48nvme: add support for the get log page commandhw/block/nvme.c hw/block/nvme.h hw/block/trace-events+150 -10 replies
14/48nvme: add support for the asynchronous event request commandhw/block/nvme.c hw/block/nvme.h hw/block/trace-events +1 more+199 -100 replies
15/48nvme: add missing mandatory featureshw/block/nvme.c hw/block/trace-events include/block/nvme.h+66 -20 replies
16/48nvme: additional tracinghw/block/nvme.c hw/block/trace-events+31 -20 replies
17/48nvme: make sure ncqr and nsqr is validhw/block/nvme.c+8 -00 replies
18/48nvme: add log specific field to trace eventshw/block/nvme.c hw/block/trace-events+3 -20 replies
19/48nvme: support identify namespace descriptor listhw/block/nvme.c hw/block/trace-events+40 -00 replies
20/48nvme: enforce valid queue creation sequencehw/block/nvme.c hw/block/nvme.h+13 -00 replies
21/48nvme: provide the mandatory subnqn fieldhw/block/nvme.c+3 -00 replies
22/48nvme: bump supported version to v1.3hw/block/nvme.c+3 -10 replies
23/48nvme: memset preallocated requests structureshw/block/nvme.c+1 -10 replies
24/48nvme: add mapping helpershw/block/nvme.c hw/block/trace-events+89 -170 replies
25/48nvme: replace dma_acct with blk_acct equivalenthw/block/nvme.c+4 -10 replies
26/48nvme: remove redundant has_sg memberhw/block/nvme.c hw/block/nvme.h+6 -60 replies
27/48nvme: refactor dma read/writehw/block/nvme.c+43 -450 replies
28/48nvme: pass request along for tracinghw/block/nvme.c hw/block/trace-events+40 -290 replies
29/48nvme: add request mapping helperhw/block/nvme.c+10 -30 replies
30/48nvme: verify validity of prp lists in the cmbhw/block/nvme.c+13 -10 replies
31/48nvme: refactor request bounds checkinghw/block/nvme.c+22 -60 replies
32/48nvme: add check for mdtshw/block/nvme.c hw/block/nvme.h hw/block/trace-events+32 -20 replies
33/48nvme: be consistent about zeros vs zeroesblock/nvme.c hw/block/nvme.c include/block/nvme.h+8 -80 replies
34/48nvme: refactor NvmeRequesthw/block/nvme.c hw/block/nvme.h+22 -170 replies
35/48nvme: remove NvmeCmd parameterhw/block/nvme.c hw/block/nvme.h+93 -850 replies
36/48nvme: allow multiple aios per commandhw/block/nvme.c hw/block/nvme.h hw/block/trace-events+350 -820 replies
37/48nvme: add nvme_check_rw helperhw/block/nvme.c+20 -60 replies
38/48nvme: use preallocated qsg/iov in nvme_dma_prphw/block/nvme.c+6 -120 replies
39/48pci: pass along the return value of dma_memory_rwinclude/hw/pci/pci.h+1 -20 replies
40/48nvme: handle dma errorshw/block/nvme.c hw/block/trace-events include/block/nvme.h+37 -121 reply
41/48nvme: harden cmb accesshw/block/nvme.c+6 -10 replies
42/48nvme: add support for scatter gather listshw/block/nvme.c hw/block/trace-events+278 -580 replies
43/48nvme: add support for sgl bit bucket descriptorhw/block/nvme.c+27 -60 replies
44/48nvme: refactor identify active namespace id listhw/block/nvme.c+4 -40 replies
45/48nvme: support multiple namespaceshw/block/Makefile.objs hw/block/nvme-ns.c hw/block/nvme-ns.h +3 more+396 -1112 replies
46/48pci: allocate pci id for nvmeMAINTAINERS docs/specs/nvme.txt docs/specs/pci-ids.txt +1 more+28 -01 reply
47/48nvme: change controller pci idhw/block/nvme.c hw/block/nvme.h hw/core/machine.c+13 -50 replies
48/48nvme: make lba data size configurablehw/block/nvme-ns.c hw/block/nvme-ns.h hw/block/nvme.c+10 -21 reply

Reviews trailers per patch

38 of 48 patches have a Reviewed-by or Acked-by.

PatchKeith BuschMaxim LevitskyFam ZhengPhilippe Mathieu-DaudéMichael S. TsirkinGerd Hoffmann
1/48A-b R-b
2/48A-b R-b R-b
3/48A-b R-b R-b
4/48R-b A-b
5/48R-b R-b
6/48A-b R-b
7/48A-b R-b
8/48
9/48R-b
10/48R-b
11/48A-b
12/48A-b R-b
13/48A-b
14/48A-b R-b
15/48A-b
16/48
17/48A-b R-b
18/48R-b
19/48
20/48R-b
21/48R-b
22/48R-b
23/48R-b
24/48
25/48R-b
26/48R-b
27/48R-b
28/48R-b
29/48R-b
30/48R-b
31/48R-b
32/48R-b
33/48
34/48
35/48
36/48A-b
37/48
38/48A-b R-b
39/48A-b R-b R-b
40/48A-b R-b
41/48
42/48A-b
43/48
44/48R-b
45/48R-b
46/48A-b R-b A-b
47/48R-b R-b
48/48A-b R-b R-b

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

Read the v7 thread

Cover letter [PATCH v7 00/48] nvme: support NVMe v1.3d, SGLs and multiple namespaces

From: Klaus Jensen <[email protected]>

Hi,

v7 is mostly just changes proposed by Maxim. Also, Gollu's patch for the bit bucket sgl descriptor has been added (patch #43), but it is of a pretty manageable size.

Changes since v6
~~~~~~~~~~~~~~~~

* 01/48 ("nvme: rename trace events to nvme_dev")
- indentation nitpicks (Maxim)

* 04/48 ("nvme: bump spec data structures to v1.3")
- added defines for temperature threshold and sensor selection (Maxim)
- added defines for the EUI64 and NGUID NIDT types (Maxim)

* 09/48 ("nvme: add max_ioqpairs device parameter")
- hoisted a bugfix out (Maxim)

* 11/48 ("nvme: refactor device realization")
- pulled the removal of the duplicated cmbsz/cmbloc struct members to separate patch (Maxim)
- fixed an incomplete error message (Maxim)

* 12/48 ("nvme: add temperature threshold feature")
- use the defines added in 04/48 (Maxim)
- remove the addition of the unused 'temperature' NvmeCtrl member

* 13/48 ("nvme: add support for the get log page command")
- use the already defined NvmeErrorLog type (Maxim)
- add the 'temperature' NvmeCtrl member here instead (Maxim)

* 15/48 ("nvme: add missing mandatory features")
- fix off-by-one when validating dw11 for the interrupt vector config feature (Maxim)
- some nitpicks (Maxim)

* 16/48 ("nvme: additional tracing")
- moved some traces (that was added in later patches) to here

* 19/48 ("nvme: support identify namespace descriptor list")
- refactored for the nth time; I think I'm finally kind of happy with it

* 20/48 ("nvme: enforce valid queue creation sequence")
- added a comment (Maxim)

* 24/48 ("nvme: add mapping helpers")
- fixed an off-by-one error that would cause valid read/writes to the CMB to be rejected (Maxim)
- add a check on len so we don't add 0 sized elements to the iovec

    (Maxim)

* 26/48 ("nvme: remove redundant has_sg member")
- pulled the s/dma_acct/block_acct change to a separate patch (Maxim)

* 36/48 ("nvme: allow multiple aios per command")
- renamed nvme_req_register_aio to nvme_req_add_aio and added some comments (Maxim)
- killed the prinfo patch
- pulled a bunch of refactoring stuff into other patches to make this one easier to read (Maxim)

* 42/48 ("nvme: add support for scatter gather lists")
- pulled the nvme_addr_read hardening into its own patch (Maxim)
- refactored the logic around allowed sgl descriptor types (Maxim)
- additional comments (Maxim)

* 45/48 ("nvme: support multiple namespaces")
- fix an inconsistent return value
- fix an edge error case where all namespaces are allocated (Maxim)

git-backport-diff against rebased v6
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Key:
[----] : patches are identical
[####] : number of functional differences between upstream/downstream patch [down] : patch is downstream-only
The flags [FC] indicate (F)unctional and (C)ontextual differences, respectively

001/48:[0006] [FC] 'nvme: rename trace events to nvme_dev' 002/48:[----] [--] 'nvme: remove superfluous breaks'
003/48:[----] [--] 'nvme: move device parameters to separate struct' 004/48:[0017] [FC] 'nvme: bump spec data structures to v1.3'
005/48:[down] 'nvme: use constants in identify'
006/48:[----] [--] 'nvme: refactor nvme_addr_read'
007/48:[----] [--] 'nvme: add support for the abort command'
008/48:[down] 'nvme: fix pci doorbell size calculation'
009/48:[0002] [FC] 'nvme: add max_ioqpairs device parameter'
010/48:[down] 'nvme: remove redundant cmbloc/cmbsz members'
011/48:[0022] [FC] 'nvme: refactor device realization'
012/48:[0013] [FC] 'nvme: add temperature threshold feature' 013/48:[0007] [FC] 'nvme: add support for the get log page command' 014/48:[----] [-C] 'nvme: add support for the asynchronous event request command' 015/48:[0002] [FC] 'nvme: add missing mandatory features' 016/48:[0014] [FC] 'nvme: additional tracing'
017/48:[----] [--] 'nvme: make sure ncqr and nsqr is valid' 018/48:[----] [--] 'nvme: add log specific field to trace events' 019/48:[0029] [FC] 'nvme: support identify namespace descriptor list' 020/48:[0005] [FC] 'nvme: enforce valid queue creation sequence' 021/48:[----] [--] 'nvme: provide the mandatory subnqn field' 022/48:[----] [--] 'nvme: bump supported version to v1.3' 023/48:[----] [--] 'nvme: memset preallocated requests structures' 024/48:[0010] [FC] 'nvme: add mapping helpers'
025/48:[down] 'nvme: replace dma_acct with blk_acct equivalent'
026/48:[0007] [FC] 'nvme: remove redundant has_sg member' 027/48:[0011] [FC] 'nvme: refactor dma read/write'
028/48:[0004] [FC] 'nvme: pass request along for tracing' 029/48:[----] [--] 'nvme: add request mapping helper'
030/48:[----] [--] 'nvme: verify validity of prp lists in the cmb' 031/48:[----] [-C] 'nvme: refactor request bounds checking' 032/48:[----] [--] 'nvme: add check for mdts'

033/48:[down]      'nvme: be consistent about zeros vs zeroes'
034/48:[down]      'nvme: refactor NvmeRequest'
035/48:[down]      'nvme: remove NvmeCmd parameter'

036/48:[0218] [FC] 'nvme: allow multiple aios per command'
037/48:[down] 'nvme: add nvme_check_rw helper'
038/48:[----] [--] 'nvme: use preallocated qsg/iov in nvme_dma_prp' 039/48:[----] [--] 'pci: pass along the return value of dma_memory_rw' 040/48:[----] [-C] 'nvme: handle dma errors'
041/48:[down] 'nvme: harden cmb access'
042/48:[0102] [FC] 'nvme: add support for scatter gather lists'
043/48:[down] 'nvme: add support for sgl bit bucket descriptor'
044/48:[----] [-C] 'nvme: refactor identify active namespace id list' 045/48:[0036] [FC] 'nvme: support multiple namespaces' 046/48:[----] [--] 'pci: allocate pci id for nvme' 047/48:[----] [--] 'nvme: change controller pci id' 048/48:[----] [-C] 'nvme: make lba data size configurable'

Gollu Appalanaidu (1):
nvme: add support for sgl bit bucket descriptor

Klaus Jensen (47):
nvme: rename trace events to nvme_dev
nvme: remove superfluous breaks
nvme: move device parameters to separate struct
nvme: bump spec data structures to v1.3
nvme: use constants in identify
nvme: refactor nvme_addr_read
nvme: add support for the abort command
nvme: fix pci doorbell size calculation
nvme: add max_ioqpairs device parameter
nvme: remove redundant cmbloc/cmbsz members
nvme: refactor device realization
nvme: add temperature threshold feature
nvme: add support for the get log page command
nvme: add support for the asynchronous event request command
nvme: add missing mandatory features
nvme: additional tracing
nvme: make sure ncqr and nsqr is valid
nvme: add log specific field to trace events
nvme: support identify namespace descriptor list
nvme: enforce valid queue creation sequence
nvme: provide the mandatory subnqn field
nvme: bump supported version to v1.3
nvme: memset preallocated requests structures
nvme: add mapping helpers
nvme: replace dma_acct with blk_acct equivalent
nvme: remove redundant has_sg member
nvme: refactor dma read/write
nvme: pass request along for tracing
nvme: add request mapping helper
nvme: verify validity of prp lists in the cmb
nvme: refactor request bounds checking
nvme: add check for mdts
nvme: be consistent about zeros vs zeroes
nvme: refactor NvmeRequest
nvme: remove NvmeCmd parameter
nvme: allow multiple aios per command
nvme: add nvme_check_rw helper
nvme: use preallocated qsg/iov in nvme_dma_prp
pci: pass along the return value of dma_memory_rw
nvme: handle dma errors
nvme: harden cmb access
nvme: add support for scatter gather lists
nvme: refactor identify active namespace id list
nvme: support multiple namespaces
pci: allocate pci id for nvme
nvme: change controller pci id
nvme: make lba data size configurable

 MAINTAINERS            |    1 +
 block/nvme.c           |   22 +-
 docs/specs/nvme.txt    |   25 +
 docs/specs/pci-ids.txt |    1 +
 hw/block/Makefile.objs |    2 +-
 hw/block/nvme-ns.c     |  162 +++
 hw/block/nvme-ns.h     |   62 ++
 hw/block/nvme.c        | 2139 ++++++++++++++++++++++++++++++++--------
 hw/block/nvme.h        |  177 +++-
 hw/block/trace-events  |  206 ++--
 hw/core/machine.c      |    1 +
 include/block/nvme.h   |  190 +++-
 include/hw/pci/pci.h   |    4 +-
 13 files changed, 2413 insertions(+), 579 deletions(-)
 create mode 100644 docs/specs/nvme.txt
 create mode 100644 hw/block/nvme-ns.c
 create mode 100644 hw/block/nvme-ns.h
Signature · 1 line
2.26.0