qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: vibi sreenivasan <vibi_sreenivasan@cms.com>
To: Martin Mohring <martin.mohring@opensuse.org>
Cc: Riku Voipio <riku.voipio@iki.fi>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 02/02] linux-user : add vmsplice system call
Date: Mon, 25 May 2009 11:43:07 +0530	[thread overview]
Message-ID: <1243231987.2177.7.camel@system> (raw)
In-Reply-To: <4A199013.10001@opensuse.org>

hi,
	Thanks for your comment.
> 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).
if the host kernel is too old , i think it will return -1 & set errno to
ENOSYS.
So isnt that same as putting #ifdef.

> Or even emulate the syscall - which can be quite hard.
Hmm thinking on that. will it be worth?
> 
> I put together the new user linux patches together with riku, seems the
> main qemu staff likes more to make qemu system mode stuff.
> 
Thanks for that.

Thanks & Regards
vibi sreenivasan

> Regards, Martin
> 
> vibi sreenivasan wrote:
> > linux-user : add vmsplice system call
> >
> > Signed-off-by: vibi sreenivasan <vibi_sreenivasan@cms.com>
> >
> > ---
> >  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);
> >   
> 
> 
> 

  reply	other threads:[~2009-05-25  6:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-24  8:05 [Qemu-devel] [PATCH 02/02] linux-user : add vmsplice system call vibi sreenivasan
2009-05-24 18:21 ` Martin Mohring
2009-05-25  6:13   ` vibi sreenivasan [this message]
2009-05-25 14:04     ` Riku Voipio

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1243231987.2177.7.camel@system \
    --to=vibi_sreenivasan@cms.com \
    --cc=martin.mohring@opensuse.org \
    --cc=qemu-devel@nongnu.org \
    --cc=riku.voipio@iki.fi \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).