All of lore.kernel.org
 help / color / mirror / Atom feed
From: Klaus Jensen <its@irrelevant.dk>
To: peter.maydell@linaro.org, qemu-devel@nongnu.org
Cc: qemu-block@nongnu.org, Klaus Jensen <k.jensen@samsung.com>,
	Maxim Levitsky <mlevitsk@redhat.com>,
	Keith Busch <kbusch@kernel.org>,
	Gerd Hoffmann <kraxel@redhat.com>,
	Klaus Jensen <its@irrelevant.dk>
Subject: [PULL 16/30] pci: allocate pci id for nvme
Date: Tue, 27 Oct 2020 11:49:18 +0100	[thread overview]
Message-ID: <20201027104932.558087-17-its@irrelevant.dk> (raw)
In-Reply-To: <20201027104932.558087-1-its@irrelevant.dk>

From: Klaus Jensen <k.jensen@samsung.com>

The emulated nvme device (hw/block/nvme.c) is currently using an
internal Intel device id.

Prepare to change that by allocating a device id under the 1b36 (Red
Hat, Inc.) vendor id.

Signed-off-by: Klaus Jensen <k.jensen@samsung.com>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com>
Reviewed-by: Keith Busch <kbusch@kernel.org>
---
 docs/specs/nvme.txt    | 23 +++++++++++++++++++++++
 docs/specs/pci-ids.txt |  1 +
 include/hw/pci/pci.h   |  1 +
 MAINTAINERS            |  1 +
 4 files changed, 26 insertions(+)
 create mode 100644 docs/specs/nvme.txt

diff --git a/docs/specs/nvme.txt b/docs/specs/nvme.txt
new file mode 100644
index 000000000000..56d393884e7a
--- /dev/null
+++ b/docs/specs/nvme.txt
@@ -0,0 +1,23 @@
+NVM Express Controller
+======================
+
+The nvme device (-device nvme) emulates an NVM Express Controller.
+
+
+Reference Specifications
+------------------------
+
+The device currently implements most mandatory features of NVMe v1.3d, see
+
+  https://nvmexpress.org/resources/specifications/
+
+for the specification.
+
+
+Known issues
+------------
+
+* The accounting numbers in the SMART/Health are reset across power cycles
+
+* Interrupt Coalescing is not supported and is disabled by default in volation
+  of the specification.
diff --git a/docs/specs/pci-ids.txt b/docs/specs/pci-ids.txt
index 4d53e5c7d9d5..abbdbca6be38 100644
--- a/docs/specs/pci-ids.txt
+++ b/docs/specs/pci-ids.txt
@@ -63,6 +63,7 @@ PCI devices (other than virtio):
 1b36:000b  PCIe Expander Bridge (-device pxb-pcie)
 1b36:000d  PCI xhci usb host adapter
 1b36:000f  mdpy (mdev sample device), linux/samples/vfio-mdev/mdpy.c
+1b36:0010  PCIe NVMe device (-device nvme)
 
 All these devices are documented in docs/specs.
 
diff --git a/include/hw/pci/pci.h b/include/hw/pci/pci.h
index f19ffe6b4fe8..72ce649eee36 100644
--- a/include/hw/pci/pci.h
+++ b/include/hw/pci/pci.h
@@ -106,6 +106,7 @@ extern bool pci_available;
 #define PCI_DEVICE_ID_REDHAT_XHCI        0x000d
 #define PCI_DEVICE_ID_REDHAT_PCIE_BRIDGE 0x000e
 #define PCI_DEVICE_ID_REDHAT_MDPY        0x000f
+#define PCI_DEVICE_ID_REDHAT_NVME        0x0010
 #define PCI_DEVICE_ID_REDHAT_QXL         0x0100
 
 #define FMT_PCIBUS                      PRIx64
diff --git a/MAINTAINERS b/MAINTAINERS
index ef6f5c739984..9e215088ce8c 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1877,6 +1877,7 @@ L: qemu-block@nongnu.org
 S: Supported
 F: hw/block/nvme*
 F: tests/qtest/nvme-test.c
+F: docs/specs/nvme.txt
 T: git git://git.infradead.org/qemu-nvme.git nvme-next
 
 megasas
-- 
2.29.1



  parent reply	other threads:[~2020-10-27 11:35 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-27 10:49 [PULL 00/30] nvme emulation patches for 5.2 Klaus Jensen
2020-10-27 10:49 ` [PULL 01/30] hw/block/nvme: fix typo in trace event Klaus Jensen
2020-10-27 10:49 ` [PULL 02/30] pci: pass along the return value of dma_memory_rw Klaus Jensen
2020-10-27 11:10   ` Klaus Jensen
2020-10-27 10:49 ` [PULL 03/30] hw/block/nvme: handle dma errors Klaus Jensen
2020-10-27 10:49 ` [PULL 04/30] hw/block/nvme: commonize nvme_rw error handling Klaus Jensen
2020-10-27 10:49 ` [PULL 05/30] hw/block/nvme: alignment style fixes Klaus Jensen
2020-10-27 10:49 ` [PULL 06/30] hw/block/nvme: add a lba to bytes helper Klaus Jensen
2020-10-27 10:49 ` [PULL 07/30] hw/block/nvme: fix endian conversion Klaus Jensen
2020-10-27 10:49 ` [PULL 08/30] hw/block/nvme: add symbolic command name to trace events Klaus Jensen
2020-10-27 10:49 ` [PULL 09/30] hw/block/nvme: refactor aio submission Klaus Jensen
2020-10-27 10:49 ` [PULL 10/30] hw/block/nvme: default request status to success Klaus Jensen
2020-10-27 10:49 ` [PULL 11/30] hw/block/nvme: harden cmb access Klaus Jensen
2020-10-27 10:49 ` [PULL 12/30] hw/block/nvme: add support for scatter gather lists Klaus Jensen
2020-11-04  9:44   ` Max Reitz
2020-10-27 10:49 ` [PULL 13/30] hw/block/nvme: add support for sgl bit bucket descriptor Klaus Jensen
2020-10-27 10:49 ` [PULL 14/30] hw/block/nvme: refactor identify active namespace id list Klaus Jensen
2020-10-27 10:49 ` [PULL 15/30] hw/block/nvme: support multiple namespaces Klaus Jensen
2020-11-04 10:06   ` Max Reitz
2020-10-27 10:49 ` Klaus Jensen [this message]
2020-10-27 10:49 ` [PULL 17/30] hw/block/nvme: change controller pci id Klaus Jensen
2020-10-27 10:49 ` [PULL 18/30] hw/block/nvme: update nsid when registered Klaus Jensen
2020-11-04  9:32   ` Max Reitz
2020-11-04  9:52     ` Klaus Jensen
2020-10-27 10:49 ` [PULL 19/30] hw/block/nvme: remove pointless rw indirection Klaus Jensen
2020-10-27 10:49 ` [PULL 20/30] hw/block/nvme: fix log page offset check Klaus Jensen
2020-10-27 10:49 ` [PULL 21/30] hw/block/nvme: support per-namespace smart log Klaus Jensen
2020-10-27 10:49 ` [PULL 22/30] hw/block/nvme: validate command set selected Klaus Jensen
2020-10-27 10:49 ` [PULL 23/30] hw/block/nvme: support for admin-only command set Klaus Jensen
2020-10-27 10:49 ` [PULL 24/30] hw/block/nvme: reject io commands if only admin command set selected Klaus Jensen
2020-10-27 10:49 ` [PULL 25/30] hw/block/nvme: add nsid to get/setfeat trace events Klaus Jensen
2020-10-27 10:49 ` [PULL 26/30] hw/block/nvme: add trace event for requests with non-zero status code Klaus Jensen
2020-10-27 10:49 ` [PULL 27/30] hw/block/nvme: report actual LBA data shift in LBAF Klaus Jensen
2020-10-27 10:49 ` [PULL 28/30] hw/block/nvme: fix prp mapping status codes Klaus Jensen
2020-10-27 10:49 ` [PULL 29/30] hw/block/nvme: fix create IO SQ/CQ " Klaus Jensen
2020-10-27 10:49 ` [PULL 30/30] hw/block/nvme: fix queue identifer validation Klaus Jensen
2020-10-29 11:39 ` [PULL 00/30] nvme emulation patches for 5.2 Peter Maydell
2020-10-29 11:52   ` Klaus Jensen
2020-10-29 12:20     ` Philippe Mathieu-Daudé
2020-10-29 13:14       ` 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=20201027104932.558087-17-its@irrelevant.dk \
    --to=its@irrelevant.dk \
    --cc=k.jensen@samsung.com \
    --cc=kbusch@kernel.org \
    --cc=kraxel@redhat.com \
    --cc=mlevitsk@redhat.com \
    --cc=peter.maydell@linaro.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.