This is the initial patches needed for a qemu device. I've submitted a patch for this before, but it was very large had some issues. This splits the commit into multiple commits. The initial commit is the smallest I could make this to work with the existing device drivers. The follow on patches add optional command support, or implement additional features.
Keith Busch (11): NVMe: Initial commit for NVM Express device QEMU NVMe: Add command line options QEMU NVMe: Implement NVMe features QEMU NVMe: Implement additional admin commands QEMU NVMe: Add DSM command support QEMU NVMe: Implement flush and dsm QEMU NVMe: Set error pages with error data QEMU NVMe: Enqueue critial temperature event QEMU NVMe: Implement discontiguous queues QEMU NVMe: Add logging QEMU NVMe: Support NVMe DIF and Meta-data MAINTAINERS | 5 + blockdev.c | 6 + default-configs/pci.mak | 1 + hw/Makefile.objs | 2 + hw/nvme.c | 2011 +++++++++++++++++++++++++++++++++++++++++++++ hw/nvme.h | 709 ++++++++++++++++ hw/pci/pci-hotplug.c | 20 +- hw/pci/pci_ids.h | 1 + include/sysemu/blockdev.h | 2 +- 9 files changed, 2754 insertions(+), 3 deletions(-) create mode 100644 hw/nvme.c create mode 100644 hw/nvme.h