Discussion of the implementations of VIRTIO specification
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Jason Wang <jasowang@redhat.com>
Cc: Eugenio Perez Martin <eperezma@redhat.com>,
	Shannon Nelson <shannon.nelson@amd.com>,
	si-wei.liu@oracle.com, longpeng2@huawei.com,
	Lei Yang <leiyang@redhat.com>,
	Laurent Vivier <lvivier@redhat.com>,
	alvaro.karsz@solid-run.com, Gautam Dawar <gdawar@xilinx.com>,
	Cindy Lu <lulu@redhat.com>, Zhu Lingshan <lingshan.zhu@intel.com>,
	Liuxiangdong <liuxiangdong5@huawei.com>,
	Parav Pandit <parav@mellanox.com>,
	Harpreet Singh Anand <hanand@xilinx.com>,
	"Gonglei (Arei)" <arei.gonglei@huawei.com>,
	Shannon Nelson <snelson@pensando.io>,
	Stefano Garzarella <sgarzare@redhat.com>,
	Dragos Tatulea <dtatulea@nvidia.com>,
	Virtio-Dev <virtio-dev@lists.oasis-open.org>
Subject: [virtio-dev] Re: [RFC 1/4] vdpa: add VHOST_BACKEND_F_ENABLE_AFTER_DRIVER_OK flag
Date: Wed, 24 May 2023 06:10:48 -0400	[thread overview]
Message-ID: <20230524060842-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <CACGkMEudc7M5ZqRvhYkW35Sb6pK9yp1LObcFZLkX-sMRYwEj7w@mail.gmail.com>

On Wed, May 24, 2023 at 12:06:47PM +0800, Jason Wang wrote:
> On Tue, May 23, 2023 at 1:55 PM Eugenio Perez Martin
> <eperezma@redhat.com> wrote:
> >
> > On Mon, May 22, 2023 at 11:22 PM Shannon Nelson <shannon.nelson@amd.com> wrote:
> > >
> > > On 5/22/23 1:07 PM, Eugenio Perez Martin wrote:
> > > >
> > > > On Mon, May 22, 2023 at 9:23 PM Michael S. Tsirkin <mst@redhat.com> wrote:
> > > >>
> > > >> On Mon, May 22, 2023 at 08:57:27PM +0200, Eugenio Pérez wrote:
> > > >>> Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
> > > >>> ---
> > > >>>   include/uapi/linux/vhost_types.h | 2 ++
> > > >>>   1 file changed, 2 insertions(+)
> > > >>>
> > > >>> diff --git a/include/uapi/linux/vhost_types.h b/include/uapi/linux/vhost_types.h
> > > >>> index c5690a8992d8..a1b316f49b38 100644
> > > >>> --- a/include/uapi/linux/vhost_types.h
> > > >>> +++ b/include/uapi/linux/vhost_types.h
> > > >>> @@ -165,5 +165,7 @@ struct vhost_vdpa_iova_range {
> > > >>>   #define VHOST_BACKEND_F_SUSPEND  0x4
> > > >>>   /* Device can be resumed */
> > > >>>   #define VHOST_BACKEND_F_RESUME  0x5
> > > >>> +/* Device can enable virtqueues after DRIVER_OK */
> > > >>
> > > >> A bit more detail on what does this mean?
> > > >> It's normally driver that enables VQs not device itself ...
> > > >>
> > > >
> > > > I agree, it is not well explained.
> > > >
> > > > What about "Device supports the driver to enable virtqueues after DRIVER_OK"?
> > > >
> > > >>> +#define VHOST_BACKEND_F_ENABLE_AFTER_DRIVER_OK  0x6
> > >
> > > Does this mean it is possible only after DRIVER_OK, or does it mean in
> > > addition to before DRIVER_OK?  It isn't clear to me.
> > >
> > > Maybe something like
> > > "Device supports virtqueue enable only after DRIVER_OK"
> > > or
> > > "Device supports virtqueue enable both before and after DRIVER_OK"
> > >
> >
> > I agree too,
> >
> > With the previous suggestion it would be:
> >
> > "Device supports the driver to enable virtqueues both before and after
> > DRIVER_OK"
> 
> Btw, I think it might be worth clarifying whether or not this is
> supported by the current virtio spec. Spec seems to be unclear on
> this:
> 
> 1) The driver MUST NOT write a 0 to queue_enable.
> 2) if reset is support, driver can wrote 1 to re-enable a virtqueue
> 
> But it doesn't say if the driver can write 1 after DRIVER_OK without reset.
> 
> Thanks

I don't think it can. Do any drivers do this?


> 
> >
> > Does it look better?
> >
> > Thanks!
> >
> > > sln
> > >
> > >
> > > >>>
> > > >>>   #endif
> > > >>> --
> > > >>> 2.31.1
> > > >>
> > > >
> > >
> >


---------------------------------------------------------------------
To unsubscribe, e-mail: virtio-dev-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: virtio-dev-help@lists.oasis-open.org


  reply	other threads:[~2023-05-24 10:10 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20230522185730.3233001-1-eperezma@redhat.com>
     [not found] ` <20230522185730.3233001-2-eperezma@redhat.com>
     [not found]   ` <20230522152226-mutt-send-email-mst@kernel.org>
     [not found]     ` <CAJaqyWfSzqdyPHogzccuYBeThJgcx-A_AfF8tmqLgxKNVczBWA@mail.gmail.com>
     [not found]       ` <1735e461-a858-5bf2-bf9f-d9418e281d0c@amd.com>
     [not found]         ` <CAJaqyWd632RiE9Zhc8OLsQbnaC42VG1FW97UMDHPQRofukYPrg@mail.gmail.com>
2023-05-24  4:06           ` [virtio-dev] Re: [RFC 1/4] vdpa: add VHOST_BACKEND_F_ENABLE_AFTER_DRIVER_OK flag Jason Wang
2023-05-24 10:10             ` Michael S. Tsirkin [this message]
2023-05-26  6:21               ` Jason Wang
2023-05-24 16:25             ` Eugenio Perez Martin
2023-05-26  6:25               ` Jason Wang
2023-05-26  8:08                 ` Eugenio Perez Martin

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=20230524060842-mutt-send-email-mst@kernel.org \
    --to=mst@redhat.com \
    --cc=alvaro.karsz@solid-run.com \
    --cc=arei.gonglei@huawei.com \
    --cc=dtatulea@nvidia.com \
    --cc=eperezma@redhat.com \
    --cc=gdawar@xilinx.com \
    --cc=hanand@xilinx.com \
    --cc=jasowang@redhat.com \
    --cc=leiyang@redhat.com \
    --cc=lingshan.zhu@intel.com \
    --cc=liuxiangdong5@huawei.com \
    --cc=longpeng2@huawei.com \
    --cc=lulu@redhat.com \
    --cc=lvivier@redhat.com \
    --cc=parav@mellanox.com \
    --cc=sgarzare@redhat.com \
    --cc=shannon.nelson@amd.com \
    --cc=si-wei.liu@oracle.com \
    --cc=snelson@pensando.io \
    --cc=virtio-dev@lists.oasis-open.org \
    /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