[PATCH 0/6] multi-target: remove qmp_query_cpu_model_expansion duplication

Pierrick Bouvier posted 6 patches 1 week ago
hw/core/machine-qmp-cmds.c            | 26 ++++++++++++++++++++++++++
include/system/qmp-cpu.h              | 21 +++++++++++++++++++++
stubs/meson.build                     |  1 -
stubs/qmp-cpu-arm.c                   |  8 ++++++++
stubs/qmp-cpu-i386.c                  |  8 ++++++++
stubs/qmp-cpu-loongarch.c             |  8 ++++++++
stubs/qmp-cpu-riscv.c                 |  8 ++++++++
stubs/qmp-cpu-s390x.c                 |  8 ++++++++
stubs/qmp-cpu.c                       | 14 --------------
target/arm/arm-qmp-cmds.c             |  7 ++++---
target/i386/cpu-system.c              |  7 ++++---
target/loongarch/loongarch-qmp-cmds.c |  7 ++++---
target/mips/system/mips-qmp-cmds.c    |  9 ---------
target/ppc/ppc-qmp-cmds.c             |  9 ---------
target/riscv/riscv-qmp-cmds.c         |  7 ++++---
target/s390x/cpu_models_system.c      |  7 ++++---
16 files changed, 107 insertions(+), 48 deletions(-)
delete mode 100644 stubs/qmp-cpu.c
[PATCH 0/6] multi-target: remove qmp_query_cpu_model_expansion duplication
Posted by Pierrick Bouvier 1 week ago
This series allows to link multiple targets that define
qmp_query_cpu_definitions. It simply replaces the duplicated definitions with
target-specific ones and a single dispatcher.

It follows the exact same approach and structure than:
https://lore.kernel.org/qemu-devel/20261015005355.62406-1-pierrick.bouvier@oss.qualcomm.com/,
which was merged yesterday.

Pierrick Bouvier (6):
  target/arm: rename qmp_query_cpu_model_expansion to
    qmp_query_arm_cpu_model_expansion
  target/i386: rename qmp_query_cpu_model_expansion to
    qmp_query_i386_cpu_model_expansion
  target/loongarch: rename to qmp_query_loongarch_cpu_model_expansion
  target/riscv: rename qmp_query_cpu_model_expansion to
    qmp_query_riscv_cpu_model_expansion
  target/s390x: rename qmp_query_cpu_model_expansion to
    qmp_query_s390x_cpu_model_expansion
  qmp: reimplement qmp_query_cpu_model_expansion as a dispatcher
    function

 hw/core/machine-qmp-cmds.c            | 26 ++++++++++++++++++++++++++
 include/system/qmp-cpu.h              | 21 +++++++++++++++++++++
 stubs/meson.build                     |  1 -
 stubs/qmp-cpu-arm.c                   |  8 ++++++++
 stubs/qmp-cpu-i386.c                  |  8 ++++++++
 stubs/qmp-cpu-loongarch.c             |  8 ++++++++
 stubs/qmp-cpu-riscv.c                 |  8 ++++++++
 stubs/qmp-cpu-s390x.c                 |  8 ++++++++
 stubs/qmp-cpu.c                       | 14 --------------
 target/arm/arm-qmp-cmds.c             |  7 ++++---
 target/i386/cpu-system.c              |  7 ++++---
 target/loongarch/loongarch-qmp-cmds.c |  7 ++++---
 target/mips/system/mips-qmp-cmds.c    |  9 ---------
 target/ppc/ppc-qmp-cmds.c             |  9 ---------
 target/riscv/riscv-qmp-cmds.c         |  7 ++++---
 target/s390x/cpu_models_system.c      |  7 ++++---
 16 files changed, 107 insertions(+), 48 deletions(-)
 delete mode 100644 stubs/qmp-cpu.c

-- 
2.43.0
Re: [PATCH 0/6] multi-target: remove qmp_query_cpu_model_expansion duplication
Posted by Pierrick Bouvier 14 hours ago
On 10/16/2026 9:25 AM, Pierrick Bouvier wrote:
> This series allows to link multiple targets that define
> qmp_query_cpu_definitions. It simply replaces the duplicated definitions with
> target-specific ones and a single dispatcher.
> 
> It follows the exact same approach and structure than:
> https://lore.kernel.org/qemu-devel/20261015005355.62406-1-pierrick.bouvier@oss.qualcomm.com/,
> which was merged yesterday.
> 
> Pierrick Bouvier (6):
>   target/arm: rename qmp_query_cpu_model_expansion to
>     qmp_query_arm_cpu_model_expansion
>   target/i386: rename qmp_query_cpu_model_expansion to
>     qmp_query_i386_cpu_model_expansion
>   target/loongarch: rename to qmp_query_loongarch_cpu_model_expansion
>   target/riscv: rename qmp_query_cpu_model_expansion to
>     qmp_query_riscv_cpu_model_expansion
>   target/s390x: rename qmp_query_cpu_model_expansion to
>     qmp_query_s390x_cpu_model_expansion
>   qmp: reimplement qmp_query_cpu_model_expansion as a dispatcher
>     function
> 
>  hw/core/machine-qmp-cmds.c            | 26 ++++++++++++++++++++++++++
>  include/system/qmp-cpu.h              | 21 +++++++++++++++++++++
>  stubs/meson.build                     |  1 -
>  stubs/qmp-cpu-arm.c                   |  8 ++++++++
>  stubs/qmp-cpu-i386.c                  |  8 ++++++++
>  stubs/qmp-cpu-loongarch.c             |  8 ++++++++
>  stubs/qmp-cpu-riscv.c                 |  8 ++++++++
>  stubs/qmp-cpu-s390x.c                 |  8 ++++++++
>  stubs/qmp-cpu.c                       | 14 --------------
>  target/arm/arm-qmp-cmds.c             |  7 ++++---
>  target/i386/cpu-system.c              |  7 ++++---
>  target/loongarch/loongarch-qmp-cmds.c |  7 ++++---
>  target/mips/system/mips-qmp-cmds.c    |  9 ---------
>  target/ppc/ppc-qmp-cmds.c             |  9 ---------
>  target/riscv/riscv-qmp-cmds.c         |  7 ++++---
>  target/s390x/cpu_models_system.c      |  7 ++++---
>  16 files changed, 107 insertions(+), 48 deletions(-)
>  delete mode 100644 stubs/qmp-cpu.c
> 

This was merged into master (3745b15e090e3dbcfcf28fc96928abba8fd2ed2a).

Regards,
Pierrick
Re: [PATCH 0/6] multi-target: remove qmp_query_cpu_model_expansion duplication
Posted by Pierrick Bouvier 4 days, 16 hours ago
On 10/16/2026 9:25 AM, Pierrick Bouvier wrote:
> This series allows to link multiple targets that define
> qmp_query_cpu_definitions. It simply replaces the duplicated definitions with
> target-specific ones and a single dispatcher.
> 
> It follows the exact same approach and structure than:
> https://lore.kernel.org/qemu-devel/20261015005355.62406-1-pierrick.bouvier@oss.qualcomm.com/,
> which was merged yesterday.
> 
> Pierrick Bouvier (6):
>   target/arm: rename qmp_query_cpu_model_expansion to
>     qmp_query_arm_cpu_model_expansion
>   target/i386: rename qmp_query_cpu_model_expansion to
>     qmp_query_i386_cpu_model_expansion
>   target/loongarch: rename to qmp_query_loongarch_cpu_model_expansion
>   target/riscv: rename qmp_query_cpu_model_expansion to
>     qmp_query_riscv_cpu_model_expansion
>   target/s390x: rename qmp_query_cpu_model_expansion to
>     qmp_query_s390x_cpu_model_expansion
>   qmp: reimplement qmp_query_cpu_model_expansion as a dispatcher
>     function
> 
>  hw/core/machine-qmp-cmds.c            | 26 ++++++++++++++++++++++++++
>  include/system/qmp-cpu.h              | 21 +++++++++++++++++++++
>  stubs/meson.build                     |  1 -
>  stubs/qmp-cpu-arm.c                   |  8 ++++++++
>  stubs/qmp-cpu-i386.c                  |  8 ++++++++
>  stubs/qmp-cpu-loongarch.c             |  8 ++++++++
>  stubs/qmp-cpu-riscv.c                 |  8 ++++++++
>  stubs/qmp-cpu-s390x.c                 |  8 ++++++++
>  stubs/qmp-cpu.c                       | 14 --------------
>  target/arm/arm-qmp-cmds.c             |  7 ++++---
>  target/i386/cpu-system.c              |  7 ++++---
>  target/loongarch/loongarch-qmp-cmds.c |  7 ++++---
>  target/mips/system/mips-qmp-cmds.c    |  9 ---------
>  target/ppc/ppc-qmp-cmds.c             |  9 ---------
>  target/riscv/riscv-qmp-cmds.c         |  7 ++++---
>  target/s390x/cpu_models_system.c      |  7 ++++---
>  16 files changed, 107 insertions(+), 48 deletions(-)
>  delete mode 100644 stubs/qmp-cpu.c
> 

Ping (sorry for the short delay) on this series, to try to get this in
before freeze.

Regards,
Pierrick
Re: [PATCH 0/6] multi-target: remove qmp_query_cpu_model_expansion duplication
Posted by Yonggang Luo 4 days, 5 hours ago
On Tue, Oct 20, 2026 at 6:17 AM Pierrick Bouvier
<pierrick.bouvier@oss.qualcomm.com> wrote:
>
> On 10/16/2026 9:25 AM, Pierrick Bouvier wrote:
> > This series allows to link multiple targets that define
> > qmp_query_cpu_definitions. It simply replaces the duplicated definitions with
> > target-specific ones and a single dispatcher.
> >
> > It follows the exact same approach and structure than:
> > https://lore.kernel.org/qemu-devel/20261015005355.62406-1-pierrick.bouvier@oss.qualcomm.com/,
> > which was merged yesterday.
> >
> > Pierrick Bouvier (6):
> >   target/arm: rename qmp_query_cpu_model_expansion to
> >     qmp_query_arm_cpu_model_expansion
> >   target/i386: rename qmp_query_cpu_model_expansion to
> >     qmp_query_i386_cpu_model_expansion
> >   target/loongarch: rename to qmp_query_loongarch_cpu_model_expansion
> >   target/riscv: rename qmp_query_cpu_model_expansion to
> >     qmp_query_riscv_cpu_model_expansion
> >   target/s390x: rename qmp_query_cpu_model_expansion to
> >     qmp_query_s390x_cpu_model_expansion
> >   qmp: reimplement qmp_query_cpu_model_expansion as a dispatcher
> >     function
> >
> >  hw/core/machine-qmp-cmds.c            | 26 ++++++++++++++++++++++++++
> >  include/system/qmp-cpu.h              | 21 +++++++++++++++++++++
> >  stubs/meson.build                     |  1 -
> >  stubs/qmp-cpu-arm.c                   |  8 ++++++++
> >  stubs/qmp-cpu-i386.c                  |  8 ++++++++
> >  stubs/qmp-cpu-loongarch.c             |  8 ++++++++
> >  stubs/qmp-cpu-riscv.c                 |  8 ++++++++
> >  stubs/qmp-cpu-s390x.c                 |  8 ++++++++
> >  stubs/qmp-cpu.c                       | 14 --------------
> >  target/arm/arm-qmp-cmds.c             |  7 ++++---
> >  target/i386/cpu-system.c              |  7 ++++---
> >  target/loongarch/loongarch-qmp-cmds.c |  7 ++++---
> >  target/mips/system/mips-qmp-cmds.c    |  9 ---------
> >  target/ppc/ppc-qmp-cmds.c             |  9 ---------
> >  target/riscv/riscv-qmp-cmds.c         |  7 ++++---
> >  target/s390x/cpu_models_system.c      |  7 ++++---
> >  16 files changed, 107 insertions(+), 48 deletions(-)
> >  delete mode 100644 stubs/qmp-cpu.c
> >
>
> Ping (sorry for the short delay) on this series, to try to get this in
> before freeze.
>
> Regards,
> Pierrick
>

Acked-by: Yonggang Luo <luoyonggang@gmail.com>

For this series, fine for me

-- 
         此致
礼
罗勇刚
Yours
    sincerely,
Yonggang Luo