[PATCH v7 00/19] single-binary: Make hw/arm/ common

Philippe Mathieu-Daudé posted 19 patches 3 weeks, 2 days ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20251021205741.57109-1-philmd@linaro.org
Maintainers: Pierrick Bouvier <pierrick.bouvier@linaro.org>, "Philippe Mathieu-Daudé" <philmd@linaro.org>, "Cédric Le Goater" <clg@kaod.org>, Peter Maydell <peter.maydell@linaro.org>, Steven Lee <steven_lee@aspeedtech.com>, Troy Lee <leetroy@gmail.com>, Jamin Lin <jamin_lin@aspeedtech.com>, Andrew Jeffery <andrew@codeconstruct.com.au>, Joel Stanley <joel@jms.id.au>, Samuel Tardieu <sam@rfc1149.net>, Beniamino Galvani <b.galvani@gmail.com>, Strahinja Jankovic <strahinja.p.jankovic@gmail.com>, Antony Pavlov <antonynpavlov@gmail.com>, Igor Mitsyanko <i.mitsyanko@gmail.com>, Rob Herring <robh@kernel.org>, Jean-Christophe Dubois <jcd@tribudubois.net>, Bernhard Beschow <shentey@gmail.com>, Andrey Smirnov <andrew.smirnov@gmail.com>, Subbaraya Sundeep <sundeep.lkml@gmail.com>, Jan Kiszka <jan.kiszka@web.de>, Alistair Francis <alistair@alistair23.me>, Tyrone Ting <kfting@nuvoton.com>, Hao Wu <wuhaotsh@google.com>, Felipe Balbi <balbi@kernel.org>, Niek Linnenbank <nieklinnenbank@gmail.com>, Radoslaw Biernacki <rad@semihalf.com>, Leif Lindholm <leif.lindholm@oss.qualcomm.com>, Alexandre Iooss <erdnaxe@crans.org>, Shannon Zhao <shannon.zhaosl@gmail.com>, "Michael S. Tsirkin" <mst@redhat.com>, Igor Mammedov <imammedo@redhat.com>, Ani Sinha <anisinha@redhat.com>, "Edgar E. Iglesias" <edgar.iglesias@gmail.com>, Eduardo Habkost <eduardo@habkost.net>, Marcel Apfelbaum <marcel.apfelbaum@gmail.com>, Yanan Wang <wangyanan55@huawei.com>, Zhao Liu <zhao1.liu@intel.com>, Paolo Bonzini <pbonzini@redhat.com>, "Marc-André Lureau" <marcandre.lureau@redhat.com>, "Daniel P. Berrangé" <berrange@redhat.com>
MAINTAINERS                       |  1 +
meson.build                       | 10 ++++-
include/hw/arm/machines-qom.h     | 46 +++++++++++++++++++
include/qemu/target-info.h        | 21 +++++++++
configs/targets/aarch64-softmmu.c | 26 +++++++++++
configs/targets/arm-softmmu.c     | 26 +++++++++++
hw/arm/aspeed.c                   | 27 ++++++++++-
hw/arm/aspeed_ast27x0-fc.c        |  2 +
hw/arm/b-l475e-iot01a.c           |  2 +
hw/arm/bananapi_m2u.c             |  3 +-
hw/arm/collie.c                   |  2 +
hw/arm/cubieboard.c               |  3 +-
hw/arm/digic_boards.c             |  3 +-
hw/arm/exynos4_boards.c           |  3 ++
hw/arm/fby35.c                    |  2 +
hw/arm/highbank.c                 |  3 ++
hw/arm/imx25_pdk.c                |  3 +-
hw/arm/imx8mp-evk.c               |  4 +-
hw/arm/integratorcp.c             |  3 +-
hw/arm/kzm.c                      |  3 +-
hw/arm/mcimx6ul-evk.c             |  4 +-
hw/arm/mcimx7d-sabre.c            |  4 +-
hw/arm/microbit.c                 |  2 +
hw/arm/mps2-tz.c                  |  5 +++
hw/arm/mps2.c                     |  5 +++
hw/arm/mps3r.c                    |  2 +
hw/arm/msf2-som.c                 |  3 +-
hw/arm/musca.c                    |  3 ++
hw/arm/musicpal.c                 |  3 +-
hw/arm/netduino2.c                |  3 +-
hw/arm/netduinoplus2.c            |  3 +-
hw/arm/npcm7xx_boards.c           |  6 +++
hw/arm/npcm8xx_boards.c           |  2 +
hw/arm/olimex-stm32-h405.c        |  3 +-
hw/arm/omap_sx1.c                 |  3 ++
hw/arm/orangepi.c                 |  3 +-
hw/arm/raspi.c                    |  6 +++
hw/arm/raspi4b.c                  |  2 +
hw/arm/realview.c                 |  5 +++
hw/arm/sabrelite.c                |  3 +-
hw/arm/sbsa-ref.c                 |  3 ++
hw/arm/stellaris.c                |  3 ++
hw/arm/stm32vldiscovery.c         |  3 +-
hw/arm/versatilepb.c              |  3 ++
hw/arm/vexpress.c                 |  3 ++
hw/arm/virt-acpi-build.c          |  1 +
hw/arm/virt.c                     | 74 ++++++++++++++++++-------------
hw/arm/xilinx_zynq.c              |  2 +
hw/arm/xlnx-versal-virt.c         |  3 ++
hw/arm/xlnx-zcu102.c              |  2 +
hw/core/null-machine.c            |  6 ++-
target-info-qom.c                 | 24 ++++++++++
target-info.c                     | 21 +++++++++
target/arm/machine.c              | 18 ++++++++
configs/targets/meson.build       |  5 +++
hw/arm/meson.build                |  8 ++--
56 files changed, 386 insertions(+), 56 deletions(-)
create mode 100644 include/hw/arm/machines-qom.h
create mode 100644 configs/targets/aarch64-softmmu.c
create mode 100644 configs/targets/arm-softmmu.c
create mode 100644 target-info-qom.c
create mode 100644 configs/targets/meson.build
[PATCH v7 00/19] single-binary: Make hw/arm/ common
Posted by Philippe Mathieu-Daudé 3 weeks, 2 days ago
Series fully reviewed.

Since v6:
- Addressed Jan comment
- Removed aspeed/raspi meson patches

Since v5:
- Rebased
- Use Zoltan's patch
- Filter QMP list
- Addressed Richard & Pierrick comments
- qtest/device-introspect-test failing

Since v4:
- Add DEFINE_MACHINE_WITH_INTERFACES (Zoltan)
- Use GPtrArray for get_valid_cpu_type (Richard)
- Define InterfaceInfo[] arrays (Richard)
- Collect R-b tags

Since v3:
- QAPI structure renamed as QemuTargetInfo
- MachineClass::get_valid_cpu_types() runtime
- target_aarch64() checking SysEmuTarget value
- Remove CONFIG_TCG #ifdef'ry in hw/arm/

Since v2:
- More comments from Pierrick addressed
- Use GList to register valid CPUs list
- Remove all TARGET_AARCH64 uses in hw/arm/

Since v1:
- Dropped unrelated / irrelevant patches
- Addressed Pierrick comments
- Added R-b tag
- Only considering machines, not CPUs.

Based-on: <20251021204700.56072-1-philmd@linaro.org>

Available here, based on hw-misc:
https://gitlab.com/philmd/qemu/-/tags/single-binary-hw-arm-rfc-v7

Philippe Mathieu-Daudé (19):
  hw/arm: Register TYPE_TARGET_ARM/AARCH64_MACHINE QOM interfaces
  hw/core: Allow ARM/Aarch64 binaries to use the 'none' machine
  hw/arm: Add DEFINE_MACHINE_ARM() / DEFINE_MACHINE_AARCH64() macros
  hw/arm: Filter machine types for qemu-system-arm/aarch64 binaries
  meson: Prepare to accept per-binary TargetInfo structure
    implementation
  config/target: Implement per-binary TargetInfo structure (ARM,
    AARCH64)
  hw/arm/virt: Register valid CPU types dynamically
  hw/arm/virt: Check accelerator availability at runtime
  qemu/target_info: Add target_arm() helper
  qemu/target_info: Add target_aarch64() helper
  qemu/target_info: Add target_base_arm() helper
  hw/arm/virt: Replace TARGET_AARCH64 -> target_aarch64()
  hw/arm/virt: Get default CPU type at runtime
  hw/arm/sbsa-ref: Include missing 'cpu.h' header
  hw/arm/sbsa-ref: Build only once
  hw/arm/virt-acpi-build: Include missing 'cpu.h' header
  hw/arm/virt-acpi-build: Build only once
  hw/arm/virt: Build only once
  hw/arm/meson: Move Xen files to arm_common_ss[]

 MAINTAINERS                       |  1 +
 meson.build                       | 10 ++++-
 include/hw/arm/machines-qom.h     | 46 +++++++++++++++++++
 include/qemu/target-info.h        | 21 +++++++++
 configs/targets/aarch64-softmmu.c | 26 +++++++++++
 configs/targets/arm-softmmu.c     | 26 +++++++++++
 hw/arm/aspeed.c                   | 27 ++++++++++-
 hw/arm/aspeed_ast27x0-fc.c        |  2 +
 hw/arm/b-l475e-iot01a.c           |  2 +
 hw/arm/bananapi_m2u.c             |  3 +-
 hw/arm/collie.c                   |  2 +
 hw/arm/cubieboard.c               |  3 +-
 hw/arm/digic_boards.c             |  3 +-
 hw/arm/exynos4_boards.c           |  3 ++
 hw/arm/fby35.c                    |  2 +
 hw/arm/highbank.c                 |  3 ++
 hw/arm/imx25_pdk.c                |  3 +-
 hw/arm/imx8mp-evk.c               |  4 +-
 hw/arm/integratorcp.c             |  3 +-
 hw/arm/kzm.c                      |  3 +-
 hw/arm/mcimx6ul-evk.c             |  4 +-
 hw/arm/mcimx7d-sabre.c            |  4 +-
 hw/arm/microbit.c                 |  2 +
 hw/arm/mps2-tz.c                  |  5 +++
 hw/arm/mps2.c                     |  5 +++
 hw/arm/mps3r.c                    |  2 +
 hw/arm/msf2-som.c                 |  3 +-
 hw/arm/musca.c                    |  3 ++
 hw/arm/musicpal.c                 |  3 +-
 hw/arm/netduino2.c                |  3 +-
 hw/arm/netduinoplus2.c            |  3 +-
 hw/arm/npcm7xx_boards.c           |  6 +++
 hw/arm/npcm8xx_boards.c           |  2 +
 hw/arm/olimex-stm32-h405.c        |  3 +-
 hw/arm/omap_sx1.c                 |  3 ++
 hw/arm/orangepi.c                 |  3 +-
 hw/arm/raspi.c                    |  6 +++
 hw/arm/raspi4b.c                  |  2 +
 hw/arm/realview.c                 |  5 +++
 hw/arm/sabrelite.c                |  3 +-
 hw/arm/sbsa-ref.c                 |  3 ++
 hw/arm/stellaris.c                |  3 ++
 hw/arm/stm32vldiscovery.c         |  3 +-
 hw/arm/versatilepb.c              |  3 ++
 hw/arm/vexpress.c                 |  3 ++
 hw/arm/virt-acpi-build.c          |  1 +
 hw/arm/virt.c                     | 74 ++++++++++++++++++-------------
 hw/arm/xilinx_zynq.c              |  2 +
 hw/arm/xlnx-versal-virt.c         |  3 ++
 hw/arm/xlnx-zcu102.c              |  2 +
 hw/core/null-machine.c            |  6 ++-
 target-info-qom.c                 | 24 ++++++++++
 target-info.c                     | 21 +++++++++
 target/arm/machine.c              | 18 ++++++++
 configs/targets/meson.build       |  5 +++
 hw/arm/meson.build                |  8 ++--
 56 files changed, 386 insertions(+), 56 deletions(-)
 create mode 100644 include/hw/arm/machines-qom.h
 create mode 100644 configs/targets/aarch64-softmmu.c
 create mode 100644 configs/targets/arm-softmmu.c
 create mode 100644 target-info-qom.c
 create mode 100644 configs/targets/meson.build

-- 
2.51.0


Re: [PATCH v7 00/19] single-binary: Make hw/arm/ common
Posted by Peter Maydell 3 weeks, 2 days ago
On Tue, 21 Oct 2025 at 21:57, Philippe Mathieu-Daudé <philmd@linaro.org> wrote:
>
> Series fully reviewed.
>
> Since v6:
> - Addressed Jan comment
> - Removed aspeed/raspi meson patches

I'm assuming you'll take this via your own tree like the
other single-binary stuff -- let me know if you want me
to take it into target-arm instead.

-- PMM
Re: [PATCH v7 00/19] single-binary: Make hw/arm/ common
Posted by Philippe Mathieu-Daudé 3 weeks, 2 days ago
On 22/10/25 13:50, Peter Maydell wrote:
> On Tue, 21 Oct 2025 at 21:57, Philippe Mathieu-Daudé <philmd@linaro.org> wrote:
>>
>> Series fully reviewed.
>>
>> Since v6:
>> - Addressed Jan comment
>> - Removed aspeed/raspi meson patches
> 
> I'm assuming you'll take this via your own tree like the
> other single-binary stuff -- let me know if you want me
> to take it into target-arm instead.

Since most files are hw/arm/ related, I tried to get it fully reviewed
before the last Tuesday before soft freeze so you could queue it;
however it is based on my hw-misc-20251021 pull request, which isn't
yet merged. I'm happy to merge myself, but would you mind to provide
your Acked-by tag?

Thanks,

Phil.

Re: [PATCH v7 00/19] single-binary: Make hw/arm/ common
Posted by Peter Maydell 3 weeks, 1 day ago
On Wed, 22 Oct 2025 at 15:03, Philippe Mathieu-Daudé <philmd@linaro.org> wrote:
>
> On 22/10/25 13:50, Peter Maydell wrote:
> > On Tue, 21 Oct 2025 at 21:57, Philippe Mathieu-Daudé <philmd@linaro.org> wrote:
> >>
> >> Series fully reviewed.
> >>
> >> Since v6:
> >> - Addressed Jan comment
> >> - Removed aspeed/raspi meson patches
> >
> > I'm assuming you'll take this via your own tree like the
> > other single-binary stuff -- let me know if you want me
> > to take it into target-arm instead.
>
> Since most files are hw/arm/ related, I tried to get it fully reviewed
> before the last Tuesday before soft freeze so you could queue it;
> however it is based on my hw-misc-20251021 pull request, which isn't
> yet merged. I'm happy to merge myself, but would you mind to provide
> your Acked-by tag?

Sure:

Acked-by: Peter Maydell <peter.maydell@linaro.org>

-- PMM
Re: [PATCH v7 00/19] single-binary: Make hw/arm/ common
Posted by Philippe Mathieu-Daudé 2 weeks, 1 day ago
On 23/10/25 14:16, Peter Maydell wrote:
> On Wed, 22 Oct 2025 at 15:03, Philippe Mathieu-Daudé <philmd@linaro.org> wrote:
>>
>> On 22/10/25 13:50, Peter Maydell wrote:
>>> On Tue, 21 Oct 2025 at 21:57, Philippe Mathieu-Daudé <philmd@linaro.org> wrote:
>>>>
>>>> Series fully reviewed.
>>>>
>>>> Since v6:
>>>> - Addressed Jan comment
>>>> - Removed aspeed/raspi meson patches
>>>
>>> I'm assuming you'll take this via your own tree like the
>>> other single-binary stuff -- let me know if you want me
>>> to take it into target-arm instead.
>>
>> Since most files are hw/arm/ related, I tried to get it fully reviewed
>> before the last Tuesday before soft freeze so you could queue it;
>> however it is based on my hw-misc-20251021 pull request, which isn't
>> yet merged. I'm happy to merge myself, but would you mind to provide
>> your Acked-by tag?
> 
> Sure:
> 
> Acked-by: Peter Maydell <peter.maydell@linaro.org>

Thanks! Series queued.