From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: qemu-devel@nongnu.org
Cc: "Paolo Bonzini" <pbonzini@redhat.com>,
"Pierrick Bouvier" <pierrick.bouvier@linaro.org>,
"Daniel P. Berrangé" <berrange@redhat.com>,
"Richard Henderson" <richard.henderson@linaro.org>,
"Thomas Huth" <thuth@redhat.com>,
"Alex Bennée" <alex.bennee@linaro.org>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>
Subject: [RFC PATCH 05/11] include: Expose QemuArchBit enum to user emulation
Date: Wed, 5 Mar 2025 01:52:19 +0100 [thread overview]
Message-ID: <20250305005225.95051-6-philmd@linaro.org> (raw)
In-Reply-To: <20250305005225.95051-1-philmd@linaro.org>
QemuArchBit isn't really specific to system emulation,
move the "system/arch_init.h" header to "qemu/arch_info.h",
a more generic include path.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
meson.build | 2 +-
include/{system/arch_init.h => qemu/arch_info.h} | 4 ++--
system/arch_init.c => arch_info-target.c | 2 +-
hw/scsi/scsi-disk.c | 2 +-
system/qdev-monitor.c | 2 +-
system/vl.c | 2 +-
system/meson.build | 1 -
7 files changed, 7 insertions(+), 8 deletions(-)
rename include/{system/arch_init.h => qemu/arch_info.h} (97%)
rename system/arch_init.c => arch_info-target.c (97%)
diff --git a/meson.build b/meson.build
index 1ab02a5d48d..04d8c477644 100644
--- a/meson.build
+++ b/meson.build
@@ -3766,7 +3766,7 @@ if have_block
endif
common_ss.add(files('cpu-common.c'))
-specific_ss.add(files('cpu-target.c'))
+specific_ss.add(files('cpu-target.c', 'arch_info-target.c'))
subdir('system')
diff --git a/include/system/arch_init.h b/include/qemu/arch_info.h
similarity index 97%
rename from include/system/arch_init.h
rename to include/qemu/arch_info.h
index 023d27d5bd7..3cb95926e27 100644
--- a/include/system/arch_init.h
+++ b/include/qemu/arch_info.h
@@ -1,5 +1,5 @@
-#ifndef QEMU_ARCH_INIT_H
-#define QEMU_ARCH_INIT_H
+#ifndef QEMU_ARCH_INFO_H
+#define QEMU_ARCH_INFO_H
#include "qemu/bitops.h"
diff --git a/system/arch_init.c b/arch_info-target.c
similarity index 97%
rename from system/arch_init.c
rename to arch_info-target.c
index 0fec0cd416b..6c11c73feb9 100644
--- a/system/arch_init.c
+++ b/arch_info-target.c
@@ -22,7 +22,7 @@
* THE SOFTWARE.
*/
#include "qemu/osdep.h"
-#include "system/arch_init.h"
+#include "qemu/arch_info.h"
bool qemu_arch_available(unsigned qemu_arch_mask)
{
diff --git a/hw/scsi/scsi-disk.c b/hw/scsi/scsi-disk.c
index 7c87b20e694..bafa9f39497 100644
--- a/hw/scsi/scsi-disk.c
+++ b/hw/scsi/scsi-disk.c
@@ -27,12 +27,12 @@
#include "qemu/module.h"
#include "qemu/hw-version.h"
#include "qemu/memalign.h"
+#include "qemu/arch_info.h"
#include "hw/scsi/scsi.h"
#include "migration/qemu-file-types.h"
#include "migration/vmstate.h"
#include "hw/scsi/emulation.h"
#include "scsi/constants.h"
-#include "system/arch_init.h"
#include "system/block-backend.h"
#include "system/blockdev.h"
#include "hw/block/block.h"
diff --git a/system/qdev-monitor.c b/system/qdev-monitor.c
index 5588ed2047d..b88e6e83512 100644
--- a/system/qdev-monitor.c
+++ b/system/qdev-monitor.c
@@ -22,7 +22,6 @@
#include "monitor/hmp.h"
#include "monitor/monitor.h"
#include "monitor/qdev.h"
-#include "system/arch_init.h"
#include "system/runstate.h"
#include "qapi/error.h"
#include "qapi/qapi-commands-qdev.h"
@@ -37,6 +36,7 @@
#include "qemu/option.h"
#include "qemu/qemu-print.h"
#include "qemu/option_int.h"
+#include "qemu/arch_info.h"
#include "system/block-backend.h"
#include "migration/misc.h"
#include "qemu/cutils.h"
diff --git a/system/vl.c b/system/vl.c
index ec93988a03a..e96c72e5400 100644
--- a/system/vl.c
+++ b/system/vl.c
@@ -27,6 +27,7 @@
#include "qemu/datadir.h"
#include "qemu/units.h"
#include "qemu/module.h"
+#include "qemu/arch_info.h"
#include "exec/cpu-common.h"
#include "exec/page-vary.h"
#include "hw/qdev-properties.h"
@@ -110,7 +111,6 @@
#include "trace/control.h"
#include "qemu/plugin.h"
#include "qemu/queue.h"
-#include "system/arch_init.h"
#include "system/confidential-guest-support.h"
#include "ui/qemu-spice.h"
diff --git a/system/meson.build b/system/meson.build
index 181195410fb..900c5d52ee4 100644
--- a/system/meson.build
+++ b/system/meson.build
@@ -1,5 +1,4 @@
specific_ss.add(when: 'CONFIG_SYSTEM_ONLY', if_true: [files(
- 'arch_init.c',
'ioport.c',
'globals-target.c',
'memory.c',
--
2.47.1
next prev parent reply other threads:[~2025-03-05 0:53 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-05 0:52 [RFC PATCH 00/11] qemu: Remove TARGET_NAME definition Philippe Mathieu-Daudé
2025-03-05 0:52 ` [RFC PATCH 01/11] system: Extract target-specific globals to their own compilation unit Philippe Mathieu-Daudé
2025-03-05 1:20 ` Pierrick Bouvier
2025-03-05 1:33 ` Philippe Mathieu-Daudé
2025-03-05 1:41 ` Pierrick Bouvier
2025-03-11 10:24 ` Alex Bennée
2025-03-05 0:52 ` [RFC PATCH 02/11] system: Open-code qemu_init_arch_modules() using target_name() Philippe Mathieu-Daudé
2025-03-05 2:27 ` Richard Henderson
2025-03-05 0:52 ` [RFC PATCH 03/11] system: Introduce QemuArchBit enum Philippe Mathieu-Daudé
2025-03-05 1:23 ` Pierrick Bouvier
2025-03-05 1:31 ` Philippe Mathieu-Daudé
2025-03-05 1:36 ` Pierrick Bouvier
2025-03-05 1:39 ` Philippe Mathieu-Daudé
2025-03-05 2:27 ` Richard Henderson
2025-03-05 8:55 ` Daniel P. Berrangé
2025-03-05 9:00 ` Daniel P. Berrangé
2025-03-05 0:52 ` [RFC PATCH 04/11] system: Replace arch_type global by qemu_arch_available() helper Philippe Mathieu-Daudé
2025-03-05 2:29 ` Richard Henderson
2025-03-05 0:52 ` Philippe Mathieu-Daudé [this message]
2025-03-05 2:43 ` [RFC PATCH 05/11] include: Expose QemuArchBit enum to user emulation Richard Henderson
2025-03-05 0:52 ` [RFC PATCH 06/11] include: Declare target_name() in common "qemu/arch_info.h" Philippe Mathieu-Daudé
2025-03-05 2:44 ` Richard Henderson
2025-03-05 0:52 ` [RFC PATCH 07/11] plugins/loader: populate target_name with target_name() Philippe Mathieu-Daudé
2025-03-05 0:52 ` [RFC PATCH 08/11] tests/qtest: Replace TARGET_NAME -> target_name() Philippe Mathieu-Daudé
2025-03-05 3:02 ` Richard Henderson
2025-03-05 0:52 ` [RFC PATCH 09/11] user: " Philippe Mathieu-Daudé
2025-03-05 0:52 ` [RFC PATCH 10/11] qemu: Introduce qemu_arch_name() helper Philippe Mathieu-Daudé
2025-03-05 1:32 ` BALATON Zoltan
2025-03-05 1:36 ` Philippe Mathieu-Daudé
2025-03-05 2:05 ` BALATON Zoltan
2025-03-05 2:23 ` Richard Henderson
2025-03-05 8:59 ` Daniel P. Berrangé
2025-03-05 0:52 ` [RFC PATCH 11/11] qemu: Remove C definitions of TARGET_NAME Philippe Mathieu-Daudé
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=20250305005225.95051-6-philmd@linaro.org \
--to=philmd@linaro.org \
--cc=alex.bennee@linaro.org \
--cc=berrange@redhat.com \
--cc=pbonzini@redhat.com \
--cc=pierrick.bouvier@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=thuth@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).