From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: Thanos Makatos <thanos.makatos@nutanix.com>,
Stefan Hajnoczi <stefanha@redhat.com>
Cc: Elena Ufimtseva <elena.ufimtseva@oracle.com>,
John G Johnson <john.g.johnson@oracle.com>,
"jag.raman@oracle.com" <jag.raman@oracle.com>,
John Levon <john.levon@nutanix.com>,
"k.jensen@samsung.com" <k.jensen@samsung.com>,
"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
"alex.williamson@redhat.com" <alex.williamson@redhat.com>,
"kraxel@redhat.com" <kraxel@redhat.com>
Subject: Re: VFIO/vfio-user: specify NVMe namespace to boot from
Date: Tue, 20 Jul 2021 21:42:17 +0200 [thread overview]
Message-ID: <199272f4-69f4-6c4c-e828-083c80cddf7a@redhat.com> (raw)
In-Reply-To: <CH0PR02MB7898B28B8D9A1C77336F1E3D8BE29@CH0PR02MB7898.namprd02.prod.outlook.com>
On 7/20/21 9:10 PM, Thanos Makatos wrote:
>> On Mon, Jul 12, 2021 at 01:24:07PM +0000, Thanos Makatos wrote:
>>> We're working on implementing a virtual NVMe controller based on SPDK
>> and a multiprocess-qemu branch that uses the vfio-user. We're facing a
>> problem where the existing API doesn't allow us to tell QEMU from which
>> NVMe namespace we'd like SeaBIOS to boot from.
>>>
>>> How can we solve this problem? Can we add a parameter to the '-boot'
>> option, e.g. '-boot path=/devices/pciblah/...@namespace0'? AFAIK VFIO
>> should have the same problem.
>>>
>>> The corresponding SeaBIOS patch can be found in
>> https://mail.coreboot.org/hyperkitty/list/seabios@seabios.org/thread/2Q7
>> NPH7TJNHK6JGPHQL7755HILO23ISN/
>>
>> Hi,
>> I have CCed Gerd Hoffmann on a hunch that he may have ideas.
>>
>> Yes, I think the path needs to include the Namespace ID similar to how
>> SCSI boot paths include the target/channel/LUN.
>
> Just to make sure I've explained the problem correctly, what we need to fix is not specific to NVMe: we want to be able to boot from any PCI device, so we'd need something like '-boot /devices/pciblah'. Specifically, for NVMe we might want to specify the namespace (as we can't necessarily assume that the first one must be used), therefore we'd have to add the '/namespace0' bit. For other kinds of PCI devices, we'd have to append something different.
>
> Would such a change be acceptable?
FWIW -boot path= sounds a good way to solve this problem,
as long as you succeed at not breaking the legacy bootdevice.c :)
>
>>
>> When the SeaBIOS NVMe driver probes the controller is should discover
>> the available Namespaces and set up individual drives for each
>> Namespace. That would be analogous to virtio_scsi_add_lun().
>
> Setting up an individual drive can easily exhaust SeaBIOS's limited memory, so it's better to either probe the specified namespace or probe the first active one. I've sent a patch here: https://mail.coreboot.org/hyperkitty/list/seabios@seabios.org/message/TKKUCH5PYZPXZG3NA2F5SALUFUVUYDZG/
>
>
prev parent reply other threads:[~2021-07-20 19:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-12 13:24 VFIO/vfio-user: specify NVMe namespace to boot from Thanos Makatos
2021-07-13 12:06 ` Stefan Hajnoczi
2021-07-20 19:10 ` Thanos Makatos
2021-07-20 19:42 ` Philippe Mathieu-Daudé [this message]
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=199272f4-69f4-6c4c-e828-083c80cddf7a@redhat.com \
--to=philmd@redhat.com \
--cc=alex.williamson@redhat.com \
--cc=elena.ufimtseva@oracle.com \
--cc=jag.raman@oracle.com \
--cc=john.g.johnson@oracle.com \
--cc=john.levon@nutanix.com \
--cc=k.jensen@samsung.com \
--cc=kraxel@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
--cc=thanos.makatos@nutanix.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).