[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 15/21] hw/core: Move machine-qmp-cmds.c into the target independen
|
From: |
Thomas Huth |
|
Subject: |
[PULL 15/21] hw/core: Move machine-qmp-cmds.c into the target independent source set |
|
Date: |
Mon, 15 May 2023 15:02:27 +0200 |
The only target specific code that is left in here are two spots that
use TARGET_NAME. Change them to use the new target_name() wrapper
function instead, so we can move the file into the common softmmu_ss
source set. That way we only have to compile this file once, and not
for each target anymore.
Message-Id: <20230424160434.331175-4-thuth@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
hw/core/machine-qmp-cmds.c | 4 ++--
hw/core/meson.build | 5 +----
2 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/hw/core/machine-qmp-cmds.c b/hw/core/machine-qmp-cmds.c
index c158c02aa3..3860a50c3b 100644
--- a/hw/core/machine-qmp-cmds.c
+++ b/hw/core/machine-qmp-cmds.c
@@ -37,7 +37,7 @@ CpuInfoFastList *qmp_query_cpus_fast(Error **errp)
MachineState *ms = MACHINE(qdev_get_machine());
MachineClass *mc = MACHINE_GET_CLASS(ms);
CpuInfoFastList *head = NULL, **tail = &head;
- SysEmuTarget target = qapi_enum_parse(&SysEmuTarget_lookup, TARGET_NAME,
+ SysEmuTarget target = qapi_enum_parse(&SysEmuTarget_lookup, target_name(),
-1, &error_abort);
CPUState *cpu;
@@ -117,7 +117,7 @@ TargetInfo *qmp_query_target(Error **errp)
{
TargetInfo *info = g_malloc0(sizeof(*info));
- info->arch = qapi_enum_parse(&SysEmuTarget_lookup, TARGET_NAME, -1,
+ info->arch = qapi_enum_parse(&SysEmuTarget_lookup, target_name(), -1,
&error_abort);
return info;
diff --git a/hw/core/meson.build b/hw/core/meson.build
index ae977c9396..959bc924d4 100644
--- a/hw/core/meson.build
+++ b/hw/core/meson.build
@@ -41,6 +41,7 @@ softmmu_ss.add(files(
'gpio.c',
'loader.c',
'machine-hmp-cmds.c',
+ 'machine-qmp-cmds.c',
'machine.c',
'nmi.c',
'null-machine.c',
@@ -51,7 +52,3 @@ softmmu_ss.add(files(
'vm-change-state-handler.c',
'clock-vmstate.c',
))
-
-specific_ss.add(when: 'CONFIG_SOFTMMU', if_true: files(
- 'machine-qmp-cmds.c',
-))
--
2.31.1
- [PULL 14/21] cpu: Introduce a wrapper for being able to use TARGET_NAME in common code, (continued)
- [PULL 14/21] cpu: Introduce a wrapper for being able to use TARGET_NAME in common code, Thomas Huth, 2023/05/15
- [PULL 08/21] tests/lcitool: Add mtools and xorriso and remove genisoimage as dependencies, Thomas Huth, 2023/05/15
- [PULL 05/21] hw/pci-bridge: Fix release ordering by embedding PCIBridgeWindows within PCIBridge, Thomas Huth, 2023/05/15
- [PULL 21/21] tests/tcg/s390x: Test EXECUTE of relative branches, Thomas Huth, 2023/05/15
- [PULL 18/21] tests/tcg/multiarch: Make the system memory test work on big-endian, Thomas Huth, 2023/05/15
- [PULL 11/21] docs/devel: remind developers to run CI container pipeline when updating images, Thomas Huth, 2023/05/15
- [PULL 10/21] s390x/pv: Fix spurious warning with asynchronous teardown, Thomas Huth, 2023/05/15
- [PULL 06/21] Add information how to fix common build error on Windows in symlink-install-tree, Thomas Huth, 2023/05/15
- [PULL 19/21] tests/tcg/s390x: Enable the multiarch system tests, Thomas Huth, 2023/05/15
- [PULL 09/21] util/async-teardown: wire up query-command-line-options, Thomas Huth, 2023/05/15
- [PULL 15/21] hw/core: Move machine-qmp-cmds.c into the target independent source set,
Thomas Huth <=
- [PULL 07/21] tests: libvirt-ci: Update to commit 'c8971e90ac' to pull in mformat and xorriso, Thomas Huth, 2023/05/15
- [PULL 04/21] tests/qtest: replace qmp_discard_response with qtest_qmp_assert_success, Thomas Huth, 2023/05/15
- [PULL 13/21] hw/core: Use a callback for target specific query-cpus-fast information, Thomas Huth, 2023/05/15
- [PULL 12/21] docs/about/emulation: fix typo, Thomas Huth, 2023/05/15
- [PULL 17/21] s390x/tcg: Fix LDER instruction format, Thomas Huth, 2023/05/15
- [PULL 20/21] target/s390x: Fix EXECUTE of relative branches, Thomas Huth, 2023/05/15
- Re: [PULL 00/21] Tests, docs, s390x and misc patches, Richard Henderson, 2023/05/15