* [PULL 01/32] hw/riscv: Register generic riscv[32|64] QOM interfaces
2026-05-27 10:30 [PULL 00/32] Single binary patches for 2026-05-27 Philippe Mathieu-Daudé
@ 2026-05-27 10:30 ` Philippe Mathieu-Daudé
2026-05-27 10:30 ` [PULL 02/32] hw/riscv: Add macros and globals for simplifying machine definitions Philippe Mathieu-Daudé
` (31 subsequent siblings)
32 siblings, 0 replies; 34+ messages in thread
From: Philippe Mathieu-Daudé @ 2026-05-27 10:30 UTC (permalink / raw)
To: qemu-devel
From: Anton Johansson <anjo@rev.ng>
Defines generic 32- and 64-bit riscv machine interfaces for machines to
implement.
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Signed-off-by: Anton Johansson <anjo@rev.ng>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Acked-by: Alistair Francis <alistair.francis@wdc.com>
Message-Id: <20260520-hw-riscv-cpu-int-v3-1-d1123ea63d9c@rev.ng>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
include/hw/riscv/machines-qom.h | 20 ++++++++++++++++++++
target-info-qom.c | 9 +++++++++
2 files changed, 29 insertions(+)
create mode 100644 include/hw/riscv/machines-qom.h
diff --git a/include/hw/riscv/machines-qom.h b/include/hw/riscv/machines-qom.h
new file mode 100644
index 00000000000..69fcf61fd72
--- /dev/null
+++ b/include/hw/riscv/machines-qom.h
@@ -0,0 +1,20 @@
+/*
+ * QOM type definitions for riscv32 / riscv64 machines
+ *
+ * Copyright (c) rev.ng Labs Srl.
+ *
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ */
+
+#ifndef HW_RISCV_MACHINES_QOM_H
+#define HW_RISCV_MACHINES_QOM_H
+
+#include "hw/core/boards.h"
+
+#define TYPE_TARGET_RISCV32_MACHINE \
+ "target-info-riscv32-machine"
+
+#define TYPE_TARGET_RISCV64_MACHINE \
+ "target-info-riscv64-machine"
+
+#endif
diff --git a/target-info-qom.c b/target-info-qom.c
index b48714cc77f..7958a5cc685 100644
--- a/target-info-qom.c
+++ b/target-info-qom.c
@@ -13,6 +13,7 @@
#include "qemu/target-info-init.h"
#include "qemu/target-info-qom.h"
#include "hw/arm/machines-qom.h"
+#include "hw/riscv/machines-qom.h"
static const TypeInfo target_info_types[] = {
{
@@ -23,6 +24,14 @@ static const TypeInfo target_info_types[] = {
.name = TYPE_TARGET_AARCH64_MACHINE,
.parent = TYPE_INTERFACE,
},
+ {
+ .name = TYPE_TARGET_RISCV32_MACHINE,
+ .parent = TYPE_INTERFACE,
+ },
+ {
+ .name = TYPE_TARGET_RISCV64_MACHINE,
+ .parent = TYPE_INTERFACE,
+ },
};
DEFINE_TYPES(target_info_types)
--
2.53.0
^ permalink raw reply related [flat|nested] 34+ messages in thread* [PULL 02/32] hw/riscv: Add macros and globals for simplifying machine definitions
2026-05-27 10:30 [PULL 00/32] Single binary patches for 2026-05-27 Philippe Mathieu-Daudé
2026-05-27 10:30 ` [PULL 01/32] hw/riscv: Register generic riscv[32|64] QOM interfaces Philippe Mathieu-Daudé
@ 2026-05-27 10:30 ` Philippe Mathieu-Daudé
2026-05-27 10:30 ` [PULL 03/32] hw/core: Add riscv[32|64] to "none" machine Philippe Mathieu-Daudé
` (30 subsequent siblings)
32 siblings, 0 replies; 34+ messages in thread
From: Philippe Mathieu-Daudé @ 2026-05-27 10:30 UTC (permalink / raw)
To: qemu-devel
From: Anton Johansson <anjo@rev.ng>
Adds macros and global interfaces for defining machines available only
in qemu-system-riscv32, qemu-system-riscv64, or both.
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Signed-off-by: Anton Johansson <anjo@rev.ng>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Acked-by: Alistair Francis <alistair.francis@wdc.com>
Message-Id: <20260520-hw-riscv-cpu-int-v3-3-d1123ea63d9c@rev.ng>
[PMD: Constify InterfaceInfo]
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
include/hw/riscv/machines-qom.h | 26 ++++++++++++++++++++++++++
target/riscv/machine.c | 19 ++++++++++++++++++-
2 files changed, 44 insertions(+), 1 deletion(-)
diff --git a/include/hw/riscv/machines-qom.h b/include/hw/riscv/machines-qom.h
index 69fcf61fd72..ee346227bb2 100644
--- a/include/hw/riscv/machines-qom.h
+++ b/include/hw/riscv/machines-qom.h
@@ -17,4 +17,30 @@
#define TYPE_TARGET_RISCV64_MACHINE \
"target-info-riscv64-machine"
+/*
+ * Interfaces specifying whether a given QOM object is available in
+ * qemu-system-riscv32, qemu-system-riscv64, or both.
+ */
+
+extern const InterfaceInfo riscv32_machine_interfaces[];
+extern const InterfaceInfo riscv64_machine_interfaces[];
+extern const InterfaceInfo riscv32_64_machine_interfaces[];
+
+/*
+ * Helper macros for defining machines available in qemu-system-riscv32,
+ * qemu-system-riscv64, or both.
+ */
+
+#define DEFINE_MACHINE_RISCV32(namestr, machine_initfn) \
+ DEFINE_MACHINE_WITH_INTERFACE_ARRAY(namestr, machine_initfn, \
+ riscv32_machine_interfaces)
+
+#define DEFINE_MACHINE_RISCV64(namestr, machine_initfn) \
+ DEFINE_MACHINE_WITH_INTERFACE_ARRAY(namestr, machine_initfn, \
+ riscv64_machine_interfaces)
+
+#define DEFINE_MACHINE_RISCV32_64(namestr, machine_initfn) \
+ DEFINE_MACHINE_WITH_INTERFACE_ARRAY(namestr, machine_initfn, \
+ riscv32_64_machine_interfaces)
+
#endif
diff --git a/target/riscv/machine.c b/target/riscv/machine.c
index 6776e7bf5a1..b92e38b11a7 100644
--- a/target/riscv/machine.c
+++ b/target/riscv/machine.c
@@ -22,7 +22,8 @@
#include "system/kvm.h"
#include "migration/cpu.h"
#include "exec/icount.h"
-#include "debug.h"
+#include "target/riscv/debug.h"
+#include "hw/riscv/machines-qom.h"
static bool pmp_needed(void *opaque)
{
@@ -522,3 +523,19 @@ const VMStateDescription vmstate_riscv_cpu = {
NULL
}
};
+
+const InterfaceInfo riscv32_machine_interfaces[] = {
+ { TYPE_TARGET_RISCV32_MACHINE },
+ { }
+};
+
+const InterfaceInfo riscv64_machine_interfaces[] = {
+ { TYPE_TARGET_RISCV64_MACHINE },
+ { }
+};
+
+const InterfaceInfo riscv32_64_machine_interfaces[] = {
+ { TYPE_TARGET_RISCV32_MACHINE },
+ { TYPE_TARGET_RISCV64_MACHINE },
+ { }
+};
--
2.53.0
^ permalink raw reply related [flat|nested] 34+ messages in thread* [PULL 03/32] hw/core: Add riscv[32|64] to "none" machine
2026-05-27 10:30 [PULL 00/32] Single binary patches for 2026-05-27 Philippe Mathieu-Daudé
2026-05-27 10:30 ` [PULL 01/32] hw/riscv: Register generic riscv[32|64] QOM interfaces Philippe Mathieu-Daudé
2026-05-27 10:30 ` [PULL 02/32] hw/riscv: Add macros and globals for simplifying machine definitions Philippe Mathieu-Daudé
@ 2026-05-27 10:30 ` Philippe Mathieu-Daudé
2026-05-27 10:30 ` [PULL 04/32] hw/riscv: Filter machine types for qemu-system-riscv32/64 binaries Philippe Mathieu-Daudé
` (29 subsequent siblings)
32 siblings, 0 replies; 34+ messages in thread
From: Philippe Mathieu-Daudé @ 2026-05-27 10:30 UTC (permalink / raw)
To: qemu-devel
From: Anton Johansson <anjo@rev.ng>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Signed-off-by: Anton Johansson <anjo@rev.ng>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Acked-by: Alistair Francis <alistair.francis@wdc.com>
Message-Id: <20260520-hw-riscv-cpu-int-v3-5-d1123ea63d9c@rev.ng>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
hw/core/null-machine.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/hw/core/null-machine.c b/hw/core/null-machine.c
index c52b022d3aa..f132a7b89b4 100644
--- a/hw/core/null-machine.c
+++ b/hw/core/null-machine.c
@@ -17,6 +17,7 @@
#include "system/address-spaces.h"
#include "hw/core/cpu.h"
#include "hw/arm/machines-qom.h"
+#include "hw/riscv/machines-qom.h"
static void machine_none_init(MachineState *mch)
{
@@ -59,4 +60,6 @@ static void machine_none_machine_init(MachineClass *mc)
DEFINE_MACHINE_WITH_INTERFACES("none", machine_none_machine_init,
{ TYPE_TARGET_AARCH64_MACHINE },
{ TYPE_TARGET_ARM_MACHINE },
+ { TYPE_TARGET_RISCV32_MACHINE },
+ { TYPE_TARGET_RISCV64_MACHINE },
{ })
--
2.53.0
^ permalink raw reply related [flat|nested] 34+ messages in thread* [PULL 04/32] hw/riscv: Filter machine types for qemu-system-riscv32/64 binaries
2026-05-27 10:30 [PULL 00/32] Single binary patches for 2026-05-27 Philippe Mathieu-Daudé
` (2 preceding siblings ...)
2026-05-27 10:30 ` [PULL 03/32] hw/core: Add riscv[32|64] to "none" machine Philippe Mathieu-Daudé
@ 2026-05-27 10:30 ` Philippe Mathieu-Daudé
2026-05-27 10:30 ` [PULL 05/32] hw/riscv/spike: Use 'max' CPU type by default Philippe Mathieu-Daudé
` (28 subsequent siblings)
32 siblings, 0 replies; 34+ messages in thread
From: Philippe Mathieu-Daudé @ 2026-05-27 10:30 UTC (permalink / raw)
To: qemu-devel
From: Anton Johansson <anjo@rev.ng>
Register machines able to run in qemu-system-riscv32,
qemu-system-riscv64, or both.
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Signed-off-by: Anton Johansson <anjo@rev.ng>
Acked-by: Alistair Francis <alistair.francis@wdc.com>
Message-Id: <20260520-hw-riscv-cpu-int-v3-4-d1123ea63d9c@rev.ng>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
hw/riscv/boston-aia.c | 3 ++-
hw/riscv/microblaze-v-generic.c | 3 ++-
hw/riscv/microchip_pfsoc.c | 2 ++
hw/riscv/opentitan.c | 2 ++
hw/riscv/shakti_c.c | 2 ++
hw/riscv/sifive_e.c | 2 ++
hw/riscv/sifive_u.c | 2 ++
hw/riscv/spike.c | 2 ++
hw/riscv/virt.c | 3 +++
hw/riscv/xiangshan_kmh.c | 2 ++
10 files changed, 21 insertions(+), 2 deletions(-)
diff --git a/hw/riscv/boston-aia.c b/hw/riscv/boston-aia.c
index b90da096ea8..965d0f5699e 100644
--- a/hw/riscv/boston-aia.c
+++ b/hw/riscv/boston-aia.c
@@ -18,6 +18,7 @@
#include "hw/ide/ahci-pci.h"
#include "hw/core/loader.h"
#include "hw/riscv/cps.h"
+#include "hw/riscv/machines-qom.h"
#include "hw/pci-host/xilinx-pcie.h"
#include "hw/core/qdev-properties.h"
#include "qapi/error.h"
@@ -473,4 +474,4 @@ static void boston_mach_class_init(MachineClass *mc)
mc->default_cpu_type = TYPE_RISCV_CPU_MIPS_P8700;
}
-DEFINE_MACHINE("boston-aia", boston_mach_class_init)
+DEFINE_MACHINE_RISCV64("boston-aia", boston_mach_class_init)
diff --git a/hw/riscv/microblaze-v-generic.c b/hw/riscv/microblaze-v-generic.c
index b0494b1ac50..d33ac39a68c 100644
--- a/hw/riscv/microblaze-v-generic.c
+++ b/hw/riscv/microblaze-v-generic.c
@@ -25,6 +25,7 @@
#include "system/address-spaces.h"
#include "hw/char/xilinx_uartlite.h"
#include "hw/misc/unimp.h"
+#include "hw/riscv/machines-qom.h"
#define LMB_BRAM_SIZE (128 * KiB)
#define MEMORY_BASEADDR 0x80000000
@@ -186,4 +187,4 @@ static void mb_v_generic_machine_init(MachineClass *mc)
mc->default_cpus = 1;
}
-DEFINE_MACHINE("amd-microblaze-v-generic", mb_v_generic_machine_init)
+DEFINE_MACHINE_RISCV32_64("amd-microblaze-v-generic", mb_v_generic_machine_init)
diff --git a/hw/riscv/microchip_pfsoc.c b/hw/riscv/microchip_pfsoc.c
index 743f31f0057..5e48a297083 100644
--- a/hw/riscv/microchip_pfsoc.c
+++ b/hw/riscv/microchip_pfsoc.c
@@ -49,6 +49,7 @@
#include "hw/misc/unimp.h"
#include "hw/riscv/boot.h"
#include "hw/riscv/riscv_hart.h"
+#include "hw/riscv/machines-qom.h"
#include "hw/riscv/microchip_pfsoc.h"
#include "hw/intc/riscv_aclint.h"
#include "hw/intc/sifive_plic.h"
@@ -751,6 +752,7 @@ static const TypeInfo microchip_icicle_kit_machine_typeinfo = {
.class_init = microchip_icicle_kit_machine_class_init,
.instance_init = microchip_icicle_kit_machine_instance_init,
.instance_size = sizeof(MicrochipIcicleKitState),
+ .interfaces = riscv64_machine_interfaces,
};
static void microchip_icicle_kit_machine_init_register_types(void)
diff --git a/hw/riscv/opentitan.c b/hw/riscv/opentitan.c
index 309125e854b..c8b2f028f23 100644
--- a/hw/riscv/opentitan.c
+++ b/hw/riscv/opentitan.c
@@ -26,6 +26,7 @@
#include "hw/core/boards.h"
#include "hw/misc/unimp.h"
#include "hw/riscv/boot.h"
+#include "hw/riscv/machines-qom.h"
#include "qemu/units.h"
#include "system/system.h"
#include "system/address-spaces.h"
@@ -335,6 +336,7 @@ static const TypeInfo open_titan_types[] = {
.parent = TYPE_MACHINE,
.instance_size = sizeof(OpenTitanState),
.class_init = opentitan_machine_class_init,
+ .interfaces = riscv32_machine_interfaces,
}
};
diff --git a/hw/riscv/shakti_c.c b/hw/riscv/shakti_c.c
index 852d5b97973..b1823a31250 100644
--- a/hw/riscv/shakti_c.c
+++ b/hw/riscv/shakti_c.c
@@ -19,6 +19,7 @@
#include "qemu/osdep.h"
#include "hw/core/boards.h"
#include "hw/riscv/shakti_c.h"
+#include "hw/riscv/machines-qom.h"
#include "qapi/error.h"
#include "qemu/error-report.h"
#include "hw/intc/sifive_plic.h"
@@ -93,6 +94,7 @@ static const TypeInfo shakti_c_machine_type_info = {
.class_init = shakti_c_machine_class_init,
.instance_init = shakti_c_machine_instance_init,
.instance_size = sizeof(ShaktiCMachineState),
+ .interfaces = riscv64_machine_interfaces,
};
static void shakti_c_machine_type_info_register(void)
diff --git a/hw/riscv/sifive_e.c b/hw/riscv/sifive_e.c
index 1acfea49668..71925583bd9 100644
--- a/hw/riscv/sifive_e.c
+++ b/hw/riscv/sifive_e.c
@@ -40,6 +40,7 @@
#include "hw/riscv/riscv_hart.h"
#include "hw/riscv/sifive_e.h"
#include "hw/riscv/boot.h"
+#include "hw/riscv/machines-qom.h"
#include "hw/char/sifive_uart.h"
#include "hw/intc/riscv_aclint.h"
#include "hw/intc/sifive_plic.h"
@@ -167,6 +168,7 @@ static const TypeInfo sifive_e_machine_typeinfo = {
.class_init = sifive_e_machine_class_init,
.instance_init = sifive_e_machine_instance_init,
.instance_size = sizeof(SiFiveEState),
+ .interfaces = riscv32_64_machine_interfaces,
};
static void sifive_e_machine_init_register_types(void)
diff --git a/hw/riscv/sifive_u.c b/hw/riscv/sifive_u.c
index 7ec67b25651..6a637e3b86c 100644
--- a/hw/riscv/sifive_u.c
+++ b/hw/riscv/sifive_u.c
@@ -51,6 +51,7 @@
#include "hw/riscv/riscv_hart.h"
#include "hw/riscv/sifive_u.h"
#include "hw/riscv/boot.h"
+#include "hw/riscv/machines-qom.h"
#include "hw/char/sifive_uart.h"
#include "hw/intc/riscv_aclint.h"
#include "hw/intc/sifive_plic.h"
@@ -742,6 +743,7 @@ static const TypeInfo sifive_u_machine_typeinfo = {
.class_init = sifive_u_machine_class_init,
.instance_init = sifive_u_machine_instance_init,
.instance_size = sizeof(SiFiveUState),
+ .interfaces = riscv32_64_machine_interfaces,
};
static void sifive_u_machine_init_register_types(void)
diff --git a/hw/riscv/spike.c b/hw/riscv/spike.c
index 87fe0f242f5..6e16adfe559 100644
--- a/hw/riscv/spike.c
+++ b/hw/riscv/spike.c
@@ -33,6 +33,7 @@
#include "hw/riscv/spike.h"
#include "hw/riscv/boot.h"
#include "hw/riscv/numa.h"
+#include "hw/riscv/machines-qom.h"
#include "hw/char/riscv_htif.h"
#include "hw/intc/riscv_aclint.h"
#include "chardev/char.h"
@@ -365,6 +366,7 @@ static const TypeInfo spike_machine_typeinfo = {
.class_init = spike_machine_class_init,
.instance_init = spike_machine_instance_init,
.instance_size = sizeof(SpikeState),
+ .interfaces = riscv32_64_machine_interfaces,
};
static void spike_machine_init_register_types(void)
diff --git a/hw/riscv/virt.c b/hw/riscv/virt.c
index 3d06c9c6104..ce64eaaef7d 100644
--- a/hw/riscv/virt.c
+++ b/hw/riscv/virt.c
@@ -36,6 +36,7 @@
#include "hw/riscv/riscv-iommu-bits.h"
#include "hw/riscv/virt.h"
#include "hw/riscv/boot.h"
+#include "hw/riscv/machines-qom.h"
#include "hw/riscv/numa.h"
#include "kvm/kvm_riscv.h"
#include "hw/firmware/smbios.h"
@@ -2001,6 +2002,8 @@ static const TypeInfo virt_machine_typeinfo = {
.instance_size = sizeof(RISCVVirtState),
.interfaces = (const InterfaceInfo[]) {
{ TYPE_HOTPLUG_HANDLER },
+ { TYPE_TARGET_RISCV32_MACHINE },
+ { TYPE_TARGET_RISCV64_MACHINE },
{ }
},
};
diff --git a/hw/riscv/xiangshan_kmh.c b/hw/riscv/xiangshan_kmh.c
index 436e51c1c59..76417ba7aba 100644
--- a/hw/riscv/xiangshan_kmh.c
+++ b/hw/riscv/xiangshan_kmh.c
@@ -41,6 +41,7 @@
#include "hw/riscv/boot.h"
#include "hw/riscv/xiangshan_kmh.h"
#include "hw/riscv/riscv_hart.h"
+#include "hw/riscv/machines-qom.h"
#include "system/system.h"
static const MemMapEntry xiangshan_kmh_memmap[] = {
@@ -211,6 +212,7 @@ static const TypeInfo xiangshan_kmh_machine_info = {
.parent = TYPE_MACHINE,
.instance_size = sizeof(XiangshanKmhState),
.class_init = xiangshan_kmh_machine_class_init,
+ .interfaces = riscv64_machine_interfaces,
};
static void xiangshan_kmh_machine_register_types(void)
--
2.53.0
^ permalink raw reply related [flat|nested] 34+ messages in thread* [PULL 05/32] hw/riscv/spike: Use 'max' CPU type by default
2026-05-27 10:30 [PULL 00/32] Single binary patches for 2026-05-27 Philippe Mathieu-Daudé
` (3 preceding siblings ...)
2026-05-27 10:30 ` [PULL 04/32] hw/riscv: Filter machine types for qemu-system-riscv32/64 binaries Philippe Mathieu-Daudé
@ 2026-05-27 10:30 ` Philippe Mathieu-Daudé
2026-05-27 10:30 ` [PULL 06/32] configs/target: Implement per-binary TargetInfo structure for riscv Philippe Mathieu-Daudé
` (27 subsequent siblings)
32 siblings, 0 replies; 34+ messages in thread
From: Philippe Mathieu-Daudé @ 2026-05-27 10:30 UTC (permalink / raw)
To: qemu-devel
The Spike RISC-V ISA Simulator aims for maximum coverage,
so can start with the 'max' CPU type by default.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Anton Johansson <anjo@rev.ng>
Reviewed-by: Daniel Henrique Barboza <daniel.barboza@oss.qualcomm.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-Id: <20260526095731.63525-2-philmd@linaro.org>
---
hw/riscv/spike.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/riscv/spike.c b/hw/riscv/spike.c
index 6e16adfe559..f9d00e0d5c4 100644
--- a/hw/riscv/spike.c
+++ b/hw/riscv/spike.c
@@ -342,7 +342,7 @@ static void spike_machine_class_init(ObjectClass *oc, const void *data)
mc->desc = "RISC-V Spike board";
mc->init = spike_board_init;
mc->max_cpus = SPIKE_CPUS_MAX;
- mc->default_cpu_type = TYPE_RISCV_CPU_BASE;
+ mc->default_cpu_type = TYPE_RISCV_CPU_MAX;
mc->possible_cpu_arch_ids = riscv_numa_possible_cpu_arch_ids;
mc->cpu_index_to_instance_props = riscv_numa_cpu_index_to_props;
mc->get_default_cpu_node_id = riscv_numa_get_default_cpu_node_id;
--
2.53.0
^ permalink raw reply related [flat|nested] 34+ messages in thread* [PULL 06/32] configs/target: Implement per-binary TargetInfo structure for riscv
2026-05-27 10:30 [PULL 00/32] Single binary patches for 2026-05-27 Philippe Mathieu-Daudé
` (4 preceding siblings ...)
2026-05-27 10:30 ` [PULL 05/32] hw/riscv/spike: Use 'max' CPU type by default Philippe Mathieu-Daudé
@ 2026-05-27 10:30 ` Philippe Mathieu-Daudé
2026-05-27 10:30 ` [PULL 07/32] target-info: Add target_riscv64() Philippe Mathieu-Daudé
` (26 subsequent siblings)
32 siblings, 0 replies; 34+ messages in thread
From: Philippe Mathieu-Daudé @ 2026-05-27 10:30 UTC (permalink / raw)
To: qemu-devel
From: Anton Johansson <anjo@rev.ng>
Defines TargetInfo for 32- and 64-bit riscv binaries.
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Signed-off-by: Anton Johansson <anjo@rev.ng>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Acked-by: Alistair Francis <alistair.francis@wdc.com>
Message-Id: <20260520-hw-riscv-cpu-int-v3-6-d1123ea63d9c@rev.ng>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
configs/targets/riscv32-softmmu.c | 26 ++++++++++++++++++++++++++
configs/targets/riscv64-softmmu.c | 26 ++++++++++++++++++++++++++
configs/targets/meson.build | 1 +
3 files changed, 53 insertions(+)
create mode 100644 configs/targets/riscv32-softmmu.c
create mode 100644 configs/targets/riscv64-softmmu.c
diff --git a/configs/targets/riscv32-softmmu.c b/configs/targets/riscv32-softmmu.c
new file mode 100644
index 00000000000..752c813077e
--- /dev/null
+++ b/configs/targets/riscv32-softmmu.c
@@ -0,0 +1,26 @@
+/*
+ * QEMU binary/target API (qemu-system-riscv32)
+ *
+ * Copyright (c) rev.ng Labs Srl.
+ *
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ */
+
+#include "qemu/osdep.h"
+#include "qemu/target-info-impl.h"
+#include "qemu/target-info-init.h"
+#include "hw/riscv/machines-qom.h"
+#include "target/riscv/cpu-qom.h"
+#include "target/riscv/cpu-param.h"
+
+static const TargetInfo target_info_riscv32_system = {
+ .target_name = "riscv32",
+ .target_arch = SYS_EMU_TARGET_RISCV32,
+ .long_bits = 32,
+ .cpu_type = TYPE_RISCV_CPU,
+ .machine_typename = TYPE_TARGET_RISCV32_MACHINE,
+ .endianness = ENDIAN_MODE_LITTLE,
+ .page_bits_init = TARGET_PAGE_BITS,
+};
+
+target_info_init(target_info_riscv32_system)
diff --git a/configs/targets/riscv64-softmmu.c b/configs/targets/riscv64-softmmu.c
new file mode 100644
index 00000000000..5150f0fe9d9
--- /dev/null
+++ b/configs/targets/riscv64-softmmu.c
@@ -0,0 +1,26 @@
+/*
+ * QEMU binary/target API (qemu-system-riscv64)
+ *
+ * Copyright (c) rev.ng Labs Srl.
+ *
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ */
+
+#include "qemu/osdep.h"
+#include "qemu/target-info-impl.h"
+#include "qemu/target-info-init.h"
+#include "hw/riscv/machines-qom.h"
+#include "target/riscv/cpu-qom.h"
+#include "target/riscv/cpu-param.h"
+
+static const TargetInfo target_info_riscv64_system = {
+ .target_name = "riscv64",
+ .target_arch = SYS_EMU_TARGET_RISCV64,
+ .long_bits = 64,
+ .cpu_type = TYPE_RISCV_CPU,
+ .machine_typename = TYPE_TARGET_RISCV64_MACHINE,
+ .endianness = ENDIAN_MODE_LITTLE,
+ .page_bits_init = TARGET_PAGE_BITS,
+};
+
+target_info_init(target_info_riscv64_system)
diff --git a/configs/targets/meson.build b/configs/targets/meson.build
index cca2514eb51..2ab4d27eaf5 100644
--- a/configs/targets/meson.build
+++ b/configs/targets/meson.build
@@ -1,5 +1,6 @@
foreach target : [
'arm-softmmu', 'aarch64-softmmu',
+ 'riscv32-softmmu', 'riscv64-softmmu'
]
config_target_info += {target : files(target + '.c')}
endforeach
--
2.53.0
^ permalink raw reply related [flat|nested] 34+ messages in thread* [PULL 07/32] target-info: Add target_riscv64()
2026-05-27 10:30 [PULL 00/32] Single binary patches for 2026-05-27 Philippe Mathieu-Daudé
` (5 preceding siblings ...)
2026-05-27 10:30 ` [PULL 06/32] configs/target: Implement per-binary TargetInfo structure for riscv Philippe Mathieu-Daudé
@ 2026-05-27 10:30 ` Philippe Mathieu-Daudé
2026-05-27 10:30 ` [PULL 08/32] target/riscv: Define MSTATUS_SBE and MSTATUS_MBE bit masks Philippe Mathieu-Daudé
` (25 subsequent siblings)
32 siblings, 0 replies; 34+ messages in thread
From: Philippe Mathieu-Daudé @ 2026-05-27 10:30 UTC (permalink / raw)
To: qemu-devel
From: Anton Johansson <anjo@rev.ng>
Adds a helper function to tell if the binary is targeting riscv64 or
not.
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Signed-off-by: Anton Johansson <anjo@rev.ng>
Reviewed-by: Chao Liu <chao.liu.zevorn@gmail.com>
Acked-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-Id: <20260520-hw-riscv-cpu-int-v3-7-d1123ea63d9c@rev.ng>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
include/qemu/target-info.h | 7 +++++++
target-info.c | 5 +++++
2 files changed, 12 insertions(+)
diff --git a/include/qemu/target-info.h b/include/qemu/target-info.h
index 23c997de541..6c5b714288e 100644
--- a/include/qemu/target-info.h
+++ b/include/qemu/target-info.h
@@ -99,4 +99,11 @@ bool target_ppc64(void);
*/
bool target_s390x(void);
+/**
+ * target_riscv64:
+ *
+ * Returns whether the target architecture is riscv64
+ */
+bool target_riscv64(void);
+
#endif
diff --git a/target-info.c b/target-info.c
index 28c458fc7a7..04c69c41f8a 100644
--- a/target-info.c
+++ b/target-info.c
@@ -93,3 +93,8 @@ bool target_s390x(void)
{
return target_arch() == SYS_EMU_TARGET_S390X;
}
+
+bool target_riscv64(void)
+{
+ return target_arch() == SYS_EMU_TARGET_RISCV64;
+}
--
2.53.0
^ permalink raw reply related [flat|nested] 34+ messages in thread* [PULL 08/32] target/riscv: Define MSTATUS_SBE and MSTATUS_MBE bit masks
2026-05-27 10:30 [PULL 00/32] Single binary patches for 2026-05-27 Philippe Mathieu-Daudé
` (6 preceding siblings ...)
2026-05-27 10:30 ` [PULL 07/32] target-info: Add target_riscv64() Philippe Mathieu-Daudé
@ 2026-05-27 10:30 ` Philippe Mathieu-Daudé
2026-05-27 10:30 ` [PULL 09/32] target/riscv: Use float_raise Philippe Mathieu-Daudé
` (24 subsequent siblings)
32 siblings, 0 replies; 34+ messages in thread
From: Philippe Mathieu-Daudé @ 2026-05-27 10:30 UTC (permalink / raw)
To: qemu-devel
From: Djordje Todorovic <Djordje.Todorovic@htecgroup.com>
Add the RISC-V privileged ISA defined bit positions for the Supervisor
Big-Endian (SBE, bit 36) and Machine Big-Endian (MBE, bit 37) fields
in the mstatus register. These are used alongside the existing
MSTATUS_UBE (bit 6) to control data endianness at each privilege level.
The MSTATUS_UBE definition was already present, but SBE and MBE were
missing.
Signed-off-by: Djordje Todorovic <djordje.todorovic@htecgroup.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-ID: <20260527083151.17876-2-djordje.todorovic@htecgroup.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
target/riscv/cpu_bits.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/target/riscv/cpu_bits.h b/target/riscv/cpu_bits.h
index b62dd82fe7c..3f146a43fe4 100644
--- a/target/riscv/cpu_bits.h
+++ b/target/riscv/cpu_bits.h
@@ -629,6 +629,8 @@
#define MSTATUS_SPELP 0x00800000 /* zicfilp */
#define MSTATUS_SDT 0x01000000
#define MSTATUS_MPELP 0x020000000000 /* zicfilp */
+#define MSTATUS_SBE 0x1000000000ULL
+#define MSTATUS_MBE 0x2000000000ULL
#define MSTATUS_GVA 0x4000000000ULL
#define MSTATUS_MPV 0x8000000000ULL
#define MSTATUS_MDT 0x40000000000ULL /* Smdbltrp extension */
--
2.53.0
^ permalink raw reply related [flat|nested] 34+ messages in thread* [PULL 09/32] target/riscv: Use float_raise
2026-05-27 10:30 [PULL 00/32] Single binary patches for 2026-05-27 Philippe Mathieu-Daudé
` (7 preceding siblings ...)
2026-05-27 10:30 ` [PULL 08/32] target/riscv: Define MSTATUS_SBE and MSTATUS_MBE bit masks Philippe Mathieu-Daudé
@ 2026-05-27 10:30 ` Philippe Mathieu-Daudé
2026-05-27 10:30 ` [PULL 10/32] target/hppa: Use DisasContext::mo_align in system emulation Philippe Mathieu-Daudé
` (23 subsequent siblings)
32 siblings, 0 replies; 34+ messages in thread
From: Philippe Mathieu-Daudé @ 2026-05-27 10:30 UTC (permalink / raw)
To: qemu-devel
From: Anton Blanchard <antonb@tenstorrent.com>
Use float_raise instead of open coding it.
Signed-off-by: Anton Blanchard <antonb@tenstorrent.com>
Reviewed-by: Chao Liu <chao.liu.zevorn@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Max Chou <max.chou@sifive.com>
Message-ID: <20260521110824.1091323-1-antonb@tenstorrent.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
target/riscv/vector_helper.c | 35 +++++++++++++++++------------------
1 file changed, 17 insertions(+), 18 deletions(-)
diff --git a/target/riscv/vector_helper.c b/target/riscv/vector_helper.c
index 12788b4b74e..954a85c03a1 100644
--- a/target/riscv/vector_helper.c
+++ b/target/riscv/vector_helper.c
@@ -4084,7 +4084,7 @@ static bfloat16 frsqrt7_h_bf16(bfloat16 f, float_status *s)
(bfloat16_is_infinity(f) && sign) ||
(bfloat16_is_normal(f) && sign) ||
(bfloat16_is_zero_or_denormal(f) && !bfloat16_is_zero(f) && sign)) {
- s->float_exception_flags |= float_flag_invalid;
+ float_raise(float_flag_invalid, s);
return bfloat16_default_nan(s);
}
@@ -4095,7 +4095,7 @@ static bfloat16 frsqrt7_h_bf16(bfloat16 f, float_status *s)
/* frsqrt7(+-0) = +-inf */
if (bfloat16_is_zero(f)) {
- s->float_exception_flags |= float_flag_divbyzero;
+ float_raise(float_flag_divbyzero, s);
return bfloat16_set_sign(bfloat16_infinity, sign);
}
@@ -4124,7 +4124,7 @@ static float16 frsqrt7_h(float16 f, float_status *s)
(float16_is_infinity(f) && sign) ||
(float16_is_normal(f) && sign) ||
(float16_is_zero_or_denormal(f) && !float16_is_zero(f) && sign)) {
- s->float_exception_flags |= float_flag_invalid;
+ float_raise(float_flag_invalid, s);
return float16_default_nan(s);
}
@@ -4135,7 +4135,7 @@ static float16 frsqrt7_h(float16 f, float_status *s)
/* frsqrt7(+-0) = +-inf */
if (float16_is_zero(f)) {
- s->float_exception_flags |= float_flag_divbyzero;
+ float_raise(float_flag_divbyzero, s);
return float16_set_sign(float16_infinity, sign);
}
@@ -4164,7 +4164,7 @@ static float32 frsqrt7_s(float32 f, float_status *s)
(float32_is_infinity(f) && sign) ||
(float32_is_normal(f) && sign) ||
(float32_is_zero_or_denormal(f) && !float32_is_zero(f) && sign)) {
- s->float_exception_flags |= float_flag_invalid;
+ float_raise(float_flag_invalid, s);
return float32_default_nan(s);
}
@@ -4175,7 +4175,7 @@ static float32 frsqrt7_s(float32 f, float_status *s)
/* frsqrt7(+-0) = +-inf */
if (float32_is_zero(f)) {
- s->float_exception_flags |= float_flag_divbyzero;
+ float_raise(float_flag_divbyzero, s);
return float32_set_sign(float32_infinity, sign);
}
@@ -4204,7 +4204,7 @@ static float64 frsqrt7_d(float64 f, float_status *s)
(float64_is_infinity(f) && sign) ||
(float64_is_normal(f) && sign) ||
(float64_is_zero_or_denormal(f) && !float64_is_zero(f) && sign)) {
- s->float_exception_flags |= float_flag_invalid;
+ float_raise(float_flag_invalid, s);
return float64_default_nan(s);
}
@@ -4215,7 +4215,7 @@ static float64 frsqrt7_d(float64 f, float_status *s)
/* frsqrt7(+-0) = +-inf */
if (float64_is_zero(f)) {
- s->float_exception_flags |= float_flag_divbyzero;
+ float_raise(float_flag_divbyzero, s);
return float64_set_sign(float64_infinity, sign);
}
@@ -4285,8 +4285,7 @@ static uint64_t frec7(uint64_t f, int exp_size, int frac_size,
* Overflow to inf or max value of same sign,
* depending on sign and rounding mode.
*/
- s->float_exception_flags |= (float_flag_inexact |
- float_flag_overflow);
+ float_raise(float_flag_inexact | float_flag_overflow, s);
if ((get_float_rounding_mode(s) == float_round_to_zero) ||
((get_float_rounding_mode(s) == float_round_down) && !sign) ||
@@ -4338,13 +4337,13 @@ static bfloat16 frec7_h_bf16(bfloat16 f, float_status *s)
/* frec7(+-0) = +-inf */
if (bfloat16_is_zero(f)) {
- s->float_exception_flags |= float_flag_divbyzero;
+ float_raise(float_flag_divbyzero, s);
return bfloat16_set_sign(bfloat16_infinity, sign);
}
/* frec7(sNaN) = canonical NaN */
if (bfloat16_is_signaling_nan(f, s)) {
- s->float_exception_flags |= float_flag_invalid;
+ float_raise(float_flag_invalid, s);
return bfloat16_default_nan(s);
}
@@ -4370,13 +4369,13 @@ static float16 frec7_h(float16 f, float_status *s)
/* frec7(+-0) = +-inf */
if (float16_is_zero(f)) {
- s->float_exception_flags |= float_flag_divbyzero;
+ float_raise(float_flag_divbyzero, s);
return float16_set_sign(float16_infinity, sign);
}
/* frec7(sNaN) = canonical NaN */
if (float16_is_signaling_nan(f, s)) {
- s->float_exception_flags |= float_flag_invalid;
+ float_raise(float_flag_invalid, s);
return float16_default_nan(s);
}
@@ -4402,13 +4401,13 @@ static float32 frec7_s(float32 f, float_status *s)
/* frec7(+-0) = +-inf */
if (float32_is_zero(f)) {
- s->float_exception_flags |= float_flag_divbyzero;
+ float_raise(float_flag_divbyzero, s);
return float32_set_sign(float32_infinity, sign);
}
/* frec7(sNaN) = canonical NaN */
if (float32_is_signaling_nan(f, s)) {
- s->float_exception_flags |= float_flag_invalid;
+ float_raise(float_flag_invalid, s);
return float32_default_nan(s);
}
@@ -4434,13 +4433,13 @@ static float64 frec7_d(float64 f, float_status *s)
/* frec7(+-0) = +-inf */
if (float64_is_zero(f)) {
- s->float_exception_flags |= float_flag_divbyzero;
+ float_raise(float_flag_divbyzero, s);
return float64_set_sign(float64_infinity, sign);
}
/* frec7(sNaN) = canonical NaN */
if (float64_is_signaling_nan(f, s)) {
- s->float_exception_flags |= float_flag_invalid;
+ float_raise(float_flag_invalid, s);
return float64_default_nan(s);
}
--
2.53.0
^ permalink raw reply related [flat|nested] 34+ messages in thread* [PULL 10/32] target/hppa: Use DisasContext::mo_align in system emulation
2026-05-27 10:30 [PULL 00/32] Single binary patches for 2026-05-27 Philippe Mathieu-Daudé
` (8 preceding siblings ...)
2026-05-27 10:30 ` [PULL 09/32] target/riscv: Use float_raise Philippe Mathieu-Daudé
@ 2026-05-27 10:30 ` Philippe Mathieu-Daudé
2026-05-27 10:30 ` [PULL 11/32] target/hppa: Inline UNALIGN() macro Philippe Mathieu-Daudé
` (22 subsequent siblings)
32 siblings, 0 replies; 34+ messages in thread
From: Philippe Mathieu-Daudé @ 2026-05-27 10:30 UTC (permalink / raw)
To: qemu-devel
Rename 'unalign' as 'mo_align' and use it in system emulation too.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Helge Deller <deller@gmx.de>
Message-Id: <20260513074323.10616-2-philmd@linaro.org>
---
target/hppa/translate.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/target/hppa/translate.c b/target/hppa/translate.c
index cf57ec518d4..a05e7e70d19 100644
--- a/target/hppa/translate.c
+++ b/target/hppa/translate.c
@@ -91,16 +91,14 @@ typedef struct DisasContext {
bool is_pa20;
bool insn_start_updated;
-#ifdef CONFIG_USER_ONLY
- MemOp unalign;
-#endif
+ MemOp mo_align;
} DisasContext;
#ifdef CONFIG_USER_ONLY
-#define UNALIGN(C) (C)->unalign
+#define UNALIGN(C) ((C)->mo_align)
#define MMU_DISABLED(C) false
#else
-#define UNALIGN(C) MO_ALIGN
+#define UNALIGN(C) ((C)->mo_align)
#define MMU_DISABLED(C) MMU_IDX_MMU_DISABLED((C)->mmu_idx)
#endif
@@ -4654,12 +4652,13 @@ static void hppa_tr_init_disas_context(DisasContextBase *dcbase, CPUState *cs)
#ifdef CONFIG_USER_ONLY
ctx->privilege = PRIV_USER;
ctx->mmu_idx = MMU_USER_IDX;
- ctx->unalign = (ctx->tb_flags & TB_FLAG_UNALIGN ? MO_UNALN : MO_ALIGN);
+ ctx->mo_align = (ctx->tb_flags & TB_FLAG_UNALIGN) ? MO_UNALN : MO_ALIGN;
#else
ctx->privilege = (ctx->tb_flags >> TB_FLAG_PRIV_SHIFT) & 3;
ctx->mmu_idx = (ctx->tb_flags & PSW_D
? PRIV_P_TO_MMU_IDX(ctx->privilege, ctx->tb_flags & PSW_P)
: ctx->tb_flags & PSW_W ? MMU_ABS_W_IDX : MMU_ABS_IDX);
+ ctx->mo_align = MO_ALIGN;
#endif
cs_base = ctx->base.tb->cs_base;
--
2.53.0
^ permalink raw reply related [flat|nested] 34+ messages in thread* [PULL 11/32] target/hppa: Inline UNALIGN() macro
2026-05-27 10:30 [PULL 00/32] Single binary patches for 2026-05-27 Philippe Mathieu-Daudé
` (9 preceding siblings ...)
2026-05-27 10:30 ` [PULL 10/32] target/hppa: Use DisasContext::mo_align in system emulation Philippe Mathieu-Daudé
@ 2026-05-27 10:30 ` Philippe Mathieu-Daudé
2026-05-27 10:30 ` [PULL 12/32] hw/arm/raspi: Initialize 64-bit CPU types during DeviceRealize() Philippe Mathieu-Daudé
` (21 subsequent siblings)
32 siblings, 0 replies; 34+ messages in thread
From: Philippe Mathieu-Daudé @ 2026-05-27 10:30 UTC (permalink / raw)
To: qemu-devel
Directly access DisasContext::mo_align in place.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Helge Deller <deller@gmx.de>
Message-Id: <20260513074323.10616-3-philmd@linaro.org>
---
target/hppa/translate.c | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/target/hppa/translate.c b/target/hppa/translate.c
index a05e7e70d19..4e348225654 100644
--- a/target/hppa/translate.c
+++ b/target/hppa/translate.c
@@ -95,10 +95,8 @@ typedef struct DisasContext {
} DisasContext;
#ifdef CONFIG_USER_ONLY
-#define UNALIGN(C) ((C)->mo_align)
#define MMU_DISABLED(C) false
#else
-#define UNALIGN(C) ((C)->mo_align)
#define MMU_DISABLED(C) MMU_IDX_MMU_DISABLED((C)->mmu_idx)
#endif
@@ -1603,10 +1601,11 @@ static void do_load_32(DisasContext *ctx, TCGv_i32 dest, unsigned rb,
/* Caller uses nullify_over/nullify_end. */
assert(ctx->null_cond.c == TCG_COND_NEVER);
+ mop |= ctx->mo_align;
mop |= mo_endian(ctx);
form_gva(ctx, &addr, &ofs, rb, rx, scale, disp, sp, modify,
MMU_DISABLED(ctx));
- tcg_gen_qemu_ld_i32(dest, addr, ctx->mmu_idx, mop | UNALIGN(ctx));
+ tcg_gen_qemu_ld_i32(dest, addr, ctx->mmu_idx, mop);
if (modify) {
save_gpr(ctx, rb, ofs);
}
@@ -1622,10 +1621,11 @@ static void do_load_64(DisasContext *ctx, TCGv_i64 dest, unsigned rb,
/* Caller uses nullify_over/nullify_end. */
assert(ctx->null_cond.c == TCG_COND_NEVER);
+ mop |= ctx->mo_align;
mop |= mo_endian(ctx);
- form_gva(ctx, &addr, &ofs, rb, rx, scale, disp, sp, modify,
+ form_gva(ctx, &addr, &ofs, rb, rx, scale, disp, sp, modify,
MMU_DISABLED(ctx));
- tcg_gen_qemu_ld_i64(dest, addr, ctx->mmu_idx, mop | UNALIGN(ctx));
+ tcg_gen_qemu_ld_i64(dest, addr, ctx->mmu_idx, mop);
if (modify) {
save_gpr(ctx, rb, ofs);
}
@@ -1641,10 +1641,11 @@ static void do_store_32(DisasContext *ctx, TCGv_i32 src, unsigned rb,
/* Caller uses nullify_over/nullify_end. */
assert(ctx->null_cond.c == TCG_COND_NEVER);
+ mop |= ctx->mo_align;
mop |= mo_endian(ctx);
form_gva(ctx, &addr, &ofs, rb, rx, scale, disp, sp, modify,
MMU_DISABLED(ctx));
- tcg_gen_qemu_st_i32(src, addr, ctx->mmu_idx, mop | UNALIGN(ctx));
+ tcg_gen_qemu_st_i32(src, addr, ctx->mmu_idx, mop);
if (modify) {
save_gpr(ctx, rb, ofs);
}
@@ -1660,10 +1661,11 @@ static void do_store_64(DisasContext *ctx, TCGv_i64 src, unsigned rb,
/* Caller uses nullify_over/nullify_end. */
assert(ctx->null_cond.c == TCG_COND_NEVER);
+ mop |= ctx->mo_align;
mop |= mo_endian(ctx);
form_gva(ctx, &addr, &ofs, rb, rx, scale, disp, sp, modify,
MMU_DISABLED(ctx));
- tcg_gen_qemu_st_i64(src, addr, ctx->mmu_idx, mop | UNALIGN(ctx));
+ tcg_gen_qemu_st_i64(src, addr, ctx->mmu_idx, mop);
if (modify) {
save_gpr(ctx, rb, ofs);
}
--
2.53.0
^ permalink raw reply related [flat|nested] 34+ messages in thread* [PULL 12/32] hw/arm/raspi: Initialize 64-bit CPU types during DeviceRealize()
2026-05-27 10:30 [PULL 00/32] Single binary patches for 2026-05-27 Philippe Mathieu-Daudé
` (10 preceding siblings ...)
2026-05-27 10:30 ` [PULL 11/32] target/hppa: Inline UNALIGN() macro Philippe Mathieu-Daudé
@ 2026-05-27 10:30 ` Philippe Mathieu-Daudé
2026-05-27 10:30 ` [PULL 13/32] hw/arm/raspi: Build objects once Philippe Mathieu-Daudé
` (20 subsequent siblings)
32 siblings, 0 replies; 34+ messages in thread
From: Philippe Mathieu-Daudé @ 2026-05-27 10:30 UTC (permalink / raw)
To: qemu-devel
bcm2836.c models 3 similar SoC: BCM2835, BCM2836 and BCM2837.
The BCM2837 is a 64-bit only SoC (Cortex-A53), only available
in the 64-bit binary.
If we build this file as common object, all BCM SoCs become
available in both 32 and 64-bit binaries; however when running
the introspection test on the 32-bit binary, the BCM2837 init()
method tries to init the Cortex-A53 type -- although not
realizing it -- which is not available. This can be avoided by
deferring the CPU type initialization to the SoC DeviceRealize
step (this is safe because nothing uses the CPU type before,
only the GIC access them, just after their realization).
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
Acked-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20260526203722.79463-2-philmd@linaro.org>
---
hw/arm/bcm2836.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/hw/arm/bcm2836.c b/hw/arm/bcm2836.c
index ee2f44debd1..03825e69d06 100644
--- a/hw/arm/bcm2836.c
+++ b/hw/arm/bcm2836.c
@@ -25,12 +25,7 @@ static void bcm283x_base_init(Object *obj)
{
BCM283XBaseState *s = BCM283X_BASE(obj);
BCM283XBaseClass *bc = BCM283X_BASE_GET_CLASS(obj);
- int n;
- for (n = 0; n < bc->core_count; n++) {
- object_initialize_child(obj, "cpu[*]", &s->cpu[n].core,
- bc->cpu_type);
- }
if (bc->core_count > 1) {
qdev_property_add_static(DEVICE(obj), &bcm2836_enabled_cores_property);
qdev_prop_set_uint32(DEVICE(obj), "enabled-cpus", bc->core_count);
@@ -65,6 +60,11 @@ bool bcm283x_common_realize(DeviceState *dev, BCMSocPeripheralBaseState *ps,
BCM283XBaseClass *bc = BCM283X_BASE_GET_CLASS(dev);
Object *obj;
+ for (int n = 0; n < bc->core_count; n++) {
+ object_initialize_child(OBJECT(dev), "cpu[*]", &s->cpu[n].core,
+ bc->cpu_type);
+ }
+
/* common peripherals from bcm2835 */
obj = object_property_get_link(OBJECT(dev), "ram", &error_abort);
--
2.53.0
^ permalink raw reply related [flat|nested] 34+ messages in thread* [PULL 13/32] hw/arm/raspi: Build objects once
2026-05-27 10:30 [PULL 00/32] Single binary patches for 2026-05-27 Philippe Mathieu-Daudé
` (11 preceding siblings ...)
2026-05-27 10:30 ` [PULL 12/32] hw/arm/raspi: Initialize 64-bit CPU types during DeviceRealize() Philippe Mathieu-Daudé
@ 2026-05-27 10:30 ` Philippe Mathieu-Daudé
2026-05-27 10:30 ` [PULL 14/32] hw/arm/aspeed: Do not realize 64-bit CPU types under QTest Philippe Mathieu-Daudé
` (19 subsequent siblings)
32 siblings, 0 replies; 34+ messages in thread
From: Philippe Mathieu-Daudé @ 2026-05-27 10:30 UTC (permalink / raw)
To: qemu-devel
Now than Raspi machines can be filtered when running a
qemu-system-arm or qemu-system-aarch64 binary, we can
remove the TARGET_AARCH64 #ifdef'ry and compile the
aspeed.c file once, moving it from arm_ss[] source set
to arm_common_ss[]. Note, we expose the TYPE_BCM2837
and TYPE_BCM2838 types to qemu-system-arm, but they are
not user-creatable, so not an issue.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
Acked-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20260526203722.79463-3-philmd@linaro.org>
---
hw/arm/bcm2836.c | 4 ----
hw/arm/raspi.c | 4 ----
hw/arm/meson.build | 8 ++++++--
3 files changed, 6 insertions(+), 10 deletions(-)
diff --git a/hw/arm/bcm2836.c b/hw/arm/bcm2836.c
index 03825e69d06..f4ecea908bd 100644
--- a/hw/arm/bcm2836.c
+++ b/hw/arm/bcm2836.c
@@ -195,7 +195,6 @@ static void bcm2836_class_init(ObjectClass *oc, const void *data)
dc->realize = bcm2836_realize;
};
-#ifdef TARGET_AARCH64
static void bcm2837_class_init(ObjectClass *oc, const void *data)
{
DeviceClass *dc = DEVICE_CLASS(oc);
@@ -208,7 +207,6 @@ static void bcm2837_class_init(ObjectClass *oc, const void *data)
bc->clusterid = 0x0;
dc->realize = bcm2836_realize;
};
-#endif
static const TypeInfo bcm283x_types[] = {
{
@@ -219,12 +217,10 @@ static const TypeInfo bcm283x_types[] = {
.name = TYPE_BCM2836,
.parent = TYPE_BCM283X,
.class_init = bcm2836_class_init,
-#ifdef TARGET_AARCH64
}, {
.name = TYPE_BCM2837,
.parent = TYPE_BCM283X,
.class_init = bcm2837_class_init,
-#endif
}, {
.name = TYPE_BCM283X,
.parent = TYPE_BCM283X_BASE,
diff --git a/hw/arm/raspi.c b/hw/arm/raspi.c
index 00e4a10466a..3f99e87428c 100644
--- a/hw/arm/raspi.c
+++ b/hw/arm/raspi.c
@@ -367,7 +367,6 @@ static void raspi2b_machine_class_init(ObjectClass *oc, const void *data)
raspi_machine_class_init(mc, rmc->board_rev);
};
-#ifdef TARGET_AARCH64
static void raspi3ap_machine_class_init(ObjectClass *oc, const void *data)
{
MachineClass *mc = MACHINE_CLASS(oc);
@@ -387,7 +386,6 @@ static void raspi3b_machine_class_init(ObjectClass *oc, const void *data)
rmc->board_rev = 0xa02082;
raspi_machine_class_init(mc, rmc->board_rev);
};
-#endif /* TARGET_AARCH64 */
static const TypeInfo raspi_machine_types[] = {
{
@@ -405,7 +403,6 @@ static const TypeInfo raspi_machine_types[] = {
.parent = TYPE_RASPI_MACHINE,
.class_init = raspi2b_machine_class_init,
.interfaces = arm_machine_interfaces,
-#ifdef TARGET_AARCH64
}, {
.name = MACHINE_TYPE_NAME("raspi3ap"),
.parent = TYPE_RASPI_MACHINE,
@@ -416,7 +413,6 @@ static const TypeInfo raspi_machine_types[] = {
.parent = TYPE_RASPI_MACHINE,
.class_init = raspi3b_machine_class_init,
.interfaces = aarch64_machine_interfaces,
-#endif
}, {
.name = TYPE_RASPI_MACHINE,
.parent = TYPE_RASPI_BASE_MACHINE,
diff --git a/hw/arm/meson.build b/hw/arm/meson.build
index 68d204bb4eb..f149ed68d09 100644
--- a/hw/arm/meson.build
+++ b/hw/arm/meson.build
@@ -27,8 +27,12 @@ arm_common_ss.add(when: 'CONFIG_ALLWINNER_A10', if_true: files('allwinner-a10.c'
arm_common_ss.add(when: 'CONFIG_ALLWINNER_H3', if_true: files('allwinner-h3.c', 'orangepi.c'))
arm_common_ss.add(when: 'CONFIG_ALLWINNER_R40', if_true: files('allwinner-r40.c', 'bananapi_m2u.c'))
arm_common_ss.add(when: 'CONFIG_MAX78000_SOC', if_true: files('max78000_soc.c'))
-arm_ss.add(when: 'CONFIG_RASPI', if_true: files('bcm2836.c', 'raspi.c'))
-arm_common_ss.add(when: ['CONFIG_RASPI', 'TARGET_AARCH64'], if_true: files('bcm2838.c', 'raspi4b.c'))
+arm_common_ss.add(when: 'CONFIG_RASPI', if_true: files(
+ 'bcm2836.c',
+ 'bcm2838.c',
+ 'raspi.c',
+ 'raspi4b.c'
+))
arm_common_ss.add(when: 'CONFIG_STM32F100_SOC', if_true: files('stm32f100_soc.c'))
arm_common_ss.add(when: 'CONFIG_STM32F205_SOC', if_true: files('stm32f205_soc.c'))
arm_common_ss.add(when: 'CONFIG_STM32F405_SOC', if_true: files('stm32f405_soc.c'))
--
2.53.0
^ permalink raw reply related [flat|nested] 34+ messages in thread* [PULL 14/32] hw/arm/aspeed: Do not realize 64-bit CPU types under QTest
2026-05-27 10:30 [PULL 00/32] Single binary patches for 2026-05-27 Philippe Mathieu-Daudé
` (12 preceding siblings ...)
2026-05-27 10:30 ` [PULL 13/32] hw/arm/raspi: Build objects once Philippe Mathieu-Daudé
@ 2026-05-27 10:30 ` Philippe Mathieu-Daudé
2026-05-27 10:30 ` [PULL 15/32] hw/arm/aspeed: Build objects once Philippe Mathieu-Daudé
` (18 subsequent siblings)
32 siblings, 0 replies; 34+ messages in thread
From: Philippe Mathieu-Daudé @ 2026-05-27 10:30 UTC (permalink / raw)
To: qemu-devel
aspeed_ast27x0.c models 2 similar SoC based on a 64-bit only
CPU (Cortex-A35), only available in the 64-bit binary.
If we build this file as common object, these SoCs become
available in both 32 and 64-bit binaries; however when running
the introspection test on the 32-bit binary, the init() method
tries to init the Cortex-A35 type -- although not realizing it
-- which is not available. Simply skip CPU initialization when
running QTests on a 32-bit binary, asserting the realization
step is not reached.
Suggested-by: Cédric Le Goater <clg@kaod.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
Acked-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20260526203722.79463-4-philmd@linaro.org>
---
hw/arm/aspeed_ast27x0.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/hw/arm/aspeed_ast27x0.c b/hw/arm/aspeed_ast27x0.c
index d7ce14e8c56..dddd7d21060 100644
--- a/hw/arm/aspeed_ast27x0.c
+++ b/hw/arm/aspeed_ast27x0.c
@@ -18,6 +18,7 @@
#include "qemu/error-report.h"
#include "hw/i2c/aspeed_i2c.h"
#include "net/net.h"
+#include "system/qtest.h"
#include "system/system.h"
#include "hw/intc/arm_gicv3.h"
#include "qobject/qlist.h"
@@ -419,6 +420,15 @@ static void aspeed_soc_ast2700_init(Object *obj)
}
for (i = 0; i < sc->num_cpus; i++) {
+ if (qtest_enabled() && !target_aarch64()) {
+ /*
+ * Introspection qtest just want to create this object
+ * without realizing it. ARM_CPU_TYPE_NAME("cortex-a35")
+ * is not available on 32-bit binary: skip it since we
+ * won't even realize it.
+ */
+ continue;
+ }
object_initialize_child(obj, "cpu[*]", &a->cpu[i],
aspeed_soc_cpu_type(sc->valid_cpu_types));
}
@@ -693,6 +703,10 @@ static void aspeed_soc_ast2700_realize(DeviceState *dev, Error **errp)
qemu_irq irq;
int uart;
+ if (qtest_enabled() && !target_aarch64()) {
+ g_assert_not_reached();
+ }
+
/* Default boot region (SPI memory or ROMs) */
memory_region_init(&s->spi_boot_container, OBJECT(s),
"aspeed.spi_boot_container", 0x400000000);
--
2.53.0
^ permalink raw reply related [flat|nested] 34+ messages in thread* [PULL 15/32] hw/arm/aspeed: Build objects once
2026-05-27 10:30 [PULL 00/32] Single binary patches for 2026-05-27 Philippe Mathieu-Daudé
` (13 preceding siblings ...)
2026-05-27 10:30 ` [PULL 14/32] hw/arm/aspeed: Do not realize 64-bit CPU types under QTest Philippe Mathieu-Daudé
@ 2026-05-27 10:30 ` Philippe Mathieu-Daudé
2026-05-27 10:30 ` [PULL 16/32] hw/arm/meson: Remove now unused arm_ss[] source set Philippe Mathieu-Daudé
` (17 subsequent siblings)
32 siblings, 0 replies; 34+ messages in thread
From: Philippe Mathieu-Daudé @ 2026-05-27 10:30 UTC (permalink / raw)
To: qemu-devel
Commit 064f1ce95fe ("hw/arm/aspeed: Split AST2700 EVB
machine into a separate source file for maintainability")
remove the last TARGET_AARCH64 use.
Now than Aspeed machines can be filtered when running a
qemu-system-arm or qemu-system-aarch64 binary, we can
compile the aspeed.c file once, moving it from arm_ss[]
source set to arm_common_ss[].
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Acked-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20260526203722.79463-5-philmd@linaro.org>
---
hw/arm/meson.build | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/hw/arm/meson.build b/hw/arm/meson.build
index f149ed68d09..22e8ad924a2 100644
--- a/hw/arm/meson.build
+++ b/hw/arm/meson.build
@@ -43,7 +43,7 @@ arm_common_ss.add(when: 'CONFIG_XLNX_VERSAL', if_true: files('xlnx-versal.c', 'x
arm_common_ss.add(when: 'CONFIG_FSL_IMX25', if_true: files('fsl-imx25.c', 'imx25_pdk.c'))
arm_common_ss.add(when: 'CONFIG_FSL_IMX31', if_true: files('fsl-imx31.c', 'kzm.c'))
arm_common_ss.add(when: 'CONFIG_FSL_IMX6', if_true: files('fsl-imx6.c'))
-arm_ss.add(when: 'CONFIG_ASPEED_SOC', if_true: files(
+arm_common_ss.add(when: 'CONFIG_ASPEED_SOC', if_true: files(
'aspeed.c',
'aspeed_soc_common.c',
'aspeed_ast2400.c',
@@ -69,8 +69,7 @@ arm_ss.add(when: 'CONFIG_ASPEED_SOC', if_true: files(
'aspeed_ast10x0.c',
'aspeed_ast10x0_evb.c',
'aspeed_ast1040.c',
- 'aspeed_ast1040_evb.c'))
-arm_common_ss.add(when: ['CONFIG_ASPEED_SOC', 'TARGET_AARCH64'], if_true: files(
+ 'aspeed_ast1040_evb.c',
'aspeed_ast1700.c',
'aspeed_ast27x0.c',
'aspeed_ast27x0_evb.c',
--
2.53.0
^ permalink raw reply related [flat|nested] 34+ messages in thread* [PULL 16/32] hw/arm/meson: Remove now unused arm_ss[] source set
2026-05-27 10:30 [PULL 00/32] Single binary patches for 2026-05-27 Philippe Mathieu-Daudé
` (14 preceding siblings ...)
2026-05-27 10:30 ` [PULL 15/32] hw/arm/aspeed: Build objects once Philippe Mathieu-Daudé
@ 2026-05-27 10:30 ` Philippe Mathieu-Daudé
2026-05-27 10:30 ` [PULL 17/32] target/arm: Introduce common system/user meson " Philippe Mathieu-Daudé
` (16 subsequent siblings)
32 siblings, 0 replies; 34+ messages in thread
From: Philippe Mathieu-Daudé @ 2026-05-27 10:30 UTC (permalink / raw)
To: qemu-devel
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Reviewed-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
Acked-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20260526203722.79463-6-philmd@linaro.org>
---
hw/arm/meson.build | 2 --
1 file changed, 2 deletions(-)
diff --git a/hw/arm/meson.build b/hw/arm/meson.build
index 22e8ad924a2..8f66a80e10e 100644
--- a/hw/arm/meson.build
+++ b/hw/arm/meson.build
@@ -1,4 +1,3 @@
-arm_ss = ss.source_set()
arm_common_ss = ss.source_set()
arm_common_ss.add(when: 'CONFIG_ARM_VIRT', if_true: files('virt.c'))
arm_common_ss.add(when: 'CONFIG_ACPI', if_true: files('virt-acpi-build.c'))
@@ -111,5 +110,4 @@ arm_common_ss.add(when: 'CONFIG_VEXPRESS', if_true: files('vexpress.c'))
arm_common_ss.add(files('boot.c'))
-hw_arch += {'arm': arm_ss}
hw_common_arch += {'arm': arm_common_ss}
--
2.53.0
^ permalink raw reply related [flat|nested] 34+ messages in thread* [PULL 17/32] target/arm: Introduce common system/user meson source set
2026-05-27 10:30 [PULL 00/32] Single binary patches for 2026-05-27 Philippe Mathieu-Daudé
` (15 preceding siblings ...)
2026-05-27 10:30 ` [PULL 16/32] hw/arm/meson: Remove now unused arm_ss[] source set Philippe Mathieu-Daudé
@ 2026-05-27 10:30 ` Philippe Mathieu-Daudé
2026-05-27 10:30 ` [PULL 18/32] target/arm: Build gdbstub64.o as common object Philippe Mathieu-Daudé
` (15 subsequent siblings)
32 siblings, 0 replies; 34+ messages in thread
From: Philippe Mathieu-Daudé @ 2026-05-27 10:30 UTC (permalink / raw)
To: qemu-devel
Introduce a source set common to system / user.
No logical change intended.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
Acked-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20260526203722.79463-7-philmd@linaro.org>
---
target/arm/meson.build | 21 +++++++++--------
target/arm/tcg/meson.build | 48 ++++++++++++--------------------------
2 files changed, 26 insertions(+), 43 deletions(-)
diff --git a/target/arm/meson.build b/target/arm/meson.build
index 4723f9f170a..e56fc943bdf 100644
--- a/target/arm/meson.build
+++ b/target/arm/meson.build
@@ -1,6 +1,7 @@
arm_ss = ss.source_set()
arm_common_ss = ss.source_set()
arm_common_system_ss = ss.source_set()
+arm_common_user_system_ss = ss.source_set()
arm_system_ss = ss.source_set()
arm_stubs_ss = ss.source_set()
arm_user_ss = ss.source_set()
@@ -16,6 +17,13 @@ arm_ss.add(when: 'TARGET_AARCH64', if_true: files(
arm_common_ss.add(files(
'mmuidx.c',
))
+arm_common_user_system_ss.add(files(
+ 'cpregs-gcs.c',
+ 'cpregs-pmu.c',
+ 'debug_helper.c',
+ 'helper.c',
+ 'vfp_fpscr.c',
+))
arm_common_system_ss.add(files(
'arm-qmp-cmds.c',
@@ -26,11 +34,6 @@ arm_system_ss.add(when: 'CONFIG_HVF', if_true: files('hyp_gdbstub.c'))
arm_user_ss.add(files('cpu.c'))
arm_stubs_ss.add(files('cpu32-stubs.c'))
arm_user_ss.add(files(
- 'cpregs-gcs.c',
- 'cpregs-pmu.c',
- 'debug_helper.c',
- 'helper.c',
- 'vfp_fpscr.c',
'el2-stubs.c',
'cpregs-omap-stub.c',
))
@@ -45,15 +48,10 @@ arm_common_system_ss.add(files(
'arch_dump.c',
'arm-powerctl.c',
'cortex-regs.c',
- 'cpregs-gcs.c',
'cpregs-omap.c',
- 'cpregs-pmu.c',
'cpu-irq.c',
- 'debug_helper.c',
- 'helper.c',
'machine.c',
'ptw.c',
- 'vfp_fpscr.c',
))
subdir('hvf')
@@ -65,6 +63,9 @@ else
arm_common_system_ss.add(files('tcg-stubs.c'))
endif
+arm_user_ss.add_all(arm_common_user_system_ss)
+arm_common_system_ss.add_all(arm_common_user_system_ss)
+
target_arch += {'arm': arm_ss}
target_system_arch += {'arm': arm_system_ss}
target_user_arch += {'arm': arm_user_ss}
diff --git a/target/arm/tcg/meson.build b/target/arm/tcg/meson.build
index 1b751d59183..b0f5342245b 100644
--- a/target/arm/tcg/meson.build
+++ b/target/arm/tcg/meson.build
@@ -52,60 +52,42 @@ arm_common_system_ss.add(when: 'CONFIG_ARM_V7M', if_true: files('cpu-v7m.c'))
arm_user_ss.add(when: 'TARGET_AARCH64', if_false: files('cpu-v7m.c'))
arm_common_ss.add(zlib)
-
arm_common_ss.add(files(
'arith_helper.c',
'crypto_helper.c',
'idau.c',
))
-arm_common_system_ss.add(
+arm_common_user_system_ss.add(
m_nocp_d,
mve_d,
neon_d,
translate32_d,
vfp_d,
files(
- 'cpregs-at.c',
'debug.c',
- 'gicv5-cpuif.c',
- 'hflags.c',
'gengvec.c',
+ 'hflags.c',
'm_helper.c',
'mve_helper.c',
'neon_helper.c',
'op_helper.c',
+ 'translate.c',
+ 'translate-m-nocp.c',
+ 'translate-mve.c',
+ 'translate-neon.c',
+ 'translate-vfp.c',
+ 'vec_helper.c',
+ 'vfp_helper.c',
+))
+
+arm_common_system_ss.add(files(
+ 'cpregs-at.c',
+ 'gicv5-cpuif.c',
'psci.c',
'tlb_helper.c',
'tlb-insns.c',
- 'translate.c',
- 'translate-m-nocp.c',
- 'translate-mve.c',
- 'translate-neon.c',
- 'translate-vfp.c',
- 'vec_helper.c',
- 'vfp_helper.c',
))
-arm_user_ss.add(
- m_nocp_d,
- mve_d,
- neon_d,
- translate32_d,
- vfp_d,
- files(
- 'debug.c',
- 'gengvec.c',
- 'hflags.c',
- 'm_helper.c',
- 'mve_helper.c',
- 'neon_helper.c',
- 'op_helper.c',
+arm_user_ss.add(files(
'tlb_helper.c',
- 'translate.c',
- 'translate-m-nocp.c',
- 'translate-mve.c',
- 'translate-neon.c',
- 'translate-vfp.c',
- 'vec_helper.c',
- 'vfp_helper.c',
))
--
2.53.0
^ permalink raw reply related [flat|nested] 34+ messages in thread* [PULL 18/32] target/arm: Build gdbstub64.o as common object
2026-05-27 10:30 [PULL 00/32] Single binary patches for 2026-05-27 Philippe Mathieu-Daudé
` (16 preceding siblings ...)
2026-05-27 10:30 ` [PULL 17/32] target/arm: Introduce common system/user meson " Philippe Mathieu-Daudé
@ 2026-05-27 10:30 ` Philippe Mathieu-Daudé
2026-05-27 10:30 ` [PULL 19/32] target/arm: Build cpu64.o " Philippe Mathieu-Daudé
` (14 subsequent siblings)
32 siblings, 0 replies; 34+ messages in thread
From: Philippe Mathieu-Daudé @ 2026-05-27 10:30 UTC (permalink / raw)
To: qemu-devel
While gdbstub64.o is already built once, build it as
common object, reducing target-specific set in arm_ss[].
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
Acked-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20260526203722.79463-8-philmd@linaro.org>
---
target/arm/meson.build | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/target/arm/meson.build b/target/arm/meson.build
index e56fc943bdf..5376be2e3bc 100644
--- a/target/arm/meson.build
+++ b/target/arm/meson.build
@@ -11,7 +11,6 @@ arm_user_ss.add(files('gdbstub.c'))
arm_ss.add(when: 'TARGET_AARCH64', if_true: files(
'cpu64.c',
- 'gdbstub64.c'
))
arm_common_ss.add(files(
@@ -24,6 +23,9 @@ arm_common_user_system_ss.add(files(
'helper.c',
'vfp_fpscr.c',
))
+arm_common_user_system_ss.add(when: 'TARGET_AARCH64', if_true: files(
+ 'gdbstub64.c'
+))
arm_common_system_ss.add(files(
'arm-qmp-cmds.c',
--
2.53.0
^ permalink raw reply related [flat|nested] 34+ messages in thread* [PULL 19/32] target/arm: Build cpu64.o as common object
2026-05-27 10:30 [PULL 00/32] Single binary patches for 2026-05-27 Philippe Mathieu-Daudé
` (17 preceding siblings ...)
2026-05-27 10:30 ` [PULL 18/32] target/arm: Build gdbstub64.o as common object Philippe Mathieu-Daudé
@ 2026-05-27 10:30 ` Philippe Mathieu-Daudé
2026-05-27 10:30 ` [PULL 20/32] target/arm: Extract common code related to 'max' CPU Philippe Mathieu-Daudé
` (13 subsequent siblings)
32 siblings, 0 replies; 34+ messages in thread
From: Philippe Mathieu-Daudé @ 2026-05-27 10:30 UTC (permalink / raw)
To: qemu-devel
While gdbstub64.o is already built once, build it as
common object, reducing target-specific set in arm_ss[].
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
Acked-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20260526203722.79463-9-philmd@linaro.org>
---
target/arm/tcg/meson.build | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/target/arm/tcg/meson.build b/target/arm/tcg/meson.build
index b0f5342245b..d5a95bf54f2 100644
--- a/target/arm/tcg/meson.build
+++ b/target/arm/tcg/meson.build
@@ -35,7 +35,6 @@ arm_ss.add(files(
))
arm_ss.add(when: 'TARGET_AARCH64', if_true: files(
- 'cpu64.c',
'gengvec64.c',
'translate-a64.c',
'translate-sve.c',
@@ -80,6 +79,9 @@ arm_common_user_system_ss.add(
'vec_helper.c',
'vfp_helper.c',
))
+arm_common_user_system_ss.add(when: 'TARGET_AARCH64', if_true: files(
+ 'cpu64.c',
+))
arm_common_system_ss.add(files(
'cpregs-at.c',
--
2.53.0
^ permalink raw reply related [flat|nested] 34+ messages in thread* [PULL 20/32] target/arm: Extract common code related to 'max' CPU
2026-05-27 10:30 [PULL 00/32] Single binary patches for 2026-05-27 Philippe Mathieu-Daudé
` (18 preceding siblings ...)
2026-05-27 10:30 ` [PULL 19/32] target/arm: Build cpu64.o " Philippe Mathieu-Daudé
@ 2026-05-27 10:30 ` Philippe Mathieu-Daudé
2026-05-27 10:30 ` [PULL 21/32] target/arm: Use make_ccsidr(LEGACY) in 32 bit 'max' CPU type Philippe Mathieu-Daudé
` (12 subsequent siblings)
32 siblings, 0 replies; 34+ messages in thread
From: Philippe Mathieu-Daudé @ 2026-05-27 10:30 UTC (permalink / raw)
To: qemu-devel
Extract common code related to 'max' CPU. This commit only
move code used by the 32-bit 'max' CPU, but we will soon add
the 64-bit counterpart, so name it generically as "cpu-max.c".
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
Acked-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20260526203722.79463-10-philmd@linaro.org>
---
target/arm/cpu-max.c | 106 +++++++++++++++++++++++++++++++++++++++++
target/arm/tcg/cpu32.c | 96 -------------------------------------
target/arm/meson.build | 1 +
3 files changed, 107 insertions(+), 96 deletions(-)
create mode 100644 target/arm/cpu-max.c
diff --git a/target/arm/cpu-max.c b/target/arm/cpu-max.c
new file mode 100644
index 00000000000..9fd48ce46e2
--- /dev/null
+++ b/target/arm/cpu-max.c
@@ -0,0 +1,106 @@
+/*
+ * QEMU ARM 'max' CPU
+ *
+ * Copyright (c) 2018 Linaro Ltd
+ *
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ */
+
+#include "qemu/osdep.h"
+#include "target/arm/internals.h"
+
+/* Share AArch32 -cpu max features with AArch64. */
+void aa32_max_features(ARMCPU *cpu)
+{
+ uint32_t t;
+ ARMISARegisters *isar = &cpu->isar;
+
+ /* Add additional features supported by QEMU */
+ t = GET_IDREG(isar, ID_ISAR5);
+ t = FIELD_DP32(t, ID_ISAR5, AES, 2); /* FEAT_PMULL */
+ t = FIELD_DP32(t, ID_ISAR5, SHA1, 1); /* FEAT_SHA1 */
+ t = FIELD_DP32(t, ID_ISAR5, SHA2, 1); /* FEAT_SHA256 */
+ t = FIELD_DP32(t, ID_ISAR5, CRC32, 1);
+ t = FIELD_DP32(t, ID_ISAR5, RDM, 1); /* FEAT_RDM */
+ t = FIELD_DP32(t, ID_ISAR5, VCMA, 1); /* FEAT_FCMA */
+ SET_IDREG(isar, ID_ISAR5, t);
+
+ t = GET_IDREG(isar, ID_ISAR6);
+ t = FIELD_DP32(t, ID_ISAR6, JSCVT, 1); /* FEAT_JSCVT */
+ t = FIELD_DP32(t, ID_ISAR6, DP, 1); /* Feat_DotProd */
+ t = FIELD_DP32(t, ID_ISAR6, FHM, 1); /* FEAT_FHM */
+ t = FIELD_DP32(t, ID_ISAR6, SB, 1); /* FEAT_SB */
+ t = FIELD_DP32(t, ID_ISAR6, SPECRES, 1); /* FEAT_SPECRES */
+ t = FIELD_DP32(t, ID_ISAR6, BF16, 1); /* FEAT_AA32BF16 */
+ t = FIELD_DP32(t, ID_ISAR6, I8MM, 1); /* FEAT_AA32I8MM */
+ SET_IDREG(isar, ID_ISAR6, t);
+
+ t = cpu->isar.mvfr1;
+ t = FIELD_DP32(t, MVFR1, FPHP, 3); /* FEAT_FP16 */
+ t = FIELD_DP32(t, MVFR1, SIMDHP, 2); /* FEAT_FP16 */
+ cpu->isar.mvfr1 = t;
+
+ t = cpu->isar.mvfr2;
+ t = FIELD_DP32(t, MVFR2, SIMDMISC, 3); /* SIMD MaxNum */
+ t = FIELD_DP32(t, MVFR2, FPMISC, 4); /* FP MaxNum */
+ cpu->isar.mvfr2 = t;
+
+ FIELD_DP32_IDREG(isar, ID_MMFR3, PAN, 2); /* FEAT_PAN2 */
+
+ t = GET_IDREG(isar, ID_MMFR4);
+ t = FIELD_DP32(t, ID_MMFR4, HPDS, 2); /* FEAT_HPDS2 */
+ t = FIELD_DP32(t, ID_MMFR4, AC2, 1); /* ACTLR2, HACTLR2 */
+ t = FIELD_DP32(t, ID_MMFR4, CNP, 1); /* FEAT_TTCNP */
+ t = FIELD_DP32(t, ID_MMFR4, XNX, 1); /* FEAT_XNX */
+ t = FIELD_DP32(t, ID_MMFR4, EVT, 2); /* FEAT_EVT */
+ SET_IDREG(isar, ID_MMFR4, t);
+
+ FIELD_DP32_IDREG(isar, ID_MMFR5, ETS, 2); /* FEAT_ETS2 */
+
+ t = GET_IDREG(isar, ID_PFR0);
+ t = FIELD_DP32(t, ID_PFR0, CSV2, 2); /* FEAT_CSV2 */
+ t = FIELD_DP32(t, ID_PFR0, DIT, 1); /* FEAT_DIT */
+ t = FIELD_DP32(t, ID_PFR0, RAS, 1); /* FEAT_RAS */
+ SET_IDREG(isar, ID_PFR0, t);
+
+ t = GET_IDREG(isar, ID_PFR2);
+ t = FIELD_DP32(t, ID_PFR2, CSV3, 1); /* FEAT_CSV3 */
+ t = FIELD_DP32(t, ID_PFR2, SSBS, 1); /* FEAT_SSBS */
+ SET_IDREG(isar, ID_PFR2, t);
+
+ t = GET_IDREG(isar, ID_DFR0);
+ t = FIELD_DP32(t, ID_DFR0, COPDBG, 10); /* FEAT_Debugv8p8 */
+ t = FIELD_DP32(t, ID_DFR0, COPSDBG, 10); /* FEAT_Debugv8p8 */
+ t = FIELD_DP32(t, ID_DFR0, PERFMON, 6); /* FEAT_PMUv3p5 */
+ SET_IDREG(isar, ID_DFR0, t);
+
+ /* Debug ID registers. */
+
+ /* Bit[15] is RES1, Bit[13] and Bits[11:0] are RES0. */
+ t = 0x00008000;
+ t = FIELD_DP32(t, DBGDIDR, SE_IMP, 1);
+ t = FIELD_DP32(t, DBGDIDR, NSUHD_IMP, 1);
+ t = FIELD_DP32(t, DBGDIDR, VERSION, 10); /* FEAT_Debugv8p8 */
+ t = FIELD_DP32(t, DBGDIDR, CTX_CMPS, 1);
+ t = FIELD_DP32(t, DBGDIDR, BRPS, 5);
+ t = FIELD_DP32(t, DBGDIDR, WRPS, 3);
+ cpu->isar.dbgdidr = t;
+
+ t = 0;
+ t = FIELD_DP32(t, DBGDEVID, PCSAMPLE, 3);
+ t = FIELD_DP32(t, DBGDEVID, WPADDRMASK, 1);
+ t = FIELD_DP32(t, DBGDEVID, BPADDRMASK, 15);
+ t = FIELD_DP32(t, DBGDEVID, VECTORCATCH, 0);
+ t = FIELD_DP32(t, DBGDEVID, VIRTEXTNS, 1);
+ t = FIELD_DP32(t, DBGDEVID, DOUBLELOCK, 1);
+ t = FIELD_DP32(t, DBGDEVID, AUXREGS, 0);
+ t = FIELD_DP32(t, DBGDEVID, CIDMASK, 0);
+ cpu->isar.dbgdevid = t;
+
+ /* Bits[31:4] are RES0. */
+ t = 0;
+ t = FIELD_DP32(t, DBGDEVID1, PCSROFFSET, 2);
+ cpu->isar.dbgdevid1 = t;
+
+ FIELD_DP32_IDREG(isar, ID_DFR1, HPMN0, 1); /* FEAT_HPMN0 */
+}
diff --git a/target/arm/tcg/cpu32.c b/target/arm/tcg/cpu32.c
index 73d21c6cf7d..919ed8a6cf8 100644
--- a/target/arm/tcg/cpu32.c
+++ b/target/arm/tcg/cpu32.c
@@ -18,102 +18,6 @@
#include "cpregs.h"
-/* Share AArch32 -cpu max features with AArch64. */
-void aa32_max_features(ARMCPU *cpu)
-{
- uint32_t t;
- ARMISARegisters *isar = &cpu->isar;
-
- /* Add additional features supported by QEMU */
- t = GET_IDREG(isar, ID_ISAR5);
- t = FIELD_DP32(t, ID_ISAR5, AES, 2); /* FEAT_PMULL */
- t = FIELD_DP32(t, ID_ISAR5, SHA1, 1); /* FEAT_SHA1 */
- t = FIELD_DP32(t, ID_ISAR5, SHA2, 1); /* FEAT_SHA256 */
- t = FIELD_DP32(t, ID_ISAR5, CRC32, 1);
- t = FIELD_DP32(t, ID_ISAR5, RDM, 1); /* FEAT_RDM */
- t = FIELD_DP32(t, ID_ISAR5, VCMA, 1); /* FEAT_FCMA */
- SET_IDREG(isar, ID_ISAR5, t);
-
- t = GET_IDREG(isar, ID_ISAR6);
- t = FIELD_DP32(t, ID_ISAR6, JSCVT, 1); /* FEAT_JSCVT */
- t = FIELD_DP32(t, ID_ISAR6, DP, 1); /* Feat_DotProd */
- t = FIELD_DP32(t, ID_ISAR6, FHM, 1); /* FEAT_FHM */
- t = FIELD_DP32(t, ID_ISAR6, SB, 1); /* FEAT_SB */
- t = FIELD_DP32(t, ID_ISAR6, SPECRES, 1); /* FEAT_SPECRES */
- t = FIELD_DP32(t, ID_ISAR6, BF16, 1); /* FEAT_AA32BF16 */
- t = FIELD_DP32(t, ID_ISAR6, I8MM, 1); /* FEAT_AA32I8MM */
- SET_IDREG(isar, ID_ISAR6, t);
-
- t = cpu->isar.mvfr1;
- t = FIELD_DP32(t, MVFR1, FPHP, 3); /* FEAT_FP16 */
- t = FIELD_DP32(t, MVFR1, SIMDHP, 2); /* FEAT_FP16 */
- cpu->isar.mvfr1 = t;
-
- t = cpu->isar.mvfr2;
- t = FIELD_DP32(t, MVFR2, SIMDMISC, 3); /* SIMD MaxNum */
- t = FIELD_DP32(t, MVFR2, FPMISC, 4); /* FP MaxNum */
- cpu->isar.mvfr2 = t;
-
- FIELD_DP32_IDREG(isar, ID_MMFR3, PAN, 2); /* FEAT_PAN2 */
-
- t = GET_IDREG(isar, ID_MMFR4);
- t = FIELD_DP32(t, ID_MMFR4, HPDS, 2); /* FEAT_HPDS2 */
- t = FIELD_DP32(t, ID_MMFR4, AC2, 1); /* ACTLR2, HACTLR2 */
- t = FIELD_DP32(t, ID_MMFR4, CNP, 1); /* FEAT_TTCNP */
- t = FIELD_DP32(t, ID_MMFR4, XNX, 1); /* FEAT_XNX */
- t = FIELD_DP32(t, ID_MMFR4, EVT, 2); /* FEAT_EVT */
- SET_IDREG(isar, ID_MMFR4, t);
-
- FIELD_DP32_IDREG(isar, ID_MMFR5, ETS, 2); /* FEAT_ETS2 */
-
- t = GET_IDREG(isar, ID_PFR0);
- t = FIELD_DP32(t, ID_PFR0, CSV2, 2); /* FEAT_CSV2 */
- t = FIELD_DP32(t, ID_PFR0, DIT, 1); /* FEAT_DIT */
- t = FIELD_DP32(t, ID_PFR0, RAS, 1); /* FEAT_RAS */
- SET_IDREG(isar, ID_PFR0, t);
-
- t = GET_IDREG(isar, ID_PFR2);
- t = FIELD_DP32(t, ID_PFR2, CSV3, 1); /* FEAT_CSV3 */
- t = FIELD_DP32(t, ID_PFR2, SSBS, 1); /* FEAT_SSBS */
- SET_IDREG(isar, ID_PFR2, t);
-
- t = GET_IDREG(isar, ID_DFR0);
- t = FIELD_DP32(t, ID_DFR0, COPDBG, 10); /* FEAT_Debugv8p8 */
- t = FIELD_DP32(t, ID_DFR0, COPSDBG, 10); /* FEAT_Debugv8p8 */
- t = FIELD_DP32(t, ID_DFR0, PERFMON, 6); /* FEAT_PMUv3p5 */
- SET_IDREG(isar, ID_DFR0, t);
-
- /* Debug ID registers. */
-
- /* Bit[15] is RES1, Bit[13] and Bits[11:0] are RES0. */
- t = 0x00008000;
- t = FIELD_DP32(t, DBGDIDR, SE_IMP, 1);
- t = FIELD_DP32(t, DBGDIDR, NSUHD_IMP, 1);
- t = FIELD_DP32(t, DBGDIDR, VERSION, 10); /* FEAT_Debugv8p8 */
- t = FIELD_DP32(t, DBGDIDR, CTX_CMPS, 1);
- t = FIELD_DP32(t, DBGDIDR, BRPS, 5);
- t = FIELD_DP32(t, DBGDIDR, WRPS, 3);
- cpu->isar.dbgdidr = t;
-
- t = 0;
- t = FIELD_DP32(t, DBGDEVID, PCSAMPLE, 3);
- t = FIELD_DP32(t, DBGDEVID, WPADDRMASK, 1);
- t = FIELD_DP32(t, DBGDEVID, BPADDRMASK, 15);
- t = FIELD_DP32(t, DBGDEVID, VECTORCATCH, 0);
- t = FIELD_DP32(t, DBGDEVID, VIRTEXTNS, 1);
- t = FIELD_DP32(t, DBGDEVID, DOUBLELOCK, 1);
- t = FIELD_DP32(t, DBGDEVID, AUXREGS, 0);
- t = FIELD_DP32(t, DBGDEVID, CIDMASK, 0);
- cpu->isar.dbgdevid = t;
-
- /* Bits[31:4] are RES0. */
- t = 0;
- t = FIELD_DP32(t, DBGDEVID1, PCSROFFSET, 2);
- cpu->isar.dbgdevid1 = t;
-
- FIELD_DP32_IDREG(isar, ID_DFR1, HPMN0, 1); /* FEAT_HPMN0 */
-}
-
/* CPU models. These are not needed for the AArch64 linux-user build. */
#if !defined(CONFIG_USER_ONLY) || !defined(TARGET_AARCH64)
diff --git a/target/arm/meson.build b/target/arm/meson.build
index 5376be2e3bc..3e02941d0d5 100644
--- a/target/arm/meson.build
+++ b/target/arm/meson.build
@@ -9,6 +9,7 @@ arm_user_ss = ss.source_set()
arm_common_system_ss.add(files('gdbstub.c'))
arm_user_ss.add(files('gdbstub.c'))
+arm_ss.add(files('cpu-max.c'))
arm_ss.add(when: 'TARGET_AARCH64', if_true: files(
'cpu64.c',
))
--
2.53.0
^ permalink raw reply related [flat|nested] 34+ messages in thread* [PULL 21/32] target/arm: Use make_ccsidr(LEGACY) in 32 bit 'max' CPU type
2026-05-27 10:30 [PULL 00/32] Single binary patches for 2026-05-27 Philippe Mathieu-Daudé
` (19 preceding siblings ...)
2026-05-27 10:30 ` [PULL 20/32] target/arm: Extract common code related to 'max' CPU Philippe Mathieu-Daudé
@ 2026-05-27 10:30 ` Philippe Mathieu-Daudé
2026-05-27 10:30 ` [PULL 22/32] target/arm: Implement DBGDEVID* registers in max AArch32 CPU Philippe Mathieu-Daudé
` (11 subsequent siblings)
32 siblings, 0 replies; 34+ messages in thread
From: Philippe Mathieu-Daudé @ 2026-05-27 10:30 UTC (permalink / raw)
To: qemu-devel
Commit 676624d757a ("target/arm/tcg: refine cache descriptions
with a wrapper") added the make_ccsidr() helper. Use it. Besides
being simpler to review, it also makes arm_max_initfn() more in
line which aarch64_a57_initfn(), which it almost duplicates.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
Acked-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20260526203722.79463-11-philmd@linaro.org>
---
target/arm/tcg/cpu32.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/target/arm/tcg/cpu32.c b/target/arm/tcg/cpu32.c
index 919ed8a6cf8..cf643ce43b1 100644
--- a/target/arm/tcg/cpu32.c
+++ b/target/arm/tcg/cpu32.c
@@ -9,6 +9,7 @@
*/
#include "qemu/osdep.h"
+#include "qemu/units.h"
#include "cpu.h"
#include "accel/tcg/cpu-ops.h"
#include "internals.h"
@@ -756,9 +757,12 @@ static void arm_max_initfn(Object *obj)
SET_IDREG(isar, ID_ISAR6, 0);
cpu->isar.reset_pmcr_el0 = 0x41013000;
SET_IDREG(isar, CLIDR, 0x0a200023);
- cpu->ccsidr[0] = 0x701fe00a; /* 32KB L1 dcache */
- cpu->ccsidr[1] = 0x201fe012; /* 48KB L1 icache */
- cpu->ccsidr[2] = 0x70ffe07a; /* 2048KB L2 cache */
+ /* 32KB L1 dcache */
+ cpu->ccsidr[0] = make_ccsidr(CCSIDR_FORMAT_LEGACY, 4, 64, 32 * KiB, 7);
+ /* 48KB L1 icache */
+ cpu->ccsidr[1] = make_ccsidr(CCSIDR_FORMAT_LEGACY, 3, 64, 48 * KiB, 2);
+ /* 2048KB L2 cache */
+ cpu->ccsidr[2] = make_ccsidr(CCSIDR_FORMAT_LEGACY, 16, 64, 2 * MiB, 7);
define_cortex_a72_a57_a53_cp_reginfo(cpu);
aa32_max_features(cpu);
--
2.53.0
^ permalink raw reply related [flat|nested] 34+ messages in thread* [PULL 22/32] target/arm: Implement DBGDEVID* registers in max AArch32 CPU
2026-05-27 10:30 [PULL 00/32] Single binary patches for 2026-05-27 Philippe Mathieu-Daudé
` (20 preceding siblings ...)
2026-05-27 10:30 ` [PULL 21/32] target/arm: Use make_ccsidr(LEGACY) in 32 bit 'max' CPU type Philippe Mathieu-Daudé
@ 2026-05-27 10:30 ` Philippe Mathieu-Daudé
2026-05-27 10:30 ` [PULL 23/32] target/arm: Only set %kvm_target when KVM is enabled Philippe Mathieu-Daudé
` (10 subsequent siblings)
32 siblings, 0 replies; 34+ messages in thread
From: Philippe Mathieu-Daudé @ 2026-05-27 10:30 UTC (permalink / raw)
To: qemu-devel
32-bit ARM max CPU is a 'Cortex-A57 advertising none of the AArch64
features'. Keep it as close as possible as the A57, by implementing
the debug ID registers, following the changes in aarch64_a57_initfn
added by commits 48eb3ae64b3 ("target-arm: Adjust debug ID registers
per-CPU") and 09754ca867f ("target/arm: Implement AArch32 DBGDEVID,
DBGDEVID1, DBGDEVID2").
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
Acked-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20260526203722.79463-12-philmd@linaro.org>
---
target/arm/tcg/cpu32.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/target/arm/tcg/cpu32.c b/target/arm/tcg/cpu32.c
index cf643ce43b1..2e8afc28602 100644
--- a/target/arm/tcg/cpu32.c
+++ b/target/arm/tcg/cpu32.c
@@ -755,6 +755,9 @@ static void arm_max_initfn(Object *obj)
SET_IDREG(isar, ID_ISAR4, 0x00011142);
SET_IDREG(isar, ID_ISAR5, 0x00011121);
SET_IDREG(isar, ID_ISAR6, 0);
+ cpu->isar.dbgdidr = 0x3516d000;
+ cpu->isar.dbgdevid = 0x01110f13;
+ cpu->isar.dbgdevid1 = 0x2;
cpu->isar.reset_pmcr_el0 = 0x41013000;
SET_IDREG(isar, CLIDR, 0x0a200023);
/* 32KB L1 dcache */
--
2.53.0
^ permalink raw reply related [flat|nested] 34+ messages in thread* [PULL 23/32] target/arm: Only set %kvm_target when KVM is enabled
2026-05-27 10:30 [PULL 00/32] Single binary patches for 2026-05-27 Philippe Mathieu-Daudé
` (21 preceding siblings ...)
2026-05-27 10:30 ` [PULL 22/32] target/arm: Implement DBGDEVID* registers in max AArch32 CPU Philippe Mathieu-Daudé
@ 2026-05-27 10:30 ` Philippe Mathieu-Daudé
2026-05-27 10:30 ` [PULL 24/32] target/arm: Factor aarch64_aa32_a57_init() out Philippe Mathieu-Daudé
` (9 subsequent siblings)
32 siblings, 0 replies; 34+ messages in thread
From: Philippe Mathieu-Daudé @ 2026-05-27 10:30 UTC (permalink / raw)
To: qemu-devel
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
Acked-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20260526203722.79463-13-philmd@linaro.org>
---
target/arm/cpu64.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/target/arm/cpu64.c b/target/arm/cpu64.c
index b38a78aac3f..7b2f09cf8ec 100644
--- a/target/arm/cpu64.c
+++ b/target/arm/cpu64.c
@@ -701,7 +701,9 @@ static void aarch64_a57_initfn(Object *obj)
set_feature(&cpu->env, ARM_FEATURE_EL2);
set_feature(&cpu->env, ARM_FEATURE_EL3);
set_feature(&cpu->env, ARM_FEATURE_PMU);
- cpu->kvm_target = QEMU_KVM_ARM_TARGET_CORTEX_A57;
+ if (kvm_enabled()) {
+ cpu->kvm_target = QEMU_KVM_ARM_TARGET_CORTEX_A57;
+ }
cpu->midr = 0x411fd070;
cpu->revidr = 0x00000000;
cpu->reset_fpsid = 0x41034070;
--
2.53.0
^ permalink raw reply related [flat|nested] 34+ messages in thread* [PULL 24/32] target/arm: Factor aarch64_aa32_a57_init() out
2026-05-27 10:30 [PULL 00/32] Single binary patches for 2026-05-27 Philippe Mathieu-Daudé
` (22 preceding siblings ...)
2026-05-27 10:30 ` [PULL 23/32] target/arm: Only set %kvm_target when KVM is enabled Philippe Mathieu-Daudé
@ 2026-05-27 10:30 ` Philippe Mathieu-Daudé
2026-05-27 10:30 ` [PULL 25/32] target/arm: Re-use common aarch64_aa32_a57_init() helper Philippe Mathieu-Daudé
` (8 subsequent siblings)
32 siblings, 0 replies; 34+ messages in thread
From: Philippe Mathieu-Daudé @ 2026-05-27 10:30 UTC (permalink / raw)
To: qemu-devel
In order to make the following commit easier to review,
factor aarch64_aa32_a57_init() out of aarch64_a57_initfn()
as a preliminary step. We only add a %aa32_only argument
to restrict AArch64 features.
Suggested-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
Acked-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20260526203722.79463-14-philmd@linaro.org>
---
target/arm/cpu64.c | 36 ++++++++++++++++++++++++------------
1 file changed, 24 insertions(+), 12 deletions(-)
diff --git a/target/arm/cpu64.c b/target/arm/cpu64.c
index 7b2f09cf8ec..7dce17fdb20 100644
--- a/target/arm/cpu64.c
+++ b/target/arm/cpu64.c
@@ -686,17 +686,20 @@ void aarch64_cpu_lpa2_finalize(ARMCPU *cpu, Error **errp)
SET_IDREG(&cpu->isar, ID_AA64MMFR0, t);
}
-static void aarch64_a57_initfn(Object *obj)
+static void aarch64_aa32_a57_init(Object *obj, bool aa32_only)
{
ARMCPU *cpu = ARM_CPU(obj);
ARMISARegisters *isar = &cpu->isar;
+ const bool aarch64_enabled = !aa32_only;
cpu->dtb_compatible = "arm,cortex-a57";
set_feature(&cpu->env, ARM_FEATURE_V8);
set_feature(&cpu->env, ARM_FEATURE_NEON);
set_feature(&cpu->env, ARM_FEATURE_GENERIC_TIMER);
set_feature(&cpu->env, ARM_FEATURE_BACKCOMPAT_CNTFRQ);
- set_feature(&cpu->env, ARM_FEATURE_AARCH64);
+ if (aarch64_enabled) {
+ set_feature(&cpu->env, ARM_FEATURE_AARCH64);
+ }
set_feature(&cpu->env, ARM_FEATURE_CBAR_RO);
set_feature(&cpu->env, ARM_FEATURE_EL2);
set_feature(&cpu->env, ARM_FEATURE_EL3);
@@ -727,10 +730,12 @@ static void aarch64_a57_initfn(Object *obj)
SET_IDREG(isar, ID_ISAR4, 0x00011142);
SET_IDREG(isar, ID_ISAR5, 0x00011121);
SET_IDREG(isar, ID_ISAR6, 0);
- SET_IDREG(isar, ID_AA64PFR0, 0x00002222);
- SET_IDREG(isar, ID_AA64DFR0, 0x10305106);
- SET_IDREG(isar, ID_AA64ISAR0, 0x00011120);
- SET_IDREG(isar, ID_AA64MMFR0, 0x00001124);
+ if (aarch64_enabled) {
+ SET_IDREG(isar, ID_AA64PFR0, 0x00002222);
+ SET_IDREG(isar, ID_AA64DFR0, 0x10305106);
+ SET_IDREG(isar, ID_AA64ISAR0, 0x00011120);
+ SET_IDREG(isar, ID_AA64MMFR0, 0x00001124);
+ }
cpu->isar.dbgdidr = 0x3516d000;
cpu->isar.dbgdevid = 0x01110f13;
cpu->isar.dbgdevid1 = 0x2;
@@ -742,14 +747,21 @@ static void aarch64_a57_initfn(Object *obj)
cpu->ccsidr[1] = make_ccsidr(CCSIDR_FORMAT_LEGACY, 3, 64, 48 * KiB, 2);
/* 2048KB L2 cache */
cpu->ccsidr[2] = make_ccsidr(CCSIDR_FORMAT_LEGACY, 16, 64, 2 * MiB, 7);
- set_dczid_bs(cpu, 4); /* 64 bytes */
- cpu->gic_num_lrs = 4;
- cpu->gic_vpribits = 5;
- cpu->gic_vprebits = 5;
- cpu->gic_pribits = 5;
+ if (aarch64_enabled) {
+ set_dczid_bs(cpu, 4); /* 64 bytes */
+ cpu->gic_num_lrs = 4;
+ cpu->gic_vpribits = 5;
+ cpu->gic_vprebits = 5;
+ cpu->gic_pribits = 5;
+ }
define_cortex_a72_a57_a53_cp_reginfo(cpu);
}
+static void aarch64_a57_initfn(Object *obj)
+{
+ aarch64_aa32_a57_init(obj, false);
+}
+
static void aarch64_a53_initfn(Object *obj)
{
ARMCPU *cpu = ARM_CPU(obj);
@@ -886,7 +898,7 @@ static void aarch64_max_initfn(Object *obj)
}
if (tcg_enabled() || qtest_enabled()) {
- aarch64_a57_initfn(obj);
+ aarch64_aa32_a57_init(obj, false);
}
/* '-cpu max' for TCG: we currently do this as "A57 with extra things" */
--
2.53.0
^ permalink raw reply related [flat|nested] 34+ messages in thread* [PULL 25/32] target/arm: Re-use common aarch64_aa32_a57_init() helper
2026-05-27 10:30 [PULL 00/32] Single binary patches for 2026-05-27 Philippe Mathieu-Daudé
` (23 preceding siblings ...)
2026-05-27 10:30 ` [PULL 24/32] target/arm: Factor aarch64_aa32_a57_init() out Philippe Mathieu-Daudé
@ 2026-05-27 10:30 ` Philippe Mathieu-Daudé
2026-05-27 10:30 ` [PULL 26/32] target/arm: Define 'max' CPU type in cpu-max.c Philippe Mathieu-Daudé
` (7 subsequent siblings)
32 siblings, 0 replies; 34+ messages in thread
From: Philippe Mathieu-Daudé @ 2026-05-27 10:30 UTC (permalink / raw)
To: qemu-devel
Make aarch64_aa32_a57_init() common by exposing its prototype
and defining it in cpu-max.c. Call it in arm_max_initfn()
restricted to AArch32.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
Acked-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20260526203722.79463-15-philmd@linaro.org>
---
target/arm/internals.h | 1 +
target/arm/cpu-max.c | 74 ++++++++++++++++++++++++++++++++++++++++++
target/arm/cpu64.c | 71 ----------------------------------------
target/arm/tcg/cpu32.c | 48 ++-------------------------
4 files changed, 77 insertions(+), 117 deletions(-)
diff --git a/target/arm/internals.h b/target/arm/internals.h
index 5a2263799c7..27414e7481f 100644
--- a/target/arm/internals.h
+++ b/target/arm/internals.h
@@ -1773,6 +1773,7 @@ void aarch64_max_tcg_initfn(Object *obj);
void aarch64_add_pauth_properties(Object *obj);
void aarch64_add_sve_properties(Object *obj);
void aarch64_add_sme_properties(Object *obj);
+void aarch64_aa32_a57_init(Object *obj, bool aa32_only);
/* Return true if the gdbstub is presenting an AArch64 CPU */
static inline bool arm_gdbstub_is_aarch64(ARMCPU *cpu)
diff --git a/target/arm/cpu-max.c b/target/arm/cpu-max.c
index 9fd48ce46e2..6fc54ebe74e 100644
--- a/target/arm/cpu-max.c
+++ b/target/arm/cpu-max.c
@@ -7,7 +7,81 @@
*/
#include "qemu/osdep.h"
+#include "qemu/units.h"
+#include "system/kvm.h"
#include "target/arm/internals.h"
+#include "target/arm/cpregs.h"
+
+void aarch64_aa32_a57_init(Object *obj, bool aa32_only)
+{
+ ARMCPU *cpu = ARM_CPU(obj);
+ ARMISARegisters *isar = &cpu->isar;
+ const bool aarch64_enabled = !aa32_only;
+
+ cpu->dtb_compatible = "arm,cortex-a57";
+ set_feature(&cpu->env, ARM_FEATURE_V8);
+ set_feature(&cpu->env, ARM_FEATURE_NEON);
+ set_feature(&cpu->env, ARM_FEATURE_GENERIC_TIMER);
+ set_feature(&cpu->env, ARM_FEATURE_BACKCOMPAT_CNTFRQ);
+ if (aarch64_enabled) {
+ set_feature(&cpu->env, ARM_FEATURE_AARCH64);
+ }
+ set_feature(&cpu->env, ARM_FEATURE_CBAR_RO);
+ set_feature(&cpu->env, ARM_FEATURE_EL2);
+ set_feature(&cpu->env, ARM_FEATURE_EL3);
+ set_feature(&cpu->env, ARM_FEATURE_PMU);
+ if (kvm_enabled()) {
+ cpu->kvm_target = QEMU_KVM_ARM_TARGET_CORTEX_A57;
+ }
+ cpu->midr = 0x411fd070;
+ cpu->revidr = 0x00000000;
+ cpu->reset_fpsid = 0x41034070;
+ cpu->isar.mvfr0 = 0x10110222;
+ cpu->isar.mvfr1 = 0x12111111;
+ cpu->isar.mvfr2 = 0x00000043;
+ cpu->ctr = 0x8444c004;
+ cpu->reset_sctlr = 0x00c50838;
+ SET_IDREG(isar, ID_PFR0, 0x00000131);
+ SET_IDREG(isar, ID_PFR1, 0x00011011);
+ SET_IDREG(isar, ID_DFR0, 0x03010066);
+ SET_IDREG(isar, ID_AFR0, 0x00000000);
+ SET_IDREG(isar, ID_MMFR0, 0x10101105);
+ SET_IDREG(isar, ID_MMFR1, 0x40000000);
+ SET_IDREG(isar, ID_MMFR2, 0x01260000);
+ SET_IDREG(isar, ID_MMFR3, 0x02102211);
+ SET_IDREG(isar, ID_ISAR0, 0x02101110);
+ SET_IDREG(isar, ID_ISAR1, 0x13112111);
+ SET_IDREG(isar, ID_ISAR2, 0x21232042);
+ SET_IDREG(isar, ID_ISAR3, 0x01112131);
+ SET_IDREG(isar, ID_ISAR4, 0x00011142);
+ SET_IDREG(isar, ID_ISAR5, 0x00011121);
+ SET_IDREG(isar, ID_ISAR6, 0);
+ if (aarch64_enabled) {
+ SET_IDREG(isar, ID_AA64PFR0, 0x00002222);
+ SET_IDREG(isar, ID_AA64DFR0, 0x10305106);
+ SET_IDREG(isar, ID_AA64ISAR0, 0x00011120);
+ SET_IDREG(isar, ID_AA64MMFR0, 0x00001124);
+ }
+ cpu->isar.dbgdidr = 0x3516d000;
+ cpu->isar.dbgdevid = 0x01110f13;
+ cpu->isar.dbgdevid1 = 0x2;
+ cpu->isar.reset_pmcr_el0 = 0x41013000;
+ SET_IDREG(isar, CLIDR, 0x0a200023);
+ /* 32KB L1 dcache */
+ cpu->ccsidr[0] = make_ccsidr(CCSIDR_FORMAT_LEGACY, 4, 64, 32 * KiB, 7);
+ /* 48KB L1 icache */
+ cpu->ccsidr[1] = make_ccsidr(CCSIDR_FORMAT_LEGACY, 3, 64, 48 * KiB, 2);
+ /* 2048KB L2 cache */
+ cpu->ccsidr[2] = make_ccsidr(CCSIDR_FORMAT_LEGACY, 16, 64, 2 * MiB, 7);
+ if (aarch64_enabled) {
+ set_dczid_bs(cpu, 4); /* 64 bytes */
+ cpu->gic_num_lrs = 4;
+ cpu->gic_vpribits = 5;
+ cpu->gic_vprebits = 5;
+ cpu->gic_pribits = 5;
+ }
+ define_cortex_a72_a57_a53_cp_reginfo(cpu);
+}
/* Share AArch32 -cpu max features with AArch64. */
void aa32_max_features(ARMCPU *cpu)
diff --git a/target/arm/cpu64.c b/target/arm/cpu64.c
index 7dce17fdb20..499d154dace 100644
--- a/target/arm/cpu64.c
+++ b/target/arm/cpu64.c
@@ -686,77 +686,6 @@ void aarch64_cpu_lpa2_finalize(ARMCPU *cpu, Error **errp)
SET_IDREG(&cpu->isar, ID_AA64MMFR0, t);
}
-static void aarch64_aa32_a57_init(Object *obj, bool aa32_only)
-{
- ARMCPU *cpu = ARM_CPU(obj);
- ARMISARegisters *isar = &cpu->isar;
- const bool aarch64_enabled = !aa32_only;
-
- cpu->dtb_compatible = "arm,cortex-a57";
- set_feature(&cpu->env, ARM_FEATURE_V8);
- set_feature(&cpu->env, ARM_FEATURE_NEON);
- set_feature(&cpu->env, ARM_FEATURE_GENERIC_TIMER);
- set_feature(&cpu->env, ARM_FEATURE_BACKCOMPAT_CNTFRQ);
- if (aarch64_enabled) {
- set_feature(&cpu->env, ARM_FEATURE_AARCH64);
- }
- set_feature(&cpu->env, ARM_FEATURE_CBAR_RO);
- set_feature(&cpu->env, ARM_FEATURE_EL2);
- set_feature(&cpu->env, ARM_FEATURE_EL3);
- set_feature(&cpu->env, ARM_FEATURE_PMU);
- if (kvm_enabled()) {
- cpu->kvm_target = QEMU_KVM_ARM_TARGET_CORTEX_A57;
- }
- cpu->midr = 0x411fd070;
- cpu->revidr = 0x00000000;
- cpu->reset_fpsid = 0x41034070;
- cpu->isar.mvfr0 = 0x10110222;
- cpu->isar.mvfr1 = 0x12111111;
- cpu->isar.mvfr2 = 0x00000043;
- cpu->ctr = 0x8444c004;
- cpu->reset_sctlr = 0x00c50838;
- SET_IDREG(isar, ID_PFR0, 0x00000131);
- SET_IDREG(isar, ID_PFR1, 0x00011011);
- SET_IDREG(isar, ID_DFR0, 0x03010066);
- SET_IDREG(isar, ID_AFR0, 0x00000000);
- SET_IDREG(isar, ID_MMFR0, 0x10101105);
- SET_IDREG(isar, ID_MMFR1, 0x40000000);
- SET_IDREG(isar, ID_MMFR2, 0x01260000);
- SET_IDREG(isar, ID_MMFR3, 0x02102211);
- SET_IDREG(isar, ID_ISAR0, 0x02101110);
- SET_IDREG(isar, ID_ISAR1, 0x13112111);
- SET_IDREG(isar, ID_ISAR2, 0x21232042);
- SET_IDREG(isar, ID_ISAR3, 0x01112131);
- SET_IDREG(isar, ID_ISAR4, 0x00011142);
- SET_IDREG(isar, ID_ISAR5, 0x00011121);
- SET_IDREG(isar, ID_ISAR6, 0);
- if (aarch64_enabled) {
- SET_IDREG(isar, ID_AA64PFR0, 0x00002222);
- SET_IDREG(isar, ID_AA64DFR0, 0x10305106);
- SET_IDREG(isar, ID_AA64ISAR0, 0x00011120);
- SET_IDREG(isar, ID_AA64MMFR0, 0x00001124);
- }
- cpu->isar.dbgdidr = 0x3516d000;
- cpu->isar.dbgdevid = 0x01110f13;
- cpu->isar.dbgdevid1 = 0x2;
- cpu->isar.reset_pmcr_el0 = 0x41013000;
- SET_IDREG(isar, CLIDR, 0x0a200023);
- /* 32KB L1 dcache */
- cpu->ccsidr[0] = make_ccsidr(CCSIDR_FORMAT_LEGACY, 4, 64, 32 * KiB, 7);
- /* 48KB L1 icache */
- cpu->ccsidr[1] = make_ccsidr(CCSIDR_FORMAT_LEGACY, 3, 64, 48 * KiB, 2);
- /* 2048KB L2 cache */
- cpu->ccsidr[2] = make_ccsidr(CCSIDR_FORMAT_LEGACY, 16, 64, 2 * MiB, 7);
- if (aarch64_enabled) {
- set_dczid_bs(cpu, 4); /* 64 bytes */
- cpu->gic_num_lrs = 4;
- cpu->gic_vpribits = 5;
- cpu->gic_vprebits = 5;
- cpu->gic_pribits = 5;
- }
- define_cortex_a72_a57_a53_cp_reginfo(cpu);
-}
-
static void aarch64_a57_initfn(Object *obj)
{
aarch64_aa32_a57_init(obj, false);
diff --git a/target/arm/tcg/cpu32.c b/target/arm/tcg/cpu32.c
index 2e8afc28602..a2f730451fb 100644
--- a/target/arm/tcg/cpu32.c
+++ b/target/arm/tcg/cpu32.c
@@ -720,53 +720,9 @@ static void sa1110_initfn(Object *obj)
static void arm_max_initfn(Object *obj)
{
ARMCPU *cpu = ARM_CPU(obj);
- ARMISARegisters *isar = &cpu->isar;
- /* aarch64_a57_initfn, advertising none of the aarch64 features */
- cpu->dtb_compatible = "arm,cortex-a57";
- set_feature(&cpu->env, ARM_FEATURE_V8);
- set_feature(&cpu->env, ARM_FEATURE_NEON);
- set_feature(&cpu->env, ARM_FEATURE_GENERIC_TIMER);
- set_feature(&cpu->env, ARM_FEATURE_BACKCOMPAT_CNTFRQ);
- set_feature(&cpu->env, ARM_FEATURE_CBAR_RO);
- set_feature(&cpu->env, ARM_FEATURE_EL2);
- set_feature(&cpu->env, ARM_FEATURE_EL3);
- set_feature(&cpu->env, ARM_FEATURE_PMU);
- cpu->midr = 0x411fd070;
- cpu->revidr = 0x00000000;
- cpu->reset_fpsid = 0x41034070;
- cpu->isar.mvfr0 = 0x10110222;
- cpu->isar.mvfr1 = 0x12111111;
- cpu->isar.mvfr2 = 0x00000043;
- cpu->ctr = 0x8444c004;
- cpu->reset_sctlr = 0x00c50838;
- SET_IDREG(isar, ID_PFR0, 0x00000131);
- SET_IDREG(isar, ID_PFR1, 0x00011011);
- SET_IDREG(isar, ID_DFR0, 0x03010066);
- SET_IDREG(isar, ID_AFR0, 0x00000000);
- SET_IDREG(isar, ID_MMFR0, 0x10101105);
- SET_IDREG(isar, ID_MMFR1, 0x40000000);
- SET_IDREG(isar, ID_MMFR2, 0x01260000);
- SET_IDREG(isar, ID_MMFR3, 0x02102211);
- SET_IDREG(isar, ID_ISAR0, 0x02101110);
- SET_IDREG(isar, ID_ISAR1, 0x13112111);
- SET_IDREG(isar, ID_ISAR2, 0x21232042);
- SET_IDREG(isar, ID_ISAR3, 0x01112131);
- SET_IDREG(isar, ID_ISAR4, 0x00011142);
- SET_IDREG(isar, ID_ISAR5, 0x00011121);
- SET_IDREG(isar, ID_ISAR6, 0);
- cpu->isar.dbgdidr = 0x3516d000;
- cpu->isar.dbgdevid = 0x01110f13;
- cpu->isar.dbgdevid1 = 0x2;
- cpu->isar.reset_pmcr_el0 = 0x41013000;
- SET_IDREG(isar, CLIDR, 0x0a200023);
- /* 32KB L1 dcache */
- cpu->ccsidr[0] = make_ccsidr(CCSIDR_FORMAT_LEGACY, 4, 64, 32 * KiB, 7);
- /* 48KB L1 icache */
- cpu->ccsidr[1] = make_ccsidr(CCSIDR_FORMAT_LEGACY, 3, 64, 48 * KiB, 2);
- /* 2048KB L2 cache */
- cpu->ccsidr[2] = make_ccsidr(CCSIDR_FORMAT_LEGACY, 16, 64, 2 * MiB, 7);
- define_cortex_a72_a57_a53_cp_reginfo(cpu);
+ /* Cortex-A57 advertising none of the aarch64 features */
+ aarch64_aa32_a57_init(obj, true);
aa32_max_features(cpu);
--
2.53.0
^ permalink raw reply related [flat|nested] 34+ messages in thread* [PULL 26/32] target/arm: Define 'max' CPU type in cpu-max.c
2026-05-27 10:30 [PULL 00/32] Single binary patches for 2026-05-27 Philippe Mathieu-Daudé
` (24 preceding siblings ...)
2026-05-27 10:30 ` [PULL 25/32] target/arm: Re-use common aarch64_aa32_a57_init() helper Philippe Mathieu-Daudé
@ 2026-05-27 10:30 ` Philippe Mathieu-Daudé
2026-05-27 10:30 ` [PULL 27/32] target/arm: Build cpu32-system.o as common object Philippe Mathieu-Daudé
` (6 subsequent siblings)
32 siblings, 0 replies; 34+ messages in thread
From: Philippe Mathieu-Daudé @ 2026-05-27 10:30 UTC (permalink / raw)
To: qemu-devel
Rather than having the 32-bit 'max' CPU type defined in
cpu32.c and the 64-bit counter part in cpu64.c, unify the
code in a single place in cpu-max.c. Define stubs for
aarch64_host_initfn() and aarch64_max_tcg_initfn() in the
32-bit binary.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
Acked-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20260526203722.79463-16-philmd@linaro.org>
---
target/arm/internals.h | 1 +
target/arm/cpu-max.c | 65 ++++++++++++++++++++++++++++++++++++++++
target/arm/cpu64.c | 21 +------------
target/arm/tcg/cpu32.c | 29 ------------------
target/arm/tcg/stubs32.c | 10 +++++++
5 files changed, 77 insertions(+), 49 deletions(-)
diff --git a/target/arm/internals.h b/target/arm/internals.h
index 27414e7481f..ae5afc5362e 100644
--- a/target/arm/internals.h
+++ b/target/arm/internals.h
@@ -1774,6 +1774,7 @@ void aarch64_add_pauth_properties(Object *obj);
void aarch64_add_sve_properties(Object *obj);
void aarch64_add_sme_properties(Object *obj);
void aarch64_aa32_a57_init(Object *obj, bool aa32_only);
+void aarch64_host_initfn(Object *obj);
/* Return true if the gdbstub is presenting an AArch64 CPU */
static inline bool arm_gdbstub_is_aarch64(ARMCPU *cpu)
diff --git a/target/arm/cpu-max.c b/target/arm/cpu-max.c
index 6fc54ebe74e..8cf8edc6535 100644
--- a/target/arm/cpu-max.c
+++ b/target/arm/cpu-max.c
@@ -8,7 +8,10 @@
#include "qemu/osdep.h"
#include "qemu/units.h"
+#include "system/hw_accel.h"
#include "system/kvm.h"
+#include "system/qtest.h"
+#include "system/tcg.h"
#include "target/arm/internals.h"
#include "target/arm/cpregs.h"
@@ -178,3 +181,65 @@ void aa32_max_features(ARMCPU *cpu)
FIELD_DP32_IDREG(isar, ID_DFR1, HPMN0, 1); /* FEAT_HPMN0 */
}
+
+/*
+ * -cpu max: a CPU with as many features enabled as our emulation supports.
+ * The version of '-cpu max' for qemu-system-aarch64 is defined in cpu64.c;
+ * this only needs to handle 32 bits, and need not care about KVM.
+ */
+static void cpu_max_initfn(Object *obj)
+{
+ ARMCPU *cpu = ARM_CPU(obj);
+
+#ifdef TARGET_AARCH64
+ const bool aarch64_enabled = true;
+#else
+ const bool aarch64_enabled = false;
+#endif /* !TARGET_AARCH64 */
+
+ if (hwaccel_enabled()) {
+ assert(aarch64_enabled);
+ /*
+ * When hardware acceleration enabled, '-cpu max' is
+ * identical to '-cpu host'
+ */
+ aarch64_host_initfn(obj);
+ return;
+ }
+
+ if (tcg_enabled() || qtest_enabled()) {
+ aarch64_aa32_a57_init(obj, !aarch64_enabled);
+ }
+
+ if (!aarch64_enabled) {
+ aa32_max_features(cpu);
+#ifdef CONFIG_USER_ONLY
+ /*
+ * Break with true ARMv8 and add back old-style VFP short-vector
+ * support. Only do this for user-mode, where -cpu max is the default,
+ * so that older v6 and v7 programs are more likely to work without
+ * adjustment.
+ */
+ cpu->isar.mvfr0 = FIELD_DP32(cpu->isar.mvfr0, MVFR0, FPSHVEC, 1);
+#endif
+ } else if (tcg_enabled()) {
+ assert(aarch64_enabled);
+ /*
+ * '-cpu max' for TCG: we currently do this as
+ * "A57 with extra things"
+ */
+ aarch64_max_tcg_initfn(obj);
+ }
+}
+
+static const ARMCPUInfo arm_max_cpu = {
+ .name = "max",
+ .initfn = cpu_max_initfn,
+};
+
+static void arm_max_cpu_register_types(void)
+{
+ arm_cpu_register(&arm_max_cpu);
+}
+
+type_init(arm_max_cpu_register_types)
diff --git a/target/arm/cpu64.c b/target/arm/cpu64.c
index 499d154dace..28167355773 100644
--- a/target/arm/cpu64.c
+++ b/target/arm/cpu64.c
@@ -791,7 +791,7 @@ static void kvm_arm_set_cpreg_mig_tolerances(ARMCPU *cpu)
}
#endif
-static void aarch64_host_initfn(Object *obj)
+void aarch64_host_initfn(Object *obj)
{
ARMCPU *cpu = ARM_CPU(obj);
@@ -818,28 +818,9 @@ static void aarch64_host_initfn(Object *obj)
}
}
-static void aarch64_max_initfn(Object *obj)
-{
- if (hwaccel_enabled()) {
- /* When hardware acceleration enabled, '-cpu max' is identical to '-cpu host' */
- aarch64_host_initfn(obj);
- return;
- }
-
- if (tcg_enabled() || qtest_enabled()) {
- aarch64_aa32_a57_init(obj, false);
- }
-
- /* '-cpu max' for TCG: we currently do this as "A57 with extra things" */
- if (tcg_enabled()) {
- aarch64_max_tcg_initfn(obj);
- }
-}
-
static const ARMCPUInfo aarch64_cpus[] = {
{ .name = "cortex-a57", .initfn = aarch64_a57_initfn },
{ .name = "cortex-a53", .initfn = aarch64_a53_initfn },
- { .name = "max", .initfn = aarch64_max_initfn },
#if defined(CONFIG_KVM) || defined(CONFIG_HVF) || defined(CONFIG_WHPX)
{ .name = "host", .initfn = aarch64_host_initfn },
#endif
diff --git a/target/arm/tcg/cpu32.c b/target/arm/tcg/cpu32.c
index a2f730451fb..8220d785f5b 100644
--- a/target/arm/tcg/cpu32.c
+++ b/target/arm/tcg/cpu32.c
@@ -711,32 +711,6 @@ static void sa1110_initfn(Object *obj)
cpu->reset_sctlr = 0x00000070;
}
-#ifndef TARGET_AARCH64
-/*
- * -cpu max: a CPU with as many features enabled as our emulation supports.
- * The version of '-cpu max' for qemu-system-aarch64 is defined in cpu64.c;
- * this only needs to handle 32 bits, and need not care about KVM.
- */
-static void arm_max_initfn(Object *obj)
-{
- ARMCPU *cpu = ARM_CPU(obj);
-
- /* Cortex-A57 advertising none of the aarch64 features */
- aarch64_aa32_a57_init(obj, true);
-
- aa32_max_features(cpu);
-
-#ifdef CONFIG_USER_ONLY
- /*
- * Break with true ARMv8 and add back old-style VFP short-vector support.
- * Only do this for user-mode, where -cpu max is the default, so that
- * older v6 and v7 programs are more likely to work without adjustment.
- */
- cpu->isar.mvfr0 = FIELD_DP32(cpu->isar.mvfr0, MVFR0, FPSHVEC, 1);
-#endif
-}
-#endif /* !TARGET_AARCH64 */
-
static const ARMCPUInfo arm_tcg_cpus[] = {
{ .name = "arm926", .initfn = arm926_initfn },
{ .name = "arm946", .initfn = arm946_initfn },
@@ -760,9 +734,6 @@ static const ARMCPUInfo arm_tcg_cpus[] = {
{ .name = "ti925t", .initfn = ti925t_initfn },
{ .name = "sa1100", .initfn = sa1100_initfn },
{ .name = "sa1110", .initfn = sa1110_initfn },
-#ifndef TARGET_AARCH64
- { .name = "max", .initfn = arm_max_initfn },
-#endif
};
static void arm_tcg_cpu_register_types(void)
diff --git a/target/arm/tcg/stubs32.c b/target/arm/tcg/stubs32.c
index 3945dc49e5e..78f819ef6ff 100644
--- a/target/arm/tcg/stubs32.c
+++ b/target/arm/tcg/stubs32.c
@@ -22,3 +22,13 @@ void aarch64_translate_code(CPUState *cs, TranslationBlock *tb,
{
g_assert_not_reached();
}
+
+void aarch64_host_initfn(Object *obj)
+{
+ g_assert_not_reached();
+}
+
+void aarch64_max_tcg_initfn(Object *obj)
+{
+ g_assert_not_reached();
+}
--
2.53.0
^ permalink raw reply related [flat|nested] 34+ messages in thread* [PULL 27/32] target/arm: Build cpu32-system.o as common object
2026-05-27 10:30 [PULL 00/32] Single binary patches for 2026-05-27 Philippe Mathieu-Daudé
` (25 preceding siblings ...)
2026-05-27 10:30 ` [PULL 26/32] target/arm: Define 'max' CPU type in cpu-max.c Philippe Mathieu-Daudé
@ 2026-05-27 10:30 ` Philippe Mathieu-Daudé
2026-05-27 10:30 ` [PULL 28/32] target/arm: Build cpu-max.c once Philippe Mathieu-Daudé
` (5 subsequent siblings)
32 siblings, 0 replies; 34+ messages in thread
From: Philippe Mathieu-Daudé @ 2026-05-27 10:30 UTC (permalink / raw)
To: qemu-devel
cpu32.c only contains CPU types used in 32-bit system emulation:
rename it as cpu32-system.c; always compile the file but only
register the QOM types for the 32-bit binary.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
Acked-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20260526203722.79463-17-philmd@linaro.org>
---
target/arm/tcg/{cpu32.c => cpu32-system.c} | 10 +---------
target/arm/tcg/meson.build | 5 +----
2 files changed, 2 insertions(+), 13 deletions(-)
rename target/arm/tcg/{cpu32.c => cpu32-system.c} (99%)
diff --git a/target/arm/tcg/cpu32.c b/target/arm/tcg/cpu32-system.c
similarity index 99%
rename from target/arm/tcg/cpu32.c
rename to target/arm/tcg/cpu32-system.c
index 8220d785f5b..6e983900899 100644
--- a/target/arm/tcg/cpu32.c
+++ b/target/arm/tcg/cpu32-system.c
@@ -1,5 +1,5 @@
/*
- * QEMU ARM TCG-only CPUs.
+ * QEMU ARM TCG-only CPUs (not needed for the AArch64 linux-user build)
*
* Copyright (c) 2012 SUSE LINUX Products GmbH
*
@@ -13,15 +13,9 @@
#include "cpu.h"
#include "accel/tcg/cpu-ops.h"
#include "internals.h"
-#if !defined(CONFIG_USER_ONLY)
#include "hw/core/boards.h"
-#endif
#include "cpregs.h"
-
-/* CPU models. These are not needed for the AArch64 linux-user build. */
-#if !defined(CONFIG_USER_ONLY) || !defined(TARGET_AARCH64)
-
static void arm926_initfn(Object *obj)
{
ARMCPU *cpu = ARM_CPU(obj);
@@ -746,5 +740,3 @@ static void arm_tcg_cpu_register_types(void)
}
type_init(arm_tcg_cpu_register_types)
-
-#endif /* !CONFIG_USER_ONLY || !TARGET_AARCH64 */
diff --git a/target/arm/tcg/meson.build b/target/arm/tcg/meson.build
index d5a95bf54f2..9b859892ed8 100644
--- a/target/arm/tcg/meson.build
+++ b/target/arm/tcg/meson.build
@@ -30,10 +30,6 @@ translate32_d = [
arm_ss.add(when: 'TARGET_AARCH64', if_true: gen_a64)
arm_stubs_ss.add(files('stubs32.c'))
-arm_ss.add(files(
- 'cpu32.c',
-))
-
arm_ss.add(when: 'TARGET_AARCH64', if_true: files(
'gengvec64.c',
'translate-a64.c',
@@ -85,6 +81,7 @@ arm_common_user_system_ss.add(when: 'TARGET_AARCH64', if_true: files(
arm_common_system_ss.add(files(
'cpregs-at.c',
+ 'cpu32-system.c',
'gicv5-cpuif.c',
'psci.c',
'tlb_helper.c',
--
2.53.0
^ permalink raw reply related [flat|nested] 34+ messages in thread* [PULL 28/32] target/arm: Build cpu-max.c once
2026-05-27 10:30 [PULL 00/32] Single binary patches for 2026-05-27 Philippe Mathieu-Daudé
` (26 preceding siblings ...)
2026-05-27 10:30 ` [PULL 27/32] target/arm: Build cpu32-system.o as common object Philippe Mathieu-Daudé
@ 2026-05-27 10:30 ` Philippe Mathieu-Daudé
2026-05-27 10:30 ` [PULL 29/32] tests/tcg: Explicitly check for 64-bit z/Architecture Philippe Mathieu-Daudé
` (4 subsequent siblings)
32 siblings, 0 replies; 34+ messages in thread
From: Philippe Mathieu-Daudé @ 2026-05-27 10:30 UTC (permalink / raw)
To: qemu-devel
Call TargetInfo::target_aarch64() at runtime, allowing to
remove the target-specific TARGET_AARCH64 definition and
build cpu-max.c once as common object.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
Acked-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20260526203722.79463-18-philmd@linaro.org>
---
target/arm/cpu-max.c | 8 ++------
target/arm/meson.build | 2 +-
2 files changed, 3 insertions(+), 7 deletions(-)
diff --git a/target/arm/cpu-max.c b/target/arm/cpu-max.c
index 8cf8edc6535..d38bdfcf811 100644
--- a/target/arm/cpu-max.c
+++ b/target/arm/cpu-max.c
@@ -8,6 +8,7 @@
#include "qemu/osdep.h"
#include "qemu/units.h"
+#include "qemu/target-info.h"
#include "system/hw_accel.h"
#include "system/kvm.h"
#include "system/qtest.h"
@@ -190,12 +191,7 @@ void aa32_max_features(ARMCPU *cpu)
static void cpu_max_initfn(Object *obj)
{
ARMCPU *cpu = ARM_CPU(obj);
-
-#ifdef TARGET_AARCH64
- const bool aarch64_enabled = true;
-#else
- const bool aarch64_enabled = false;
-#endif /* !TARGET_AARCH64 */
+ const bool aarch64_enabled = target_aarch64();
if (hwaccel_enabled()) {
assert(aarch64_enabled);
diff --git a/target/arm/meson.build b/target/arm/meson.build
index 3e02941d0d5..9408131d178 100644
--- a/target/arm/meson.build
+++ b/target/arm/meson.build
@@ -9,7 +9,6 @@ arm_user_ss = ss.source_set()
arm_common_system_ss.add(files('gdbstub.c'))
arm_user_ss.add(files('gdbstub.c'))
-arm_ss.add(files('cpu-max.c'))
arm_ss.add(when: 'TARGET_AARCH64', if_true: files(
'cpu64.c',
))
@@ -20,6 +19,7 @@ arm_common_ss.add(files(
arm_common_user_system_ss.add(files(
'cpregs-gcs.c',
'cpregs-pmu.c',
+ 'cpu-max.c',
'debug_helper.c',
'helper.c',
'vfp_fpscr.c',
--
2.53.0
^ permalink raw reply related [flat|nested] 34+ messages in thread* [PULL 29/32] tests/tcg: Explicitly check for 64-bit z/Architecture
2026-05-27 10:30 [PULL 00/32] Single binary patches for 2026-05-27 Philippe Mathieu-Daudé
` (27 preceding siblings ...)
2026-05-27 10:30 ` [PULL 28/32] target/arm: Build cpu-max.c once Philippe Mathieu-Daudé
@ 2026-05-27 10:30 ` Philippe Mathieu-Daudé
2026-05-27 10:30 ` [PULL 30/32] MAINTAINERS: Remove PhilMD from firmware sections Philippe Mathieu-Daudé
` (3 subsequent siblings)
32 siblings, 0 replies; 34+ messages in thread
From: Philippe Mathieu-Daudé @ 2026-05-27 10:30 UTC (permalink / raw)
To: qemu-devel
We do not support the 32-bit ESA/390 target, only the
64-bit z/Architecture.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20260519171240.97420-5-philmd@linaro.org>
---
tests/tcg/multiarch/nop_func.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/tcg/multiarch/nop_func.h b/tests/tcg/multiarch/nop_func.h
index f714d210000..26d3a76eb62 100644
--- a/tests/tcg/multiarch/nop_func.h
+++ b/tests/tcg/multiarch/nop_func.h
@@ -15,7 +15,7 @@ static const char nop_func[] = {
0x1e, 0xff, 0x2f, 0xe1, /* bx lr */
#elif defined(__riscv)
0x67, 0x80, 0x00, 0x00, /* ret */
-#elif defined(__s390__)
+#elif defined(__s390x__)
0x07, 0xfe, /* br %r14 */
#elif defined(__i386__) || defined(__x86_64__)
0xc3, /* ret */
--
2.53.0
^ permalink raw reply related [flat|nested] 34+ messages in thread* [PULL 30/32] MAINTAINERS: Remove PhilMD from firmware sections
2026-05-27 10:30 [PULL 00/32] Single binary patches for 2026-05-27 Philippe Mathieu-Daudé
` (28 preceding siblings ...)
2026-05-27 10:30 ` [PULL 29/32] tests/tcg: Explicitly check for 64-bit z/Architecture Philippe Mathieu-Daudé
@ 2026-05-27 10:30 ` Philippe Mathieu-Daudé
2026-05-27 10:30 ` [PULL 31/32] MAINTAINERS: update qualcomm git tree URL Philippe Mathieu-Daudé
` (2 subsequent siblings)
32 siblings, 0 replies; 34+ messages in thread
From: Philippe Mathieu-Daudé @ 2026-05-27 10:30 UTC (permalink / raw)
To: qemu-devel
I'm not paid to support this code. I haven't followed
it neither, so be fair and just remove myself. Demote
the status to 'Orphaned'.
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Daniel P. Berrange <berrange@redhat.com>
Cc: Kashyap Chamarthy <kchamart@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20260519173014.98967-3-philmd@linaro.org>
Reviewed-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
Message-Id: <20260527063102.91205-1-philmd@linaro.org>
---
MAINTAINERS | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/MAINTAINERS b/MAINTAINERS
index cd5c4831e27..15982c04614 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -2874,9 +2874,8 @@ F: hw/usb/vt82c686-uhci-pci.c
F: include/hw/isa/vt82c686.h
Firmware configuration (fw_cfg)
-M: Philippe Mathieu-Daudé <philmd@linaro.org>
R: Gerd Hoffmann <kraxel@redhat.com>
-S: Supported
+S: Orphaned
F: docs/specs/fw_cfg.rst
F: hw/nvram/fw_cfg*.c
F: stubs/fw_cfg.c
@@ -4004,14 +4003,12 @@ F: docs/specs/fsi.rst
F: tests/qtest/aspeed_fsi-test.c
Firmware schema specifications
-M: Philippe Mathieu-Daudé <philmd@linaro.org>
R: Daniel P. Berrange <berrange@redhat.com>
R: Kashyap Chamarthy <kchamart@redhat.com>
-S: Maintained
+S: Orphan
F: docs/interop/firmware.json
EDK2 Firmware
-M: Philippe Mathieu-Daudé <philmd@linaro.org>
M: Gerd Hoffmann <kraxel@redhat.com>
S: Supported
F: hw/i386/*ovmf*
--
2.53.0
^ permalink raw reply related [flat|nested] 34+ messages in thread* [PULL 31/32] MAINTAINERS: update qualcomm git tree URL
2026-05-27 10:30 [PULL 00/32] Single binary patches for 2026-05-27 Philippe Mathieu-Daudé
` (29 preceding siblings ...)
2026-05-27 10:30 ` [PULL 30/32] MAINTAINERS: Remove PhilMD from firmware sections Philippe Mathieu-Daudé
@ 2026-05-27 10:30 ` Philippe Mathieu-Daudé
2026-05-27 10:30 ` [PULL 32/32] MAINTAINERS: Update PhilMD's email address Philippe Mathieu-Daudé
2026-05-27 22:49 ` [PULL 00/32] Single binary patches for 2026-05-27 Stefan Hajnoczi
32 siblings, 0 replies; 34+ messages in thread
From: Philippe Mathieu-Daudé @ 2026-05-27 10:30 UTC (permalink / raw)
To: qemu-devel
From: Brian Cain <brian.cain@oss.qualcomm.com>
The git repo has been migrated to https://github.com/qualcomm/qemu
Note also that for some time, https://github.com/quic/qemu should continue
to redirect to https://github.com/qualcomm/qemu
Signed-off-by: Brian Cain <brian.cain@oss.qualcomm.com>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
Message-ID: <20260522222827.3239334-1-brian.cain@oss.qualcomm.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
MAINTAINERS | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/MAINTAINERS b/MAINTAINERS
index 15982c04614..35ab2b458a4 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -259,7 +259,7 @@ F: disas/hexagon.c
F: configs/targets/hexagon-linux-user/default.mak
F: docker/dockerfiles/debian-hexagon-cross.docker
F: gdbstub/gdb-xml/hexagon*.xml
-T: git https://github.com/quic/qemu.git hex-next
+T: git https://github.com/qualcomm/qemu.git hex-next
Hexagon idef-parser
M: Alessandro Di Federico <ale@rev.ng>
--
2.53.0
^ permalink raw reply related [flat|nested] 34+ messages in thread* [PULL 32/32] MAINTAINERS: Update PhilMD's email address
2026-05-27 10:30 [PULL 00/32] Single binary patches for 2026-05-27 Philippe Mathieu-Daudé
` (30 preceding siblings ...)
2026-05-27 10:30 ` [PULL 31/32] MAINTAINERS: update qualcomm git tree URL Philippe Mathieu-Daudé
@ 2026-05-27 10:30 ` Philippe Mathieu-Daudé
2026-05-27 22:49 ` [PULL 00/32] Single binary patches for 2026-05-27 Stefan Hajnoczi
32 siblings, 0 replies; 34+ messages in thread
From: Philippe Mathieu-Daudé @ 2026-05-27 10:30 UTC (permalink / raw)
To: qemu-devel
philmd@linaro.org will stop working starting 2026-06-01,
use my personal email instead. Update mailmap and gitdm
accordingly.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@mailo.com>
Reviewed-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
Message-Id: <20260527065943.92554-1-philmd@linaro.org>
---
MAINTAINERS | 58 ++++++++++++++---------------
.mailmap | 7 ++--
contrib/gitdm/group-map-individuals | 1 +
3 files changed, 34 insertions(+), 32 deletions(-)
diff --git a/MAINTAINERS b/MAINTAINERS
index 35ab2b458a4..892380a6d51 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -68,7 +68,7 @@ Project policy and developer guides
R: Alex Bennée <alex.bennee@linaro.org>
R: Daniel P. Berrangé <berrange@redhat.com>
R: Markus Armbruster <armbru@redhat.com>
-R: Philippe Mathieu-Daudé <philmd@linaro.org>
+R: Philippe Mathieu-Daudé <philmd@mailo.com>
W: https://www.qemu.org/docs/master/devel/index.html
S: Odd Fixes
F: docs/devel/build-environment.rst
@@ -132,7 +132,7 @@ T: git https://gitlab.com/cohuck/qemu.git s390-next
L: qemu-s390x@nongnu.org
MIPS general architecture support
-M: Philippe Mathieu-Daudé <philmd@linaro.org>
+M: Philippe Mathieu-Daudé <philmd@mailo.com>
R: Jiaxun Yang <jiaxun.yang@flygoat.com>
S: Odd Fixes
K: ^Subject:.*(?i)mips
@@ -302,7 +302,7 @@ F: tests/docker/dockerfiles/debian-microblaze-cross.d/build-toolchain.sh
F: tests/functional/microblaze/
MIPS TCG CPUs
-M: Philippe Mathieu-Daudé <philmd@linaro.org>
+M: Philippe Mathieu-Daudé <philmd@mailo.com>
R: Aurelien Jarno <aurelien@aurel32.net>
R: Jiaxun Yang <jiaxun.yang@flygoat.com>
R: Aleksandar Rikalo <arikalo@gmail.com>
@@ -533,7 +533,7 @@ Guest CPU Cores (other accelerators)
Overall
M: Richard Henderson <richard.henderson@linaro.org>
R: Paolo Bonzini <pbonzini@redhat.com>
-R: Philippe Mathieu-Daudé <philmd@linaro.org>
+R: Philippe Mathieu-Daudé <philmd@mailo.com>
S: Maintained
F: include/exec/cpu*.h
F: include/exec/target_long.h
@@ -696,7 +696,7 @@ F: qemu.nsi
F: scripts/nsis.py
Darwin (macOS, iOS)
-M: Philippe Mathieu-Daudé <philmd@linaro.org>
+M: Philippe Mathieu-Daudé <philmd@mailo.com>
S: Odd Fixes
F: .gitlab-ci.d/cirrus/macos-*
F: */*.m
@@ -1012,7 +1012,7 @@ F: tests/functional/arm/test_quanta_gsj.py
Raspberry Pi
M: Peter Maydell <peter.maydell@linaro.org>
-R: Philippe Mathieu-Daudé <philmd@linaro.org>
+R: Philippe Mathieu-Daudé <philmd@mailo.com>
L: qemu-arm@nongnu.org
S: Odd Fixes
F: hw/arm/raspi.c
@@ -1314,7 +1314,7 @@ F: include/hw/misc/avr_power.h
F: hw/misc/avr_power.c
Arduino
-M: Philippe Mathieu-Daudé <philmd@linaro.org>
+M: Philippe Mathieu-Daudé <philmd@mailo.com>
S: Maintained
F: hw/avr/arduino.c
F: tests/functional/avr/test_uno.py
@@ -1448,7 +1448,7 @@ F: hw/microblaze/petalogix_ml605_mmu.c
MIPS Machines
-------------
Overall MIPS Machines
-M: Philippe Mathieu-Daudé <philmd@linaro.org>
+M: Philippe Mathieu-Daudé <philmd@mailo.com>
S: Odd Fixes
F: configs/devices/mips*/*
F: hw/mips/
@@ -1465,7 +1465,7 @@ F: hw/dma/rc4030.c
F: hw/nvram/ds1225y.c
Malta
-M: Philippe Mathieu-Daudé <philmd@linaro.org>
+M: Philippe Mathieu-Daudé <philmd@mailo.com>
R: Aurelien Jarno <aurelien@aurel32.net>
S: Odd Fixes
F: hw/isa/piix.c
@@ -1479,7 +1479,7 @@ F: tests/functional/mips*/test_tuxrun.py
Fuloong 2E
M: Huacai Chen <chenhuacai@kernel.org>
-M: Philippe Mathieu-Daudé <philmd@linaro.org>
+M: Philippe Mathieu-Daudé <philmd@mailo.com>
R: Jiaxun Yang <jiaxun.yang@flygoat.com>
S: Odd Fixes
F: hw/mips/fuloong2e.c
@@ -1503,7 +1503,7 @@ F: include/hw/intc/loongson_liointc.h
F: tests/functional/mips64el/test_loongson3v.py
Boston
-M: Philippe Mathieu-Daudé <philmd@linaro.org>
+M: Philippe Mathieu-Daudé <philmd@mailo.com>
R: Aleksandar Rikalo <arikalo@gmail.com>
S: Odd Fixes
F: hw/core/loader-fit.c
@@ -2032,7 +2032,7 @@ F: include/hw/i386/nitro_enclave.h
F: docs/system/i386/nitro-enclave.rst
Machine core
-M: Philippe Mathieu-Daudé <philmd@linaro.org>
+M: Philippe Mathieu-Daudé <philmd@mailo.com>
R: Zhao Liu <zhao1.liu@intel.com>
S: Maintained
F: hw/core/cpu-common.c
@@ -2055,7 +2055,7 @@ F: tests/unit/test-smp-parse.c
TargetInfo API
M: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
-M: Philippe Mathieu-Daudé <philmd@linaro.org>
+M: Philippe Mathieu-Daudé <philmd@mailo.com>
S: Supported
F: include/qemu/target-info*.h
F: target-info*.c
@@ -2279,7 +2279,7 @@ F: docs/system/virtio-net-failover.rst
T: git https://github.com/jasowang/qemu.git net
Parallel NOR Flash devices
-M: Philippe Mathieu-Daudé <philmd@linaro.org>
+M: Philippe Mathieu-Daudé <philmd@mailo.com>
S: Maintained
F: hw/block/pflash_cfi*.c
F: include/hw/block/flash.h
@@ -2311,7 +2311,7 @@ S: Maintained
F: hw/ssi/xilinx_*
SD (Secure Card)
-M: Philippe Mathieu-Daudé <philmd@linaro.org>
+M: Philippe Mathieu-Daudé <philmd@mailo.com>
M: Bin Meng <bmeng.cn@gmail.com>
L: qemu-block@nongnu.org
S: Odd Fixes
@@ -2765,14 +2765,14 @@ F: docs/specs/vmgenid.rst
F: tests/qtest/vmgenid-test.c
LED
-M: Philippe Mathieu-Daudé <philmd@linaro.org>
+M: Philippe Mathieu-Daudé <philmd@mailo.com>
S: Maintained
F: include/hw/misc/led.h
F: hw/misc/led.c
Unimplemented device
M: Peter Maydell <peter.maydell@linaro.org>
-R: Philippe Mathieu-Daudé <philmd@linaro.org>
+R: Philippe Mathieu-Daudé <philmd@mailo.com>
R: Ani Sinha <ani@anisinha.ca>
S: Maintained
F: include/hw/misc/unimp.h
@@ -2780,7 +2780,7 @@ F: hw/misc/unimp.c
Empty slot
M: Artyom Tarasenko <atar4qemu@gmail.com>
-R: Philippe Mathieu-Daudé <philmd@linaro.org>
+R: Philippe Mathieu-Daudé <philmd@mailo.com>
R: Ani Sinha <ani@anisinha.ca>
S: Maintained
F: include/hw/misc/empty_slot.h
@@ -2859,14 +2859,14 @@ F: hw/display/apple-gfx*
PIIX4 South Bridge (i82371AB)
M: Hervé Poussineau <hpoussin@reactos.org>
-M: Philippe Mathieu-Daudé <philmd@linaro.org>
+M: Philippe Mathieu-Daudé <philmd@mailo.com>
S: Maintained
F: hw/isa/piix.c
F: include/hw/southbridge/piix.h
VIA South Bridges (VT82C686B, VT8231)
M: BALATON Zoltan <balaton@eik.bme.hu>
-M: Philippe Mathieu-Daudé <philmd@linaro.org>
+M: Philippe Mathieu-Daudé <philmd@mailo.com>
R: Jiaxun Yang <jiaxun.yang@flygoat.com>
S: Maintained
F: hw/isa/vt82c686.c
@@ -2931,13 +2931,13 @@ F: hw/intc/openpic.c
F: include/hw/ppc/openpic.h
MIPS CPS
-M: Philippe Mathieu-Daudé <philmd@linaro.org>
+M: Philippe Mathieu-Daudé <philmd@mailo.com>
S: Odd Fixes
F: hw/misc/mips_*
F: include/hw/misc/mips_*
MIPS GIC
-M: Philippe Mathieu-Daudé <philmd@linaro.org>
+M: Philippe Mathieu-Daudé <philmd@mailo.com>
S: Odd Fixes
F: hw/intc/mips_gic.c
F: hw/timer/mips_gictimer.c
@@ -3063,7 +3063,7 @@ F: audio/alsaaudio.c
Core Audio framework backend
M: Gerd Hoffmann <kraxel@redhat.com>
-M: Philippe Mathieu-Daudé <philmd@linaro.org>
+M: Philippe Mathieu-Daudé <philmd@mailo.com>
R: Christian Schoenebeck <qemu_oss@crudebyte.com>
R: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
S: Odd Fixes
@@ -3318,7 +3318,7 @@ F: tests/functional/ppc64/test_fadump.py
GDB stub
M: Alex Bennée <alex.bennee@linaro.org>
-R: Philippe Mathieu-Daudé <philmd@linaro.org>
+R: Philippe Mathieu-Daudé <philmd@mailo.com>
S: Maintained
F: docs/system/gdb.rst
F: gdbstub/*
@@ -3332,7 +3332,7 @@ T: git https://gitlab.com/stsquad/qemu gdbstub/next
Memory API
M: Paolo Bonzini <pbonzini@redhat.com>
M: Peter Xu <peterx@redhat.com>
-R: Philippe Mathieu-Daudé <philmd@linaro.org>
+R: Philippe Mathieu-Daudé <philmd@mailo.com>
S: Supported
F: include/system/ioport.h
F: include/exec/memop.h
@@ -3387,7 +3387,7 @@ F: tests/functional/generic/test_vnc.py
Cocoa graphics
M: Peter Maydell <peter.maydell@linaro.org>
-M: Philippe Mathieu-Daudé <philmd@linaro.org>
+M: Philippe Mathieu-Daudé <philmd@mailo.com>
R: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
S: Odd Fixes
F: ui/cocoa.m
@@ -3950,7 +3950,7 @@ S: Maintained
F: contrib/elf2dmp/
Overall sensors
-M: Philippe Mathieu-Daudé <philmd@linaro.org>
+M: Philippe Mathieu-Daudé <philmd@mailo.com>
S: Odd Fixes
F: hw/sensor
F: include/hw/sensor
@@ -4511,7 +4511,7 @@ W: https://cirrus-ci.com/github/qemu/qemu
Functional testing framework
M: Thomas Huth <th.huth+qemu@posteo.eu>
-R: Philippe Mathieu-Daudé <philmd@linaro.org>
+R: Philippe Mathieu-Daudé <philmd@mailo.com>
R: Daniel P. Berrange <berrange@redhat.com>
S: Odd Fixes
F: docs/devel/testing/functional.rst
@@ -4567,7 +4567,7 @@ Meson
M: Paolo Bonzini <pbonzini@redhat.com>
R: Marc-André Lureau <marcandre.lureau@redhat.com>
R: Daniel P. Berrange <berrange@redhat.com>
-R: Philippe Mathieu-Daudé <philmd@linaro.org>
+R: Philippe Mathieu-Daudé <philmd@mailo.com>
R: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
S: Maintained
F: meson.build
diff --git a/.mailmap b/.mailmap
index ce569d83f4a..273661c758e 100644
--- a/.mailmap
+++ b/.mailmap
@@ -104,9 +104,10 @@ Paul Burton <paulburton@kernel.org> <paul.burton@mips.com>
Paul Burton <paulburton@kernel.org> <paul.burton@imgtec.com>
Paul Burton <paulburton@kernel.org> <paul@archlinuxmips.org>
Paul Burton <paulburton@kernel.org> <pburton@wavecomp.com>
-Philippe Mathieu-Daudé <philmd@linaro.org> <f4bug@amsat.org>
-Philippe Mathieu-Daudé <philmd@linaro.org> <philmd@redhat.com>
-Philippe Mathieu-Daudé <philmd@linaro.org> <philmd@fungible.com>
+Philippe Mathieu-Daudé <philmd@mailo.com> <f4bug@amsat.org>
+Philippe Mathieu-Daudé <philmd@mailo.com> <philmd@redhat.com>
+Philippe Mathieu-Daudé <philmd@mailo.com> <philmd@fungible.com>
+Philippe Mathieu-Daudé <philmd@mailo.com> <philmd@linaro.org>
Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com> <pierrick.bouvier@linaro.org>
Roman Bolshakov <rbolshakov@ddn.com> <r.bolshakov@yadro.com>
Sriram Yagnaraman <sriram.yagnaraman@ericsson.com> <sriram.yagnaraman@est.tech>
diff --git a/contrib/gitdm/group-map-individuals b/contrib/gitdm/group-map-individuals
index 4f4645a84cb..178b393b8c3 100644
--- a/contrib/gitdm/group-map-individuals
+++ b/contrib/gitdm/group-map-individuals
@@ -45,3 +45,4 @@ Jason@zx2c4.com
amarjargal16@gmail.com
me@sean.taipei
kosasihwilliam4@gmail.com
+philmd@mailo.com
--
2.53.0
^ permalink raw reply related [flat|nested] 34+ messages in thread* Re: [PULL 00/32] Single binary patches for 2026-05-27
2026-05-27 10:30 [PULL 00/32] Single binary patches for 2026-05-27 Philippe Mathieu-Daudé
` (31 preceding siblings ...)
2026-05-27 10:30 ` [PULL 32/32] MAINTAINERS: Update PhilMD's email address Philippe Mathieu-Daudé
@ 2026-05-27 22:49 ` Stefan Hajnoczi
32 siblings, 0 replies; 34+ messages in thread
From: Stefan Hajnoczi @ 2026-05-27 22:49 UTC (permalink / raw)
To: Philippe Mathieu-Daudé; +Cc: qemu-devel
[-- Attachment #1: Type: text/plain, Size: 116 bytes --]
Applied, thanks.
Please update the changelog at https://wiki.qemu.org/ChangeLog/11.1 for any user-visible changes.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 34+ messages in thread