qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 02/02] linux-user : add vmsplice system call


From: Martin Mohring
Subject: Re: [Qemu-devel] [PATCH 02/02] linux-user : add vmsplice system call
Date: Sun, 24 May 2009 20:21:07 +0200
User-agent: Thunderbird 2.0.0.19 (X11/20081227)

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 <address@hidden>
>
> ---
>  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 via email to

[Prev in Thread] Current Thread [Next in Thread]