All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@redhat.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: "Stefan Hajnoczi" <stefanha@gmail.com>,
	"Alex Bennée" <alex.bennee@linaro.org>,
	qemu-devel@nongnu.org, virtio-dev@lists.oasis-open.org,
	slp@redhat.com, marcandre.lureau@redhat.com,
	viresh.kumar@linaro.org, sgarzare@redhat.com,
	takahiro.akashi@linaro.org, erik.schilling@linaro.org,
	manos.pitsidianakis@linaro.org, mathieu.poirier@linaro.org
Subject: [virtio-dev] Re: [RFC PATCH] docs/interop: define STANDALONE protocol feature for vhost-user
Date: Mon, 24 Jul 2023 14:08:39 -0400	[thread overview]
Message-ID: <20230724180839.GC222590@fedora> (raw)
In-Reply-To: <20230720182128-mutt-send-email-mst@kernel.org>

[-- Attachment #1: Type: text/plain, Size: 3738 bytes --]

On Thu, Jul 20, 2023 at 06:22:08PM -0400, Michael S. Tsirkin wrote:
> On Thu, Jul 20, 2023 at 05:31:03PM -0400, Stefan Hajnoczi wrote:
> > On Thu, 20 Jul 2023 at 17:15, Michael S. Tsirkin <mst@redhat.com> wrote:
> > >
> > > On Thu, Jul 20, 2023 at 03:58:37PM -0400, Stefan Hajnoczi wrote:
> > > > On Thu, Jul 06, 2023 at 12:48:20PM -0400, Michael S. Tsirkin wrote:
> > > > > On Tue, Jul 04, 2023 at 01:36:00PM +0100, Alex Bennée wrote:
> > > > > > Currently QEMU has to know some details about the back-end to be able
> > > > > > to setup the guest. While various parts of the setup can be delegated
> > > > > > to the backend (for example config handling) this is a very piecemeal
> > > > > > approach.
> > > > >
> > > > > > This patch suggests a new feature flag (VHOST_USER_PROTOCOL_F_STANDALONE)
> > > > > > which the back-end can advertise which allows a probe message to be
> > > > > > sent to get all the details QEMU needs to know in one message.
> > > > >
> > > > > The reason we do piecemeal is that these existing pieces can be reused
> > > > > as others evolve or fall by wayside.
> > > > >
> > > > > For example, I can think of instances where you want to connect
> > > > > specifically to e.g. networking backend, and specify it
> > > > > on command line. Reasons could be many, e.g. for debugging,
> > > > > or to prevent connecting to wrong device on wrong channel
> > > > > (kind of like type safety).
> > > > >
> > > > > What is the reason to have 1 message? startup latency?
> > > > > How about we allow pipelining several messages then?
> > > > > Will be easier.
> > > >
> > > > This flag effectively says that the back-end is a full VIRTIO device
> > > > with a Device Status Register, Configuration Space, Virtqueues, the
> > > > device type, etc. This is different from previous vhost-user devices
> > > > which sometimes just offloaded certain virtqueues without providing the
> > > > full VIRTIO device (parts were emulated in the VMM).
> > > >
> > > > So for example, a vhost-user-net device does not support the controlq.
> > > > Alex's "standalone" device is a mode where the vhost-user protocol is
> > > > used but the back-end must implement a full virtio-net device.
> > > > Standalone devices are like vDPA device in this respect.
> > > >
> > > > I think it is important to have a protocol feature bit that advertises
> > > > that this is a standalone device, since the semantics are different for
> > > > traditional vhost-user-net devices.
> > >
> > > Not sure what that would gain as compared to a feature bit per
> > > message as we did previously.
> > 
> > Having a single feature bit makes it easier to distinguish between a
> > traditional vhost-user device and a standalone device.
> > 
> > For example, the presence of VHOST_USER_F_GET_DEVICE_ID doesn't tell
> > you whether this device is a standalone device that is appropriate for
> > a new generic QEMU --device vhost-user-device feature that Alex is
> > working on. It could be a traditional vhost-user device that is not
> > standalone but implements the VHOST_USER_GET_DEVICE_ID message.
> > 
> > How will we detect standalone devices? It will be messy if there is no
> > single feature bit that advertises that this back-end is a standalone
> > device.
> > 
> > Stefan
> 
> Looks like standalone implies some 5-6 messages to be supported.
> So just test the 6 bits are all ones.

It's not clear to me that the individual bits together mean this is
really a standalone device, but let's go with individual commands and
see if a front-end can distinguish standalone devices or not. If not,
then we can still add "standalone" feature bit before merging the code.

Stefan

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: Stefan Hajnoczi <stefanha@redhat.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: "Stefan Hajnoczi" <stefanha@gmail.com>,
	"Alex Bennée" <alex.bennee@linaro.org>,
	qemu-devel@nongnu.org, virtio-dev@lists.oasis-open.org,
	slp@redhat.com, marcandre.lureau@redhat.com,
	viresh.kumar@linaro.org, sgarzare@redhat.com,
	takahiro.akashi@linaro.org, erik.schilling@linaro.org,
	manos.pitsidianakis@linaro.org, mathieu.poirier@linaro.org
Subject: Re: [RFC PATCH] docs/interop: define STANDALONE protocol feature for vhost-user
Date: Mon, 24 Jul 2023 14:08:39 -0400	[thread overview]
Message-ID: <20230724180839.GC222590@fedora> (raw)
In-Reply-To: <20230720182128-mutt-send-email-mst@kernel.org>

[-- Attachment #1: Type: text/plain, Size: 3738 bytes --]

On Thu, Jul 20, 2023 at 06:22:08PM -0400, Michael S. Tsirkin wrote:
> On Thu, Jul 20, 2023 at 05:31:03PM -0400, Stefan Hajnoczi wrote:
> > On Thu, 20 Jul 2023 at 17:15, Michael S. Tsirkin <mst@redhat.com> wrote:
> > >
> > > On Thu, Jul 20, 2023 at 03:58:37PM -0400, Stefan Hajnoczi wrote:
> > > > On Thu, Jul 06, 2023 at 12:48:20PM -0400, Michael S. Tsirkin wrote:
> > > > > On Tue, Jul 04, 2023 at 01:36:00PM +0100, Alex Bennée wrote:
> > > > > > Currently QEMU has to know some details about the back-end to be able
> > > > > > to setup the guest. While various parts of the setup can be delegated
> > > > > > to the backend (for example config handling) this is a very piecemeal
> > > > > > approach.
> > > > >
> > > > > > This patch suggests a new feature flag (VHOST_USER_PROTOCOL_F_STANDALONE)
> > > > > > which the back-end can advertise which allows a probe message to be
> > > > > > sent to get all the details QEMU needs to know in one message.
> > > > >
> > > > > The reason we do piecemeal is that these existing pieces can be reused
> > > > > as others evolve or fall by wayside.
> > > > >
> > > > > For example, I can think of instances where you want to connect
> > > > > specifically to e.g. networking backend, and specify it
> > > > > on command line. Reasons could be many, e.g. for debugging,
> > > > > or to prevent connecting to wrong device on wrong channel
> > > > > (kind of like type safety).
> > > > >
> > > > > What is the reason to have 1 message? startup latency?
> > > > > How about we allow pipelining several messages then?
> > > > > Will be easier.
> > > >
> > > > This flag effectively says that the back-end is a full VIRTIO device
> > > > with a Device Status Register, Configuration Space, Virtqueues, the
> > > > device type, etc. This is different from previous vhost-user devices
> > > > which sometimes just offloaded certain virtqueues without providing the
> > > > full VIRTIO device (parts were emulated in the VMM).
> > > >
> > > > So for example, a vhost-user-net device does not support the controlq.
> > > > Alex's "standalone" device is a mode where the vhost-user protocol is
> > > > used but the back-end must implement a full virtio-net device.
> > > > Standalone devices are like vDPA device in this respect.
> > > >
> > > > I think it is important to have a protocol feature bit that advertises
> > > > that this is a standalone device, since the semantics are different for
> > > > traditional vhost-user-net devices.
> > >
> > > Not sure what that would gain as compared to a feature bit per
> > > message as we did previously.
> > 
> > Having a single feature bit makes it easier to distinguish between a
> > traditional vhost-user device and a standalone device.
> > 
> > For example, the presence of VHOST_USER_F_GET_DEVICE_ID doesn't tell
> > you whether this device is a standalone device that is appropriate for
> > a new generic QEMU --device vhost-user-device feature that Alex is
> > working on. It could be a traditional vhost-user device that is not
> > standalone but implements the VHOST_USER_GET_DEVICE_ID message.
> > 
> > How will we detect standalone devices? It will be messy if there is no
> > single feature bit that advertises that this back-end is a standalone
> > device.
> > 
> > Stefan
> 
> Looks like standalone implies some 5-6 messages to be supported.
> So just test the 6 bits are all ones.

It's not clear to me that the individual bits together mean this is
really a standalone device, but let's go with individual commands and
see if a front-end can distinguish standalone devices or not. If not,
then we can still add "standalone" feature bit before merging the code.

Stefan

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2023-07-24 18:08 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-04 12:36 [RFC PATCH] docs/interop: define STANDALONE protocol feature for vhost-user Alex Bennée
2023-07-04 12:36 ` [virtio-dev] " Alex Bennée
2023-07-04 14:54 ` Stefano Garzarella
2023-07-04 14:54   ` Stefano Garzarella
2023-07-04 15:02   ` Alex Bennée
2023-07-04 15:02     ` Alex Bennée
2023-07-07 10:27     ` Stefano Garzarella
2023-07-07 10:27       ` Stefano Garzarella
2023-07-20 19:36       ` Stefan Hajnoczi
2023-07-26 16:01         ` Michael S. Tsirkin
2023-07-26 16:01           ` Michael S. Tsirkin
2023-07-26 14:33   ` Erik Schilling
2023-07-26 15:51     ` Stefan Hajnoczi
2023-07-06 16:31 ` Alex Bennée
2023-07-06 16:31   ` [virtio-dev] " Alex Bennée
2023-07-07 10:35   ` Stefano Garzarella
2023-07-07 10:35     ` [virtio-dev] " Stefano Garzarella
2023-07-06 16:48 ` Michael S. Tsirkin
2023-07-06 16:48   ` Michael S. Tsirkin
2023-07-07  7:58   ` [virtio-dev] " Alex Bennée
2023-07-07  7:58     ` Alex Bennée
2023-07-07  9:57     ` [virtio-dev] " Michael S. Tsirkin
2023-07-07  9:57       ` Michael S. Tsirkin
2023-07-07 13:12       ` Alex Bennée
2023-07-07 13:12         ` [virtio-dev] " Alex Bennée
2023-07-20 19:58   ` Stefan Hajnoczi
2023-07-20 19:58     ` Stefan Hajnoczi
2023-07-20 21:14     ` [virtio-dev] " Michael S. Tsirkin
2023-07-20 21:14       ` Michael S. Tsirkin
2023-07-20 21:31       ` Stefan Hajnoczi
2023-07-20 22:22         ` [virtio-dev] " Michael S. Tsirkin
2023-07-20 22:22           ` Michael S. Tsirkin
2023-07-24 18:08           ` Stefan Hajnoczi [this message]
2023-07-24 18:08             ` Stefan Hajnoczi
2023-07-26 16:02             ` [virtio-dev] " Michael S. Tsirkin
2023-07-26 16:02               ` Michael S. Tsirkin
2023-07-26 17:37               ` [virtio-dev] " Stefan Hajnoczi
2023-07-26 17:37                 ` Stefan Hajnoczi
2023-07-20 19:32 ` Stefan Hajnoczi
2023-07-20 19:32   ` [virtio-dev] " Stefan Hajnoczi
2023-07-20 19:34 ` Stefan Hajnoczi
2023-07-20 19:34   ` [virtio-dev] " Stefan Hajnoczi

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=20230724180839.GC222590@fedora \
    --to=stefanha@redhat.com \
    --cc=alex.bennee@linaro.org \
    --cc=erik.schilling@linaro.org \
    --cc=manos.pitsidianakis@linaro.org \
    --cc=marcandre.lureau@redhat.com \
    --cc=mathieu.poirier@linaro.org \
    --cc=mst@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=sgarzare@redhat.com \
    --cc=slp@redhat.com \
    --cc=stefanha@gmail.com \
    --cc=takahiro.akashi@linaro.org \
    --cc=viresh.kumar@linaro.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.