From f7dbd8fe5665a1161b5f8af3e2d2044f3bd349d2 Mon Sep 17 00:00:00 2001 From: Aleksandar Markovic Date: Thu, 16 Jan 2020 23:49:51 +0100 Subject: [PATCH] linux-user: Add support for KCOV_INIT_TRACE ioctl 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 Signed-off-by: Aleksandar Markovic Message-Id: <1579214991-19602-13-git-send-email-aleksandar.markovic@rt-rk.com> Signed-off-by: Laurent Vivier --- 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 6220dd8cf7..23f6d3feb5 100644 --- a/linux-user/ioctls.h +++ b/linux-user/ioctls.h @@ -538,4 +538,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 7b0b60d253..fb8318d121 100644 --- a/linux-user/syscall_defs.h +++ b/linux-user/syscall_defs.h @@ -2437,6 +2437,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 */