overall, all devices' realize functions take an Error **errp, but return void.
hw/core/qdev.c code, which realizes devices, therefore does:
local_err = NULL;
dc->realize(dev, &local_err);
if (local_err != NULL) {
    goto fail;
}
However, we can improve at least accel_cpu to return a meaningful bool value.
Signed-off-by: Claudio Fontana <cfontana@suse.de>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20210322132800.7470-9-cfontana@suse.de>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
		
	
			
		
			
				
	
	
		
			20 lines
		
	
	
		
			515 B
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			20 lines
		
	
	
		
			515 B
		
	
	
	
		
			C
		
	
	
	
	
	
/*
 | 
						|
 * x86 host CPU type initialization and host CPU functions
 | 
						|
 *
 | 
						|
 * Copyright 2021 SUSE LLC
 | 
						|
 *
 | 
						|
 * This work is licensed under the terms of the GNU GPL, version 2 or later.
 | 
						|
 * See the COPYING file in the top-level directory.
 | 
						|
 */
 | 
						|
 | 
						|
#ifndef HOST_CPU_H
 | 
						|
#define HOST_CPU_H
 | 
						|
 | 
						|
void host_cpu_instance_init(X86CPU *cpu);
 | 
						|
void host_cpu_max_instance_init(X86CPU *cpu);
 | 
						|
bool host_cpu_realizefn(CPUState *cs, Error **errp);
 | 
						|
 | 
						|
void host_cpu_vendor_fms(char *vendor, int *family, int *model, int *stepping);
 | 
						|
 | 
						|
#endif /* HOST_CPU_H */
 |