From: Honglei Huang <[email protected]> Define a new ioctl command AMDKFD_IOC_SVM_RANGES (0x27) to support batch registration of multiple SVM ranges. Update AMDKFD_COMMAND_END from 0x27 to 0x28 accordingly.
This ioctl provides a more efficient interface for userspace to register multiple non-contiguous memory ranges with the same set of SVM attributes in a single system call, reducing context switching overhead compared to multiple AMDKFD_IOC_SVM calls. Signed-off-by: Honglei Huang <[email protected]> --- include/uapi/linux/kfd_ioctl.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/include/uapi/linux/kfd_ioctl.h b/include/uapi/linux/kfd_ioctl.h index d782bda1d2ca..c5f9595ef30d 100644 --- a/include/uapi/linux/kfd_ioctl.h +++ b/include/uapi/linux/kfd_ioctl.h @@ -663,7 +663,6 @@ enum kfd_mmio_remap { #define KFD_IOCTL_SVM_FLAG_GPU_ALWAYS_MAPPED 0x00000040 /* Fine grained coherency between all devices using device-scope atomics */ #define KFD_IOCTL_SVM_FLAG_EXT_COHERENT 0x00000080 - /** * kfd_ioctl_svm_op - SVM ioctl operations * @@ -1622,7 +1621,10 @@ struct kfd_ioctl_dbg_trap_args { #define AMDKFD_IOC_DBG_TRAP \ AMDKFD_IOWR(0x26, struct kfd_ioctl_dbg_trap_args) +#define AMDKFD_IOC_SVM_RANGES \ + AMDKFD_IOWR(0x27, struct kfd_ioctl_svm_ranges_args) + #define AMDKFD_COMMAND_START 0x01 -#define AMDKFD_COMMAND_END 0x27 +#define AMDKFD_COMMAND_END 0x28 #endif -- 2.34.1
