On Thu, Sep 08, 2022 at 13:18:19 -0600, Jim Fehlig wrote:
> On 9/8/22 01:52, Peter Krempa wrote:
> > On Wed, Sep 07, 2022 at 15:20:44 -0600, Jim Fehlig wrote:
> > > On 9/6/22 14:42, Jim Fehlig wrote:

[...]

> > In cases where a command line option parser in qemu was implemented via
> > the modern QOM based approach, but at the same time is not runtime
> > configurable or queryable via the monitor it's not possible for libvirt
> > to detect the options.
> > 
> > Historically command line arguments could be queried via
> > 'query-command-line-options' command but that was deemed to be
> > un-extendible and new code is not getting coverage. At the same time
> > libvirt is trying to decrease the reliance on the command to allow
> > deprecation and promote some form of replacement.
> > 
> > We had a similar problem for graphics options, which was side-stepped by
> > implementing 'query-display-options' which in turn exposed all the
> > objects in the QMP schema (query-qmp-schema) which allowed us to detet
> > graphics related functionality.
> > 
> > At this point we e.g. assume that the modern -audiodev is present. For
> > few specific configs we validate that the appropriate graphics protocol
> > is used for the VM but don't validate anything else.
> > 
> > For your specific query, the spice backend for audio is allowed only
> > when spice video is enabled anyways, so the capability you are
> > suggesting does not seem to be that much interesting as the decision can
> > be based on the graphics protocol support.
> 
> IIUC, it is possible to have a qemu installation with spice video support
> but without the audio-spice module. If that is the case, seems we need to
> report the available audio backends in domcaps.

Well, I'd reckon that in most cases this will be "administratively"
solved by simply packaging spice audio together with the graphics
protocol.

Anyways, at this point it doesn't seem to be possible to introspect the
presence of that feature. Luckily the domain capabilities allow tristate
logic reasonably since once qemu adds the introspectability we'll
have to assume that versions which don't allow introspection may support
the audio-spice backend.

Regarding qemu adding introspectability I think it will not be that
straightforward though. Specifically retrofitting it into
query-command-line-options as well as adding a dummy query command
(similarly to 'query-display-options') may be frowned upon [1], and I'm
not sure how the things are with the qapified command option schema.

[1] https://lists.nongnu.org/archive/html/qemu-devel/2018-11/msg05162.html

Reply via email to