Received: from eggs.gnu.org ([140.186.70.92]:41685) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QpObR-0006GS-Gf for qemu-devel@nongnu.org; Fri, 05 Aug 2011 13:54:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QpObO-0000om-K2 for qemu-devel@nongnu.org; Fri, 05 Aug 2011 13:54:33 -0400 Received: from na3sys009aog117.obsmtp.com ([74.125.149.242]:60905) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1QpObO-0000oE-8y for qemu-devel@nongnu.org; Fri, 05 Aug 2011 13:54:30 -0400 Received: by mail-iy0-f170.google.com with SMTP id 16so3743643iye.15 for ; Fri, 05 Aug 2011 10:54:27 -0700 (PDT) Date: Fri, 5 Aug 2011 10:54:23 -0700 From: An-Cheng Huang Message-ID: <20110805175423.GC5323@debian.localdomain> References: <20110804221600.GA5323@debian.localdomain> <20110805000549.GB5323@debian.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] [PATCH 1/2] linux-user: Fix indirect syscall handling for MIPS List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: riku.voipio@iki.fi, qemu-devel@nongnu.org On Fri, Aug 05, 2011 at 10:27:21AM +0100, Peter Maydell wrote: > On 5 August 2011 01:05, An-Cheng Huang wrote: > > Ok the following patch changes the number of arguments for sys_syscall > > to 8 in mips_syscall_args and also skips the do_syscall() call if any > > of the get_user() calls fails. Do you think combining these makes sense > > or should they be two separate patches? Thanks. > > The code in this patch looks good, but yes, I think they should > be two separate patches. Here's the first patch for the indirect syscall: This patch changes the number of arguments for sys_syscall on MIPS to 8, which allows the arguments for the actual syscall to be handled correctly. Signed-off-by: An-Cheng Huang --- linux-user/main.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/linux-user/main.c b/linux-user/main.c index 6a8f4bd..9e67b24 100644 --- a/linux-user/main.c +++ b/linux-user/main.c @@ -1669,7 +1669,7 @@ void cpu_loop(CPUPPCState *env) #define MIPS_SYS(name, args) args, static const uint8_t mips_syscall_args[] = { - MIPS_SYS(sys_syscall , 0) /* 4000 */ + MIPS_SYS(sys_syscall , 8) /* 4000 */ MIPS_SYS(sys_exit , 1) MIPS_SYS(sys_fork , 0) MIPS_SYS(sys_read , 3)