From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:38053) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TqV5o-0000gu-Cv for qemu-devel@nongnu.org; Wed, 02 Jan 2013 15:39:18 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TqV5n-0006pw-Av for qemu-devel@nongnu.org; Wed, 02 Jan 2013 15:39:16 -0500 Received: from mail-la0-f43.google.com ([209.85.215.43]:44515) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TqV5n-0006pF-3F for qemu-devel@nongnu.org; Wed, 02 Jan 2013 15:39:15 -0500 Received: by mail-la0-f43.google.com with SMTP id eg20so6819208lab.16 for ; Wed, 02 Jan 2013 12:39:13 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <1357156566-38368-1-git-send-email-LightningTH@GMail.com> References: <1357156566-38368-1-git-send-email-LightningTH@GMail.com> From: Peter Maydell Date: Wed, 2 Jan 2013 20:38:53 +0000 Message-ID: Content-Type: text/plain; charset=UTF-8 Subject: Re: [Qemu-devel] [PATCH v2] Modifications to fix PowerPC on 64bit host, bug #1052857 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Samuel Seay Cc: qemu-ppc@nongnu.org, qemu-devel@nongnu.org On 2 January 2013 19:56, Samuel Seay wrote: > Removed h2g() macro around the ka->_sa_handler due to _sa_handler being a guest value > Changed the __put_user macro as it was attempting to put a value to a guest memory location without converting to the guest area > > Signed-off-by: Samuel Seay > --- > linux-user/signal.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/linux-user/signal.c b/linux-user/signal.c > index 95e2ffa..d0d24fc 100644 > --- a/linux-user/signal.c > +++ b/linux-user/signal.c > @@ -4584,7 +4584,7 @@ static void setup_frame(int sig, struct target_sigaction *ka, > > signal = current_exec_domain_sig(sig); > > - err |= __put_user(h2g(ka->_sa_handler), &sc->handler); > + err |= __put_user(ka->_sa_handler, &sc->handler); > err |= __put_user(set->sig[0], &sc->oldmask); > #if defined(TARGET_PPC64) > err |= __put_user(set->sig[0] >> 32, &sc->_unused[3]); > @@ -4606,7 +4606,7 @@ static void setup_frame(int sig, struct target_sigaction *ka, > > /* Create a stack frame for the caller of the handler. */ > newsp = frame_addr - SIGNAL_FRAMESIZE; > - err |= __put_user(env->gpr[1], (target_ulong *)(uintptr_t) newsp); > + err |= put_user(env->gpr[1], (target_ulong)(uintptr_t) newsp, target_ulong); newsp is already a target_ulong, you don't need either of these casts. -- PMM