All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Henrique Barboza <daniel.barboza@oss.qualcomm.com>
To: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>,
	luoyonggang@gmail.com
Cc: qemu-devel@nongnu.org,
	"Philippe Mathieu-Daudé" <philmd@oss.qualcomm.com>,
	"Nicholas Piggin" <npiggin@gmail.com>,
	"Bernhard Beschow" <shentey@gmail.com>,
	"Anton Johansson" <anjo@rev.ng>,
	"Alistair Francis" <alistair@alistair23.me>,
	"Peter Maydell" <peter.maydell@linaro.org>,
	"Alistair Francis" <alistair.francis@wdc.com>
Subject: Re: [PATCH 00/27] single-binary: implement dynamic filtering for machine types
Date: Thu, 6 Aug 2026 17:29:05 -0300	[thread overview]
Message-ID: <628f6692-7e03-423c-a6e3-b2c115350d30@oss.qualcomm.com> (raw)
In-Reply-To: <8726ffd9-542c-42b7-b95d-b872ba6b21ea@oss.qualcomm.com>



On 8/5/2026 1:20 PM, Pierrick Bouvier wrote:
> On 8/5/2026 6:30 AM, Yonggang Luo wrote:
>>
>>
>> On Fri, Jul 31, 2026 at 1:34 AM Pierrick Bouvier
>> <pierrick.bouvier@oss.qualcomm.com
>> <mailto:pierrick.bouvier@oss.qualcomm.com>> wrote:
>>>
>>> On 7/23/2026 5:09 PM, Pierrick Bouvier wrote:
>>>> Now that we can link a single-binary with at least two targets (arm,
>> aarch64),
>>>> we want to make sure that we expose the same set of machines (later
>> devices and
>>>> cpus) than target binaries. For that, we implemented a static
>> filtering based on
>>>> target interfaces that each machine will implement to declare which
>> targets have
>>>> this machine.
>>>>
>>>> However, we discovered that this static filtering is not enough.
>> Indeed, some
>>>> machines and devices do not depend only on target, and their
>> presence can depend
>>>> on Kconfig or host/target combination. Thus, our static approach
>> can't work, and
>>>> we need something more flexible.
>>>>
>>>> This series adds a new TYPE_TARGET_SPECIFIC, that declare a single
>> function
>>>> bool is_available(void). From there, any machine type (and later
>> devices and
>>>> cpus) can implement it to override their presence for each target.
>>>> We first replace the existing static mechanism with this, and once
>> done, we
>>>> cleanup all the old interface. One nice benefit is that we can get
>> rid of
>>>> config/targets/*.c files, which saves duplication.
>>>>
>>>> This series was tested by comparing list of machines for all qemu system
>>>> binaries, before and after this change, to make sure we don't
>> introduce a
>>>> regression.
>>>>
>>
>> I am also tracing for this. So what's the shape of the final command line?
>>
> 
> I have those commits ready, but I would like to get filtering done
> before so we can focus on command line independently.
> 
> Currently, what we have implemented is:
> ./build/qemu-system -target {arm,aarch64,microblaze}
> Or
> cp ./build/qemu-system ./build/qemu-system-{arm,aarch64,microblaze} and
> there is no need to use -target in this case.
> 
>> Maybe we can at least get arm/arm64/riscv32/risv64/riscv32-be/risv64-be
>> to be in a single binary.
>>
> 
> v0 will be arm/arm64/microblaze.
> risvc64 is a wip, it's not yet ready for integration.

I talked with Mr. Pierrick and Mr. Phil and offered a hand in the riscv side.
So far I wasn't able to do much about it - qemu-riscv has been more active than
usual and we're barely keeping up with the reviews and ongoing work we want
to push for 11.2 ... I think we'll be in better shape for v1 of this effort.

Thanks,
Daniel




> 
>> The -be is needed because gdbstub would need this to get gdb working
>> fine. so the endian mode is important. arm/arm64 have nothing about be
>> support yet, even though in spec also have
>>   
>>
>>
>>>> Pierrick Bouvier (27):
>>>>    include/qemu/target-info-qom.h: declare TYPE_TARGET_SPECIFIC interface
>>>>    hw/arm: implement TYPE_TARGET_SPECIFIC
>>>>    target-info: add target_riscv32 and target_base_riscv
>>>>    hw/riscv: implement TYPE_TARGET_SPECIFIC
>>>>    target-info: add target_config_multiprocess
>>>>    hw/remote/machine: remove unsupported arm target
>>>>    hw/remote/machine: implement TYPE_TARGET_SPECIFIC
>>>>    target-info: add target_config_xen
>>>>    hw/arm/xen-pvh: implement TYPE_TARGET_SPECIFIC
>>>>    hw/xenpv/xen_machine_pv: implement TYPE_TARGET_SPECIFIC
>>>>    target-info: add target_config_nitro
>>>>    hw/nitro/machine: implement TYPE_TARGET_SPECIFIC
>>>>    target-info-qom: implement new machine filtering per target
>>>>    target-info-qom: use TYPE_MACHINE instead of target_machine_typename
>>>>    target-info: remove target_machine_typename
>>>>    target-info-qom: add type_target_specific
>>>>    hw/arm: remove TYPE_TARGET_{AARCH64,ARM}_MACHINE
>>>>    hw/arm: remove {arm,arm_aarch64,aarch64}_machine_interfaces
>>>>    include/hw/core/boards.h: add DEFINE_MACHINE_TARGET_SPECIFIC
>>>>    hw/arm: remove DEFINE_MACHINE_{AARCH64,ARM}
>>>>    hw/arm: remove machines-qom.h
>>>>    hw/riscv: remove TYPE_TARGET_{RISCV32,RISCV64}_MACHINE
>>>>    hw/riscv: remove {riscv32,riscv32_64,riscv64}_machine_interfaces
>>>>    hw/riscv: remove DEFINE_MACHINE_{RISCV32,RISCV64}
>>>>    hw/riscv: remove machines-qom.h
>>>>    configs/targets: remove target info definitions
>>
>>>>    target-info: rename target-info-stub.c in target-info-def.c
>>
>> Does that mean  target-info-def.c would be compiled N-times. N is the
>> target list count and finally linkage into a single binary?
>> How to choose this target-info?
>>
> 
> Yes, correct.
> We choose either from -target arch, or from binary name.
> In case a single target-info is present, we don't check binary name and
> simply use it.
> 
>>
>>>>
>>>
>>> Gentle ping after a week.
>>> You're welcome to review only your architecture if time is limited, and
>>> validate the global approach.
>>>
>>> Regards,
>>> Pierrick
>>>
>>
>>
>> --
>>           此致
>> 礼
>> 罗勇刚
>> Yours
>>      sincerely,
>> Yonggang Luo
> 
> Regards,
> Pierrick



  reply	other threads:[~2026-08-06 20:29 UTC|newest]

Thread overview: 56+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-24  0:09 [PATCH 00/27] single-binary: implement dynamic filtering for machine types Pierrick Bouvier
2026-07-24  0:09 ` [PATCH 01/27] include/qemu/target-info-qom.h: declare TYPE_TARGET_SPECIFIC interface Pierrick Bouvier
2026-07-24  6:21   ` Philippe Mathieu-Daudé
2026-07-24 16:54     ` Pierrick Bouvier
2026-08-05 14:05   ` Daniel P. Berrangé
2026-08-05 16:16     ` Pierrick Bouvier
2026-08-05 16:53       ` Daniel P. Berrangé
2026-08-05 19:10         ` Pierrick Bouvier
2026-08-06 10:21           ` Daniel P. Berrangé
2026-08-06 14:52             ` Philippe Mathieu-Daudé
2026-08-06 16:38               ` Pierrick Bouvier
2026-08-06 18:15                 ` Daniel P. Berrangé
2026-08-06 21:04                   ` Pierrick Bouvier
2026-08-10 22:26                   ` Pierrick Bouvier
2026-08-06 16:52               ` Daniel P. Berrangé
2026-08-06 20:21                 ` Pierrick Bouvier
2026-08-10 15:56                   ` Daniel P. Berrangé
2026-08-10 16:11                     ` Pierrick Bouvier
2026-07-24  0:09 ` [PATCH 02/27] hw/arm: implement TYPE_TARGET_SPECIFIC Pierrick Bouvier
2026-07-24  0:09 ` [PATCH 03/27] target-info: add target_riscv32 and target_base_riscv Pierrick Bouvier
2026-07-24  6:09   ` Philippe Mathieu-Daudé
2026-07-24  0:09 ` [PATCH 04/27] hw/riscv: implement TYPE_TARGET_SPECIFIC Pierrick Bouvier
2026-07-24  0:09 ` [PATCH 05/27] target-info: add target_config_multiprocess Pierrick Bouvier
2026-07-24  0:09 ` [PATCH 06/27] hw/remote/machine: remove unsupported arm target Pierrick Bouvier
2026-07-24  0:09 ` [PATCH 07/27] hw/remote/machine: implement TYPE_TARGET_SPECIFIC Pierrick Bouvier
2026-07-24  0:09 ` [PATCH 08/27] target-info: add target_config_xen Pierrick Bouvier
2026-07-24  0:09 ` [PATCH 09/27] hw/arm/xen-pvh: implement TYPE_TARGET_SPECIFIC Pierrick Bouvier
2026-07-24  0:09 ` [PATCH 10/27] hw/xenpv/xen_machine_pv: " Pierrick Bouvier
2026-07-24  0:09 ` [PATCH 11/27] target-info: add target_config_nitro Pierrick Bouvier
2026-07-24  0:09 ` [PATCH 12/27] hw/nitro/machine: implement TYPE_TARGET_SPECIFIC Pierrick Bouvier
2026-07-24  0:09 ` [PATCH 13/27] target-info-qom: implement new machine filtering per target Pierrick Bouvier
2026-07-24  6:12   ` Philippe Mathieu-Daudé
2026-07-24  0:09 ` [PATCH 14/27] target-info-qom: use TYPE_MACHINE instead of target_machine_typename Pierrick Bouvier
2026-07-24  6:12   ` Philippe Mathieu-Daudé
2026-07-24  0:09 ` [PATCH 15/27] target-info: remove target_machine_typename Pierrick Bouvier
2026-07-24  0:09 ` [PATCH 16/27] target-info-qom: add type_target_specific Pierrick Bouvier
2026-07-24  0:09 ` [PATCH 17/27] hw/arm: remove TYPE_TARGET_{AARCH64,ARM}_MACHINE Pierrick Bouvier
2026-07-24  0:09 ` [PATCH 18/27] hw/arm: remove {arm, arm_aarch64, aarch64}_machine_interfaces Pierrick Bouvier via qemu development
2026-07-24  0:09 ` [PATCH 19/27] include/hw/core/boards.h: add DEFINE_MACHINE_TARGET_SPECIFIC Pierrick Bouvier
2026-07-24  0:09 ` [PATCH 20/27] hw/arm: remove DEFINE_MACHINE_{AARCH64,ARM} Pierrick Bouvier
2026-07-24  0:09 ` [PATCH 21/27] hw/arm: remove machines-qom.h Pierrick Bouvier
2026-07-24  0:09 ` [PATCH 22/27] hw/riscv: remove TYPE_TARGET_{RISCV32,RISCV64}_MACHINE Pierrick Bouvier
2026-07-24  0:09 ` [PATCH 23/27] hw/riscv: remove {riscv32, riscv32_64, riscv64}_machine_interfaces Pierrick Bouvier via qemu development
2026-07-24  0:09 ` [PATCH 24/27] hw/riscv: remove DEFINE_MACHINE_{RISCV32,RISCV64} Pierrick Bouvier
2026-07-24  0:09 ` [PATCH 25/27] hw/riscv: remove machines-qom.h Pierrick Bouvier
2026-07-24  0:09 ` [PATCH 26/27] configs/targets: remove target info definitions Pierrick Bouvier
2026-07-24  0:09 ` [PATCH 27/27] target-info: rename target-info-stub.c in target-info-def.c Pierrick Bouvier
2026-07-30 17:33 ` [PATCH 00/27] single-binary: implement dynamic filtering for machine types Pierrick Bouvier
2026-08-05 13:30   ` Yonggang Luo
2026-08-05 16:20     ` Pierrick Bouvier
2026-08-06 20:29       ` Daniel Henrique Barboza [this message]
2026-08-10 15:46 ` Peter Maydell
2026-08-10 15:55   ` Pierrick Bouvier
2026-08-10 16:00     ` Peter Maydell
2026-08-10 16:14       ` Pierrick Bouvier
2026-08-10 16:42         ` Daniel P. Berrangé

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=628f6692-7e03-423c-a6e3-b2c115350d30@oss.qualcomm.com \
    --to=daniel.barboza@oss.qualcomm.com \
    --cc=alistair.francis@wdc.com \
    --cc=alistair@alistair23.me \
    --cc=anjo@rev.ng \
    --cc=luoyonggang@gmail.com \
    --cc=npiggin@gmail.com \
    --cc=peter.maydell@linaro.org \
    --cc=philmd@oss.qualcomm.com \
    --cc=pierrick.bouvier@oss.qualcomm.com \
    --cc=qemu-devel@nongnu.org \
    --cc=shentey@gmail.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.