From b07a80e505cc19c12fa442c8b1161d04187bb64c Mon Sep 17 00:00:00 2001 From: James Zhu Date: Fri, 20 Dec 2024 14:26:53 -0500 Subject: [PATCH] libhsakmt: add spm buffer header to send data back to user. Change-Id: If11fb4147e32c0eed319ccf76bcde9d76815ff67 Signed-off-by: James Zhu --- libhsakmt/include/hsakmt/linux/kfd_ioctl.h | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/libhsakmt/include/hsakmt/linux/kfd_ioctl.h b/libhsakmt/include/hsakmt/linux/kfd_ioctl.h index e132cedfb4..675722c2a0 100644 --- a/libhsakmt/include/hsakmt/linux/kfd_ioctl.h +++ b/libhsakmt/include/hsakmt/linux/kfd_ioctl.h @@ -1188,9 +1188,8 @@ enum kfd_ioctl_spm_op { * @buf_size[in]: size of the destination buffer * @timeout[in/out]: [in]: timeout in milliseconds, [out]: amount of time left * `in the timeout window - * @bytes_copied[out]: amount of data that was copied to the previous dest_buf - * @has_data_loss: boolean indicating whether data was lost - * (e.g. due to a ring-buffer overflow) + * @bytes_copied[out]: total amount of data that was copied to the previous dest_buf + * @has_data_loss: total count for sub-block which has data loss * * This ioctl performs different functions depending on the @op parameter. * @@ -1240,6 +1239,21 @@ struct kfd_ioctl_spm_args { __u32 has_data_loss; }; +/** + * kfd_ioctl_spm_buffer_header - SPM Buffer header for kfd_ioctl_spm_args->dest_buf + * + * @version [out]: spm versiom + * @bytes_copied [out]: amount of data for each sub-block + * @has_data_loss: [out]: boolean indicating whether data was lost for each sub-block + * (e.g. due to a ring-buffer overflow) + */ +struct kfd_ioctl_spm_buffer_header { + __u32 version; /* 0-23: minor 24-31: major */ + __u32 bytes_copied; + __u32 has_data_loss; + __u32 reserved[5]; +}; + /************************************************************************************************** * CRIU IOCTLs (Checkpoint Restore In Userspace) *