qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Alex Bennée" <alex.bennee@linaro.org>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: "Daniel P. Berrangé" <berrange@redhat.com>,
	"Christian Speich" <c.speich@avm.de>,
	qemu-devel@nongnu.org, "Stefano Garzarella" <sgarzare@redhat.com>
Subject: Re: [PATCH] virtio: vhost-user-device: Make user creatable again
Date: Mon, 29 Sep 2025 10:52:30 +0100	[thread overview]
Message-ID: <874islmvq9.fsf@draig.linaro.org> (raw)
In-Reply-To: <20250929042410-mutt-send-email-mst@kernel.org> (Michael S. Tsirkin's message of "Mon, 29 Sep 2025 04:24:44 -0400")

"Michael S. Tsirkin" <mst@redhat.com> writes:

> On Mon, Sep 29, 2025 at 09:22:02AM +0100, Daniel P. Berrangé wrote:
>> On Mon, Sep 22, 2025 at 04:14:55PM +0100, Alex Bennée wrote:
>> > "Michael S. Tsirkin" <mst@redhat.com> writes:
>> > 
>> > > On Mon, Sep 22, 2025 at 03:26:23PM +0200, Christian Speich wrote:
>> > >> On Mon, Sep 22, 2025 at 09:08:47AM -0400, Michael S. Tsirkin wrote:
>> > >> > On Mon, Sep 22, 2025 at 01:49:55PM +0100, Daniel P. Berrangé wrote:
>> > >> > > On Mon, Sep 22, 2025 at 08:15:20AM -0400, Michael S. Tsirkin wrote:
>> > >> > > > On Mon, Sep 22, 2025 at 12:33:26PM +0100, Daniel P. Berrangé wrote:
>> > >> > > > > On Fri, Sep 19, 2025 at 04:07:19PM -0400, Michael S. Tsirkin wrote:
>> > >> > > > > > On Fri, Sep 19, 2025 at 04:30:53PM +0200, Christian Speich wrote:
>> > >> > > > > > > This removes the change introduced in [1] that prevents the use of
>> > >> > > > > > > vhost-user-device and vhost-user-device-pci on unpatched QEMU builds.
>> > >> > > > > > > 
>> > >> > > > > > > [1]: 6275989647efb708f126eb4f880e593792301ed4
>> > >> > > > > > > 
>> > >> > > > > > > Signed-off-by: Christian Speich <c.speich@avm.de>
>> > >> > > > > > > ---
>> > >> > > > > > > vhost-user-device and vhost-user-device-pci started out as user
>> > >> > > > > > > creatable devices. This was changed in [1] when the vhost-user-base was
>> > >> > > > > > > introduced.
>> > >> > > > > > > 
>> > >> > > > > > > The reason given is to prevent user confusion. Searching qemu-discuss or
>> > >> > > > > > > google for "vhost-user-device" I've seen no confused users.
>> > >> > > > > > > 
>> > >> > > > > > > Our use case is to provide wifi emulation using "vhost-user-device-pci",
>> > >> > > > > > > which currently is working fine with the QEMU 9.0.2 present in Ubuntu
>> > >> > > > > > > 24.04. With newer QEMU versions we now need to patch, distribute and
>> > >> > > > > > > maintain our own QEMU packages, which is non-trivial.
>> > >> > > > > > > 
>> > >> > > > > > > So I want to propose lifting this restriction to make this feature
>> > >> > > > > > > usable without a custom QEMU.
>> > >> > > > > > > 
>> > >> > > > > > > [1]: 6275989647efb708f126eb4f880e593792301ed4
>> > >> > > > > > 
>> > >> > > > > > The confusion is after someone reuses the ID you are claiming without
>> > >> > > > > > telling anyone and then linux guests will start binding that driver to
>> > >> > > > > > your device.
>> > >> > > > > > 
>> > >> > > > > > 
>> > >> > > > > > We want people doing this kind of thing to *at a minimum*
>> > >> > > > > > go ahead and register a device id with the virtio TC,
>> > >> > > > > > but really to write and publish a spec.
>> > >> > > > > 
>> > >> > > > > Wanting people to register a device ID is a social problem and
>> > >> > > > > we're trying to apply a technical hammer to it, which is rarely
>> > >> > > > > an productive approach.
>> > >> > > > > 
>> > >> > > > > If we want to demonstrate that vhost-user-device is "risky", then
>> > >> > > > > how about we rename it to have an 'x-' prefix and thus disclaim
>> > >> > > > > any support for it, but none the less allow its use. Document it
>> > >> > > > > as an experimental device, and if it breaks, users get to keep
>> > >> > > > > both pieces.
>> > >> > > > 
>> > >> > > > Maybe with the insecure tag you are working on?
>> > >> > > 
>> > >> > > Sure.
>> > >> > > 
>> > >> > > > And disable in the default config?
>> > >> > > 
>> > >> > > Disabling in default config would retain the very problem that Christian
>> > >> > > is trying to solve - that no distro would have the functionality available
>> > >> > > for users.
>> > >> > 
>> > >> > I think his problem is that he has to patch qemu.
>> > >> 
>> > >> Yes I'm trying to avoid that. Patching qemu also involes providing updates
>> > >> (and security patches!) for it. This is a very high burden to turn this
>> > >> simple flag on.
>> > >> 
>> > >> > 
>> > >> > As described, this is a developer option not an end user one.
>> > >> 
>> > >> I don't really get the distintion between developer and end user here.
>> > >> 
>> > >> As a developer I'm an end user too, I'm concerned with the linux kernel
>> > >> and the additional host tooling for mac80211_hwsim support but QEMU
>> > >> I'm just using as an user.
>> > >> 
>> > > Are you ok with building qemu with an extra config flag?
>> > 
>> > In my patch I gated the feature on:
>> > 
>> >   VHOST_USER_TEST
>> > 
>> > so it's easy to patch out of the default config.
>> 
>> FWIW, we have multiple other test devices that we don't gate behind KConfig
>> build flags - hyperv-testdev, pc-testdev, pci-testdev & edu.
>
> Well that's because e.g. kvmtest actually depends on pci-testdev.
> IOW it's actually supported.

Isn't this solved by having an entry in MAINTAINERS?

Its not like the device isn't useful to developers working on vhost-user
daemons who have yet to acquire a stub. Indeed if the numbers are
correct it should work for any daemon which takes full responsibility
for the config space.

>
>>  IMHO the
>> vhost user device is more compelling to have enabled by default as it can
>> actually be used todo something useful.
>> 
>> IMHO the rationale for disabling it is more fitting to downstreams like
>> RHEL.

Makes sense to me.

>> 
>> With regards,
>> Daniel
>> -- 
>> |: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
>> |: https://libvirt.org         -o-            https://fstop138.berrange.com :|
>> |: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|

-- 
Alex Bennée
Virtualisation Tech Lead @ Linaro


  reply	other threads:[~2025-09-29  9:54 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-19 14:30 [PATCH] virtio: vhost-user-device: Make user creatable again Christian Speich
2025-09-19 14:46 ` Stefano Garzarella
2025-09-19 20:07 ` Michael S. Tsirkin
2025-09-22 10:40   ` Christian Speich via
2025-09-22 10:56     ` Michael S. Tsirkin
2025-09-22 11:11       ` Christian Speich via
2025-09-22 14:37         ` Michael S. Tsirkin
2025-09-25  7:56           ` Christian Speich
2025-09-25  9:33             ` Michael S. Tsirkin
2025-09-25 10:14               ` Christian Speich
2025-09-22 11:33   ` Daniel P. Berrangé
2025-09-22 12:15     ` Michael S. Tsirkin
2025-09-22 12:49       ` Daniel P. Berrangé
2025-09-22 13:08         ` Michael S. Tsirkin
2025-09-22 13:26           ` Christian Speich via
2025-09-22 13:30             ` Michael S. Tsirkin
2025-09-22 13:42               ` Christian Speich
2025-09-22 15:14               ` Alex Bennée
2025-09-29  8:12                 ` Christian Speich
2025-09-29  8:22                 ` Daniel P. Berrangé
2025-09-29  8:24                   ` Michael S. Tsirkin
2025-09-29  9:52                     ` Alex Bennée [this message]
2025-09-29 10:07                     ` Daniel P. Berrangé
2025-10-04 17:33                       ` Michael S. Tsirkin
2025-10-09 10:20                         ` Daniel P. Berrangé
2025-10-09 16:49                           ` Alex Bennée
2025-09-22 12:51     ` Alex Bennée
2025-09-22 13:33     ` Christian Speich
2025-09-22 14:38       ` Daniel P. Berrangé

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=874islmvq9.fsf@draig.linaro.org \
    --to=alex.bennee@linaro.org \
    --cc=berrange@redhat.com \
    --cc=c.speich@avm.de \
    --cc=mst@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=sgarzare@redhat.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).