From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: qemu-devel@nongnu.org
Cc: "Peter Maydell" <peter.maydell@linaro.org>,
"Cédric Le Goater" <clg@kaod.org>,
"Richard Henderson" <richard.henderson@linaro.org>,
qemu-arm@nongnu.org, "Joel Stanley" <joel@jms.id.au>,
"Kane Chen" <kane_chen@aspeedtech.com>,
"Troy Lee" <leetroy@gmail.com>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>,
"Pierrick Bouvier" <pierrick.bouvier@oss.qualcomm.com>,
"Jamin Lin" <jamin_lin@aspeedtech.com>,
"Steven Lee" <steven_lee@aspeedtech.com>,
"Andrew Jeffery" <andrew@codeconstruct.com.au>,
"Manos Pitsidianakis" <manos.pitsidianakis@linaro.org>
Subject: [PATCH v6 10/20] target/arm: Restrict IDAU interface to TCG namespace
Date: Fri, 15 May 2026 16:10:21 +0200 [thread overview]
Message-ID: <20260515141032.3271-11-philmd@linaro.org> (raw)
In-Reply-To: <20260515141032.3271-1-philmd@linaro.org>
Emphasis the IDAU interface is restricted to TCG by
moving the header under target/arm/tcg/. Move the
definition to cpu-v7m.c which also contains v7/v8
hardware (NVIC), keeping only CPU types in cpu32.c.
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
include/hw/arm/armv7m.h | 2 +-
include/hw/misc/tz-msc.h | 2 +-
target/arm/{ => tcg}/idau.h | 4 ++--
hw/arm/armv7m.c | 2 +-
target/arm/cpu.c | 2 +-
target/arm/ptw.c | 2 +-
target/arm/tcg/cpu-v7m.c | 11 +++++++++++
target/arm/tcg/cpu32.c | 8 --------
8 files changed, 18 insertions(+), 15 deletions(-)
rename target/arm/{ => tcg}/idau.h (97%)
diff --git a/include/hw/arm/armv7m.h b/include/hw/arm/armv7m.h
index 98ad08db036..70555962bb9 100644
--- a/include/hw/arm/armv7m.h
+++ b/include/hw/arm/armv7m.h
@@ -13,7 +13,7 @@
#include "hw/core/sysbus.h"
#include "hw/intc/armv7m_nvic.h"
#include "hw/misc/armv7m_ras.h"
-#include "target/arm/idau.h"
+#include "target/arm/tcg/idau.h"
#include "qom/object.h"
#include "hw/core/clock.h"
diff --git a/include/hw/misc/tz-msc.h b/include/hw/misc/tz-msc.h
index 07112d8caa3..6cf4c6b09eb 100644
--- a/include/hw/misc/tz-msc.h
+++ b/include/hw/misc/tz-msc.h
@@ -51,7 +51,7 @@
#define TZ_MSC_H
#include "hw/core/sysbus.h"
-#include "target/arm/idau.h"
+#include "target/arm/tcg/idau.h"
#include "qom/object.h"
#define TYPE_TZ_MSC "tz-msc"
diff --git a/target/arm/idau.h b/target/arm/tcg/idau.h
similarity index 97%
rename from target/arm/idau.h
rename to target/arm/tcg/idau.h
index 0ef5251971d..e5736ad848d 100644
--- a/target/arm/idau.h
+++ b/target/arm/tcg/idau.h
@@ -25,8 +25,8 @@
* connected to the CPU using a link property.
*/
-#ifndef TARGET_ARM_IDAU_H
-#define TARGET_ARM_IDAU_H
+#ifndef TARGET_ARM_TCG_IDAU_H
+#define TARGET_ARM_TCG_IDAU_H
#include "qom/object.h"
diff --git a/hw/arm/armv7m.c b/hw/arm/armv7m.c
index a29eab6c915..68a1cbd6316 100644
--- a/hw/arm/armv7m.c
+++ b/hw/arm/armv7m.c
@@ -20,7 +20,7 @@
#include "qemu/error-report.h"
#include "qemu/module.h"
#include "qemu/log.h"
-#include "target/arm/idau.h"
+#include "target/arm/tcg/idau.h"
#include "target/arm/cpu.h"
#include "target/arm/cpu-features.h"
#include "target/arm/cpu-qom.h"
diff --git a/target/arm/cpu.c b/target/arm/cpu.c
index 31e0a12a986..76f5909e902 100644
--- a/target/arm/cpu.c
+++ b/target/arm/cpu.c
@@ -24,7 +24,6 @@
#include "qemu/log.h"
#include "exec/page-vary.h"
#include "system/whpx.h"
-#include "target/arm/idau.h"
#include "qemu/module.h"
#include "qapi/error.h"
#include "cpu.h"
@@ -42,6 +41,7 @@
#include "hw/intc/arm_gicv5_stream.h"
#ifdef CONFIG_TCG
#include "hw/intc/armv7m_nvic.h"
+#include "target/arm/tcg/idau.h"
#endif /* CONFIG_TCG */
#endif /* !CONFIG_USER_ONLY */
#include "system/tcg.h"
diff --git a/target/arm/ptw.c b/target/arm/ptw.c
index 8706dd59dd6..a4842a4b62b 100644
--- a/target/arm/ptw.c
+++ b/target/arm/ptw.c
@@ -17,7 +17,7 @@
#include "cpu.h"
#include "internals.h"
#include "cpu-features.h"
-#include "idau.h"
+#include "target/arm/tcg/idau.h"
typedef struct S1Translate {
/*
diff --git a/target/arm/tcg/cpu-v7m.c b/target/arm/tcg/cpu-v7m.c
index dc249ce1f14..02abd831e6a 100644
--- a/target/arm/tcg/cpu-v7m.c
+++ b/target/arm/tcg/cpu-v7m.c
@@ -11,6 +11,7 @@
#include "qemu/osdep.h"
#include "cpu.h"
#include "accel/tcg/cpu-ops.h"
+#include "target/arm/tcg/idau.h"
#include "internals.h"
#if !defined(CONFIG_USER_ONLY)
@@ -40,6 +41,16 @@ static bool arm_v7m_cpu_exec_interrupt(CPUState *cs, int interrupt_request)
return ret;
}
+static const TypeInfo arm_v8m_types[] = {
+ {
+ .name = TYPE_IDAU_INTERFACE,
+ .parent = TYPE_INTERFACE,
+ .class_size = sizeof(IDAUInterfaceClass),
+ }
+};
+
+DEFINE_TYPES(arm_v8m_types)
+
#endif /* !CONFIG_USER_ONLY */
static void cortex_m0_initfn(Object *obj)
diff --git a/target/arm/tcg/cpu32.c b/target/arm/tcg/cpu32.c
index 2127d456ad6..73d21c6cf7d 100644
--- a/target/arm/tcg/cpu32.c
+++ b/target/arm/tcg/cpu32.c
@@ -12,7 +12,6 @@
#include "cpu.h"
#include "accel/tcg/cpu-ops.h"
#include "internals.h"
-#include "target/arm/idau.h"
#if !defined(CONFIG_USER_ONLY)
#include "hw/core/boards.h"
#endif
@@ -899,17 +898,10 @@ static const ARMCPUInfo arm_tcg_cpus[] = {
#endif
};
-static const TypeInfo idau_interface_type_info = {
- .name = TYPE_IDAU_INTERFACE,
- .parent = TYPE_INTERFACE,
- .class_size = sizeof(IDAUInterfaceClass),
-};
-
static void arm_tcg_cpu_register_types(void)
{
size_t i;
- type_register_static(&idau_interface_type_info);
for (i = 0; i < ARRAY_SIZE(arm_tcg_cpus); ++i) {
arm_cpu_register(&arm_tcg_cpus[i]);
}
--
2.53.0
next prev parent reply other threads:[~2026-05-15 14:12 UTC|newest]
Thread overview: 65+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-15 14:10 [PATCH v6 00/20] single-binary: Make hw/arm/ common Philippe Mathieu-Daudé
2026-05-15 14:10 ` [PATCH v6 01/20] hw/arm: Build ARM/HVF GICv3 stub once Philippe Mathieu-Daudé
2026-05-15 16:35 ` Pierrick Bouvier
2026-05-15 14:10 ` [PATCH v6 02/20] hw/arm/raspi: Initialize 64-bit CPU types during DeviceRealize() Philippe Mathieu-Daudé
2026-05-15 14:15 ` Manos Pitsidianakis
2026-05-15 16:58 ` Pierrick Bouvier
2026-05-15 14:10 ` [PATCH v6 03/20] hw/arm/raspi: Build objects once Philippe Mathieu-Daudé
2026-05-15 14:15 ` Manos Pitsidianakis
2026-05-15 14:10 ` [PATCH v6 04/20] hw/arm/aspeed: Initialize 64-bit CPU types during DeviceRealize() Philippe Mathieu-Daudé
2026-05-15 14:14 ` Manos Pitsidianakis
2026-05-15 16:29 ` Cédric Le Goater
2026-05-15 17:00 ` Pierrick Bouvier
2026-05-15 17:18 ` Cédric Le Goater
2026-05-15 17:22 ` Pierrick Bouvier
2026-05-15 21:17 ` Cédric Le Goater
2026-05-15 17:00 ` Pierrick Bouvier
2026-05-15 14:10 ` [PATCH v6 05/20] hw/arm/aspeed: Build objects once Philippe Mathieu-Daudé
2026-05-15 14:16 ` Manos Pitsidianakis
2026-05-15 14:10 ` [PATCH v6 06/20] hw/arm/meson: Remove now unused arm_ss[] source set Philippe Mathieu-Daudé
2026-05-15 14:16 ` Manos Pitsidianakis
2026-05-15 14:10 ` [PATCH v6 07/20] target/arm: Introduce common system/user meson " Philippe Mathieu-Daudé
2026-05-15 14:17 ` Manos Pitsidianakis
2026-05-15 17:04 ` Pierrick Bouvier
2026-05-15 14:10 ` [PATCH v6 08/20] target/arm: Build gdbstub64.o as common object Philippe Mathieu-Daudé
2026-05-15 14:17 ` Manos Pitsidianakis
2026-05-15 17:04 ` Pierrick Bouvier
2026-05-15 14:10 ` [PATCH v6 09/20] target/arm: Build cpu64.o " Philippe Mathieu-Daudé
2026-05-15 14:21 ` Manos Pitsidianakis
2026-05-15 14:27 ` Philippe Mathieu-Daudé
2026-05-15 17:06 ` Pierrick Bouvier
2026-05-15 14:10 ` Philippe Mathieu-Daudé [this message]
2026-05-15 14:23 ` [PATCH v6 10/20] target/arm: Restrict IDAU interface to TCG namespace Manos Pitsidianakis
2026-05-15 14:27 ` Philippe Mathieu-Daudé
2026-05-15 17:07 ` Pierrick Bouvier
2026-05-15 14:10 ` [PATCH v6 11/20] target/arm: Rename Aarch64-specific methods Philippe Mathieu-Daudé
2026-05-15 14:23 ` Manos Pitsidianakis
2026-05-15 14:10 ` [PATCH v6 12/20] target/arm: Extract common code related to 'max' CPU Philippe Mathieu-Daudé
2026-05-15 14:24 ` Manos Pitsidianakis
2026-05-15 17:10 ` Pierrick Bouvier
2026-05-15 17:13 ` Pierrick Bouvier
2026-05-15 14:10 ` [PATCH v6 13/20] target/arm: Use make_ccsidr(LEGACY) in 32 bit 'max' CPU type Philippe Mathieu-Daudé
2026-05-15 14:25 ` Manos Pitsidianakis
2026-05-15 17:10 ` Pierrick Bouvier
2026-05-15 14:10 ` [PATCH v6 14/20] target/arm: Implement DBGDEVID* registers in max AArch32 CPU Philippe Mathieu-Daudé
2026-05-15 14:26 ` Manos Pitsidianakis
2026-05-15 17:11 ` Pierrick Bouvier
2026-05-15 14:10 ` [PATCH v6 15/20] target/arm: Only set %kvm_target when KVM is enabled Philippe Mathieu-Daudé
2026-05-15 14:26 ` Manos Pitsidianakis
2026-05-15 17:11 ` Pierrick Bouvier
2026-05-15 14:10 ` [PATCH v6 16/20] target/arm: Factor aarch64_aa32_a57_init() out Philippe Mathieu-Daudé
2026-05-15 14:27 ` Manos Pitsidianakis
2026-05-15 17:12 ` Pierrick Bouvier
2026-05-15 14:10 ` [PATCH v6 17/20] target/arm: Re-use common aarch64_aa32_a57_init() helper Philippe Mathieu-Daudé
2026-05-15 14:28 ` Manos Pitsidianakis
2026-05-15 17:12 ` Pierrick Bouvier
2026-05-15 14:10 ` [PATCH v6 18/20] target/arm: Define 'max' CPU type in cpu-max.c Philippe Mathieu-Daudé
2026-05-15 14:29 ` Manos Pitsidianakis
2026-05-15 17:22 ` Pierrick Bouvier
2026-05-15 14:10 ` [PATCH v6 19/20] target/arm: Build cpu32-system.o as common object Philippe Mathieu-Daudé
2026-05-15 14:30 ` Manos Pitsidianakis
2026-05-15 17:14 ` Pierrick Bouvier
2026-05-15 14:10 ` [PATCH v6 20/20] target/arm: Build cpu-max.c once Philippe Mathieu-Daudé
2026-05-15 14:31 ` Manos Pitsidianakis
2026-05-15 17:15 ` Pierrick Bouvier
2026-05-15 17:02 ` [PATCH v6 00/20] single-binary: Make hw/arm/ common Pierrick Bouvier
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=20260515141032.3271-11-philmd@linaro.org \
--to=philmd@linaro.org \
--cc=andrew@codeconstruct.com.au \
--cc=clg@kaod.org \
--cc=jamin_lin@aspeedtech.com \
--cc=joel@jms.id.au \
--cc=kane_chen@aspeedtech.com \
--cc=leetroy@gmail.com \
--cc=manos.pitsidianakis@linaro.org \
--cc=peter.maydell@linaro.org \
--cc=pierrick.bouvier@oss.qualcomm.com \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=steven_lee@aspeedtech.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.