Skip to content

RFC virtio nvme

Ming Lin linux-nvme virtualization 1 version New

Get series with b4
b4 am 1441992101.802.11.camel@ssi

Versions newest first

  1. v1 RFC Latest0 of 2 patches 0 repliesNew

Patches in v1 No applies recorded yet

None of the 2 patches the cover letter announces are in this archive.

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
Quoted 21 lines · Stefan Hajnoczi
Quoted 11 lines · Ming Lin
Quoted 10 lines · Stefan Hajnoczi
Quoted 9 lines · Ming Lin

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:

(quoted diff) +0 -2
-drive file=disk.img,format=raw,if=none,id=D22 \
-device virtio-nvme-pci,drive=D22,serial=1234,num_queues=4
Quoted 8 lines
Quoted 6 lines
Quoted 2 lines

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

Why is a virtio-nvme guest device needed? I guess there must either be NVMe-only features that you want to pass through, or you think the performance will be significantly better than virtio-blk/virtio-scsi?

It simply passes through NVMe commands.

Quoted 7 lines

I understand that. My question is why the guest needs to send NVMe commands?

If the virtio_nvme.ko guest driver only sends read/write/flush then there's no advantage over virtio-blk.

There must be something you are trying to achieve which is not possible with virtio-blk or virtio-scsi. What is that?

I actually learned from your virtio-scsi work.
http://www.linux-kvm.org/images/f/f5/2011-forum-virtio-scsi.pdf

Then I thought a full NVMe stack from guest to host to target seems reasonable.

Trying to achieve similar things as virtio-scsi, but all NVMe protocol.

- Effective NVMe passthrough
- Multiple target choices: QEMU, LIO-NVMe(vhost_nvme)
- Almost unlimited scalability. Thousands of namespaces per PCI device
- True NVMe device
- End-to-end Protection Information
- ....