summaryrefslogtreecommitdiffstats
path: root/cpu.c
diff options
context:
space:
mode:
authorClaudio Fontana2021-03-22 14:27:42 +0100
committerPaolo Bonzini2021-05-10 21:41:50 +0200
commitbb883fd67707fd7f1bf04369aafd7ea7ad5b01b0 (patch)
treed2f6a06aa5972b7ed82d76c39672233ea8b01e8b /cpu.c
parentcpu: call AccelCPUClass::cpu_realizefn in cpu_exec_realizefn (diff)
downloadqemu-bb883fd67707fd7f1bf04369aafd7ea7ad5b01b0.tar.gz
qemu-bb883fd67707fd7f1bf04369aafd7ea7ad5b01b0.tar.xz
qemu-bb883fd67707fd7f1bf04369aafd7ea7ad5b01b0.zip
accel: introduce new accessor functions
avoid open coding the accesses to cpu->accel_cpu interfaces, and instead introduce: accel_cpu_instance_init, accel_cpu_realizefn to be used by the targets/ initfn code, and by cpu_exec_realizefn respectively. Signed-off-by: Claudio Fontana <cfontana@suse.de> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20210322132800.7470-7-cfontana@suse.de> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'cpu.c')
-rw-r--r--cpu.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/cpu.c b/cpu.c
index ba5d272c1e..25e6fbfa2c 100644
--- a/cpu.c
+++ b/cpu.c
@@ -130,11 +130,7 @@ void cpu_exec_realizefn(CPUState *cpu, Error **errp)
CPUClass *cc = CPU_GET_CLASS(cpu);
cpu_list_add(cpu);
-
- if (cc->accel_cpu) {
- /* NB: errp parameter is unused currently */
- cc->accel_cpu->cpu_realizefn(cpu, errp);
- }
+ accel_cpu_realizefn(cpu, errp);
#ifdef CONFIG_TCG
/* NB: errp parameter is unused currently */