From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48385) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ayLt2-0003zq-Ko for qemu-devel@nongnu.org; Thu, 05 May 2016 12:12:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ayLsq-0003iI-Rb for qemu-devel@nongnu.org; Thu, 05 May 2016 12:12:19 -0400 Received: from mail-wm0-x22f.google.com ([2a00:1450:400c:c09::22f]:35415) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ayLsp-0003VP-I5 for qemu-devel@nongnu.org; Thu, 05 May 2016 12:12:12 -0400 Received: by mail-wm0-x22f.google.com with SMTP id e201so26587638wme.0 for ; Thu, 05 May 2016 09:11:57 -0700 (PDT) Date: Thu, 5 May 2016 18:11:52 +0200 From: "Edgar E. Iglesias" Message-ID: <20160505161152.GC16305@toto> References: <1459260825-5710-1-git-send-email-chengang@emindsoft.com.cn> <572B5D59.6000006@emindsoft.com.cn> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <572B5D59.6000006@emindsoft.com.cn> Subject: Re: [Qemu-devel] [PATCH] linux-user/signal.c: Use target address instead of host address for microblaze restorer List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Chen Gang Cc: Peter Maydell , Richard Henderson , Chris Metcalf , Laurent Vivier , "walt@tilera.com" , Riku Voipio , QEMU Developers , Chen Gang On Thu, May 05, 2016 at 10:48:57PM +0800, Chen Gang wrote: > On 5/5/16 00:05, Peter Maydell wrote: > > On 29 March 2016 at 15:13, wrote: > >> From: Chen Gang > >> > >> The return address is in target space, so the restorer address needs to > >> be target space, too. > >> > >> Signed-off-by: Chen Gang > >> --- > >> linux-user/signal.c | 3 ++- > >> 1 file changed, 2 insertions(+), 1 deletion(-) > >> > >> diff --git a/linux-user/signal.c b/linux-user/signal.c > >> index 4157154..c0a6f7e 100644 > >> --- a/linux-user/signal.c > >> +++ b/linux-user/signal.c > >> @@ -3532,7 +3532,8 @@ static void setup_frame(int sig, struct target_sigaction *ka, > >> > >> /* Return from sighandler will jump to the tramp. > >> Negative 8 offset because return is rtsd r15, 8 */ > >> - env->regs[15] = ((unsigned long)frame->tramp) - 8; > >> + env->regs[15] = frame_addr + offsetof(struct target_signal_frame, tramp) > >> + - 8; > >> } > >> > >> /* Set up registers for signal handler */ > > > > Reviewed-by: Peter Maydell > > > > Thank all of you for the 2 patches reviewing. > > I guess, this month, I may have free time (at least, will not be as busy > as the previous month), I shall finish tilegx floating point insns (it > has been delayed too long). Reviewed-by: Edgar E. Iglesias