From ef0a6249a80f05906dffa3a954e0563421972244 Mon Sep 17 00:00:00 2001 From: Greg Kurz Date: Mon, 16 Dec 2019 16:01:12 +0100 Subject: cpu: Introduce cpu_class_set_parent_reset() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Similarly to what we already do with qdev, use a helper to overload the reset QOM methods of the parent in children classes, for clarity. Signed-off-by: Greg Kurz Reviewed-by: David Gibson Reviewed-by: Alistair Francis Reviewed-by: Cornelia Huck Acked-by: David Hildenbrand Reviewed-by: Philippe Mathieu-Daudé Message-Id: <157650847239.354886.2782881118916307978.stgit@bahia.lan> Signed-off-by: Paolo Bonzini --- include/hw/core/cpu.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include') diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h index 77c6f05299..73e9a869a4 100644 --- a/include/hw/core/cpu.h +++ b/include/hw/core/cpu.h @@ -1135,6 +1135,10 @@ void cpu_exec_unrealizefn(CPUState *cpu); */ bool target_words_bigendian(void); +void cpu_class_set_parent_reset(CPUClass *cc, + void (*child_reset)(CPUState *cpu), + void (**parent_reset)(CPUState *cpu)); + #ifdef NEED_CPU_H #ifdef CONFIG_SOFTMMU -- cgit v1.2.3