RE: [PATCH 1/2] drm/amdgpu: allow secure submission on VCN4 ring

2023-07-16 Thread Guttula, Suresh
Hi Leo, There are two issues here. This change fixing the Crash while secure playback and we see below error: 2023-07-14T15:51:24.837592Z ERR kernel: [ 129.255823] amdgpu :c2:00.0: amdgpu: secure submissions not supported on ring 2023-07-14T15:51:24.837601Z ERR kernel: [ 129.255827] [drm:

[PATCH 3/4] drm/amdgpu/vm: use the same xcp_id from root PD

2023-07-16 Thread Guchun Chen
Other PDs/PTs allocation should just use the same xcp_id as that stored in root PD. Suggested-by: Christian König Signed-off-by: Guchun Chen --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm_pt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm_p

[PATCH 4/4] drm/amdgpu: use a macro to define no xcp partition case

2023-07-16 Thread Guchun Chen
~0 as no xcp partition is used in several places, so improve its definition by a macro for code consistency. Suggested-by: Christian König Signed-off-by: Guchun Chen --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 3 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_xcp.c | 4 ++-- drivers/

[PATCH 2/4] drm/amdgpu: fix slab-out-of-bounds issue in amdgpu_vm_pt_create

2023-07-16 Thread Guchun Chen
Recent code set xcp_id stored from file private data when opening device to amdgpu bo for accounting memory usage etc, but not all VMs are attached to this fpriv structure like the vm cases in amdgpu_mes_self_test, otherwise, KASAN will complain below out of bound access. And more importantly, VM c

[PATCH 1/4] drm/amdgpu: Allocate root PD on correct partition

2023-07-16 Thread Guchun Chen
file_priv needs to be setup firstly, otherwise, root PD will always be allocated on partition 0, even if opening the device from other partitions. Signed-off-by: Guchun Chen --- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/driv

RE: [1/2] drm/amdgpu: fix slab-out-of-bounds issue in amdgpu_vm_pt_create

2023-07-16 Thread Chen, Guchun
[AMD Official Use Only - General] > -Original Message- > From: Limonciello, Mario > Sent: Monday, July 17, 2023 8:39 AM > To: Chen, Guchun ; amd- > g...@lists.freedesktop.org; Deucher, Alexander > ; Zhang, Hawking > ; Koenig, Christian > ; Yang, Philip ; > Kuehling, Felix ; mikhail.v.gavr

Re: [1/2] drm/amdgpu: fix slab-out-of-bounds issue in amdgpu_vm_pt_create

2023-07-16 Thread Limonciello, Mario
On 7/14/2023 6:05 AM, Guchun Chen wrote: Recent code set xcp_id stored from file private data when opening device to amdgpu bo for accounting memory usage etc, but not all VMs are attached to this fpriv structure like the vm cases in amdgpu_mes_self_test, otherwise, KASAN will complain below ou

Re: [regression][6.5] KASAN: slab-out-of-bounds in amdgpu_vm_pt_create+0x555/0x670 [amdgpu] on Radeon 7900XTX

2023-07-16 Thread Mikhail Gavrilov
On Fri, Jul 14, 2023 at 4:09 PM Chen, Guchun wrote: > > Thanks for your patience on this, Mike. I think > https://patchwork.freedesktop.org/patch/547592/ can help this, please take a > try. Tested-by: Mikhail Gavrilov Thanks it looks good. I spent the whole weekend with these patches on top of