* [PATCH v3] drm/amdgpu: Verify root PD is mapped into kernel address space.
@ 2018-07-06 20:12 Andrey Grodzovsky
[not found] ` <1530907956-9150-1-git-send-email-andrey.grodzovsky-5C7GfCeVMHo@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: Andrey Grodzovsky @ 2018-07-06 20:12 UTC (permalink / raw)
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
Cc: Andrey Grodzovsky, zhoucm1-5C7GfCeVMHo,
christian.koenig-5C7GfCeVMHo
Problem: When PD/PT update made by CPU root PD was not yet mapped causing
page fault.
Fix: Verify root PD is mapped into CPU address space.
v2:
Make sure that we add the root PD to the relocated list
since then it's get mapped into CPU address space bt default
in amdgpu_vm_update_directories.
v3:
Drop change to not move kernel type BOs to evicted list.
Link: https://bugs.freedesktop.org/show_bug.cgi?id=107065
Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com>
Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
index d18f247..316a501 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
@@ -156,6 +156,9 @@ static void amdgpu_vm_bo_base_init(struct amdgpu_vm_bo_base *base,
return;
list_add_tail(&base->bo_list, &bo->va);
+ if (bo->tbo.type == ttm_bo_type_kernel)
+ list_move(&base->vm_status, &vm->relocated);
+
if (bo->tbo.resv != vm->root.base.bo->tbo.resv)
return;
--
2.7.4
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v3] drm/amdgpu: Verify root PD is mapped into kernel address space.
[not found] ` <1530907956-9150-1-git-send-email-andrey.grodzovsky-5C7GfCeVMHo@public.gmane.org>
@ 2018-07-07 9:21 ` Christian König
[not found] ` <ce7662b9-36ae-4183-1e26-38c4c980915c-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: Christian König @ 2018-07-07 9:21 UTC (permalink / raw)
To: Andrey Grodzovsky, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
Cc: zhoucm1-5C7GfCeVMHo, christian.koenig-5C7GfCeVMHo
Am 06.07.2018 um 22:12 schrieb Andrey Grodzovsky:
> Problem: When PD/PT update made by CPU root PD was not yet mapped causing
> page fault.
>
> Fix: Verify root PD is mapped into CPU address space.
>
> v2:
> Make sure that we add the root PD to the relocated list
> since then it's get mapped into CPU address space bt default
> in amdgpu_vm_update_directories.
>
> v3:
> Drop change to not move kernel type BOs to evicted list.
>
> Link: https://bugs.freedesktop.org/show_bug.cgi?id=107065
> Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com>
>
> Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com>
Double Signed-off-by line, but apart of that Reviewed-by: Christian
König <christian.koenig@amd.com>.
Regards,
Christian.
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> index d18f247..316a501 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> @@ -156,6 +156,9 @@ static void amdgpu_vm_bo_base_init(struct amdgpu_vm_bo_base *base,
> return;
> list_add_tail(&base->bo_list, &bo->va);
>
> + if (bo->tbo.type == ttm_bo_type_kernel)
> + list_move(&base->vm_status, &vm->relocated);
> +
> if (bo->tbo.resv != vm->root.base.bo->tbo.resv)
> return;
>
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v3] drm/amdgpu: Verify root PD is mapped into kernel address space.
[not found] ` <ce7662b9-36ae-4183-1e26-38c4c980915c-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2018-07-09 3:18 ` Zhang, Jerry (Junwei)
0 siblings, 0 replies; 3+ messages in thread
From: Zhang, Jerry (Junwei) @ 2018-07-09 3:18 UTC (permalink / raw)
To: christian.koenig-5C7GfCeVMHo, Andrey Grodzovsky,
amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
Cc: zhoucm1-5C7GfCeVMHo
On 07/07/2018 05:21 PM, Christian König wrote:
> Am 06.07.2018 um 22:12 schrieb Andrey Grodzovsky:
>> Problem: When PD/PT update made by CPU root PD was not yet mapped causing
>> page fault.
>>
>> Fix: Verify root PD is mapped into CPU address space.
>>
>> v2:
>> Make sure that we add the root PD to the relocated list
>> since then it's get mapped into CPU address space bt default
>> in amdgpu_vm_update_directories.
>>
>> v3:
>> Drop change to not move kernel type BOs to evicted list.
>>
>> Link: https://bugs.freedesktop.org/show_bug.cgi?id=107065
>> Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com>
>>
>> Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com>
>
> Double Signed-off-by line, but apart of that Reviewed-by: Christian König <christian.koenig@amd.com>.
Same comment as Christian's
Now that's really much more cleaner:)
Well, we may also remove the redundant code in amdgpu_vm_alloc_levels() meanwhile.
{{{
amdgpu_vm_bo_base_init(&entry->base, vm, pt);
- list_move(&entry->base.vm_status, &vm->relocated);
}}}
Apart from that, it's
Reviewed-by: Junwei Zhang <Jerry.Zhang@amd.com>
Jerry
>
> Regards,
> Christian.
>
>> ---
>> drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 3 +++
>> 1 file changed, 3 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
>> index d18f247..316a501 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
>> @@ -156,6 +156,9 @@ static void amdgpu_vm_bo_base_init(struct amdgpu_vm_bo_base *base,
>> return;
>> list_add_tail(&base->bo_list, &bo->va);
>> + if (bo->tbo.type == ttm_bo_type_kernel)
>> + list_move(&base->vm_status, &vm->relocated);
>> +
>> if (bo->tbo.resv != vm->root.base.bo->tbo.resv)
>> return;
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-07-09 3:18 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-06 20:12 [PATCH v3] drm/amdgpu: Verify root PD is mapped into kernel address space Andrey Grodzovsky
[not found] ` <1530907956-9150-1-git-send-email-andrey.grodzovsky-5C7GfCeVMHo@public.gmane.org>
2018-07-07 9:21 ` Christian König
[not found] ` <ce7662b9-36ae-4183-1e26-38c4c980915c-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2018-07-09 3:18 ` Zhang, Jerry (Junwei)
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.