All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: "Paolo Bonzini" <pbonzini@redhat.com>,
	"Sergei Heifetz" <heifetz@yandex-team.com>,
	qemu-devel@nongnu.org,
	"Philippe Mathieu-Daudé" <philmd@linaro.org>,
	"Alex Bennée" <alex.bennee@linaro.org>,
	"Eric Blake" <eblake@redhat.com>,
	"Marc-André Lureau" <marcandre.lureau@redhat.com>,
	"Markus Armbruster" <armbru@redhat.com>,
	"Fabiano Rosas" <farosas@suse.de>,
	"Thomas Huth" <thuth@redhat.com>,
	"Gerd Hoffmann" <kraxel@redhat.com>,
	"Laurent Vivier" <lvivier@redhat.com>
Subject: Re: [PATCH 1/8] audio: add `audio` build option for meson and Kconfig
Date: Tue, 17 Feb 2026 10:14:06 +0000	[thread overview]
Message-ID: <aZQ_bo7SvivJb7Sd@redhat.com> (raw)
In-Reply-To: <CAFEAcA_Q78GwXS0Uia1fFdPoDwkofD4Wr080EkG01gGD-d8Pgg@mail.gmail.com>

On Tue, Feb 17, 2026 at 10:06:19AM +0000, Peter Maydell wrote:
> On Tue, 17 Feb 2026 at 09:42, Paolo Bonzini <pbonzini@redhat.com> wrote:
> >
> > On 2/17/26 10:31, Peter Maydell wrote:
> > > On Tue, 17 Feb 2026 at 05:29, Sergei Heifetz <heifetz@yandex-team.com> wrote:
> > >>
> > >> This patch adds the `audio` option to meson_options.txt. It is
> > >> propagated into Kconfig as AUDIO. It is enabled by default.
> > >> The corresponding `--disable-audio` and `--enable-audio` options
> > >> for `configure` are also added.
> > >>
> > >> For now, this option does nothing. In subsequent patches, it will
> > >> gradually disable audio in different places. The final goal is to stop
> > >> building sources from `audio/` and `hw/audio/` and other audio-related
> > >> files (except for some stubs). Note that this intent is different from
> > >> `-audio none`, which mutes audio but still compiles the audio subsystem.
> > >
> > > Not building audio/ code makes sense, but do we really want to
> > > stop building hw/audio code ? That's the guest facing audio
> > > devices, and if for instance a machine type has an embedded
> > > sound device that would require us to stop compiling that
> > > machine. I think it would be very confusing for users if
> > > --disable-audio meant "we will silently not build half the
> > > Arm boards that have a pl041 in them".
> > >
> > > Maybe it would be better if "--disable-audio" meant "don't build
> > > the audio backends, and everything behaves as if the user
> > > passed -audio none" ?
> >
> > The problem is that "-audio none" uses a silent backend but still keeps
> > all the audio/ code around.  If you prefer to keep the Arm boards
> > around, the solution would be to disable the audio code in the
> > individual pl041 devices with "#ifdef CONFIG_AUDIO", so that the
> > "depends on AUDIO" for pl041 can be removed too.
> 
> This seems weird, though -- why would we put in a lot of ifdefs
> in every single audio device, when we could instead say "if you
> disable audio at build time what you get is something that presents
> the same API as the existing audio backends but does nothing" ?
>
> Also, I think we should be consistent here, not put ifdefs in
> some devices we think are "important" but skip it in others.

If we consider our security boundary guidance, none of these boards
with on-board audio frontends would be considered in scope for
security.

On arm, only the "virt" board is providing a secure deployment, and
that does not require this --disable-audio functionality.

The same applies broadly to other arch targets too, with perhaps the
only exception being the "PC speaker" on x86, and a "none" audio
backend should be sufficient there IMHO.

With regards,
Daniel
-- 
|: https://berrange.com       ~~        https://hachyderm.io/@berrange :|
|: https://libvirt.org          ~~          https://entangle-photo.org :|
|: https://pixelfed.art/berrange   ~~    https://fstop138.berrange.com :|



  reply	other threads:[~2026-02-17 10:15 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-17  5:27 [PATCH 0/8] add build option to disable audio subsystem Sergei Heifetz
2026-02-17  5:27 ` [PATCH 1/8] audio: add `audio` build option for meson and Kconfig Sergei Heifetz
2026-02-17  8:40   ` Thomas Huth
2026-02-18  7:30     ` Sergei Heifetz
2026-02-17  9:31   ` Peter Maydell
2026-02-17  9:42     ` Paolo Bonzini
2026-02-17 10:06       ` Peter Maydell
2026-02-17 10:14         ` Daniel P. Berrangé [this message]
2026-02-18  8:52           ` Sergei Heifetz
2026-02-18 10:50             ` Daniel P. Berrangé
2026-02-18 12:55               ` Vladimir Sementsov-Ogievskiy
2026-02-17 10:16         ` Paolo Bonzini
2026-02-17 10:05     ` Daniel P. Berrangé
2026-02-17  9:44   ` Paolo Bonzini
2026-02-18  7:26     ` Sergei Heifetz
2026-02-17  5:27 ` [PATCH 2/8] ui/vnc: disable audio feature when configured with --disable-audio Sergei Heifetz
2026-02-17  5:27 ` [PATCH 3/8] tests/qtest: remove -audio none " Sergei Heifetz
2026-02-17  9:19   ` Thomas Huth
2026-02-17  5:27 ` [PATCH 4/8] hw/audio/pcspk: change PCSPK behaviour " Sergei Heifetz
2026-02-17  9:14   ` Thomas Huth
2026-02-18  7:36     ` Sergei Heifetz
2026-02-17  9:56   ` Paolo Bonzini
2026-02-18  8:24     ` Sergei Heifetz
2026-02-17  5:27 ` [PATCH 5/8] Kconfig: add AUDIO dependency to audio-related devices Sergei Heifetz
2026-02-17  9:15   ` Thomas Huth
2026-02-17  5:27 ` [PATCH 6/8] system/vl: remove audio and audiodev options when audio is disabled Sergei Heifetz
2026-02-17  5:27 ` [PATCH 7/8] audio: do not build audio-related sources with --disable-audio Sergei Heifetz
2026-02-17  9:49   ` Paolo Bonzini
2026-02-18  9:08     ` Sergei Heifetz
2026-02-17  5:27 ` [PATCH 8/8] meson.build: ignore audio drivers when configured " Sergei Heifetz
2026-02-17  9:58 ` [PATCH 0/8] add build option to disable audio subsystem Marc-André Lureau
2026-02-17 12:16   ` Sergei Heifetz

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=aZQ_bo7SvivJb7Sd@redhat.com \
    --to=berrange@redhat.com \
    --cc=alex.bennee@linaro.org \
    --cc=armbru@redhat.com \
    --cc=eblake@redhat.com \
    --cc=farosas@suse.de \
    --cc=heifetz@yandex-team.com \
    --cc=kraxel@redhat.com \
    --cc=lvivier@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=philmd@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=thuth@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.