linux-user: Add support for KCOV_INIT_TRACE ioctl
authorAleksandar Markovic <amarkovic@wavecomp.com>
Thu, 16 Jan 2020 22:49:51 +0000 (23:49 +0100)
committerLaurent Vivier <laurent@vivier.eu>
Wed, 22 Jan 2020 14:15:51 +0000 (15:15 +0100)
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>
Message-Id: <1579214991-19602-13-git-send-email-aleksandar.markovic@rt-rk.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
linux-user/ioctls.h
linux-user/syscall_defs.h

index 6220dd8cf791a1524d844e71ab5110b624541cde..23f6d3feb5db2465a4017f209aa8a0bd7aa9c429 100644 (file)
 #ifdef CONFIG_KCOV
   IOCTL(KCOV_ENABLE, 0, TYPE_NULL)
   IOCTL(KCOV_DISABLE, 0, TYPE_NULL)
+  IOCTL(KCOV_INIT_TRACE, IOC_R, TYPE_ULONG)
 #endif
index 7b0b60d253d9a5a527ceae89a366636cf374ba3f..fb8318d12185c8a60e6d4ebd265aa0fc0a2f3e4b 100644 (file)
@@ -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 */