Skip to content

RFC virtio nvme

Ming Lin linux-nvme virtualization 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest2 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2virtio_nvme(kernel): virtual NVMe driver using virtiodrivers/block/Kconfig drivers/block/Makefile drivers/block/nvme-core.c +4 more+946 -00 replies
2/2virtio-nvme(qemu): NVMe device using virtiohw/block/Makefile.objs hw/block/virtio-nvme.c hw/virtio/virtio-pci.c +5 more+584 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC PATCH 0/2] virtio nvme

Hi all,

These 2 patches added virtio-nvme to kernel and qemu, basically modified from virtio-blk and nvme code.

As title said, request for your comments.

Play it in Qemu with:
-drive file=disk.img,format=raw,if=none,id=D22 \
-device virtio-nvme-pci,drive=D22,serial=1234,num_queues=4

The goal is to have a full NVMe stack from VM guest(virtio-nvme) to host(vhost_nvme) to LIO NVMe-over-fabrics target.

Now there are lots of duplicated code with linux/nvme-core.c and qemu/nvme.c. The ideal result is to have a multi level NVMe stack(similar as SCSI). So we can re-use the nvme code, for example

.-------------------------.
| NVMe device register |

  Upper level           | NVMe protocol process   |
                        |                         |
                        '-------------------------'



              .-----------.    .-----------.    .------------------.
 Lower level  |   PCIe    |    | VIRTIO    |    |NVMe over Fabrics |
              |           |    |           |    |initiator         |
              '-----------'    '-----------'    '------------------'

todo:
- tune performance. Should be as good as virtio-blk/virtio-scsi
- support discard/flush/integrity
- need Redhat's help for the VIRTIO_ID_NVME pci id
- multi level NVMe stack

Code also available at:
http://www.minggr.net/cgit/cgit.cgi/linux/commit/?h=virtio-nvme/v1
http://www.minggr.net/cgit/cgit.cgi/qemu/log/?h=virtio-nvme/v1

Thanks,
Ming