Skip to content
Snippets Groups Projects
Commit 66cee909 authored by Alistair Popple's avatar Alistair Popple Committed by Lyude Paul
Browse files

nouveau/svm: Fix to migrate all requested pages


Users may request that pages from an OpenCL SVM allocation be migrated
to the GPU with clEnqueueSVMMigrateMem(). In Nouveau this will call into
nouveau_dmem_migrate_vma() to do the migration. If the total range to be
migrated exceeds SG_MAX_SINGLE_ALLOC the pages will be migrated in
chunks of size SG_MAX_SINGLE_ALLOC. However a typo in updating the
starting address means that only the first chunk will get migrated.

Fix the calculation so that the entire range will get migrated if
possible.

Signed-off-by: default avatarAlistair Popple <apopple@nvidia.com>
Fixes: e3d8b089 ("drm/nouveau/svm: map pages after migration")
Reviewed-by: default avatarRalph Campbell <rcampbell@nvidia.com>
Reviewed-by: Lyude Paul's avatarLyude Paul <lyude@redhat.com>
Signed-off-by: Lyude Paul's avatarLyude Paul <lyude@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220720062745.960701-1-apopple@nvidia.com
Cc: <stable@vger.kernel.org> # v5.8+
parent 0c09bc33
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment