[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC QEMU PATCH] ui: Make the DisplayType enum entries conditional
From: |
Daniel P . Berrangé |
Subject: |
Re: [RFC QEMU PATCH] ui: Make the DisplayType enum entries conditional |
Date: |
Wed, 9 Jun 2021 12:53:46 +0100 |
User-agent: |
Mutt/2.0.7 (2021-05-04) |
On Wed, Jun 09, 2021 at 01:49:21PM +0200, Gerd Hoffmann wrote:
> On Wed, Jun 09, 2021 at 12:29:58PM +0100, Daniel P. Berrangé wrote:
> > On Wed, Jun 09, 2021 at 01:24:05PM +0200, Gerd Hoffmann wrote:
> > > On Wed, Jun 09, 2021 at 12:02:40PM +0200, Thomas Huth wrote:
> > > > Libvirt's "domcapabilities" command has a way to state whether
> > > > certain graphic frontends are available in QEMU or not. Originally,
> > > > libvirt looked at the "--help" output of the QEMU binary to determine
> > > > whether SDL was available or not (by looking for the "-sdl" parameter
> > > > in the help text), but since libvirt stopped doing this analysis of
> > > > the help text, the detection of SDL is currently broken, see:
> > > >
> > > > https://bugzilla.redhat.com/show_bug.cgi?id=1790902
> > > >
> > > > QEMU should provide a way via the QMP interface instead. The simplest
> > > > way, without introducing additional commands, is to make the DisplayType
> > > > enum entries conditional, so that the enum only contains the entries if
> > > > the corresponding CONFIG_xxx switches have been set.
> > >
> > > Hmm, that'll break for the "dnf remove qemu-ui-sdl" case ...
> >
> > Note tht libvirt invalidates its cache of QEMU capabilities when it
> > sees the /usr/lib64/qemu directory timestamp change. So it ought to
> > pick up changes caused by installing/removing QEMU modules, and apply
> > this to future queries for domcapabilities, or when starting future
> > QEMU guests.
>
> That'll work fine for modules implementing qom objects / devices,
> because the list of available objects changes accordingly and libvirt
> can see that.
>
> The #if CONFIG_SDL approach will not work because qemu will continue to
> report sdl as supported even when the sdl module is not installed any
> more.
Ah see what you mean now. So libvirt can't merely query members of
the DisplayType enum. We need an actual 'query-display-types' command
that returns an array of DisplayType values corresponding to what is
actually built-in or available as a module at that instant.
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 :|
- [RFC QEMU PATCH] ui: Make the DisplayType enum entries conditional, Thomas Huth, 2021/06/09
- Re: [RFC QEMU PATCH] ui: Make the DisplayType enum entries conditional, Gerd Hoffmann, 2021/06/09
- Re: [RFC QEMU PATCH] ui: Make the DisplayType enum entries conditional, Daniel P . Berrangé, 2021/06/09
- Re: [RFC QEMU PATCH] ui: Make the DisplayType enum entries conditional, Gerd Hoffmann, 2021/06/09
- Re: [RFC QEMU PATCH] ui: Make the DisplayType enum entries conditional,
Daniel P . Berrangé <=
- Re: [RFC QEMU PATCH] ui: Make the DisplayType enum entries conditional, Thomas Huth, 2021/06/09
- Re: [RFC QEMU PATCH] ui: Make the DisplayType enum entries conditional, Gerd Hoffmann, 2021/06/09
- Re: [RFC QEMU PATCH] ui: Make the DisplayType enum entries conditional, Markus Armbruster, 2021/06/10
- Re: [RFC QEMU PATCH] ui: Make the DisplayType enum entries conditional, Thomas Huth, 2021/06/10
Re: [RFC QEMU PATCH] ui: Make the DisplayType enum entries conditional, Markus Armbruster, 2021/06/09
Re: [RFC QEMU PATCH] ui: Make the DisplayType enum entries conditional, Markus Armbruster, 2021/06/09