From 5a790cc4b942e651fec7edc597c19b637fad5a76 Mon Sep 17 00:00:00 2001 From: Bharata B Rao Date: Tue, 23 Jun 2015 19:31:12 -0700 Subject: cpu: Add Error argument to cpu_exec_init() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add an Error argument to cpu_exec_init() to let users collect the error. This is in preparation to change the CPU enumeration logic in cpu_exec_init(). With the new enumeration logic, cpu_exec_init() can fail if cpu_index values corresponding to max_cpus have already been handed out. Since all current callers of cpu_exec_init() are from instance_init, use error_abort Error argument to abort in case of an error. Signed-off-by: Bharata B Rao Reviewed-by: Eduardo Habkost Reviewed-by: Igor Mammedov Reviewed-by: David Gibson Reviewed-by: Peter Crosthwaite Acked-by: Paolo Bonzini Signed-off-by: Peter Crosthwaite Signed-off-by: Andreas Färber --- target-ppc/translate_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'target-ppc/translate_init.c') diff --git a/target-ppc/translate_init.c b/target-ppc/translate_init.c index d74f4f0..52d95ce 100644 --- a/target-ppc/translate_init.c +++ b/target-ppc/translate_init.c @@ -9633,7 +9633,7 @@ static void ppc_cpu_initfn(Object *obj) CPUPPCState *env = &cpu->env; cs->env_ptr = env; - cpu_exec_init(env); + cpu_exec_init(env, &error_abort); cpu->cpu_dt_id = cs->cpu_index; env->msr_mask = pcc->msr_mask; -- cgit v1.1