Skip to content

Commit

Permalink
accel/tcg: Have tcg_exec_realizefn() return a boolean
Browse files Browse the repository at this point in the history
Following the example documented since commit e3fe398 ("error:
Document Error API usage rules"), have tcg_exec_realizefn() return
a boolean indicating whether an error is set or not.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Claudio Fontana <cfontana@suse.de>
Message-Id: <20231003123026.99229-7-philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
  • Loading branch information
philmd authored and rth7680 committed Oct 3, 2023
1 parent 5985186 commit fa312f2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion accel/tcg/cpu-exec.c
Original file line number Diff line number Diff line change
Expand Up @@ -1088,7 +1088,7 @@ int cpu_exec(CPUState *cpu)
return ret;
}

void tcg_exec_realizefn(CPUState *cpu, Error **errp)
bool tcg_exec_realizefn(CPUState *cpu, Error **errp)
{
static bool tcg_target_initialized;
CPUClass *cc = CPU_GET_CLASS(cpu);
Expand All @@ -1104,6 +1104,8 @@ void tcg_exec_realizefn(CPUState *cpu, Error **errp)
tcg_iommu_init_notifier_list(cpu);
#endif /* !CONFIG_USER_ONLY */
/* qemu_plugin_vcpu_init_hook delayed until cpu_index assigned. */

return true;
}

/* undo the initializations in reverse order */
Expand Down
2 changes: 1 addition & 1 deletion include/exec/cpu-all.h
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ void dump_exec_info(GString *buf);

/* accel/tcg/cpu-exec.c */
int cpu_exec(CPUState *cpu);
void tcg_exec_realizefn(CPUState *cpu, Error **errp);
bool tcg_exec_realizefn(CPUState *cpu, Error **errp);
void tcg_exec_unrealizefn(CPUState *cpu);

/**
Expand Down

0 comments on commit fa312f2

Please sign in to comment.