patches and low-level development discussion
 help / color / mirror / code / Atom feed
From: "Alex Bennée" <alex.bennee@linaro.org>
To: Demi Marie Obenour <demiobenour@gmail.com>
Cc: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>,
	Parav Pandit <parav@nvidia.com>, Alyssa Ross <hi@alyssa.is>,
	Rob Bradford <rbradford@meta.com>, Bo Chen <bchen@crusoe.ai>,
	"dev@lists.cloudhypervisor.org" <dev@lists.cloudhypervisor.org>,
	Spectrum OS Development <devel@spectrum-os.org>,
	"virtio-comment@lists.linux.dev" <virtio-comment@lists.linux.dev>,
	Viresh Kumar <viresh.kumar@linaro.org>,
	Sumit Semwal <sumit.semwal@linaro.org>,
	Bill Mills <bill.mills@linaro.org>,
	"Edgar E. Iglesias" <edgar.iglesias@amd.com>
Subject: Re: Vhost-guest (was virtio vhost-user) vs virtio-msg
Date: Thu, 28 May 2026 17:13:03 +0100	[thread overview]
Message-ID: <877bonqzqo.fsf@draig.linaro.org> (raw)
In-Reply-To: <4ba67246-3a2b-43ee-b827-000c16ff07ed@gmail.com> (Demi Marie Obenour's message of "Thu, 28 May 2026 02:59:13 -0400")

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

Demi Marie Obenour <demiobenour@gmail.com> writes:

(add virtio-msg authors to CC)

> On 5/28/26 01:47, Manos Pitsidianakis wrote:
>> On Thu, May 28, 2026 at 8:22 AM Parav Pandit <parav@nvidia.com> wrote:
>>>
>>>
>>>> From: Demi Marie Obenour <demiobenour@gmail.com>
>>>> Sent: 28 May 2026 05:23 AM
>>>> To: virtio-comment@lists.linux.dev
>>>> Subject: MSI-X vector limits and reserving a virtio device ID
>>>>
>>>> I'd like to reserve a virtio device ID for virtio vhost-guest,
>>>> formally virtio vhost-user.  Would this be possible?
>>>>
>>> Vhost user is an implementation of the device.
>>> I believe it stays as implementation and not a new device type.
>> 
>> This exactly.
>> 
>> Furthermore, we already have a mechanism for "providing" an arbitrary
>> virtio device; it's called a transport.
>> 
>> Demi, I suggest you look into virtio-msg transport, which would allow
>> you to do what you want.
>
> I'm aware of virtio-msg, and in fact considered using it.  However, I
> found that virtio-msg doesn't meet my requirements.
>
> 1. Virtio-msg needs to run over a transport of its own.  None of the
>    proposed transports support KVM guests on x86.  FF-A is the only
>    one that would make sense with KVM, but FF-A is specific to Arm.

Well yes. virtio-msg is a common transport that implements various buses
on the backend. FF-A is one but we have working implementations that
just use plain memory sharing for the message bus which work on anything
including x86/KVM. Although it does beg the question of what an
additional transport would being to KVM as it is already well served by
PCI and MMIO transports.

> 2. Virtio-msg isn't compatible with existing frontend VMMs.
>    Vhost-guest can be used with any frontend VMM that implements
>    vhost-user.

What exactly do you mean by frontend VMMs?

The VMM needs some mechanism to expose a VirtIO transport to the guest
be it through probing (PCI) or some machine description like ACPI or DT.
The guest is completely unaware if the backend implementation is using
vhost-user. If you were going to expose that to the guest you will need
some mechanism for that.

For what its worth there are QEMU and rust-vmm implementations of
various virtio-msg backends although we would expect the host UAPI to be
stabilised after the VirtIO spec is ratified (because its not guest
visible).

> 3. Virtio-msg isn't compatible with existing frontend drivers.  While I
>    expect that drivers for Linux will eventually be upstreamed,

This is just plain wrong. No changes are needed to be made to the
drivers as they are transport agnostic.

>    I doubt that drivers for Windows or *BSD will ever be written.
>    I don't even know if the Windows Driver Framework provides enough
>    to write one.  I don't need this myself, but I suspect that this
>    is enough to make virtio-msg unsuitable in many environments.

Why would Windows or *BSD want to implement virtio-msg when they can
already use MMIO and PCI? But nothing stops them implementing it if they
wish.

>    
> 4. Virtio-msg requires invasive changes to existing userspace device
>    implementations.

No it doesn't. We test virtio-msg with existing unmodified rust-vmm
vhost-device implementations because on the host we bridge between
virtio-msg and vhost-user. In QEMU the transport is abstracted away from
the details of the device implementation - you don't need MMIO and PCI
specific device implementations either.

>    The project I work on doesn't use QEMU, and the
>    existing frontends are targeted at server use-cases.  Using the
>    vhost-user protocol lets me reuse these with little effort.
>
> 5. To the best of my knowledge, virtio-msg doesn't support live
>    migration of frontend VMs.  Vhost-guest uses the vhost-user
>    protocol, which has supported this for a very long time.  I don't
>    need live migration myself, but for many server use-cases, not
>    having live migration is a dealbreaker.

Live migration isn't in scope for a transport (aside from maybe support
device reset/disable flows). The information needed to deal with
migration is between the VMM and whatever implements the device backend.

Indeed I find it a little confusing how live migration would work if the
vhost-guest communication is directly between the backend and the guest.
The VMM is the one that is responsible for serialistion and if it is cut
out of the loop how will it know?

>    
> 6. I don't know if virtio-msg can achieve comparable performance.
>    It appears to be optimized for reliability and isolation,
>    not processing tens of gigabits of network traffic per second.
>    Vhost-guest is designed with performance in mind.

This is pure supposition. The data plane in virtio-msg is the same as in
PCI and MMIO, shared memory and virtqs. While virtio-msg does support
notifications in the message queue it does not preclude direct IRQ
signalling or indeed switch to pure polling which is what most of the
high speed networking solutions end up doing to avoid the latency of
IRQs.

>
> Vhost-guest is designed for storage and networking appliances on
> servers, whereas virtio-msg is designed for safety-critical embedded
> systems.  These domains have very different requirements, and as a
> result they arrived at very different solutions.
>
> I work on Spectrum (https://spectrum-os.org), which uses Cloud
> Hypervisor.  As the name implies, Cloud Hypervisor is primarily
> intended for cloud workloads, though it can also be used on clients.
> I don't think that an implementation of virtio-msg would be accepted,
> as it benefits none of Cloud Hypervisor's other users.

-- 
Alex Bennée
Virtualisation Tech Lead @ Linaro

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

      parent reply	other threads:[~2026-05-28 16:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <11771164-7919-43e1-a980-03f036bdae2e@gmail.com>
     [not found] ` <SJ0PR12MB6806C5A16CB0899E095E835EDC092@SJ0PR12MB6806.namprd12.prod.outlook.com>
     [not found]   ` <CAAjaMXYGMTok_a2CJK8aKSqbTbgLx1CbkCVZw2VnZdJVuPJ38w@mail.gmail.com>
2026-05-28  6:59     ` Vhost-guest (was virtio vhost-user) vs virtio-msg Demi Marie Obenour
2026-05-28  8:56       ` Alyssa Ross
2026-05-28 13:52         ` Stefan Hajnoczi
2026-05-28 16:13       ` Alex Bennée [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=877bonqzqo.fsf@draig.linaro.org \
    --to=alex.bennee@linaro.org \
    --cc=bchen@crusoe.ai \
    --cc=bill.mills@linaro.org \
    --cc=demiobenour@gmail.com \
    --cc=dev@lists.cloudhypervisor.org \
    --cc=devel@spectrum-os.org \
    --cc=edgar.iglesias@amd.com \
    --cc=hi@alyssa.is \
    --cc=manos.pitsidianakis@linaro.org \
    --cc=parav@nvidia.com \
    --cc=rbradford@meta.com \
    --cc=sumit.semwal@linaro.org \
    --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.
Code repositories for project(s) associated with this public inbox

	https://spectrum-os.org/git/crosvm
	https://spectrum-os.org/git/doc
	https://spectrum-os.org/git/mktuntap
	https://spectrum-os.org/git/nixpkgs
	https://spectrum-os.org/git/spectrum
	https://spectrum-os.org/git/ucspi-vsock
	https://spectrum-os.org/git/www

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).