fixup! drm/amdkfd: CRIU export dmabuf handles for GTT BOs
Subsystems (3)
PATCH 1/1 fixup! drm/amdkfd: CRIU export dmabuf handles for GTT BOs
Signed-off-by David Yat Sin <[email protected]>
--- drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 6 ++++++ include/uapi/linux/kfd_ioctl.h | 2 ++ 2 files changed, 8 insertions(+)
drivers/gpu/drm/amd/amdkfd/kfd_chardev.c +6 -0
@@ -1767,7 +1767,10 @@ static int criu_checkpoint_bos(struct kfd_process *p, &bo_bucket->dmabuf_fd);if (ret) goto exit; + }else { + bo_bucket->dmabuf_fd =KFD_INVALID_FD ; } +if (bo_bucket->alloc_flags &KFD_IOC_ALLOC_MEM_FLAGS_DOORBELL ) bo_bucket->offset =KFD_MMAP_TYPE_DOORBELL |KFD_MMAP_GPU_ID (pdd->dev->id);
@@ -2219,7 +2222,10 @@ static int criu_restore_bo(struct kfd_process *p, &bo_bucket->dmabuf_fd);if (ret)return ret; + }else { + bo_bucket->dmabuf_fd =KFD_INVALID_FD ; } +return 0 ; }
include/uapi/linux/kfd_ioctl.h +2 -0
@@ -196,6 +196,8 @@ struct kfd_ioctl_dbg_wave_control_args {__u32 buf_size_in_bytes;/*including gpu_id and buf_size */ }; +#define KFD_INVALID_FD 0xffffffff +/* Matching HSA_EVENTTYPE */ #define KFD_IOC_EVENT_SIGNAL 0#define KFD_IOC_EVENT_NODECHANGE 1
Signature · 1 line
2.35.1
Quoted 1 line · David Yat Sin
Signed-off-by David Yat Sin <[email protected]>
Please add the commit description back. And let's wait for Alex to confirm that the fixup-method is OK. With that fixed, the patch is
Reviewed-by Felix Kuehling <[email protected]>
Quoted 44 lines
--- drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 6 ++++++ include/uapi/linux/kfd_ioctl.h | 2 ++ 2 files changed, 8 insertions(+)drivers/gpu/drm/amd/amdkfd/kfd_chardev.c +6
-0@@ -1767,7 +1767,10 @@ static int criu_checkpoint_bos(struct kfd_process *p, &bo_bucket->dmabuf_fd);if (ret) goto exit; + }else { + bo_bucket->dmabuf_fd =KFD_INVALID_FD ; } +if (bo_bucket->alloc_flags &KFD_IOC_ALLOC_MEM_FLAGS_DOORBELL ) bo_bucket->offset =KFD_MMAP_TYPE_DOORBELL |KFD_MMAP_GPU_ID (pdd->dev->id);@@ -2219,7 +2222,10 @@ static int criu_restore_bo(struct kfd_process *p, &bo_bucket->dmabuf_fd);if (ret)return ret; + }else { + bo_bucket->dmabuf_fd =KFD_INVALID_FD ; } +return 0 ; }include/uapi/linux/kfd_ioctl.h +2
-0@@ -196,6 +196,8 @@ struct kfd_ioctl_dbg_wave_control_args {__u32 buf_size_in_bytes;/*including gpu_id and buf_size */ }; +#define KFD_INVALID_FD 0xffffffff +/* Matching HSA_EVENTTYPE */ #define KFD_IOC_EVENT_SIGNAL 0#define KFD_IOC_EVENT_NODECHANGE 1
No problem. squashed in:
https://gitlab.freedesktop.org/agd5f/linux/-/commit/74041e46982cd627e7b52f9c3ed37d23a4973b5f
Alex
Alex
Quoted 54 lines · Felix Kuehling
Quoted 1 line · David Yat Sin
Signed-off-by David Yat Sin <[email protected]>Please add the commit description back. And let's wait for Alex to confirm that the fixup-method is OK. With that fixed, the patch is
Reviewed-by Felix Kuehling <[email protected]>Quoted 44 lines
--- drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 6 ++++++ include/uapi/linux/kfd_ioctl.h | 2 ++ 2 files changed, 8 insertions(+)drivers/gpu/drm/amd/amdkfd/kfd_chardev.c +6
-0@@ -1767,7 +1767,10 @@ static int criu_checkpoint_bos(struct kfd_process *p, &bo_bucket->dmabuf_fd);if (ret) goto exit; + }else { + bo_bucket->dmabuf_fd =KFD_INVALID_FD ; } +if (bo_bucket->alloc_flags &KFD_IOC_ALLOC_MEM_FLAGS_DOORBELL ) bo_bucket->offset =KFD_MMAP_TYPE_DOORBELL |KFD_MMAP_GPU_ID (pdd->dev->id);@@ -2219,7 +2222,10 @@ static int criu_restore_bo(struct kfd_process *p, &bo_bucket->dmabuf_fd);if (ret)return ret; + }else { + bo_bucket->dmabuf_fd =KFD_INVALID_FD ; } +return 0 ; }include/uapi/linux/kfd_ioctl.h +2
-0@@ -196,6 +196,8 @@ struct kfd_ioctl_dbg_wave_control_args {__u32 buf_size_in_bytes;/*including gpu_id and buf_size */ }; +#define KFD_INVALID_FD 0xffffffff +/* Matching HSA_EVENTTYPE */ #define KFD_IOC_EVENT_SIGNAL 0#define KFD_IOC_EVENT_NODECHANGE 1