diff mbox series

[12/12] linux-user: Add support for KCOV_INIT_TRACE ioctl

Message ID 1579214991-19602-13-git-send-email-aleksandar.markovic@rt-rk.com (mailing list archive)
State New, archived
Headers show
Series linux-user: Add support for fs, fd,and kcov ioctls | expand

Commit Message

Aleksandar Markovic Jan. 16, 2020, 10:49 p.m. UTC
From: Aleksandar Markovic <amarkovic@wavecomp.com>

KCOV_INIT_TRACE ioctl plays the role in kernel coverage tracing.
This ioctl's third argument is of type 'unsigned long', and the
implementation in QEMU is straightforward.

Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com>
---
 linux-user/ioctls.h       | 1 +
 linux-user/syscall_defs.h | 1 +
 2 files changed, 2 insertions(+)

Comments

Laurent Vivier Jan. 22, 2020, 2:16 p.m. UTC | #1
Le 16/01/2020 à 23:49, Aleksandar Markovic a écrit :
> From: Aleksandar Markovic <amarkovic@wavecomp.com>
> 
> KCOV_INIT_TRACE ioctl plays the role in kernel coverage tracing.
> This ioctl's third argument is of type 'unsigned long', and the
> implementation in QEMU is straightforward.
> 
> Reviewed-by: Laurent Vivier <laurent@vivier.eu>
> Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com>
> ---
>  linux-user/ioctls.h       | 1 +
>  linux-user/syscall_defs.h | 1 +
>  2 files changed, 2 insertions(+)
> 
> diff --git a/linux-user/ioctls.h b/linux-user/ioctls.h
> index 39b3825..1da71dd 100644
> --- a/linux-user/ioctls.h
> +++ b/linux-user/ioctls.h
> @@ -556,4 +556,5 @@
>  #ifdef CONFIG_KCOV
>    IOCTL(KCOV_ENABLE, 0, TYPE_NULL)
>    IOCTL(KCOV_DISABLE, 0, TYPE_NULL)
> +  IOCTL(KCOV_INIT_TRACE, IOC_R, TYPE_ULONG)
>  #endif
> diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h
> index c8999ef..bf71b3a 100644
> --- a/linux-user/syscall_defs.h
> +++ b/linux-user/syscall_defs.h
> @@ -2464,6 +2464,7 @@ struct target_mtpos {
>  /* kcov ioctls */
>  #define TARGET_KCOV_ENABLE     TARGET_IO('c', 100)
>  #define TARGET_KCOV_DISABLE    TARGET_IO('c', 101)
> +#define TARGET_KCOV_INIT_TRACE TARGET_IOR('c', 1, abi_ulong)
>  
>  struct target_sysinfo {
>      abi_long uptime;                /* Seconds since boot */
> 

Applied to my linux-user branch.

Thanks,
Laurent
diff mbox series

Patch

diff --git a/linux-user/ioctls.h b/linux-user/ioctls.h
index 39b3825..1da71dd 100644
--- a/linux-user/ioctls.h
+++ b/linux-user/ioctls.h
@@ -556,4 +556,5 @@ 
 #ifdef CONFIG_KCOV
   IOCTL(KCOV_ENABLE, 0, TYPE_NULL)
   IOCTL(KCOV_DISABLE, 0, TYPE_NULL)
+  IOCTL(KCOV_INIT_TRACE, IOC_R, TYPE_ULONG)
 #endif
diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h
index c8999ef..bf71b3a 100644
--- a/linux-user/syscall_defs.h
+++ b/linux-user/syscall_defs.h
@@ -2464,6 +2464,7 @@  struct target_mtpos {
 /* kcov ioctls */
 #define TARGET_KCOV_ENABLE     TARGET_IO('c', 100)
 #define TARGET_KCOV_DISABLE    TARGET_IO('c', 101)
+#define TARGET_KCOV_INIT_TRACE TARGET_IOR('c', 1, abi_ulong)
 
 struct target_sysinfo {
     abi_long uptime;                /* Seconds since boot */