]> git.baikalelectronics.ru Git - kernel.git/commit
nouveau: fix storing invalid ptes
authorRalph Campbell <rcampbell@nvidia.com>
Thu, 23 Jul 2020 22:29:59 +0000 (15:29 -0700)
committerJason Gunthorpe <jgg@nvidia.com>
Tue, 28 Jul 2020 18:48:42 +0000 (15:48 -0300)
commit79ff5d0b5edf8b5bcb9036c5ced9b11088866e55
tree2c2c9cecf6faea2b21bbe38ce10be0e7574182bb
parent4ad495527004dfe217400a4f962bd7f91c45a49c
nouveau: fix storing invalid ptes

When migrating a range of system memory to device private memory, some of
the pages in the address range may not be migrating. In this case, the non
migrating pages won't have a new GPU MMU entry to store but the
nvif_object_ioctl() NVIF_VMM_V0_PFNMAP method doesn't check the input and
stores a bad valid GPU page table entry.

Fix this by skipping the invalid input PTEs when updating the GPU page
tables.

Link: https://lore.kernel.org/r/20200723223004.9586-2-rcampbell@nvidia.com
Signed-off-by: Ralph Campbell <rcampbell@nvidia.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmmgp100.c