From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46179) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z5W8C-0008Bu-9W for qemu-devel@nongnu.org; Thu, 18 Jun 2015 05:29:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z5W89-0002Xd-5F for qemu-devel@nongnu.org; Thu, 18 Jun 2015 05:29:08 -0400 Received: from mx1.redhat.com ([209.132.183.28]:49914) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z5W89-0002XB-0C for qemu-devel@nongnu.org; Thu, 18 Jun 2015 05:29:05 -0400 Message-ID: <55828F5C.70706@redhat.com> Date: Thu, 18 Jun 2015 11:29:00 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <20150617124158.3316.54954.stgit@PASHA-ISP> <20150617141901.GE19635@aurel32.net> <001101d0a996$19a72f80$4cf58e80$@Dovgaluk@ispras.ru> <20150618081640.GK931@aurel32.net> <20150618090813.GF19635@aurel32.net> In-Reply-To: <20150618090813.GF19635@aurel32.net> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v2 0/3] Fix exceptions handling for MIPS and i386 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Aurelien Jarno , Pavel Dovgaluk Cc: rth7680@gmail.com, leon.alrae@imgtec.com, qemu-devel@nongnu.org On 18/06/2015 11:08, Aurelien Jarno wrote: > For an i386 guest still on an x86 host, I get a 4% slower boot time by > not using retranslation (see patch below). This is not that much > compared to the complexity retranslation bring us. QEMU could just always compute and store the restore_state information. TCG needs to help filling it in (a new TCG opcode?), but it should be ea= sy. Paolo > diff --git a/target-i386/translate.c b/target-i386/translate.c > index 58b1959..de65bba 100644 > --- a/target-i386/translate.c > +++ b/target-i386/translate.c > @@ -8001,6 +8001,9 @@ static inline void gen_intermediate_code_internal= (X86CPU *cpu, > =20 > gen_tb_start(tb); > for(;;) { > + gen_update_cc_op(dc); > + gen_jmp_im(pc_ptr - dc->cs_base); > + > if (unlikely(!QTAILQ_EMPTY(&cs->breakpoints))) { > QTAILQ_FOREACH(bp, &cs->breakpoints, entry) { > if (bp->pc =3D=3D pc_ptr && > diff --git a/translate-all.c b/translate-all.c > index b6b0e1c..3d4c017 100644 > --- a/translate-all.c > +++ b/translate-all.c > @@ -212,6 +212,8 @@ static int cpu_restore_state_from_tb(CPUState *cpu,= TranslationBlock *tb, > int64_t ti; > #endif > =20 > + return -1; > + > #ifdef CONFIG_PROFILER > ti =3D profile_getclock(); > #endif