[PATCH 0/3] hw/core: Make machine-qmp-cmds.c target independent

Thomas Huth posted 3 patches 1 year ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20230424160434.331175-1-thuth@redhat.com
Maintainers: Eduardo Habkost <eduardo@habkost.net>, Marcel Apfelbaum <marcel.apfelbaum@gmail.com>, "Philippe Mathieu-Daudé" <philmd@linaro.org>, Yanan Wang <wangyanan55@huawei.com>, Richard Henderson <richard.henderson@linaro.org>, David Hildenbrand <david@redhat.com>, Ilya Leoshkevich <iii@linux.ibm.com>, Thomas Huth <thuth@redhat.com>
include/hw/core/cpu.h      |  6 ++++++
include/qemu/typedefs.h    |  1 +
cpu.c                      |  5 +++++
hw/core/machine-qmp-cmds.c | 20 ++++----------------
target/s390x/cpu.c         |  8 ++++++++
hw/core/meson.build        |  5 +----
6 files changed, 25 insertions(+), 20 deletions(-)
[PATCH 0/3] hw/core: Make machine-qmp-cmds.c target independent
Posted by Thomas Huth 1 year ago
For being able to create a universal QEMU binary one day, core files
like machine-qmp-cmds.c must not contain any target specifc macros.
This series reworks the related spots in this file, so we can move
it to the common softmmu_ss source set. This has also the advantage
that we only have to compile this file once, and not multiple times
(one time for each target) anymore.

Thomas Huth (3):
  hw/core: Use a callback for target specific query-cpus-fast
    information
  cpu: Introduce a wrapper for being able to use TARGET_NAME in common
    code
  hw/core: Move machine-qmp-cmds.c into the target independent source
    set

 include/hw/core/cpu.h      |  6 ++++++
 include/qemu/typedefs.h    |  1 +
 cpu.c                      |  5 +++++
 hw/core/machine-qmp-cmds.c | 20 ++++----------------
 target/s390x/cpu.c         |  8 ++++++++
 hw/core/meson.build        |  5 +----
 6 files changed, 25 insertions(+), 20 deletions(-)

-- 
2.31.1