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 <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>
This commit is contained in:
Aleksandar Markovic 2020-01-16 23:49:51 +01:00 committed by Laurent Vivier
parent bd27e675d3
commit f7dbd8fe56
2 changed files with 2 additions and 0 deletions

View File

@ -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

View 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 */