On Sun, Apr 27, 2025 at 07:48:02PM +0800, honglei.w...@smartx.com wrote:
From: hongleiwang <honglei.w...@smartx.com>QEMU has supported nvme disk emulation for a long time, see: https://qemu-project.gitlab.io/qemu/system/devices/nvme.html. The following patches introduce nvme-ns disk bus type:
Thanks for the v2. I have some suggestions which I'd like some more feedback on, which might be controversial, hence the added Cc's for people who replied to any of the versions.
A disk with nvme-ns as bus is represented as an nvme namespace and needs to be attached to an nvme controller. In XML, it can be used like this: <devices> ... <disk type='file' device='disk'> <driver name='qemu' type='raw'/> <source file='/tmp/data.img'/> <target dev='nvmensa' bus='nvme-ns'/>
Since we're not using the bus='nvme', what if we abandoned the qemu naming and not specify the -ns; on top of that it would be nicer to have the device naming same as it actually happens on Linux. That is kind of biased, but we already do that for other disk types. The above would then become: <target dev='nvme0n1' bus='nvme'/> Because that means a slightly bigger change to how we do things currently (bunch of the code depends on the original numbering) I'd be willing to submit the XML part of this series with that change. One of the reasons is that I also need it for support in a different driver. Let me know what you think. Martin
signature.asc
Description: PGP signature