pci: allocate pci id for nvme
authorKlaus Jensen <k.jensen@samsung.com>
Mon, 13 Jan 2020 18:12:50 +0000 (19:12 +0100)
committerKlaus Jensen <k.jensen@samsung.com>
Tue, 27 Oct 2020 06:24:47 +0000 (07:24 +0100)
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>
MAINTAINERS
docs/specs/nvme.txt [new file with mode: 0644]
docs/specs/pci-ids.txt
include/hw/pci/pci.h

index ef6f5c73998488528f44c4d204de1ed775557fe6..9e215088ce8ce95a8772219405825bb0896fb57e 100644 (file)
@@ -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
diff --git a/docs/specs/nvme.txt b/docs/specs/nvme.txt
new file mode 100644 (file)
index 0000000..56d3938
--- /dev/null
@@ -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.
index 4d53e5c7d9d527df0369ec02265ce84382be3b86..abbdbca6be382afc6cc2f3e30fcc0023e06329ce 100644 (file)
@@ -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.
 
index f19ffe6b4fe81f2ca40329b404b21ac8fb53d62f..72ce649eee3604c003dc6dab2d2e728aac93e7f7 100644 (file)
@@ -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