From: Honglei Huang <[email protected]>

Add a new SVM attribute type to indicate whether a memory range is
a special mapped VMA (VM_PFNMAP or VM_MIXEDMAP). This attribute will
be used to support non-contiguous memory mappings in SVM ranges.

The MAPPED attribute allows the driver to distinguish between regular
anonymous memory and pre-mapped device or reserved memory regions,
enabling different handling paths for page pinning and GPU mapping.

Signed-off-by: Honglei Huang <[email protected]>
---
 include/uapi/linux/kfd_ioctl.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/include/uapi/linux/kfd_ioctl.h b/include/uapi/linux/kfd_ioctl.h
index 2040a470ddb4..320a4a0e10bc 100644
--- a/include/uapi/linux/kfd_ioctl.h
+++ b/include/uapi/linux/kfd_ioctl.h
@@ -703,6 +703,7 @@ enum kfd_ioctl_svm_location {
  * @KFD_IOCTL_SVM_ATTR_CLR_FLAGS: bitmask of flags to clear
  * @KFD_IOCTL_SVM_ATTR_GRANULARITY: migration granularity
  *                                  (log2 num pages)
+ * @KFD_IOCTL_SVM_ATTR_MAPPED: indicates whether the range is VM_PFNMAP or 
VM_MIXEDMAP
  */
 enum kfd_ioctl_svm_attr_type {
        KFD_IOCTL_SVM_ATTR_PREFERRED_LOC,
@@ -712,7 +713,8 @@ enum kfd_ioctl_svm_attr_type {
        KFD_IOCTL_SVM_ATTR_NO_ACCESS,
        KFD_IOCTL_SVM_ATTR_SET_FLAGS,
        KFD_IOCTL_SVM_ATTR_CLR_FLAGS,
-       KFD_IOCTL_SVM_ATTR_GRANULARITY
+       KFD_IOCTL_SVM_ATTR_GRANULARITY,
+       KFD_IOCTL_SVM_ATTR_MAPPED
 };
 
 /**
-- 
2.34.1

Reply via email to