From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52453) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z5WLc-0004qZ-A5 for qemu-devel@nongnu.org; Thu, 18 Jun 2015 05:43:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z5WLa-0001W2-Fx for qemu-devel@nongnu.org; Thu, 18 Jun 2015 05:43:00 -0400 Received: from hall.aurel32.net ([2001:bc8:30d7:101::1]:35690) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z5WLa-0001Vf-9r for qemu-devel@nongnu.org; Thu, 18 Jun 2015 05:42:58 -0400 Date: Thu, 18 Jun 2015 11:42:54 +0200 From: Aurelien Jarno Message-ID: <20150618094254.GE3379@aurel32.net> 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> <55828F5C.70706@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <55828F5C.70706@redhat.com> Sender: Aurelien Jarno 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: Paolo Bonzini Cc: rth7680@gmail.com, leon.alrae@imgtec.com, qemu-devel@nongnu.org, Pavel Dovgaluk On 2015-06-18 11:29, Paolo Bonzini wrote: > 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 easy. Yes, that was another approach I have in mind (I called it exception table in my other mail), but it requires a tiny more work than just saving the CPU state all the time. The problem is that the state information we want to save are varying for target to target. Going through a TCG opcode means we can use the liveness analysis pass to save the minimum amount of data. That said I would like to push further the idea of always saving the CPU state a bit more to see if we can keep the same performances. There are still improvements to do, by removing more code on the core side (like finding the call to tb_finc_pc which is now useless), or on the target side by checking/improving helper flags. We might save the CPU state too often if a helper doesn't declare it doesn't touch globals. -- Aurelien Jarno GPG: 4096R/1DDD8C9B aurelien@aurel32.net http://www.aurel32.net