rusticl: add support for fine-grained system SVM
authorKarol Herbst <kherbst@redhat.com>
Sat, 5 Nov 2022 12:33:45 +0000 (13:33 +0100)
committerMarge Bot <emma+marge@anholt.net>
Fri, 14 Apr 2023 07:41:54 +0000 (07:41 +0000)
commitbfee3a8563d2ec9bec89704c4cbb603203d9ad84
treeb7d582f4f79acbbd12a2d761f41092372be9d30c
parentbfcd914825547607ded187a9fece5b9e61189151
rusticl: add support for fine-grained system SVM

At the moment it's an all or nothing. A driver supporting fine-grained
system SVM can enable it in order to get full SVM support.

Lower levels could be emulated by userptrs and placing the bo at the same
locations in the GPU's VM as well, but that would require reworking quite
a bit on the drivers side.

For now supporting mmu_notifiers on the kernel side is the only way of
getting SVM support with Rusticl.

The only driver having the gallium bits wired up atm is Nouveau, but I
suspect it shouldn't be all to hard for iris and radeonsi as well.

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19712>
src/gallium/frontends/rusticl/api/device.rs
src/gallium/frontends/rusticl/api/icd.rs
src/gallium/frontends/rusticl/api/kernel.rs
src/gallium/frontends/rusticl/api/memory.rs
src/gallium/frontends/rusticl/core/context.rs
src/gallium/frontends/rusticl/core/device.rs
src/gallium/frontends/rusticl/core/kernel.rs
src/gallium/frontends/rusticl/core/memory.rs
src/gallium/frontends/rusticl/mesa/pipe/context.rs