qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Laurent Vivier <laurent@vivier.eu>
To: Aleksandar Markovic <aleksandar.markovic@rt-rk.com>,
	qemu-devel@nongnu.org
Cc: lvivier@redhat.com, thuth@redhat.com, daniel.santos@pobox.com,
	arikalo@wavecomp.com, jcmvbkbc@gmail.com, amarkovic@wavecomp.com,
	nchen@wavecomp.com, philmd@redhat.com, aurelien@aurel32.net
Subject: Re: [Qemu-devel] [PATCH v6 2/6] linux-user: Add support for SIOCSPGRP ioctl for all targets
Date: Wed, 22 May 2019 11:12:53 +0200	[thread overview]
Message-ID: <cf487418-2f81-45b3-3c29-94f8b5edb47e@vivier.eu> (raw)
In-Reply-To: <1558282527-22183-3-git-send-email-aleksandar.markovic@rt-rk.com>

On 19/05/2019 18:15, Aleksandar Markovic wrote:
> From: Aleksandar Markovic <amarkovic@wavecomp.com>
> 
> Add support for setting the process (or process group) to receive SIGIO
> or SIGURG signals when I/O becomes possible or urgent data is available,
> using SIOCSPGRP ioctl.
> 
> The ioctl numeric values for SIOCSPGRP are platform-dependent and are
> determined by following files in Linux kernel source tree:
> 
> arch/ia64/include/uapi/asm/sockios.h:#define SIOCSPGRP    0x8902
> arch/mips/include/uapi/asm/sockios.h:#define SIOCSPGRP    _IOW('s', 8, pid_t)
> arch/parisc/include/uapi/asm/sockios.h:#define SIOCSPGRP  0x8902
> arch/sh/include/uapi/asm/sockios.h:#define SIOCSPGRP      _IOW('s', 8, pid_t)
> arch/xtensa/include/uapi/asm/sockios.h:#define SIOCSPGRP  _IOW('s', 8, pid_t)
> arch/alpha/include/uapi/asm/sockios.h:#define SIOCSPGRP   _IOW('s', 8, pid_t)
> arch/sparc/include/uapi/asm/sockios.h:#define SIOCSPGRP   0x8902
> include/uapi/asm-generic/sockios.h:#define SIOCSPGRP      0x8902
> 
> Hence the different definition for alpha, mips, sh4, and xtensa.
> 
> Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com>
> Reviewed-by: Max Filippov <jcmvbkbc@gmail.com>
> Reviewed-by: Laurent Vivier <laurent@vivier.eu>
> ---
>   linux-user/ioctls.h       | 1 +
>   linux-user/syscall_defs.h | 3 +++
>   2 files changed, 4 insertions(+)
> 
> diff --git a/linux-user/ioctls.h b/linux-user/ioctls.h
> index ae89516..c37adc5 100644
> --- a/linux-user/ioctls.h
> +++ b/linux-user/ioctls.h
> @@ -218,6 +218,7 @@
>     IOCTL(SIOCSRARP, IOC_W, MK_PTR(MK_STRUCT(STRUCT_arpreq)))
>     IOCTL(SIOCGRARP, IOC_R, MK_PTR(MK_STRUCT(STRUCT_arpreq)))
>     IOCTL(SIOCGIWNAME, IOC_W | IOC_R, MK_PTR(MK_STRUCT(STRUCT_char_ifreq)))
> +  IOCTL(SIOCSPGRP, IOC_W, MK_PTR(TYPE_INT)) /* pid_t */
>     IOCTL(SIOCGPGRP, IOC_R, MK_PTR(TYPE_INT)) /* pid_t */
>     IOCTL(SIOCGSTAMP, IOC_R, MK_PTR(MK_STRUCT(STRUCT_timeval)))
>     IOCTL(SIOCGSTAMPNS, IOC_R, MK_PTR(MK_STRUCT(STRUCT_timespec)))
> diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h
> index 1e86fb9..2941231 100644
> --- a/linux-user/syscall_defs.h
> +++ b/linux-user/syscall_defs.h
> @@ -739,11 +739,14 @@ struct target_pollfd {
>   #if defined(TARGET_ALPHA) || defined(TARGET_MIPS) || defined(TARGET_SH4) ||    \
>          defined(TARGET_XTENSA)
>   #define TARGET_SIOCATMARK      TARGET_IOR('s', 7, int)
> +#define TARGET_SIOCSPGRP       TARGET_IOW('s', 8, pid_t)
>   #define TARGET_SIOCGPGRP       TARGET_IOR('s', 9, pid_t)
>   #else
>   #define TARGET_SIOCATMARK      0x8905
> +#define TARGET_SIOCSPGRP       0x8902
>   #define TARGET_SIOCGPGRP       0x8904
>   #endif
> +
>   #define TARGET_SIOCGSTAMP      0x8906          /* Get stamp (timeval) */
>   #define TARGET_SIOCGSTAMPNS    0x8907          /* Get stamp (timespec) */
>   
> 

Applied to my linux-user branch.

Thanks,
Laurent


  reply	other threads:[~2019-05-22  9:17 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-19 16:15 [Qemu-devel] [PATCH v6 0/6] linux-user: A set of miscellaneous patches Aleksandar Markovic
2019-05-19 16:15 ` [Qemu-devel] [PATCH v6 1/6] linux-user: Fix support for SIOCATMARK and SIOCGPGRP ioctls for xtensa Aleksandar Markovic
2019-05-22  9:11   ` Laurent Vivier
2019-05-19 16:15 ` [Qemu-devel] [PATCH v6 2/6] linux-user: Add support for SIOCSPGRP ioctl for all targets Aleksandar Markovic
2019-05-22  9:12   ` Laurent Vivier [this message]
2019-05-19 16:15 ` [Qemu-devel] [PATCH v6 3/6] linux-user: Add support for SIOC<G|S>IFPFLAGS ioctls " Aleksandar Markovic
2019-05-22  9:13   ` Laurent Vivier
2019-05-19 16:15 ` [Qemu-devel] [PATCH v6 4/6] linux-user: Add support for setsockopt() options IPV6_<ADD|DROP>_MEMBERSHIP Aleksandar Markovic
2019-05-22  9:16   ` Laurent Vivier
2019-05-22  9:18   ` Laurent Vivier
2019-05-19 16:15 ` [Qemu-devel] [PATCH v6 5/6] linux-user: Sanitize interp_info and, for mips only, init field fp_abi Aleksandar Markovic
2019-05-22  9:14   ` Laurent Vivier
2019-05-19 16:15 ` [Qemu-devel] [PATCH v6 6/6] linux-user: Add support for statx() syscall Aleksandar Markovic

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=cf487418-2f81-45b3-3c29-94f8b5edb47e@vivier.eu \
    --to=laurent@vivier.eu \
    --cc=aleksandar.markovic@rt-rk.com \
    --cc=amarkovic@wavecomp.com \
    --cc=arikalo@wavecomp.com \
    --cc=aurelien@aurel32.net \
    --cc=daniel.santos@pobox.com \
    --cc=jcmvbkbc@gmail.com \
    --cc=lvivier@redhat.com \
    --cc=nchen@wavecomp.com \
    --cc=philmd@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=thuth@redhat.com \
    /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).