Received: from eggs.gnu.org ([2001:4830:134:3::10]:57866) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZAEEK-0002U4-C8 for qemu-devel@nongnu.org; Wed, 01 Jul 2015 05:22:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZAEEF-0006VX-29 for qemu-devel@nongnu.org; Wed, 01 Jul 2015 05:22:56 -0400 Received: from mail.ispras.ru ([83.149.199.45]:49232) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZAEEE-0006VK-Qk for qemu-devel@nongnu.org; Wed, 01 Jul 2015 05:22:50 -0400 From: "Pavel Dovgaluk" References: <20150629072310.388.48661.stgit@PASHA-ISP> <20150629072333.388.3004.stgit@PASHA-ISP> <5593B027.8070102@twiddle.net> In-Reply-To: <5593B027.8070102@twiddle.net> Date: Wed, 1 Jul 2015 12:22:51 +0300 Message-ID: <000b01d0b3df$8146bcc0$83d43640$@Dovgaluk@ispras.ru> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Content-Language: ru Subject: Re: [Qemu-devel] [PATCH v4 4/5] target-i386: fix memory operations in helpers List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: 'Richard Henderson' , qemu-devel@nongnu.org Cc: pbonzini@redhat.com, rth7680@gmail.com, leon.alrae@imgtec.com, agraf@suse.de, aurelien@aurel32.net > From: Richard Henderson [mailto:rth7680@gmail.com] On Behalf Of Richard Henderson > On 06/29/2015 08:23 AM, Pavel Dovgalyuk wrote: > > This patch passes TB return address into softmmu functions that are > > invoked from target helpers. This allows correct PC and icount recovering > > while handling MMU faults. > > > > Signed-off-by: Pavel Dovgalyuk > > --- > > target-i386/cc_helper.c | 2 > > target-i386/cpu.h | 5 > > target-i386/excp_helper.c | 21 + > > target-i386/fpu_helper.c | 146 +++++---- > > target-i386/helper.c | 4 > > target-i386/int_helper.c | 32 +- > > target-i386/mem_helper.c | 39 +- > > target-i386/misc_helper.c | 12 - > > target-i386/ops_sse.h | 2 > > target-i386/seg_helper.c | 712 +++++++++++++++++++++++---------------------- > > target-i386/svm_helper.c | 4 > > target-i386/translate.c | 25 -- > > 12 files changed, 503 insertions(+), 501 deletions(-) > > This patch is too big. It really needs to be split into several patches. > > (1) Introduce raise_exception_ra that accepts the GETPC argument, so that > (a) you can stage the changes in and > (b) most of the seg_helper changes from do_interrupt et al > aren't needed. > > (2) Stage in fixes for each of the (groups of) helpers callable from > translate.c. E.g. fld, fst in one group, division in another. Ok, I'll split this patch. > And while this patch set fixes icount, do you have any evidence that we ever > got incorrect PC values handling mmu faults? Indeed. I described it here: http://lists.nongnu.org/archive/html/qemu-devel/2014-09/msg02960.html One of the applications used maskmov_xmm, which caused MMU fault. Then execution of TB restarted instead of continuing from maskmov. Pavel Dovgalyuk