[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v6 39/42] pci: allocate pci id for nvme
From: |
Klaus Jensen |
Subject: |
[PATCH v6 39/42] pci: allocate pci id for nvme |
Date: |
Mon, 16 Mar 2020 07:29:25 -0700 |
From: Klaus Jensen <address@hidden>
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 <address@hidden>
Acked-by: Keith Busch <address@hidden>
Reviewed-by: Maxim Levitsky <address@hidden>
---
MAINTAINERS | 1 +
docs/specs/nvme.txt | 25 +++++++++++++++++++++++++
docs/specs/pci-ids.txt | 1 +
include/hw/pci/pci.h | 1 +
4 files changed, 28 insertions(+)
create mode 100644 docs/specs/nvme.txt
diff --git a/MAINTAINERS b/MAINTAINERS
index 32867bc63670..fcffe790ef40 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1698,6 +1698,7 @@ L: address@hidden
S: Supported
F: hw/block/nvme*
F: tests/qtest/nvme-test.c
+F: docs/specs/nvme.txt
megasas
M: Hannes Reinecke <address@hidden>
diff --git a/docs/specs/nvme.txt b/docs/specs/nvme.txt
new file mode 100644
index 000000000000..b51552cb5c3f
--- /dev/null
+++ b/docs/specs/nvme.txt
@@ -0,0 +1,25 @@
+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 device does not have any way of storing persistent state, so minor parts
+ of the implementation is in violation of the specification:
+ - 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 da9057b8db97..92231885bc23 100644
--- a/include/hw/pci/pci.h
+++ b/include/hw/pci/pci.h
@@ -104,6 +104,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
--
2.25.1
[PATCH v6 39/42] pci: allocate pci id for nvme,
Klaus Jensen <=
[PATCH v6 37/42] nvme: refactor identify active namespace id list, Klaus Jensen, 2020/03/16
[PATCH v6 41/42] nvme: remove redundant NvmeCmd pointer parameter, Klaus Jensen, 2020/03/16
[PATCH v6 38/42] nvme: support multiple namespaces, Klaus Jensen, 2020/03/16
[PATCH v6 40/42] nvme: change controller pci id, Klaus Jensen, 2020/03/16
[PATCH v6 35/42] nvme: handle dma errors, Klaus Jensen, 2020/03/16