mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
tcg: Define guest_default_memory_order in TCGCPUOps
Add the TCGCPUOps::guest_default_memory_order field and have each target initialize it. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Anton Johansson <anjo@rev.ng> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
adb86e48ad
commit
04583ce7e0
21 changed files with 43 additions and 0 deletions
|
@ -16,8 +16,16 @@
|
|||
#include "exec/memop.h"
|
||||
#include "exec/mmu-access-type.h"
|
||||
#include "exec/vaddr.h"
|
||||
#include "tcg/tcg-mo.h"
|
||||
|
||||
struct TCGCPUOps {
|
||||
|
||||
/**
|
||||
* @guest_default_memory_order: default barrier that is required
|
||||
* for the guest memory ordering.
|
||||
*/
|
||||
TCGBar guest_default_memory_order;
|
||||
|
||||
/**
|
||||
* @initialize: Initialize TCG state
|
||||
*
|
||||
|
|
|
@ -235,6 +235,8 @@ static const struct SysemuCPUOps alpha_sysemu_ops = {
|
|||
#include "accel/tcg/cpu-ops.h"
|
||||
|
||||
static const TCGCPUOps alpha_tcg_ops = {
|
||||
.guest_default_memory_order = TCG_GUEST_DEFAULT_MO,
|
||||
|
||||
.initialize = alpha_translate_init,
|
||||
.translate_code = alpha_translate_code,
|
||||
.synchronize_from_tb = alpha_cpu_synchronize_from_tb,
|
||||
|
|
|
@ -2671,6 +2671,8 @@ static const struct SysemuCPUOps arm_sysemu_ops = {
|
|||
|
||||
#ifdef CONFIG_TCG
|
||||
static const TCGCPUOps arm_tcg_ops = {
|
||||
.guest_default_memory_order = TCG_GUEST_DEFAULT_MO,
|
||||
|
||||
.initialize = arm_translate_init,
|
||||
.translate_code = arm_translate_code,
|
||||
.synchronize_from_tb = arm_cpu_synchronize_from_tb,
|
||||
|
|
|
@ -232,6 +232,8 @@ static void cortex_m55_initfn(Object *obj)
|
|||
}
|
||||
|
||||
static const TCGCPUOps arm_v7m_tcg_ops = {
|
||||
.guest_default_memory_order = TCG_GUEST_DEFAULT_MO,
|
||||
|
||||
.initialize = arm_translate_init,
|
||||
.translate_code = arm_translate_code,
|
||||
.synchronize_from_tb = arm_cpu_synchronize_from_tb,
|
||||
|
|
|
@ -224,6 +224,7 @@ static const struct SysemuCPUOps avr_sysemu_ops = {
|
|||
#include "accel/tcg/cpu-ops.h"
|
||||
|
||||
static const TCGCPUOps avr_tcg_ops = {
|
||||
.guest_default_memory_order = TCG_GUEST_DEFAULT_MO,
|
||||
.initialize = avr_cpu_tcg_init,
|
||||
.translate_code = avr_cpu_translate_code,
|
||||
.synchronize_from_tb = avr_cpu_synchronize_from_tb,
|
||||
|
|
|
@ -325,6 +325,7 @@ static void hexagon_cpu_init(Object *obj)
|
|||
#include "accel/tcg/cpu-ops.h"
|
||||
|
||||
static const TCGCPUOps hexagon_tcg_ops = {
|
||||
.guest_default_memory_order = TCG_GUEST_DEFAULT_MO,
|
||||
.initialize = hexagon_translate_init,
|
||||
.translate_code = hexagon_translate_code,
|
||||
.synchronize_from_tb = hexagon_cpu_synchronize_from_tb,
|
||||
|
|
|
@ -253,6 +253,8 @@ static const struct SysemuCPUOps hppa_sysemu_ops = {
|
|||
#include "accel/tcg/cpu-ops.h"
|
||||
|
||||
static const TCGCPUOps hppa_tcg_ops = {
|
||||
.guest_default_memory_order = TCG_GUEST_DEFAULT_MO,
|
||||
|
||||
.initialize = hppa_translate_init,
|
||||
.translate_code = hppa_translate_code,
|
||||
.synchronize_from_tb = hppa_cpu_synchronize_from_tb,
|
||||
|
|
|
@ -125,6 +125,7 @@ static bool x86_debug_check_breakpoint(CPUState *cs)
|
|||
#include "accel/tcg/cpu-ops.h"
|
||||
|
||||
static const TCGCPUOps x86_tcg_ops = {
|
||||
.guest_default_memory_order = TCG_GUEST_DEFAULT_MO,
|
||||
.initialize = tcg_x86_init,
|
||||
.translate_code = x86_translate_code,
|
||||
.synchronize_from_tb = x86_cpu_synchronize_from_tb,
|
||||
|
|
|
@ -864,6 +864,8 @@ static void loongarch_cpu_dump_state(CPUState *cs, FILE *f, int flags)
|
|||
#include "accel/tcg/cpu-ops.h"
|
||||
|
||||
static const TCGCPUOps loongarch_tcg_ops = {
|
||||
.guest_default_memory_order = TCG_GUEST_DEFAULT_MO,
|
||||
|
||||
.initialize = loongarch_translate_init,
|
||||
.translate_code = loongarch_translate_code,
|
||||
.synchronize_from_tb = loongarch_cpu_synchronize_from_tb,
|
||||
|
|
|
@ -589,6 +589,8 @@ static const struct SysemuCPUOps m68k_sysemu_ops = {
|
|||
#include "accel/tcg/cpu-ops.h"
|
||||
|
||||
static const TCGCPUOps m68k_tcg_ops = {
|
||||
.guest_default_memory_order = TCG_GUEST_DEFAULT_MO,
|
||||
|
||||
.initialize = m68k_tcg_init,
|
||||
.translate_code = m68k_translate_code,
|
||||
.restore_state_to_opc = m68k_restore_state_to_opc,
|
||||
|
|
|
@ -427,6 +427,8 @@ static const struct SysemuCPUOps mb_sysemu_ops = {
|
|||
#include "accel/tcg/cpu-ops.h"
|
||||
|
||||
static const TCGCPUOps mb_tcg_ops = {
|
||||
.guest_default_memory_order = TCG_GUEST_DEFAULT_MO,
|
||||
|
||||
.initialize = mb_tcg_init,
|
||||
.translate_code = mb_translate_code,
|
||||
.synchronize_from_tb = mb_cpu_synchronize_from_tb,
|
||||
|
|
|
@ -551,6 +551,8 @@ static int mips_cpu_mmu_index(CPUState *cs, bool ifunc)
|
|||
}
|
||||
|
||||
static const TCGCPUOps mips_tcg_ops = {
|
||||
.guest_default_memory_order = TCG_GUEST_DEFAULT_MO,
|
||||
|
||||
.initialize = mips_tcg_init,
|
||||
.translate_code = mips_translate_code,
|
||||
.synchronize_from_tb = mips_cpu_synchronize_from_tb,
|
||||
|
|
|
@ -243,6 +243,8 @@ static const struct SysemuCPUOps openrisc_sysemu_ops = {
|
|||
#include "accel/tcg/cpu-ops.h"
|
||||
|
||||
static const TCGCPUOps openrisc_tcg_ops = {
|
||||
.guest_default_memory_order = TCG_GUEST_DEFAULT_MO,
|
||||
|
||||
.initialize = openrisc_translate_init,
|
||||
.translate_code = openrisc_translate_code,
|
||||
.synchronize_from_tb = openrisc_cpu_synchronize_from_tb,
|
||||
|
|
|
@ -7479,6 +7479,7 @@ static const struct SysemuCPUOps ppc_sysemu_ops = {
|
|||
#include "accel/tcg/cpu-ops.h"
|
||||
|
||||
static const TCGCPUOps ppc_tcg_ops = {
|
||||
.guest_default_memory_order = TCG_GUEST_DEFAULT_MO,
|
||||
.initialize = ppc_translate_init,
|
||||
.translate_code = ppc_translate_code,
|
||||
.restore_state_to_opc = ppc_restore_state_to_opc,
|
||||
|
|
|
@ -140,6 +140,8 @@ static void riscv_restore_state_to_opc(CPUState *cs,
|
|||
}
|
||||
|
||||
static const TCGCPUOps riscv_tcg_ops = {
|
||||
.guest_default_memory_order = TCG_GUEST_DEFAULT_MO,
|
||||
|
||||
.initialize = riscv_translate_init,
|
||||
.translate_code = riscv_translate_code,
|
||||
.synchronize_from_tb = riscv_cpu_synchronize_from_tb,
|
||||
|
|
|
@ -204,6 +204,8 @@ static const struct SysemuCPUOps rx_sysemu_ops = {
|
|||
#include "accel/tcg/cpu-ops.h"
|
||||
|
||||
static const TCGCPUOps rx_tcg_ops = {
|
||||
.guest_default_memory_order = TCG_GUEST_DEFAULT_MO,
|
||||
|
||||
.initialize = rx_translate_init,
|
||||
.translate_code = rx_translate_code,
|
||||
.synchronize_from_tb = rx_cpu_synchronize_from_tb,
|
||||
|
|
|
@ -345,6 +345,8 @@ void cpu_get_tb_cpu_state(CPUS390XState *env, vaddr *pc,
|
|||
}
|
||||
|
||||
static const TCGCPUOps s390_tcg_ops = {
|
||||
.guest_default_memory_order = TCG_GUEST_DEFAULT_MO,
|
||||
|
||||
.initialize = s390x_translate_init,
|
||||
.translate_code = s390x_translate_code,
|
||||
.restore_state_to_opc = s390x_restore_state_to_opc,
|
||||
|
|
|
@ -262,6 +262,8 @@ static const struct SysemuCPUOps sh4_sysemu_ops = {
|
|||
#include "accel/tcg/cpu-ops.h"
|
||||
|
||||
static const TCGCPUOps superh_tcg_ops = {
|
||||
.guest_default_memory_order = TCG_GUEST_DEFAULT_MO,
|
||||
|
||||
.initialize = sh4_translate_init,
|
||||
.translate_code = sh4_translate_code,
|
||||
.synchronize_from_tb = superh_cpu_synchronize_from_tb,
|
||||
|
|
|
@ -1001,6 +1001,8 @@ static const struct SysemuCPUOps sparc_sysemu_ops = {
|
|||
#include "accel/tcg/cpu-ops.h"
|
||||
|
||||
static const TCGCPUOps sparc_tcg_ops = {
|
||||
.guest_default_memory_order = TCG_GUEST_DEFAULT_MO,
|
||||
|
||||
.initialize = sparc_tcg_init,
|
||||
.translate_code = sparc_translate_code,
|
||||
.synchronize_from_tb = sparc_cpu_synchronize_from_tb,
|
||||
|
|
|
@ -172,6 +172,7 @@ static const struct SysemuCPUOps tricore_sysemu_ops = {
|
|||
#include "accel/tcg/cpu-ops.h"
|
||||
|
||||
static const TCGCPUOps tricore_tcg_ops = {
|
||||
.guest_default_memory_order = TCG_GUEST_DEFAULT_MO,
|
||||
.initialize = tricore_tcg_init,
|
||||
.translate_code = tricore_translate_code,
|
||||
.synchronize_from_tb = tricore_cpu_synchronize_from_tb,
|
||||
|
|
|
@ -232,6 +232,8 @@ static const struct SysemuCPUOps xtensa_sysemu_ops = {
|
|||
#include "accel/tcg/cpu-ops.h"
|
||||
|
||||
static const TCGCPUOps xtensa_tcg_ops = {
|
||||
.guest_default_memory_order = TCG_GUEST_DEFAULT_MO,
|
||||
|
||||
.initialize = xtensa_translate_init,
|
||||
.translate_code = xtensa_translate_code,
|
||||
.debug_excp_handler = xtensa_breakpoint_handler,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue