kfd_process_device_init_vm(9)
π NAME π
kfd_process_device_init_vm β bestie, this is the one that sets up a VM for a process-device β¨
π SYNOPSIS π
int kfd_process_device_init_vm (struct kfd_process_device *pdd , struct
file *drm_file );
π¦ ARGUMENTS π¦
pddβ the process-device itself, the main character of this whole function π«Άdrm_fileβ an optional pointer to a DRM file descriptor. Optional as in "you can pass NULL and it's still valid", not optional as in "skip it and see what happens" ngl π
π₯ DESCRIPTION π₯
So here's the vibe check, okay?
If drm_file is specified, it gets used to acquire the VM from that file descriptor. And the way that it works β if it succeeds, pdd takes ownership of the file descriptor. Like, full custody. Periodt. π
Heads up bestie: ownership transfer is real. Once it succeeds, that fd belongs to the pdd now, so don't be out here double-dipping with it π
If drm_file is NULL, then a brand new VM gets created instead. Fresh out of the oven, no cap β¨
And the return situation:
- Returns
0on success π - Returns
-errnoon failure π
That's literally it, but it's iconic π
π SEE ALSO π
- Kernel file
./drivers/gpu/drm/amd/amdkfd/kfd_process.c kfd_get_cu_occupancy(9)amdgpu_amdkfd_set_sigbus_delay(9)
okay that's the whole page bestie, go forth and init those VMs π§
this masterpiece lives over in ./drivers/gpu/drm/amd/amdkfd, dated October 2026, and it's literally called kfd_process_device_init_vm(9) in case you forgot on your way down here π
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms