From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56561) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZAE9B-0000Fu-IM for qemu-devel@nongnu.org; Wed, 01 Jul 2015 05:17:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZAE96-00044p-AA for qemu-devel@nongnu.org; Wed, 01 Jul 2015 05:17:37 -0400 Received: from mail-qk0-x232.google.com ([2607:f8b0:400d:c09::232]:34748) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZAE96-00044e-5l for qemu-devel@nongnu.org; Wed, 01 Jul 2015 05:17:32 -0400 Received: by qkeo142 with SMTP id o142so24899458qke.1 for ; Wed, 01 Jul 2015 02:17:31 -0700 (PDT) Sender: Richard Henderson References: <20150629072310.388.48661.stgit@PASHA-ISP> <20150629072333.388.3004.stgit@PASHA-ISP> From: Richard Henderson Message-ID: <5593B027.8070102@twiddle.net> Date: Wed, 1 Jul 2015 10:17:27 +0100 MIME-Version: 1.0 In-Reply-To: <20150629072333.388.3004.stgit@PASHA-ISP> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit 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: Pavel Dovgalyuk , qemu-devel@nongnu.org Cc: pbonzini@redhat.com, rth7680@gmail.com, leon.alrae@imgtec.com, agraf@suse.de, aurelien@aurel32.net 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. And while this patch set fixes icount, do you have any evidence that we ever got incorrect PC values handling mmu faults? r~