criu/plugins/amdgpu/amdgpu_plugin_dmabuf.h
David Francis 9e404e2083 plugin/amdgpu: Support for checkpoint of dmabuf fds
amdgpu libraries that use dmabuf fd to share GPU memory between
processes close the dmabuf fds immediately after using them.
However, it is possible that checkpoint of a process catches one
of the dmabuf fds open. In that case, the amdgpu plugin needs
to handle it.

The checkpoint of the dmabuf fd does require the device file
it was exported from to have already been dumped

To identify which device this dmabuf fd was exprted from, attempt
to import it on each device, then record the dmabuf handle
it imports as. This handle can be used to restore it.

Signed-off-by: David Francis <David.Francis@amd.com>
2025-11-14 18:31:37 +00:00

16 lines
No EOL
370 B
C

#ifndef __AMDGPU_PLUGIN_DMABUF_H__
#define __AMDGPU_PLUGIN_DMABUF_H__
#include "amdgpu_plugin_util.h"
#include "criu-amdgpu.pb-c.h"
int amdgpu_plugin_dmabuf_dump(int fd, int id);
int amdgpu_plugin_dmabuf_restore(int id);
int try_dump_dmabuf_list();
int post_dump_dmabuf_check();
int get_dmabuf_info(int fd, struct stat *st);
#endif /* __AMDGPU_PLUGIN_DMABUF_H__ */