Skip to content

Commit ed710a6

Browse files
Ralph CampbellBen Skeggs
authored andcommitted
drm/nouveau/nouveau: fix page fault on device private memory
If system memory is migrated to device private memory and no GPU MMU page table entry exists, the GPU will fault and call hmm_range_fault() to get the PFN for the page. Since the .dev_private_owner pointer in struct hmm_range is not set, hmm_range_fault returns an error which results in the GPU program stopping with a fatal fault. Fix this by setting .dev_private_owner appropriately. Fixes: 08ddddd ("mm/hmm: check the device private page owner in hmm_range_fault()") Cc: [email protected] Signed-off-by: Ralph Campbell <[email protected]> Reviewed-by: Jason Gunthorpe <[email protected]> Signed-off-by: Ben Skeggs <[email protected]>
1 parent ad61f5f commit ed710a6

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/gpu/drm/nouveau/nouveau_svm.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -562,6 +562,7 @@ static int nouveau_range_fault(struct nouveau_svmm *svmm,
562562
.end = notifier->notifier.interval_tree.last + 1,
563563
.pfn_flags_mask = HMM_PFN_REQ_FAULT | HMM_PFN_REQ_WRITE,
564564
.hmm_pfns = hmm_pfns,
565+
.dev_private_owner = drm->dev,
565566
};
566567
struct mm_struct *mm = notifier->notifier.mm;
567568
int ret;

0 commit comments

Comments
 (0)