drm/nouveau/svm: fix migrate page regression
authorRalph Campbell <rcampbell@nvidia.com>
Mon, 22 Jun 2020 23:38:52 +0000 (16:38 -0700)
committerBen Skeggs <bskeggs@redhat.com>
Wed, 8 Jul 2020 03:30:42 +0000 (13:30 +1000)
commitad61f5f5e02e0aaf667efcd0c44ba5d70ea0b356
treec6b1a99f96120352705dbea67eabbfff80def106
parent0156e76d388310a490aeb0f2fbb5b284ded3aecc
drm/nouveau/svm: fix migrate page regression

The patch to add zero page migration to GPU memory inadvertently included
part of a future change which broke normal page migration to GPU memory
by copying too much data and corrupting GPU memory.
Fix this by only copying one page instead of a byte count.

Fixes: 9d4296a7d4b3 ("drm/nouveau/nouveau/hmm: fix migrate zero page to GPU")
Signed-off-by: Ralph Campbell <rcampbell@nvidia.com>
Reviewed-by: John Hubbard <jhubbard@nvidia.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/nouveau_dmem.c