summary refs log tree commit diff stats
path: root/cpu-target.c
diff options
context:
space:
mode:
authorStefan Hajnoczi <stefanha@redhat.com>2025-04-24 13:44:28 -0400
committerStefan Hajnoczi <stefanha@redhat.com>2025-04-24 13:44:28 -0400
commitfc524567087c2537b5103cdfc1d41e4f442892b6 (patch)
tree18c575a1cbf9c04d5b5420bf5fbde9ca9d6621f4 /cpu-target.c
parent91d0d16b44c93fa82cf76ae12990ce3aa96096c9 (diff)
parenta3d40b5effafdd299d1850f0c9956f60199b5b56 (diff)
downloadfocaccia-qemu-fc524567087c2537b5103cdfc1d41e4f442892b6.tar.gz
focaccia-qemu-fc524567087c2537b5103cdfc1d41e4f442892b6.zip
Merge tag 'pull-tcg-20250423' of https://gitlab.com/rth7680/qemu into staging
meson: Introduce top-level libuser_ss and libsystem_ss
meson: Add hw_common_arch dictionary
accel/tcg: Lots of cleanups to enable build once for:
    user-exec-stub.c,
    plugin-gen.c,
    translator.c
page-vary: Restrict scope of TARGET_PAGE_BITS_MIN
tcg: Always define TARGET_INSN_START_EXTRA_WORDS
tcg: Convert TARGET_GUEST_DEFAULT_MO to TCGCPUOps::guest_default_memory_order
tcg: Convert TARGET_SUPPORTS_MTTCG to TCGCPUOps::mttcg_supported field
target/riscv: Do not expose rv128 CPU on user mode emulation

# -----BEGIN PGP SIGNATURE-----
#
# iQFRBAABCgA7FiEEekgeeIaLTbaoWgXAZN846K9+IV8FAmgJikUdHHJpY2hhcmQu
# aGVuZGVyc29uQGxpbmFyby5vcmcACgkQZN846K9+IV+t0gf9E9OWD3oQ7NIl+azS
# imEFCKwuDxR0g07fH0aM9DW6e01mPQjxe3bmfxuYZbGUu0aJ/WzTbzfkX4qAiPeV
# S32e5wwuYOknzDgoI9r8QTFUdelvBgxtVbxyZWJcWZFbLu4oPUhVUvpLJTWaxefo
# VUL0g1LgJEYcWnzKFerb9kuiMXeDLsMd4eEX9g4XMAclHEDihND0hPKc3X7sYsmX
# N/MtZUY1Zth0c53aq7bP5MBwNIH3tH3o+xAFcBhxiBQ/HxfX7qeNgOTIKo92ApfL
# xcQul1AA/q9uQhCKsgfCxZDU4BhcR6sfmCOiDiTTEs+4zlWVDWjWwYtoednhf7ok
# v3l9+A==
# =qyvX
# -----END PGP SIGNATURE-----
# gpg: Signature made Wed 23 Apr 2025 20:48:05 EDT
# gpg:                using RSA key 7A481E78868B4DB6A85A05C064DF38E8AF7E215F
# gpg:                issuer "richard.henderson@linaro.org"
# gpg: Good signature from "Richard Henderson <richard.henderson@linaro.org>" [full]
# Primary key fingerprint: 7A48 1E78 868B 4DB6 A85A  05C0 64DF 38E8 AF7E 215F

* tag 'pull-tcg-20250423' of https://gitlab.com/rth7680/qemu: (148 commits)
  tcg: Convert TARGET_SUPPORTS_MTTCG to TCGCPUOps::mttcg_supported field
  target/i386: Remove AccelCPUClass::cpu_class_init need
  target/riscv: Remove AccelCPUClass::cpu_class_init need
  accel/tcg: Move mttcg warning to tcg_init_machine
  tcg: Convert TCGState::mttcg_enabled to TriState
  accel/tcg: Remove mttcg_enabled
  tcg: Move qemu_tcg_mttcg_enabled() to 'system/tcg.h'
  tcg: Pass max_threads not max_cpus to tcg_init
  tcg: Move cpu_req_mo() macro to target-agnostic 'backend-ldst.h'
  tcg: Remove the TCG_GUEST_DEFAULT_MO definition globally
  tcg: Have tcg_req_mo() use TCGCPUOps::guest_default_memory_order
  tcg: Propagate CPUState argument to cpu_req_mo()
  tcg: Remove use of TCG_GUEST_DEFAULT_MO in tb_gen_code()
  tcg: Define guest_default_memory_order in TCGCPUOps
  tcg: Simplify tcg_req_mo() macro
  tcg: Always define TCG_GUEST_DEFAULT_MO
  exec: Do not include 'accel/tcg/cpu-ldst.h' in 'exec-all.h'
  exec: Restrict 'cpu_ldst.h' to accel/tcg/
  exec: Restrict 'cpu-ldst-common.h' to accel/tcg/
  tcg: Always define TARGET_INSN_START_EXTRA_WORDS
  ...

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'cpu-target.c')
-rw-r--r--cpu-target.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/cpu-target.c b/cpu-target.c
index cae77374b3..14cd623bff 100644
--- a/cpu-target.c
+++ b/cpu-target.c
@@ -18,17 +18,23 @@
  */
 
 #include "qemu/osdep.h"
+#include "cpu.h"
 #include "qapi/error.h"
 #include "qemu/error-report.h"
 #include "qemu/qemu-print.h"
 #include "system/accel-ops.h"
 #include "system/cpus.h"
+#include "exec/cpu-common.h"
 #include "exec/tswap.h"
 #include "exec/replay-core.h"
 #include "exec/log.h"
 #include "accel/accel-cpu-target.h"
 #include "trace/trace-root.h"
 
+/* Validate correct placement of CPUArchState. */
+QEMU_BUILD_BUG_ON(offsetof(ArchCPU, parent_obj) != 0);
+QEMU_BUILD_BUG_ON(offsetof(ArchCPU, env) != sizeof(CPUState));
+
 char *cpu_model_from_type(const char *typename)
 {
     const char *suffix = "-" CPU_RESOLVING_TYPE;
@@ -155,6 +161,7 @@ void cpu_abort(CPUState *cpu, const char *fmt, ...)
     abort();
 }
 
+#undef target_words_bigendian
 bool target_words_bigendian(void)
 {
     return TARGET_BIG_ENDIAN;