Skip to content

Commit 98c7362

Browse files
committed
Merge tag 'accel-cpus-20250306' of https://github.com/philmd/qemu into staging
Generic CPUs / accelerators patch queue - Merge "qemu/clang-tsa.h" within "qemu/compiler.h" - Various cleanups around accelerators initialization code (better user/system split) - Various trivial cleanups in accel/tcg/, Guard few TCG calls with tcg_enabled() - Explicit disassemble_info endianness - Improve dual-endianness support for MicroBlaze # -----BEGIN PGP SIGNATURE----- # # iQIzBAABCAAdFiEE+qvnXhKRciHc/Wuy4+MsLN6twN4FAmfJw08ACgkQ4+MsLN6t # wN70whAAtfcdWtqseFfb6fvDtjflgxN51Ui0iaOECXUA18USKriGy34eBcMYMiM2 # +eKgU7+jI6JGE4+burcgWUsPpFFF951/A8+lyIbFgO5yToTDmC+qNe4XfmMAIyXq # uf9Obr2c0Xk9luh4odb+jPAQodw/7G1fKgcCVIJNDCl/xEcPhS9eNpTaHwcVnkWI # K6KrxWXOsqG6+evJBPWYoXtOOyt0+JcwAsJoGhprwtGm3P9+jSVXsgeGsJVyZcna # f32JtjWL754O8XeMkOn4x6rt58VrCIMKI9xT7keDyuhTCq0Zki9RO2nMU2dSw5mN # AfL9hxqUy0Nijnyslg3ugujDfTePsNyLdwwH7n0mnoD72ELi6WnhDsmOThuEB3Rd # 4/kdwTJfA/rlWk/GF1tbKW7AvQZokRARtzmL3V0HmGJu57lX+2JuszEdYBkqDEP7 # GH1I10B2yANUm+C9y3X8qWOU7Ws433ebJeJoZuyfnbZ9Me+UfRmql/oS+V8ata2i # fArEItpldUFrWRyYLkTbXrh2dgyV9yJTEir/lzOzeAZZzyabTbjf2z9qnh976GGO # 1QnDy5QA4f54kDBUZe7JK26TZsHPch7cgqXW6f8tRlJF7A9hxGK8d2TUV/lC3/vx # LUOlWNu03PhiruYmZEcWOsY3Jt9jRCF6lIryrnaJsqnVOVmMUMM= # =3TRh # -----END PGP SIGNATURE----- # gpg: Signature made Thu 06 Mar 2025 23:46:23 HKT # gpg: using RSA key FAABE75E12917221DCFD6BB2E3E32C2CDEADC0DE # gpg: Good signature from "Philippe Mathieu-Daudé (F4BUG) <[email protected]>" [full] # Primary key fingerprint: FAAB E75E 1291 7221 DCFD 6BB2 E3E3 2C2C DEAD C0DE * tag 'accel-cpus-20250306' of https://github.com/philmd/qemu: (54 commits) include: Poison TARGET_PHYS_ADDR_SPACE_BITS definition system: Open-code qemu_init_arch_modules() using target_name() target/i386: Mark WHPX APIC region as little-endian target/alpha: Do not mix exception flags and FPCR bits target/riscv: Convert misa_mxl_max using GLib macros target/riscv: Declare RISCVCPUClass::misa_mxl_max as RISCVMXL target/xtensa: Finalize config in xtensa_register_core() target/sparc: Constify SPARCCPUClass::cpu_def target/i386: Constify X86CPUModel uses disas: Remove target_words_bigendian() call in initialize_debug_target() target/xtensa: Set disassemble_info::endian value in disas_set_info() target/sh4: Set disassemble_info::endian value in disas_set_info() target/riscv: Set disassemble_info::endian value in disas_set_info() target/ppc: Set disassemble_info::endian value in disas_set_info() target/mips: Set disassemble_info::endian value in disas_set_info() target/microblaze: Set disassemble_info::endian value in disas_set_info target/arm: Set disassemble_info::endian value in disas_set_info() target: Set disassemble_info::endian value for big-endian targets target: Set disassemble_info::endian value for little-endian targets target/mips: Fix possible MSA int overflow ... Signed-off-by: Stefan Hajnoczi <[email protected]>
2 parents 2400fad + 92941c9 commit 98c7362

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

110 files changed

+546
-535
lines changed

MAINTAINERS

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ F: include/exec/helper-info.c.inc
175175
F: include/exec/page-protection.h
176176
F: include/system/cpus.h
177177
F: include/system/tcg.h
178-
F: include/hw/core/tcg-cpu-ops.h
178+
F: include/accel/tcg/cpu-ops.h
179179
F: host/include/*/host/cpuinfo.h
180180
F: util/cpuinfo-*.c
181181
F: include/tcg/
@@ -499,7 +499,7 @@ R: Paolo Bonzini <[email protected]>
499499
S: Maintained
500500
F: include/qemu/accel.h
501501
F: include/system/accel-*.h
502-
F: include/hw/core/accel-cpu.h
502+
F: include/accel/accel-cpu-target.h
503503
F: accel/accel-*.c
504504
F: accel/Makefile.objs
505505
F: accel/stubs/Makefile.objs
@@ -3798,6 +3798,7 @@ Overall usermode emulation
37983798
M: Riku Voipio <[email protected]>
37993799
S: Maintained
38003800
F: accel/tcg/user-exec*.c
3801+
F: hw/core/cpu-user.c
38013802
F: include/user/
38023803
F: common-user/
38033804

accel/accel-system.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
#include "qemu/osdep.h"
2727
#include "qemu/accel.h"
2828
#include "hw/boards.h"
29+
#include "system/accel-ops.h"
2930
#include "system/cpus.h"
3031
#include "qemu/error-report.h"
3132
#include "accel-system.h"

accel/accel-target.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
#include "qemu/accel.h"
2828

2929
#include "cpu.h"
30-
#include "hw/core/accel-cpu.h"
30+
#include "accel/accel-cpu-target.h"
3131

3232
#ifndef CONFIG_USER_ONLY
3333
#include "accel-system.h"
@@ -38,6 +38,7 @@ static const TypeInfo accel_type = {
3838
.parent = TYPE_OBJECT,
3939
.class_size = sizeof(AccelClass),
4040
.instance_size = sizeof(AccelState),
41+
.abstract = true,
4142
};
4243

4344
/* Lookup AccelClass from opt_name. Returns NULL if not found */

accel/hvf/hvf-accel-ops.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454
#include "exec/exec-all.h"
5555
#include "gdbstub/enums.h"
5656
#include "hw/boards.h"
57+
#include "system/accel-ops.h"
5758
#include "system/cpus.h"
5859
#include "system/hvf.h"
5960
#include "system/hvf_int.h"

accel/kvm/kvm-accel-ops.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#include "qemu/osdep.h"
1717
#include "qemu/error-report.h"
1818
#include "qemu/main-loop.h"
19+
#include "system/accel-ops.h"
1920
#include "system/kvm.h"
2021
#include "system/kvm_int.h"
2122
#include "system/runstate.h"

accel/kvm/kvm-cpus.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@
1010
#ifndef KVM_CPUS_H
1111
#define KVM_CPUS_H
1212

13-
#include "system/cpus.h"
14-
1513
int kvm_init_vcpu(CPUState *cpu, Error **errp);
1614
int kvm_cpu_exec(CPUState *cpu);
1715
void kvm_destroy_vcpu(CPUState *cpu);

accel/qtest/qtest.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
#include "qemu/option.h"
1919
#include "qemu/config-file.h"
2020
#include "qemu/accel.h"
21+
#include "system/accel-ops.h"
2122
#include "system/qtest.h"
2223
#include "system/cpus.h"
2324
#include "qemu/guest-random.h"

accel/stubs/tcg-stub.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,6 @@
1414
#include "exec/tb-flush.h"
1515
#include "exec/exec-all.h"
1616

17-
void tb_flush(CPUState *cpu)
18-
{
19-
}
20-
2117
G_NORETURN void cpu_loop_exit(CPUState *cpu)
2218
{
2319
g_assert_not_reached();

accel/tcg/cpu-exec-common.c

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,45 @@
1818
*/
1919

2020
#include "qemu/osdep.h"
21-
#include "system/cpus.h"
21+
#include "exec/log.h"
2222
#include "system/tcg.h"
2323
#include "qemu/plugin.h"
2424
#include "internal-common.h"
2525

2626
bool tcg_allowed;
2727

28+
bool tcg_cflags_has(CPUState *cpu, uint32_t flags)
29+
{
30+
return cpu->tcg_cflags & flags;
31+
}
32+
33+
void tcg_cflags_set(CPUState *cpu, uint32_t flags)
34+
{
35+
cpu->tcg_cflags |= flags;
36+
}
37+
38+
uint32_t curr_cflags(CPUState *cpu)
39+
{
40+
uint32_t cflags = cpu->tcg_cflags;
41+
42+
/*
43+
* Record gdb single-step. We should be exiting the TB by raising
44+
* EXCP_DEBUG, but to simplify other tests, disable chaining too.
45+
*
46+
* For singlestep and -d nochain, suppress goto_tb so that
47+
* we can log -d cpu,exec after every TB.
48+
*/
49+
if (unlikely(cpu->singlestep_enabled)) {
50+
cflags |= CF_NO_GOTO_TB | CF_NO_GOTO_PTR | CF_SINGLE_STEP | 1;
51+
} else if (qatomic_read(&one_insn_per_tb)) {
52+
cflags |= CF_NO_GOTO_TB | 1;
53+
} else if (qemu_loglevel_mask(CPU_LOG_TB_NOCHAIN)) {
54+
cflags |= CF_NO_GOTO_TB;
55+
}
56+
57+
return cflags;
58+
}
59+
2860
/* exit the current TB, but without causing any exception to be raised */
2961
void cpu_loop_exit_noexc(CPUState *cpu)
3062
{

accel/tcg/cpu-exec.c

Lines changed: 1 addition & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
#include "qapi/error.h"
2323
#include "qapi/type-helpers.h"
2424
#include "hw/core/cpu.h"
25-
#include "hw/core/tcg-cpu-ops.h"
25+
#include "accel/tcg/cpu-ops.h"
2626
#include "trace.h"
2727
#include "disas/disas.h"
2828
#include "exec/cpu-common.h"
@@ -33,7 +33,6 @@
3333
#include "qemu/rcu.h"
3434
#include "exec/log.h"
3535
#include "qemu/main-loop.h"
36-
#include "system/cpus.h"
3736
#include "exec/cpu-all.h"
3837
#include "system/cpu-timers.h"
3938
#include "exec/replay-core.h"
@@ -148,38 +147,6 @@ static void init_delay_params(SyncClocks *sc, const CPUState *cpu)
148147
}
149148
#endif /* CONFIG USER ONLY */
150149

151-
bool tcg_cflags_has(CPUState *cpu, uint32_t flags)
152-
{
153-
return cpu->tcg_cflags & flags;
154-
}
155-
156-
void tcg_cflags_set(CPUState *cpu, uint32_t flags)
157-
{
158-
cpu->tcg_cflags |= flags;
159-
}
160-
161-
uint32_t curr_cflags(CPUState *cpu)
162-
{
163-
uint32_t cflags = cpu->tcg_cflags;
164-
165-
/*
166-
* Record gdb single-step. We should be exiting the TB by raising
167-
* EXCP_DEBUG, but to simplify other tests, disable chaining too.
168-
*
169-
* For singlestep and -d nochain, suppress goto_tb so that
170-
* we can log -d cpu,exec after every TB.
171-
*/
172-
if (unlikely(cpu->singlestep_enabled)) {
173-
cflags |= CF_NO_GOTO_TB | CF_NO_GOTO_PTR | CF_SINGLE_STEP | 1;
174-
} else if (qatomic_read(&one_insn_per_tb)) {
175-
cflags |= CF_NO_GOTO_TB | 1;
176-
} else if (qemu_loglevel_mask(CPU_LOG_TB_NOCHAIN)) {
177-
cflags |= CF_NO_GOTO_TB;
178-
}
179-
180-
return cflags;
181-
}
182-
183150
struct tb_desc {
184151
vaddr pc;
185152
uint64_t cs_base;

0 commit comments

Comments
 (0)