From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60144) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XTxgr-0000L2-06 for qemu-devel@nongnu.org; Tue, 16 Sep 2014 14:41:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XTxgm-0002pG-Q6 for qemu-devel@nongnu.org; Tue, 16 Sep 2014 14:41:24 -0400 Received: from static.88-198-71-155.clients.your-server.de ([88.198.71.155]:41271 helo=socrates.bennee.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XTxgm-0002ow-Jz for qemu-devel@nongnu.org; Tue, 16 Sep 2014 14:41:20 -0400 From: Alex =?utf-8?Q?Benn=C3=A9e?= References: <1410626734-3804-1-git-send-email-rth@twiddle.net> <1410626734-3804-9-git-send-email-rth@twiddle.net> In-reply-to: <1410626734-3804-9-git-send-email-rth@twiddle.net> Date: Tue, 16 Sep 2014 19:41:12 +0100 Message-ID: <87a95zflx3.fsf@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH 08/23] target-s390x: Use cpu_exec_interrupt qom hook List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Richard Henderson Cc: peter.maydell@linaro.org, Alexander Graf , qemu-devel@nongnu.org, aliguori@amazon.com, afaerber@suse.de Richard Henderson writes: > Cc: Alexander Graf > Signed-off-by: Richard Henderson Reviewed-by: Alex Bennée > --- > cpu-exec.c | 6 ------ > target-s390x/cpu-qom.h | 1 + > target-s390x/cpu.c | 1 + > target-s390x/helper.c | 13 +++++++++++++ > 4 files changed, 15 insertions(+), 6 deletions(-) > > diff --git a/cpu-exec.c b/cpu-exec.c > index 304867d..08be521 100644 > --- a/cpu-exec.c > +++ b/cpu-exec.c > @@ -663,12 +663,6 @@ int cpu_exec(CPUArchState *env) > do_interrupt_m68k_hardirq(env); > next_tb = 0; > } > -#elif defined(TARGET_S390X) && !defined(CONFIG_USER_ONLY) > - if ((interrupt_request & CPU_INTERRUPT_HARD) && > - (env->psw.mask & PSW_MASK_EXT)) { > - cc->do_interrupt(cpu); > - next_tb = 0; > - } > #endif > /* The target hook has 3 exit conditions: > False when the interrupt isn't processed, > diff --git a/target-s390x/cpu-qom.h b/target-s390x/cpu-qom.h > index 80dd741..4f7d4cb 100644 > --- a/target-s390x/cpu-qom.h > +++ b/target-s390x/cpu-qom.h > @@ -78,6 +78,7 @@ static inline S390CPU *s390_env_get_cpu(CPUS390XState *env) > #define ENV_OFFSET offsetof(S390CPU, env) > > void s390_cpu_do_interrupt(CPUState *cpu); > +bool s390_cpu_exec_interrupt(CPUState *cpu, int int_req); > void s390_cpu_dump_state(CPUState *cpu, FILE *f, fprintf_function cpu_fprintf, > int flags); > int s390_cpu_write_elf64_note(WriteCoreDumpFunction f, CPUState *cs, > diff --git a/target-s390x/cpu.c b/target-s390x/cpu.c > index 97a9216..2cfeb82 100644 > --- a/target-s390x/cpu.c > +++ b/target-s390x/cpu.c > @@ -262,6 +262,7 @@ static void s390_cpu_class_init(ObjectClass *oc, void *data) > cc->get_phys_page_debug = s390_cpu_get_phys_page_debug; > cc->write_elf64_note = s390_cpu_write_elf64_note; > cc->write_elf64_qemunote = s390_cpu_write_elf64_qemunote; > + cc->cpu_exec_interrupt = s390_cpu_exec_interrupt; > #endif > dc->vmsd = &vmstate_s390_cpu; > cc->gdb_num_core_regs = S390_NUM_CORE_REGS; > diff --git a/target-s390x/helper.c b/target-s390x/helper.c > index 67ab106..e21afe6 100644 > --- a/target-s390x/helper.c > +++ b/target-s390x/helper.c > @@ -876,4 +876,17 @@ void s390_cpu_do_interrupt(CPUState *cs) > } > } > > +bool s390_cpu_exec_interrupt(CPUState *cs, int interrupt_request) > +{ > + if (interrupt_request & CPU_INTERRUPT_HARD) { > + S390CPU *cpu = S390_CPU(cs); > + CPUS390XState *env = &cpu->env; > + > + if (env->psw.mask & PSW_MASK_EXT) { > + s390_cpu_do_interrupt(cs); > + return true; > + } > + } > + return false; > +} > #endif /* CONFIG_USER_ONLY */ -- Alex Bennée