All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Jason Wang <jasowang@redhat.com>
Cc: Bill Mills <bill.mills@linaro.org>,
	virtio-comment@lists.linux.dev,
	Bertrand Marquis <bertrand.marquis@arm.com>,
	"Edgar E . Iglesias" <edgar.iglesias@amd.com>,
	Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>,
	Viresh Kumar <viresh.kumar@linaro.org>,
	Alex Bennee <alex.bennee@linaro.org>
Subject: Re: [PATCH RFC v1 0/1] virtio-msg transport layer
Date: Thu, 27 Feb 2025 03:55:32 -0500	[thread overview]
Message-ID: <20250227035442-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <CACGkMEsmvBkfPffDGxpnArOuz_JqYfwZ-uA-H=hWKr5QyjjSwA@mail.gmail.com>

On Thu, Feb 27, 2025 at 04:32:53PM +0800, Jason Wang wrote:
> On Thu, Feb 27, 2025 at 4:09 PM Michael S. Tsirkin <mst@redhat.com> wrote:
> >
> > On Tue, Feb 25, 2025 at 08:48:00AM -0500, Bill Mills wrote:
> > > This series adds the virtio-msg transport layer.
> > >
> > > The individuals and organizations involved in this effort have had difficulty in
> > > using the existing virtio-transports in various situations and desire to add one
> > > more transport that performs its transport layer operations by sending and
> > > receiving messages.
> > >
> > > Implementations of virtio-msg will normally be done in multiple layers:
> > > * common / device level
> > > * bus level
> > >
> > > The common / device level defines the messages exchanged between the driver
> > > and a device. This common part should lead to a common driver holding most
> > > of the virtio specifics and can be shared by all virtio-msg bus implementations.
> > > The kernel implementation in [3] shows this separation. As with other transport
> > > layers, virtio-msg should not require modifications to existing virtio device
> > > implementations (virtio-net, virtio-blk etc). The common / device level is the
> > > main focus of this version of the patch series.
> > >
> > > The virtio-msg bus level implements the normal things a bus defines
> > > (enumeration, dma operations, etc) but also implements the message send and
> > > receive operations. A number of bus implementations are envisioned,
> > > some of which will be reusable and general purpose. Other bus implementations
> > > might be unique to a given situation, for example only used by a PCIe card
> > > and its driver.
> > >
> > > How much of the bus level should be described in the virtio spec is one item
> > > we wish to discuss. This draft takes a middle approach by describing the bus
> > > level and defining some standard bus level messages that MAY be used by the bus.
> > > It also describes a range of bus messages that are implementation dependent.
> > >
> > > The standard bus messages are an effort to avoid different bus implementations
> > > doing the same thing in different ways for no good reason. However the
> > > different environments will require different things. Instead of trying to
> > > anticipate all needs and provide something very abstract, we think
> > > implementation specific messages will be needed at the bus level. Over time,
> > > if we see similar messages across multiple bus implementations, we will move to
> > > standardize a bus level message for that.
> > >
> > > We are working on two reusable bus implementations:
> > >
> > > * virtio-msg-ffa based on Arm FF-A interface for use between:
> > >   * normal world and secure world
> > >   * host and VM or VM to VM
> > >   * Can be used w/ or with out a hypervisor
> > >   * Any Hypervisor that implements FF-A can be used
> > >
> > > * virtio-msg-amp for use between heterogenous systems
> > >   * The main processors and its co-processors on an AMP SOC
> > >   * Two or more systems connected via PCIe
> > >   * Minimal requirements: bi-directional interrupts and
> > >     at least one shared memory area
> > >
> > > We also anticipate a third:
> > >
> > > * virtio-msg-xen specific to Xen
> > >   * Usable on any Xen system (including x86 where FF-A does not exist)
> > >   * Using Xen events and page grants
> >
> > I am also interested in virtio-msg-admin-cmd, sending messages to VFs
> > over the admin commands of the PF.
> 
> One more thing, there used to be a similar proposal which is the
> transport virtqueue which also defines the message. And it has the
> chance to be unified with the admin command. Need to think about the
> (dis)advantages of each proposal.
> 
> What's more, if the actual method to send and receive the message, can
> we still call this a transport or not?
> 
> Thanks


This one has the advantage that it does not rely on some other
transport to operate the vq.

But yes, adding some specific ways to send the message would
be good.


> >
> > Thank you, will review.
> >
> > > This series is a work in progress and we acknowledge at least the following
> > > issues we need to work on:
> > >
> > > * Conform to virtio spec nouns (device/driver vs frontend/backend)
> > >   and verbs (must/may)
> > > * Perhaps move error definition elsewhere it the spec and align on its symbols
> > >   and numeric values
> > > * Allow message size to be greater than 40 bytes and allow bus implementations
> > >   to define their max message size
> > > * Add a way to discover the protocol version
> > > * Add a better description of the types of things a bus can do, specifically
> > >   including out-of-band notification and memory area sharing/discovery
> > > * Maybe redo configuration generation handling
> > >
> > > Background info and work in progress implementations:
> > > * HVAC project page with intro slides [1]
> > > * HVAC demo repo w/ instructions in README.md [2]
> > > * Kernel w/ virtio-msg common level and ffa support [3]
> > > * QEMU w/ support for one form of virtio-msg-amp [4]
> > > * Portable RTOS library w/ one form of virtio-msg-amp [5]
> > >
> > > In addition to the QEMU system based demos in the hvac-demo repo, we also have
> > > two hardware systems running:
> > > * AMD x86 + AMD Arm Versal connected via PCIe
> > > * ST STM32MP157 A7 Linux using virtio-i2c provided by M4 Zephyr
> > >
> > > Please note that although the demos work, they are not yet aligned with each
> > > other nor this version of the spec.
> > >
> > > [1] https://linaro.atlassian.net/wiki/spaces/HVAC/overview
> > > [2] https://github.com/wmamills/hvac-demo
> > > [3] https://git.kernel.org/pub/scm/linux/kernel/git/vireshk/linux.git/log/?h=virtio/msg
> > > [4] https://github.com/edgarigl/qemu/commits/edgar/virtio-msg-new
> > > [5] https://github.com/arnopo/open-amp/commits/virtio-msg/
> > >
> > > Bill Mills (1):
> > >   virtio-msg: Add virtio-msg, a message based virtio transport layer
> > >
> > >  content.tex       |   1 +
> > >  transport-msg.tex | 680 ++++++++++++++++++++++++++++++++++++++++++++++
> > >  2 files changed, 681 insertions(+)
> > >  create mode 100644 transport-msg.tex
> > >
> > > --
> > > 2.34.1
> > >
> >
> >


  parent reply	other threads:[~2025-02-27  8:55 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-25 13:48 [PATCH RFC v1 0/1] virtio-msg transport layer Bill Mills
2025-02-25 13:48 ` [PATCH RFC v1 1/1] virtio-msg: Add virtio-msg, a message based virtio " Bill Mills
2025-02-27  7:59 ` [PATCH RFC v1 0/1] virtio-msg " Michael S. Tsirkin
2025-02-27  8:32   ` Jason Wang
2025-02-27  8:34     ` Jason Wang
2025-02-27 14:40       ` Bill Mills
2025-02-28  8:18         ` Jason Wang
2025-02-27  8:55     ` Michael S. Tsirkin [this message]
2025-02-28  8:24       ` Jason Wang
2025-02-27  8:59     ` Zhu Lingshan
2025-02-27 14:59       ` Bill Mills

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=20250227035442-mutt-send-email-mst@kernel.org \
    --to=mst@redhat.com \
    --cc=alex.bennee@linaro.org \
    --cc=arnaud.pouliquen@foss.st.com \
    --cc=bertrand.marquis@arm.com \
    --cc=bill.mills@linaro.org \
    --cc=edgar.iglesias@amd.com \
    --cc=jasowang@redhat.com \
    --cc=viresh.kumar@linaro.org \
    --cc=virtio-comment@lists.linux.dev \
    /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.