[PATCH 00/22] configs: switch boards to "default y"

Paolo Bonzini posted 22 patches 1 week, 3 days ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20240423131612.28362-1-pbonzini@redhat.com
Maintainers: Michael Rolnik <mrolnik@gmail.com>, Richard Henderson <richard.henderson@linaro.org>, Helge Deller <deller@gmx.de>, Paolo Bonzini <pbonzini@redhat.com>, Song Gao <gaosong@loongson.cn>, "Philippe Mathieu-Daudé" <philmd@linaro.org>, Chris Wulff <crwulff@gmail.com>, Marek Vasut <marex@denx.de>, Thomas Huth <thuth@redhat.com>, Halil Pasic <pasic@linux.ibm.com>, Christian Borntraeger <borntraeger@linux.ibm.com>, Eric Farman <farman@linux.ibm.com>, Max Filippov <jcmvbkbc@gmail.com>, Peter Maydell <peter.maydell@linaro.org>, "Edgar E. Iglesias" <edgar.iglesias@gmail.com>, "Michael S. Tsirkin" <mst@redhat.com>, Marcel Apfelbaum <marcel.apfelbaum@gmail.com>, Eduardo Habkost <eduardo@habkost.net>, Stafford Horne <shorne@gmail.com>, Palmer Dabbelt <palmer@dabbelt.com>, Alistair Francis <alistair.francis@wdc.com>, Bin Meng <bin.meng@windriver.com>, Weiwei Li <liwei1518@gmail.com>, Daniel Henrique Barboza <dbarboza@ventanamicro.com>, Liu Zhiwei <zhiwei_liu@linux.alibaba.com>, Yoshinori Sato <ysato@users.sourceforge.jp>, David Hildenbrand <david@redhat.com>, Ilya Leoshkevich <iii@linux.ibm.com>, Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>, Artyom Tarasenko <atar4qemu@gmail.com>, Bastian Koppelmann <kbastian@mail.uni-paderborn.de>, "Marc-André Lureau" <marcandre.lureau@redhat.com>, "Daniel P. Berrangé" <berrange@redhat.com>, Nicholas Piggin <npiggin@gmail.com>
configs/devices/alpha-softmmu/default.mak     |  5 ++--
configs/devices/arm-softmmu/default.mak       |  5 +++-
configs/devices/avr-softmmu/default.mak       |  5 ++--
configs/devices/cris-softmmu/default.mak      |  5 ++--
configs/devices/hppa-softmmu/default.mak      |  5 ++--
configs/devices/i386-softmmu/default.mak      | 11 ++++---
.../devices/loongarch64-softmmu/default.mak   |  6 +++-
configs/devices/m68k-softmmu/default.mak      | 13 ++++----
.../devices/microblaze-softmmu/default.mak    |  9 +++---
configs/devices/mips-softmmu/common.mak       |  5 ++--
configs/devices/mips64-softmmu/default.mak    |  4 ++-
configs/devices/mips64el-softmmu/default.mak  | 10 ++++---
configs/devices/nios2-softmmu/default.mak     |  7 ++---
configs/devices/or1k-softmmu/default.mak      |  9 ++++--
configs/devices/ppc-softmmu/default.mak       | 30 +++++++++++--------
configs/devices/ppc64-softmmu/default.mak     |  8 ++---
configs/devices/riscv32-softmmu/default.mak   | 17 +++++------
configs/devices/riscv64-softmmu/default.mak   | 19 ++++++------
configs/devices/rx-softmmu/default.mak        |  3 +-
configs/devices/s390x-softmmu/default.mak     |  5 ++--
configs/devices/sh4-softmmu/default.mak       |  7 ++---
configs/devices/sparc-softmmu/default.mak     |  7 ++---
configs/devices/sparc64-softmmu/default.mak   |  7 ++---
configs/devices/tricore-softmmu/default.mak   |  7 +++--
configs/devices/xtensa-softmmu/default.mak    | 11 ++++---
meson.build                                   | 12 ++++----
hw/alpha/Kconfig                              |  2 ++
hw/arm/Kconfig                                |  2 ++
hw/avr/Kconfig                                |  3 ++
hw/cris/Kconfig                               |  2 ++
hw/hppa/Kconfig                               |  2 ++
hw/i386/Kconfig                               | 10 ++++++-
hw/loongarch/Kconfig                          |  2 ++
hw/m68k/Kconfig                               | 10 +++++++
hw/microblaze/Kconfig                         |  6 ++++
hw/mips/Kconfig                               | 12 ++++++++
hw/nios2/Kconfig                              |  9 +++---
hw/openrisc/Kconfig                           |  4 +++
hw/ppc/Kconfig                                | 26 ++++++++++++++++
hw/riscv/Kconfig                              | 14 +++++++++
hw/rx/Kconfig                                 |  2 ++
hw/s390x/Kconfig                              |  2 ++
hw/sh4/Kconfig                                |  4 +++
hw/sparc/Kconfig                              |  4 +++
hw/sparc64/Kconfig                            |  4 +++
hw/tricore/Kconfig                            |  4 +++
hw/xtensa/Kconfig                             |  6 ++++
target/Kconfig                                |  3 ++
target/i386/Kconfig                           |  1 +
target/ppc/Kconfig                            |  1 +
50 files changed, 252 insertions(+), 115 deletions(-)
[PATCH 00/22] configs: switch boards to "default y"
Posted by Paolo Bonzini 1 week, 3 days ago
Some boards, notably ARM boards that use TCG, are already using
"default y".  This was done to remove TCG-only boards from
a KVM-only build in commit 29d9efca16 (2023-04-26).

This series converts all other boards to that, so that the requirements
of each board are clearer in the Kconfig files.

For now, the only such use is MIPS's 64-bit and endianness requirements.
In the future, it will be possible to enable/disable boards based
on the presence of required libraries, for example libfdt, or
their deprecation status.

There is an important difference in that Kconfig symbols for boards
have to be enabled in a --without-default-devices build, similar to
devices.

Paolo

Paolo Bonzini (22):
  configs: list "implied" device groups in the default configs
  alpha: switch boards to "default y"
  arm: switch boards to "default y"
  avr: switch boards to "default y"
  cris: switch boards to "default y"
  hppa: switch boards to "default y"
  i386: switch boards to "default y"
  loongarch: switch boards to "default y"
  m68k: switch boards to "default y"
  microblaze: switch boards to "default y"
  meson: make target endianneess available to Kconfig
  mips: switch boards to "default y"
  nios2: switch boards to "default y"
  openrisc: switch boards to "default y"
  ppc: switch boards to "default y"
  riscv: switch boards to "default y"
  rx: switch boards to "default y"
  s390x: switch boards to "default y"
  sh4: switch boards to "default y"
  sparc: switch boards to "default y"
  tricore: switch boards to "default y"
  xtensa: switch boards to "default y"

 configs/devices/alpha-softmmu/default.mak     |  5 ++--
 configs/devices/arm-softmmu/default.mak       |  5 +++-
 configs/devices/avr-softmmu/default.mak       |  5 ++--
 configs/devices/cris-softmmu/default.mak      |  5 ++--
 configs/devices/hppa-softmmu/default.mak      |  5 ++--
 configs/devices/i386-softmmu/default.mak      | 11 ++++---
 .../devices/loongarch64-softmmu/default.mak   |  6 +++-
 configs/devices/m68k-softmmu/default.mak      | 13 ++++----
 .../devices/microblaze-softmmu/default.mak    |  9 +++---
 configs/devices/mips-softmmu/common.mak       |  5 ++--
 configs/devices/mips64-softmmu/default.mak    |  4 ++-
 configs/devices/mips64el-softmmu/default.mak  | 10 ++++---
 configs/devices/nios2-softmmu/default.mak     |  7 ++---
 configs/devices/or1k-softmmu/default.mak      |  9 ++++--
 configs/devices/ppc-softmmu/default.mak       | 30 +++++++++++--------
 configs/devices/ppc64-softmmu/default.mak     |  8 ++---
 configs/devices/riscv32-softmmu/default.mak   | 17 +++++------
 configs/devices/riscv64-softmmu/default.mak   | 19 ++++++------
 configs/devices/rx-softmmu/default.mak        |  3 +-
 configs/devices/s390x-softmmu/default.mak     |  5 ++--
 configs/devices/sh4-softmmu/default.mak       |  7 ++---
 configs/devices/sparc-softmmu/default.mak     |  7 ++---
 configs/devices/sparc64-softmmu/default.mak   |  7 ++---
 configs/devices/tricore-softmmu/default.mak   |  7 +++--
 configs/devices/xtensa-softmmu/default.mak    | 11 ++++---
 meson.build                                   | 12 ++++----
 hw/alpha/Kconfig                              |  2 ++
 hw/arm/Kconfig                                |  2 ++
 hw/avr/Kconfig                                |  3 ++
 hw/cris/Kconfig                               |  2 ++
 hw/hppa/Kconfig                               |  2 ++
 hw/i386/Kconfig                               | 10 ++++++-
 hw/loongarch/Kconfig                          |  2 ++
 hw/m68k/Kconfig                               | 10 +++++++
 hw/microblaze/Kconfig                         |  6 ++++
 hw/mips/Kconfig                               | 12 ++++++++
 hw/nios2/Kconfig                              |  9 +++---
 hw/openrisc/Kconfig                           |  4 +++
 hw/ppc/Kconfig                                | 26 ++++++++++++++++
 hw/riscv/Kconfig                              | 14 +++++++++
 hw/rx/Kconfig                                 |  2 ++
 hw/s390x/Kconfig                              |  2 ++
 hw/sh4/Kconfig                                |  4 +++
 hw/sparc/Kconfig                              |  4 +++
 hw/sparc64/Kconfig                            |  4 +++
 hw/tricore/Kconfig                            |  4 +++
 hw/xtensa/Kconfig                             |  6 ++++
 target/Kconfig                                |  3 ++
 target/i386/Kconfig                           |  1 +
 target/ppc/Kconfig                            |  1 +
 50 files changed, 252 insertions(+), 115 deletions(-)

-- 
2.44.0
Re: [PATCH 00/22] configs: switch boards to "default y"
Posted by Fabiano Rosas 1 week, 3 days ago
Paolo Bonzini <pbonzini@redhat.com> writes:

> Some boards, notably ARM boards that use TCG, are already using
> "default y".  This was done to remove TCG-only boards from
> a KVM-only build in commit 29d9efca16 (2023-04-26).
>
> This series converts all other boards to that, so that the requirements
> of each board are clearer in the Kconfig files.
>
> For now, the only such use is MIPS's 64-bit and endianness requirements.
> In the future, it will be possible to enable/disable boards based
> on the presence of required libraries, for example libfdt, or
> their deprecation status.
>
> There is an important difference in that Kconfig symbols for boards
> have to be enabled in a --without-default-devices build, similar to
> devices.

And how do we make that happen?

>
> Paolo
>
> Paolo Bonzini (22):
>   configs: list "implied" device groups in the default configs
>   alpha: switch boards to "default y"
>   arm: switch boards to "default y"
>   avr: switch boards to "default y"
>   cris: switch boards to "default y"
>   hppa: switch boards to "default y"
>   i386: switch boards to "default y"
>   loongarch: switch boards to "default y"
>   m68k: switch boards to "default y"
>   microblaze: switch boards to "default y"
>   meson: make target endianneess available to Kconfig
>   mips: switch boards to "default y"
>   nios2: switch boards to "default y"
>   openrisc: switch boards to "default y"
>   ppc: switch boards to "default y"
>   riscv: switch boards to "default y"
>   rx: switch boards to "default y"
>   s390x: switch boards to "default y"
>   sh4: switch boards to "default y"
>   sparc: switch boards to "default y"
>   tricore: switch boards to "default y"
>   xtensa: switch boards to "default y"
>
>  configs/devices/alpha-softmmu/default.mak     |  5 ++--
>  configs/devices/arm-softmmu/default.mak       |  5 +++-
>  configs/devices/avr-softmmu/default.mak       |  5 ++--
>  configs/devices/cris-softmmu/default.mak      |  5 ++--
>  configs/devices/hppa-softmmu/default.mak      |  5 ++--
>  configs/devices/i386-softmmu/default.mak      | 11 ++++---
>  .../devices/loongarch64-softmmu/default.mak   |  6 +++-
>  configs/devices/m68k-softmmu/default.mak      | 13 ++++----
>  .../devices/microblaze-softmmu/default.mak    |  9 +++---
>  configs/devices/mips-softmmu/common.mak       |  5 ++--
>  configs/devices/mips64-softmmu/default.mak    |  4 ++-
>  configs/devices/mips64el-softmmu/default.mak  | 10 ++++---
>  configs/devices/nios2-softmmu/default.mak     |  7 ++---
>  configs/devices/or1k-softmmu/default.mak      |  9 ++++--
>  configs/devices/ppc-softmmu/default.mak       | 30 +++++++++++--------
>  configs/devices/ppc64-softmmu/default.mak     |  8 ++---
>  configs/devices/riscv32-softmmu/default.mak   | 17 +++++------
>  configs/devices/riscv64-softmmu/default.mak   | 19 ++++++------
>  configs/devices/rx-softmmu/default.mak        |  3 +-
>  configs/devices/s390x-softmmu/default.mak     |  5 ++--
>  configs/devices/sh4-softmmu/default.mak       |  7 ++---
>  configs/devices/sparc-softmmu/default.mak     |  7 ++---
>  configs/devices/sparc64-softmmu/default.mak   |  7 ++---
>  configs/devices/tricore-softmmu/default.mak   |  7 +++--
>  configs/devices/xtensa-softmmu/default.mak    | 11 ++++---
>  meson.build                                   | 12 ++++----
>  hw/alpha/Kconfig                              |  2 ++
>  hw/arm/Kconfig                                |  2 ++
>  hw/avr/Kconfig                                |  3 ++
>  hw/cris/Kconfig                               |  2 ++
>  hw/hppa/Kconfig                               |  2 ++
>  hw/i386/Kconfig                               | 10 ++++++-
>  hw/loongarch/Kconfig                          |  2 ++
>  hw/m68k/Kconfig                               | 10 +++++++
>  hw/microblaze/Kconfig                         |  6 ++++
>  hw/mips/Kconfig                               | 12 ++++++++
>  hw/nios2/Kconfig                              |  9 +++---
>  hw/openrisc/Kconfig                           |  4 +++
>  hw/ppc/Kconfig                                | 26 ++++++++++++++++
>  hw/riscv/Kconfig                              | 14 +++++++++
>  hw/rx/Kconfig                                 |  2 ++
>  hw/s390x/Kconfig                              |  2 ++
>  hw/sh4/Kconfig                                |  4 +++
>  hw/sparc/Kconfig                              |  4 +++
>  hw/sparc64/Kconfig                            |  4 +++
>  hw/tricore/Kconfig                            |  4 +++
>  hw/xtensa/Kconfig                             |  6 ++++
>  target/Kconfig                                |  3 ++
>  target/i386/Kconfig                           |  1 +
>  target/ppc/Kconfig                            |  1 +
>  50 files changed, 252 insertions(+), 115 deletions(-)
Re: [PATCH 00/22] configs: switch boards to "default y"
Posted by Paolo Bonzini 1 week, 3 days ago
Il mar 23 apr 2024, 19:57 Fabiano Rosas <farosas@suse.de> ha scritto:

> > There is an important difference in that Kconfig symbols for boards
> > have to be enabled in a --without-default-devices build, similar to
> > devices.
>
> And how do we make that happen?
>

Before building you edit configs/devices/ to set e.g. CONFIG_ARM_VIRT=y,
just like you did in order to enable devices.

Paolo


> >
> > Paolo
> >
> > Paolo Bonzini (22):
> >   configs: list "implied" device groups in the default configs
> >   alpha: switch boards to "default y"
> >   arm: switch boards to "default y"
> >   avr: switch boards to "default y"
> >   cris: switch boards to "default y"
> >   hppa: switch boards to "default y"
> >   i386: switch boards to "default y"
> >   loongarch: switch boards to "default y"
> >   m68k: switch boards to "default y"
> >   microblaze: switch boards to "default y"
> >   meson: make target endianneess available to Kconfig
> >   mips: switch boards to "default y"
> >   nios2: switch boards to "default y"
> >   openrisc: switch boards to "default y"
> >   ppc: switch boards to "default y"
> >   riscv: switch boards to "default y"
> >   rx: switch boards to "default y"
> >   s390x: switch boards to "default y"
> >   sh4: switch boards to "default y"
> >   sparc: switch boards to "default y"
> >   tricore: switch boards to "default y"
> >   xtensa: switch boards to "default y"
> >
> >  configs/devices/alpha-softmmu/default.mak     |  5 ++--
> >  configs/devices/arm-softmmu/default.mak       |  5 +++-
> >  configs/devices/avr-softmmu/default.mak       |  5 ++--
> >  configs/devices/cris-softmmu/default.mak      |  5 ++--
> >  configs/devices/hppa-softmmu/default.mak      |  5 ++--
> >  configs/devices/i386-softmmu/default.mak      | 11 ++++---
> >  .../devices/loongarch64-softmmu/default.mak   |  6 +++-
> >  configs/devices/m68k-softmmu/default.mak      | 13 ++++----
> >  .../devices/microblaze-softmmu/default.mak    |  9 +++---
> >  configs/devices/mips-softmmu/common.mak       |  5 ++--
> >  configs/devices/mips64-softmmu/default.mak    |  4 ++-
> >  configs/devices/mips64el-softmmu/default.mak  | 10 ++++---
> >  configs/devices/nios2-softmmu/default.mak     |  7 ++---
> >  configs/devices/or1k-softmmu/default.mak      |  9 ++++--
> >  configs/devices/ppc-softmmu/default.mak       | 30 +++++++++++--------
> >  configs/devices/ppc64-softmmu/default.mak     |  8 ++---
> >  configs/devices/riscv32-softmmu/default.mak   | 17 +++++------
> >  configs/devices/riscv64-softmmu/default.mak   | 19 ++++++------
> >  configs/devices/rx-softmmu/default.mak        |  3 +-
> >  configs/devices/s390x-softmmu/default.mak     |  5 ++--
> >  configs/devices/sh4-softmmu/default.mak       |  7 ++---
> >  configs/devices/sparc-softmmu/default.mak     |  7 ++---
> >  configs/devices/sparc64-softmmu/default.mak   |  7 ++---
> >  configs/devices/tricore-softmmu/default.mak   |  7 +++--
> >  configs/devices/xtensa-softmmu/default.mak    | 11 ++++---
> >  meson.build                                   | 12 ++++----
> >  hw/alpha/Kconfig                              |  2 ++
> >  hw/arm/Kconfig                                |  2 ++
> >  hw/avr/Kconfig                                |  3 ++
> >  hw/cris/Kconfig                               |  2 ++
> >  hw/hppa/Kconfig                               |  2 ++
> >  hw/i386/Kconfig                               | 10 ++++++-
> >  hw/loongarch/Kconfig                          |  2 ++
> >  hw/m68k/Kconfig                               | 10 +++++++
> >  hw/microblaze/Kconfig                         |  6 ++++
> >  hw/mips/Kconfig                               | 12 ++++++++
> >  hw/nios2/Kconfig                              |  9 +++---
> >  hw/openrisc/Kconfig                           |  4 +++
> >  hw/ppc/Kconfig                                | 26 ++++++++++++++++
> >  hw/riscv/Kconfig                              | 14 +++++++++
> >  hw/rx/Kconfig                                 |  2 ++
> >  hw/s390x/Kconfig                              |  2 ++
> >  hw/sh4/Kconfig                                |  4 +++
> >  hw/sparc/Kconfig                              |  4 +++
> >  hw/sparc64/Kconfig                            |  4 +++
> >  hw/tricore/Kconfig                            |  4 +++
> >  hw/xtensa/Kconfig                             |  6 ++++
> >  target/Kconfig                                |  3 ++
> >  target/i386/Kconfig                           |  1 +
> >  target/ppc/Kconfig                            |  1 +
> >  50 files changed, 252 insertions(+), 115 deletions(-)
>
>
Re: [PATCH 00/22] configs: switch boards to "default y"
Posted by Paolo Bonzini 1 day ago
On Tue, Apr 23, 2024 at 3:16 PM Paolo Bonzini <pbonzini@redhat.com> wrote:
>
> Some boards, notably ARM boards that use TCG, are already using
> "default y".  This was done to remove TCG-only boards from
> a KVM-only build in commit 29d9efca16 (2023-04-26).
>
> This series converts all other boards to that, so that the requirements
> of each board are clearer in the Kconfig files.
>
> For now, the only such use is MIPS's 64-bit and endianness requirements.
> In the future, it will be possible to enable/disable boards based
> on the presence of required libraries, for example libfdt, or
> their deprecation status.
>
> There is an important difference in that Kconfig symbols for boards
> have to be enabled in a --without-default-devices build, similar to
> devices.

Running CI shows that some targets now pass build-without-defaults and
some don't.

I'm going to squash in changes to each individual patch, resulting in
the following diff:

diff --git a/.gitlab-ci.d/buildtest.yml b/.gitlab-ci.d/buildtest.yml
index 6394b8f41e4..e9402a68a79 100644
--- a/.gitlab-ci.d/buildtest.yml
+++ b/.gitlab-ci.d/buildtest.yml
@@ -648,6 +648,9 @@ build-tci:
     - make check-tcg

 # Check our reduced build configurations
+# requires libfdt: aarch64, arm, i386, loongarch64, microblaze, microblazeel,
+#   mips64el, or1k, ppc, ppc64, riscv32, riscv64, rx, x86_64
+# does not build without boards: i386, loongarch64, s390x, sh4, sh4eb, x86_64
 build-without-defaults:
   extends: .native_build_job_template
   needs:
@@ -661,8 +664,10 @@ build-without-defaults:
       --disable-pie
       --disable-qom-cast-debug
       --disable-strip
-    TARGETS: avr-softmmu s390x-softmmu sh4-softmmu
-      sparc64-softmmu hexagon-linux-user i386-linux-user s390x-linux-user
+    TARGETS: alpha-softmmu avr-softmmu cris-softmmu hppa-softmmu m68k-softmmu
+      mips-softmmu mips64-softmmu mipsel-softmmu sparc-softmmu
+      sparc64-softmmu tricore-softmmu xtensa-softmmu xtensaeb-softmmu
+      hexagon-linux-user i386-linux-user s390x-linux-user
     MAKE_CHECK_ARGS: check

 build-libvhost-user:

Let me know if you'd prefer me to post a v2.

Paolo