Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

amdkfd: process svm ioctl only on the primary kfd process

svm ioctl should only be processed on the primary
kfd process because only the lifecycle of the
primary kfd process is tied to the user space
applicaiton.

Another reason is in virtualization the hypervisor owns
the primary kfd process as a privileged one.

Signed-off-by: Zhu Lingshan <lingshan.zhu@amd.com>
Reviewed-by: Felix Kuehling <felix.kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Zhu Lingshan and committed by
Alex Deucher
26fc46d7 65cce2a1

+6
+6
drivers/gpu/drm/amd/amdkfd/kfd_chardev.c
··· 1718 1718 struct kfd_ioctl_svm_args *args = data; 1719 1719 int r = 0; 1720 1720 1721 + if (p->context_id != KFD_CONTEXT_ID_PRIMARY) { 1722 + pr_debug("SVM ioctl not supported on non-primary kfd process\n"); 1723 + 1724 + return -EOPNOTSUPP; 1725 + } 1726 + 1721 1727 pr_debug("start 0x%llx size 0x%llx op 0x%x nattr 0x%x\n", 1722 1728 args->start_addr, args->size, args->op, args->nattr); 1723 1729