From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44890) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YcewU-0000zu-Ef for qemu-devel@nongnu.org; Mon, 30 Mar 2015 15:01:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YcewR-0002c8-PZ for qemu-devel@nongnu.org; Mon, 30 Mar 2015 15:01:46 -0400 Received: from mail-qg0-x22f.google.com ([2607:f8b0:400d:c04::22f]:36597) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YcewR-0002c4-Kl for qemu-devel@nongnu.org; Mon, 30 Mar 2015 15:01:43 -0400 Received: by qgf60 with SMTP id 60so179495637qgf.3 for ; Mon, 30 Mar 2015 12:01:43 -0700 (PDT) Sender: Richard Henderson Message-ID: <55199D92.3050203@twiddle.net> Date: Mon, 30 Mar 2015 12:01:38 -0700 From: Richard Henderson MIME-Version: 1.0 References: <1426523374-18673-1-git-send-email-leon.alrae@imgtec.com> In-Reply-To: <1426523374-18673-1-git-send-email-leon.alrae@imgtec.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] target-mips: save cpu state before calling MSA load and store helpers List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Leon Alrae , qemu-devel@nongnu.org Cc: aurelien@aurel32.net On 03/16/2015 09:29 AM, Leon Alrae wrote: > PC needs to be saved if an exception can be generated by an helper. > This fixes a problem related to resuming the execution at unexpected address > after an exception (caused by MSA load/store instruction) has been serviced. Only if the helper doesn't use cpu_restore_state. In this case, all of your do_##name memory routines should instead use helper_[lb]e_*_mmu, which allows you to pass along the mmu_idx (instead of switching on _kernel et al), and the GETRA() value in the top-level helper. r~