From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
Cc: qemu-devel@nongnu.org
Subject: Re: [PATCH 3/3] Socket activation: enable spice listener.
Date: Tue, 1 Jul 2025 10:38:02 +0100 [thread overview]
Message-ID: <aGOsek0xeyXk3G6y@redhat.com> (raw)
In-Reply-To: <20250627180331.1370235-3-dkg@fifthhorseman.net>
On Fri, Jun 27, 2025 at 02:03:31PM -0400, Daniel Kahn Gillmor wrote:
> Enable qemu to be socket-activated based on a spice connection.
>
> Note that this depends on un-deprecating
> spice_server_set_listen_socket_fd, see
> https://gitlab.freedesktop.org/spice/spice/-/merge_requests/240
>
> This partially addresses
> https://gitlab.com/qemu-project/qemu/-/issues/3011
I don't think this is showing the right approach for systemd socket
activation. Spice is rather an odd-ball part of QEMU today that isn't
using modern best practice config design, so what looks simple from a
Spice POV is not aligned with what we need for QEMU.
Historically we've long supported passing pre-opened FDs of any kind
into QEMU at launch time, but we didn't rely on systemd socket
activation. We just passed the FDs in and referenced them numerically
in the config.
At runtime we then also had the ability to pass in pre-opend FDs over
QMP, which we referenced by name.
IMHO for systemd socket activation, we want to introduce the ability
to reference sockets by name at startup, so it is aligned with what
we can do at runtime.
Primarily this comes down to having logic present in the socket_get_fd
method, such that when there is no current monitor, we use the systemd
named sockets.
We should also have logic to validate that we have consumed all
systemd sockets, before we move out of startup phase, in order to
detect config errors. This indicates should we proactively parse
the socket activation env at starutp and record all FDs, and keep
track of which are consumed by the config.
Meanwhile both -vnc and -spice need updating to have their CLI
modelled in QAPI, and use the SocketAdddress struct config, which
would unlock FD passing both with & without systemd socket activation.
And then there are some hard questions about how we integrate this with
the various helper programs like qemu-nbd, and friends, which all
already support systemd socket activation but fail to validate the
names, making it hard to add propert support while retaining back compat.
This is all a major amount of work, which is partly why we've not addressed
this yet, despite it being on the wishlist for years already
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 :|
next prev parent reply other threads:[~2025-07-01 9:39 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-27 18:03 [PATCH 1/3] Socket Activation: stash $LISTEN_FDNAMES Daniel Kahn Gillmor
2025-06-27 18:03 ` [PATCH 2/3] Socket activation: get FD by label Daniel Kahn Gillmor
2025-06-27 18:03 ` [PATCH 3/3] Socket activation: enable spice listener Daniel Kahn Gillmor
2025-07-01 9:38 ` Daniel P. Berrangé [this message]
2025-07-01 18:02 ` Daniel Kahn Gillmor
2025-07-03 9:57 ` Daniel P. Berrangé
2025-06-29 4:03 ` Clean up (v2) of Socket Activation series Daniel Kahn Gillmor
2025-06-29 4:03 ` [PATCH v2 1/3] Socket Activation: stash $LISTEN_FDNAMES Daniel Kahn Gillmor
2025-09-24 19:54 ` Eric Blake
2025-06-29 4:04 ` [PATCH v2 2/3] Socket activation: get FD by label Daniel Kahn Gillmor
2025-09-24 20:55 ` Eric Blake
2025-06-29 4:04 ` [PATCH v2 3/3] Socket activation: enable spice listener Daniel Kahn Gillmor
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=aGOsek0xeyXk3G6y@redhat.com \
--to=berrange@redhat.com \
--cc=dkg@fifthhorseman.net \
--cc=qemu-devel@nongnu.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;
as well as URLs for NNTP newsgroup(s).