nouveau: Fix migrate_to_ram() for faulting page
Subsystems (4)
PATCH 1/1 nouveau: Fix migrate_to_ram() for faulting page
Commit 16ce101db85d ("mm/memory.c: fix race when faulting a device private page") changed the migrate_to_ram() callback to take a reference on the device page to ensure it can't be freed while handling the fault. Unfortunately the corresponding update to Nouveau to accommodate this change was inadvertently dropped from that patch causing GPU to CPU migration to fail so add it here.
---
Hi Andrew/Ben, apologies I must have accidentally dropped this small hunk when rebasing prior to sending v2 of the original series. Without this migration from GPU to CPU won't work in Nouveau so hopefully one of you can take this for v6.1-rcX. Thanks.
--- drivers/gpu/drm/nouveau/nouveau_dmem.c | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/nouveau/nouveau_dmem.c +1 -0
@@ -176,6 +176,7 @@ static vm_fault_t nouveau_dmem_migrate_to_ram(struct vm_fault *vmf) .src = &src, .dst = &dst, .pgmap_owner = drm->dev, + .fault_page = vmf->page, .flags = MIGRATE_VMA_SELECT_DEVICE_PRIVATE, };
Signature · 1 line
2.35.1
Quoted 14 lines · Alistair Popple
Commit
16ce101db85d("mm/memory.c: fix race when faulting a device private page") changed themigrate_to_ram()callback to take a reference on the device page to ensure it can't be freed while handling the fault. Unfortunately the corresponding update to Nouveau to accommodate this change was inadvertently dropped from that patch causing GPU to CPU migration to fail so add it here.Signed-off-by Alistair Popple <[email protected]>Fixes 16ce101db85d ("mm/memory.c: fix race when faulting a device private page")Cc John Hubbard <[email protected]>Cc Ralph Campbell <[email protected]>Cc Lyude Paul <[email protected]>Cc Ben Skeggs <[email protected]>
Quoted 6 lines
---
Hi Andrew/Ben, apologies I must have accidentally dropped this small hunk when rebasing prior to sending v2 of the original series. Without this migration from GPU to CPU won't work in Nouveau so hopefully one of you can take this for v6.1-rcX. Thanks.
Hi!
I will push this to drm-misc-next in just a moment, thanks for the patch!
Quoted 16 lines
--- drivers/gpu/drm/nouveau/nouveau_dmem.c | 1 + 1 file changed, 1 insertion(+)drivers/gpu/drm/nouveau/nouveau_dmem.c +1
-0@@ -176,6 +176,7 @@ static vm_fault_t nouveau_dmem_migrate_to_ram(struct vm_fault *vmf) .src = &src, .dst = &dst, .pgmap_owner = drm->dev, + .fault_page = vmf->page, .flags = MIGRATE_VMA_SELECT_DEVICE_PRIVATE, };
Signature · 3 lines
Cheers, Lyude Paul (she/her) Software Engineer at Red Hat
Andrew Morton
maintainerQuoted 10 lines · On Fri, 21 Oct 2022 15:53:19 -0400 Lyude Paul <[email protected]> wrote:
Quoted 4 lines
Hi Andrew/Ben, apologies I must have accidentally dropped this small hunk when rebasing prior to sending v2 of the original series. Without this migration from GPU to CPU won't work in Nouveau so hopefully one of you can take this for v6.1-rcX. Thanks.
Hi!
Reviewed-by Lyude Paul <[email protected]>I will push this to drm-misc-next in just a moment, thanks for the patch!
Linus merged it but minutes ago.
Lyude Paul
maintainerQuoted 7 lines · Andrew Morton
Quoted 5 lines · On Fri, 21 Oct 2022 15:53:19 -0400 Lyude Paul <[email protected]> wrote:
Quoted 4 lines
Hi Andrew/Ben, apologies I must have accidentally dropped this small hunk when rebasing prior to sending v2 of the original series. Without this migration from GPU to CPU won't work in Nouveau so hopefully one of you can take this for v6.1-rcX. Thanks.
Quoted 7 lines
Quoted 5 lines
Hi!
Reviewed-by Lyude Paul <[email protected]>I will push this to drm-misc-next in just a moment, thanks for the patch!
Linus merged it but minutes ago.
Agh, sorry about that - I already pushed this over an hour ago
Quoted 1 line
Signature · 3 lines
Cheers, Lyude Paul (she/her) Software Engineer at Red Hat