aboutsummaryrefslogtreecommitdiff
path: root/cpu-target.c
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <philmd@linaro.org>2023-09-15 16:26:52 +0200
committerPhilippe Mathieu-Daudé <philmd@linaro.org>2023-11-07 13:08:48 +0100
commit79a99091c1af7783a13c21ab5e4049265fcbb1d1 (patch)
tree681ae1be56aee224f1e2a61944eaa6ebbedb4c69 /cpu-target.c
parent3a9d0d7b64b72144369f48ef12ef0ed69d633fd6 (diff)
exec/cpu: Have cpu_exec_realize() return a boolean
Following the example documented since commit e3fe3988d7 ("error: Document Error API usage rules"), have cpu_exec_realizefn() return a boolean indicating whether an error is set or not. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20230918160257.30127-22-philmd@linaro.org>
Diffstat (limited to 'cpu-target.c')
-rw-r--r--cpu-target.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/cpu-target.c b/cpu-target.c
index 79363ae370..f3e1ad8bcd 100644
--- a/cpu-target.c
+++ b/cpu-target.c
@@ -131,13 +131,13 @@ const VMStateDescription vmstate_cpu_common = {
};
#endif
-void cpu_exec_realizefn(CPUState *cpu, Error **errp)
+bool cpu_exec_realizefn(CPUState *cpu, Error **errp)
{
/* cache the cpu class for the hotpath */
cpu->cc = CPU_GET_CLASS(cpu);
if (!accel_cpu_common_realize(cpu, errp)) {
- return;
+ return false;
}
/* Wait until cpu initialization complete before exposing cpu. */
@@ -159,6 +159,8 @@ void cpu_exec_realizefn(CPUState *cpu, Error **errp)
vmstate_register(NULL, cpu->cpu_index, cpu->cc->sysemu_ops->legacy_vmsd, cpu);
}
#endif /* CONFIG_USER_ONLY */
+
+ return true;
}
void cpu_exec_unrealizefn(CPUState *cpu)