From: Padmakar Kalghatgi <p.kalghatgi@samsung.com>
To: Stefan Hajnoczi <stefanha@redhat.com>
Cc: fam@euphon.net, kwolf@redhat.com, jg123.choi@samsung.com,
qemu-block@nongnu.org, k.jensen@samsung.com,
d.palani@samsung.com, qemu-devel@nongnu.org,
linux-nvme@lists.infradead.org, mreitz@redhat.com,
Christoph Hellwig <hch@infradead.org>,
kbusch@kernel.org, u.kishore@samsung.com, its@irrelevant.dk,
javier.gonz@samsung.com, prakash.v@samsung.com,
mohit.kap@samsung.com
Subject: Re: [RFC PATCH 1/2] hw/nvme: add mi device
Date: Thu, 15 Jul 2021 20:07:07 +0530 [thread overview]
Message-ID: <20210715143707.GA368@test-zns> (raw)
In-Reply-To: <YO1e01ex1yOvy0SB@stefanha-x1.localdomain>
[-- Attachment #1: Type: text/plain, Size: 2567 bytes --]
On Tue, Jul 13, 2021 at 10:37:23AM +0100, Stefan Hajnoczi wrote:
>On Tue, Jul 13, 2021 at 06:30:28AM +0100, Christoph Hellwig wrote:
>On Tue, Jul 13, 2021 at 06:30:28AM +0100, Christoph Hellwig wrote:
>> On Mon, Jul 12, 2021 at 12:03:27PM +0100, Stefan Hajnoczi wrote:
>> > Why did you decide to implement -device nvme-mi as a device on
>> > TYPE_NVME_BUS? If the NVMe spec somehow requires this then I'm surprised
>> > that there's no NVMe bus interface (callbacks). It seems like this could
>> > just as easily be a property of an NVMe controller -device
>> > nvme,mi=on|off or -device nvme-subsys,mi=on|off? I'm probably just not
>> > familiar enough with MI and NVMe architecture...
>>
>> I'm too far away from qemu these days to understand what TYPE_NVME_BUS
>> is. Bt NVMe-MI has tree possible transports:
>>
>> 1) out of band through smbus. This seems something that could be
>> trivially modelled in qemu
>> 2) out of band over MCTP / PCIe VDM.
>> 3) in band using NVMe admin commands that pass through MI commands
>
>Thanks for explaining!
>
>Common NVMe-MI code can be shared by -device nvme-mi-smbus, in-band NVMe
>MI commands (part of -device nvme), a vsock transport, etc. This patch
>has nvme_mi_admin_command() as the entry point to common MI code, so not
>much needs to be done to achieve this.
>
>My question about why -device nvme-mi was because this "device" doesn't
>implement any bus interface (callbacks). The bus effectively just serves
>as an owner of this device. The guest does not access the device via the
>bus. So I'm not sure a -device is appropriate, it's an usual device.
>
>If the device is kept, please name it -device nvme-mi-vsock so it's
>clear this is the NVMe-MI vsock transport. I think the device could be
>dropped and instead an -device nvme,mi-vsock=on|off property could be
>added to enable the MI vsock transport on a specific NVMe controller.
>This raises the question of whether the port number should be
>configurable so multiple vsock Management Endpoints can coexist.
>
>I don't have time to explore the architectural model, but here's the
>link in case anyone wants to think through all the options for NVMe MI
>Management Endpoints and how QEMU should model them:
>"1.4 NVM Subsystem Architectural Model"
>https://protect2.fireeye.com/v1/url?k=8ee99db1-ee0b00ec-8ee816fe-000babd9f1ba-c174da71c1d11e79&q=1&e=b7b9709a-33ac-4d98-a6c0-ff53377a3278&u=https%3A%2F%2Fnvmexpress.org%2Fwp-content%2Fuploads%2FNVM-Express-Management-Interface-1.2-2021.06.02-Ratified.pdf
>
>Stefan
Thanks Stefan for the suggestion.
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
next prev parent reply other threads:[~2021-07-15 15:00 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20210709135651epcas5p1c544dec5377413bfa4b2eeab6ee43f26@epcas5p1.samsung.com>
2021-07-09 13:55 ` [RFC PATCH 1/2] hw/nvme: add mi device Padmakar Kalghatgi
2021-07-09 15:58 ` Keith Busch
2021-07-15 12:01 ` Padmakar Kalghatgi
2021-07-12 11:03 ` Stefan Hajnoczi
2021-07-13 5:30 ` Christoph Hellwig
2021-07-13 9:37 ` Stefan Hajnoczi
2021-07-15 14:37 ` Padmakar Kalghatgi [this message]
2021-07-15 12:36 ` Padmakar Kalghatgi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210715143707.GA368@test-zns \
--to=p.kalghatgi@samsung.com \
--cc=d.palani@samsung.com \
--cc=fam@euphon.net \
--cc=hch@infradead.org \
--cc=its@irrelevant.dk \
--cc=javier.gonz@samsung.com \
--cc=jg123.choi@samsung.com \
--cc=k.jensen@samsung.com \
--cc=kbusch@kernel.org \
--cc=kwolf@redhat.com \
--cc=linux-nvme@lists.infradead.org \
--cc=mohit.kap@samsung.com \
--cc=mreitz@redhat.com \
--cc=prakash.v@samsung.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
--cc=u.kishore@samsung.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).