From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50748) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZPsL9-0005Zn-Bf for qemu-devel@nongnu.org; Thu, 13 Aug 2015 09:14:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZPsL4-0001L3-DQ for qemu-devel@nongnu.org; Thu, 13 Aug 2015 09:14:39 -0400 Received: from greensocs.com ([193.104.36.180]:40784) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZPsL4-0001Kk-2P for qemu-devel@nongnu.org; Thu, 13 Aug 2015 09:14:34 -0400 Message-ID: <55CC9833.6020803@greensocs.com> Date: Thu, 13 Aug 2015 15:14:27 +0200 From: Frederic Konrad MIME-Version: 1.0 References: <1439397664-70734-1-git-send-email-pbonzini@redhat.com> <1439397664-70734-6-git-send-email-pbonzini@redhat.com> In-Reply-To: <1439397664-70734-6-git-send-email-pbonzini@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 05/10] cpu-exec: elide more icount code if CONFIG_USER_ONLY List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini , qemu-devel@nongnu.org Cc: mttcg@greensocs.com On 12/08/2015 18:40, Paolo Bonzini wrote: > Signed-off-by: Paolo Bonzini > --- > cpu-exec.c | 6 ++++++ > 1 file changed, 6 insertions(+) What about the icount part in CPUState and the tb_start/end ? Can't this be removed as well? Fred > > diff --git a/cpu-exec.c b/cpu-exec.c > index 599e64d..bde5fd1 100644 > --- a/cpu-exec.c > +++ b/cpu-exec.c > @@ -228,6 +228,7 @@ static inline tcg_target_ulong cpu_tb_exec(CPUState *cpu, uint8_t *tb_ptr) > return next_tb; > } > > +#if defined(CONFIG_SOFTMMU) > /* Execute the code without caching the generated code. An interpreter > could be used if available. */ > static void cpu_exec_nocache(CPUState *cpu, int max_cycles, > @@ -251,6 +252,7 @@ static void cpu_exec_nocache(CPUState *cpu, int max_cycles, > tb_phys_invalidate(tb, -1); > tb_free(tb); > } > +#endif > > static TranslationBlock *tb_find_slow(CPUState *cpu, > target_ulong pc, > @@ -523,6 +525,9 @@ int cpu_exec(CPUState *cpu) > case TB_EXIT_ICOUNT_EXPIRED: > { > /* Instruction counter expired. */ > +#ifdef CONFIG_USER_ONLY > + abort(); > +#else > int insns_left = cpu->icount_decr.u32; > if (cpu->icount_extra && insns_left >= 0) { > /* Refill decrementer and continue execution. */ > @@ -542,6 +547,7 @@ int cpu_exec(CPUState *cpu) > cpu_loop_exit(cpu); > } > break; > +#endif > } > default: > break;