From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1M8IJv-0001Qg-5I for qemu-devel@nongnu.org; Sun, 24 May 2009 14:21:15 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1M8IJt-0001QU-DT for qemu-devel@nongnu.org; Sun, 24 May 2009 14:21:13 -0400 Received: from [199.232.76.173] (port=35574 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M8IJt-0001QR-6T for qemu-devel@nongnu.org; Sun, 24 May 2009 14:21:13 -0400 Received: from dd21438.kasserver.com ([85.13.141.110]:50565) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1M8IJs-0007l8-No for qemu-devel@nongnu.org; Sun, 24 May 2009 14:21:13 -0400 Message-ID: <4A199013.10001@opensuse.org> Date: Sun, 24 May 2009 20:21:07 +0200 From: Martin Mohring MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH 02/02] linux-user : add vmsplice system call References: <1243152335.2111.9.camel@system> In-Reply-To: <1243152335.2111.9.camel@system> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: vibi_sreenivasan@cms.com Cc: Riku Voipio , qemu-devel@nongnu.org Hi, fine that you provide missing syscalls for user mode one after the other. I have one remark: if the host os kernel is too old to provide the syscalls, they should be #if'ed out (tee, vmsplice & co). Or even emulate the syscall - which can be quite hard. I put together the new user linux patches together with riku, seems the main qemu staff likes more to make qemu system mode stuff. Regards, Martin vibi sreenivasan wrote: > linux-user : add vmsplice system call > > Signed-off-by: vibi sreenivasan > > --- > linux-user/syscall.c | 14 ++++++++++++++ > 1 files changed, 14 insertions(+), 0 deletions(-) > > diff --git a/linux-user/syscall.c b/linux-user/syscall.c > index dc726ad..bb32f84 100644 > --- a/linux-user/syscall.c > +++ b/linux-user/syscall.c > @@ -6598,6 +6598,20 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1, > break; > #endif > > +#ifdef TARGET_NR_vmsplice > + case TARGET_NR_vmsplice: > + { > + int count = arg3; > + struct iovec *vec; > + > + vec = alloca(count * sizeof(struct iovec)); > + if (lock_iovec(VERIFY_READ, vec, arg2, count, 1) < 0) > + goto efault; > + ret = get_errno(vmsplice(arg1, vec, count, arg4)); > + unlock_iovec(vec, arg2, count, 0); > + } > + break; > +#endif > default: > unimplemented: > gemu_log("qemu: Unsupported syscall: %d\n", num); >