RE: [PATCH] drm/amdgpu: fix double free vcn ip_dump

2024-11-10 Thread Zhang, Jesse(Jie)
[AMD Official Use Only - AMD Internal Distribution Only] Hi Sunil Khatri, -Original Message- From: Khatri, Sunil Sent: Monday, November 11, 2024 2:47 PM To: Zhang, Jesse(Jie) ; amd-gfx@lists.freedesktop.org Cc: Deucher, Alexander ; Koenig, Christian ; Prosyak, Vitaly ; Huang, Tim Subj

Re: [PATCH] drm/amdgpu: fix double free vcn ip_dump

2024-11-10 Thread Khatri, Sunil
This isnt needed any more as the issue is introduced with per ip changes in VCN. Changes to accomodate per ip changes for ip dump is already reviewed and in progress to be merged. With that each IP of VCN have it own memory which is freed only once. We dont need this change anymore as we need

[PATCH] drm/amdgpu: fix double free vcn ip_dump

2024-11-10 Thread jesse.zh...@amd.com
[ 90.441868] [ cut here ] [ 90.441873] kernel BUG at mm/slub.c:553! [ 90.441885] Oops: invalid opcode: [#1] PREEMPT SMP NOPTI [ 90.441892] CPU: 0 PID: 1523 Comm: amd_pci_unplug Tainted: GE 6.10.0+ #47 [ 90.441900] Hardware name: AMD Splinter/

Re: [PATCH 2/2] drm/amdkfd: use cache GTT buffer for PQ and wb pool

2024-11-10 Thread Lazar, Lijo
On 11/11/2024 7:00 AM, Liu, Monk wrote: > [AMD Official Use Only - AMD Internal Distribution Only] > > Hi Lijo > > This is the patch we verified before: > > diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_kernel_queue.c > b/drivers/gpu/drm/amd/amdkfd/kfd_kernel_queue.c > index 4843dcb9a5f7..3955

RE: [PATCH] drm/amdkfd: correct the SVM DMA device unmap direction

2024-11-10 Thread Liang, Prike
[AMD Official Use Only - AMD Internal Distribution Only] > From: Koenig, Christian > Sent: Friday, November 8, 2024 5:40 PM > To: Liang, Prike ; Kuehling, Felix > ; amd-gfx@lists.freedesktop.org > Cc: Deucher, Alexander ; Kasiviswanathan, Harish > > Subject: Re: [PATCH] drm/amdkfd: correct the S

[PATCH 5/5] drm/amdgpu: Add missing 'inst' parameter to VCN v4.0 function interfaces

2024-11-10 Thread Srinivasan Shanmugam
This patch adds the missing parameter descriptors to the functions v4_0 _start, _stop, _set_unified_ring_funcs, and _set_irq_funcs. Fixes the below with gcc W=1: drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c:1093: warning: Function parameter or struct member 'inst' not described in 'vcn_v4_0_start' drive

[PATCH 2/5] drm/amdgpu: Add missing 'inst' parameter to VCN v4.0.3 function interfaces

2024-11-10 Thread Srinivasan Shanmugam
This patch adds the missing parameter descriptors to the functions vcn_v4_0_3 _start, _stop, _set_unified_ring_funcs, and _set_irq_funcs. Fixes the below with gcc W=1: drivers/gpu/drm/amd/amdgpu/vcn_v4_0_3.c:1104: warning: Function parameter or struct member 'inst' not described in 'vcn_v4_0_3_st

[PATCH 4/5] drm/amdgpu: Add missing 'inst' parameter to VCN v2.5 clock gating functions

2024-11-10 Thread Srinivasan Shanmugam
This patch adds the missing parameter descriptors to the functions vcn_v2_5_ disable_clock_gating, _enable_clock_gating. Fixes the below with gcc W=1: drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c:616: warning: Function parameter or struct member 'inst' not described in 'vcn_v2_5_disable_clock_gating' dr

[PATCH 3/5] drm/amdgpu: Add missing 'inst' parameter to VCN v4.0.5 function interfaces

2024-11-10 Thread Srinivasan Shanmugam
This patch adds the missing parameter descriptors to the functions v4_0_5 _start, _stop, _set_unified_ring_funcs, and _set_irq_funcs. Fixes the below with gcc W=1: drivers/gpu/drm/amd/amdgpu/vcn_v4_0_5.c:996: warning: Function parameter or struct member 'inst' not described in 'vcn_v4_0_5_start'

[PATCH 1/5] drm/amdgpu: Add 'inst' parameter to kdoc in VCN v5.0.0 functions

2024-11-10 Thread Srinivasan Shanmugam
This patch adds the missing parameter descriptors to the functions vcn_v5_0_0_start, vcn_v5_0_0_stop, vcn_v5_0_0_set_unified_ring_funcs, and vcn_v5_0_0_set_irq_funcs. Fixes the below with gcc W=1: drivers/gpu/drm/amd/amdgpu/vcn_v5_0_0.c:767: warning: Function parameter or struct member 'inst' not

[PATCH] drm/amd/amdgpu: Add missing kdoc 'inst' parameter in 'amdgpu_device_ip_set_powergating_state'

2024-11-10 Thread Srinivasan Shanmugam
Fixes the below with gcc W=1: drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:2182: warning: Function parameter or struct member 'inst' not described in 'amdgpu_device_ip_set_powergating_state' Cc: Christian König Cc: Alex Deucher Signed-off-by: Srinivasan Shanmugam --- drivers/gpu/drm/amd/amdgpu/

[PATCH] drm/amd/amdgpu: Add missing kdoc 'gpu_addr' parameter in amdgpu_seq64_alloc()

2024-11-10 Thread Srinivasan Shanmugam
Fixes the below with gcc W=1: drivers/gpu/drm/amd/amdgpu/amdgpu_seq64.c:168: warning: Function parameter or struct member 'gpu_addr' not described in 'amdgpu_seq64_alloc' Cc: Christian König Cc: Alex Deucher Signed-off-by: Srinivasan Shanmugam --- drivers/gpu/drm/amd/amdgpu/amdgpu_seq64.c | 3

RE: [PATCH 2/2] drm/amdkfd: use cache GTT buffer for PQ and wb pool

2024-11-10 Thread Liu, Monk
[AMD Official Use Only - AMD Internal Distribution Only] Hi Lijo This is the patch we verified before: diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_kernel_queue.c b/drivers/gpu/drm/amd/amdkfd/kfd_kernel_queue.c index 4843dcb9a5f7..39553c7648eb 100644 --- a/drivers/gpu/drm/amd/amdkfd/kfd_kernel_q

[RFC PATCH 5/6 6.6] shmem: Fix shmem_rename2()

2024-11-10 Thread cel
From: Chuck Lever [ Upstream commit ad191eb6d6942bb835a0b20b647f7c53c1d99ca4 ] When renaming onto an existing directory entry, user space expects the replacement entry to have the same directory offset as the original one. Link: https://gitlab.alpinelinux.org/alpine/aports/-/issues/15966 Fixes:

[RFC PATCH 6/6 6.6] libfs: fix infinite directory reads for offset dir

2024-11-10 Thread cel
From: yangerkun [ Upstream commit 64a7ce76fb901bf9f9c36cf5d681328fc0fd4b5a ] After we switch tmpfs dir operations from simple_dir_operations to simple_offset_dir_operations, every rename happened will fill new dentry to dest dir's maple tree(&SHMEM_I(inode)->dir_offsets->mt) with a free key star

[RFC PATCH 1/6 6.6] libfs: Define a minimum directory offset

2024-11-10 Thread cel
From: Chuck Lever [ Upstream commit 7beea725a8ca412c6190090ce7c3a13b169592a1 ] This value is used in several places, so make it a symbolic constant. Reviewed-by: Jan Kara Signed-off-by: Chuck Lever Link: https://lore.kernel.org/r/170820142741.6328.12428356024575347885.st...@91.116.238.104.ho

[RFC PATCH 2/6 6.6] libfs: Add simple_offset_empty()

2024-11-10 Thread cel
From: Chuck Lever [ Upstream commit ecba88a3b32d733d41e27973e25b2bc580f64281 ] For simple filesystems that use directory offset mapping, rely strictly on the directory offset map to tell when a directory has no children. After this patch is applied, the emptiness test holds only the RCU read lo

[RFC PATCH 0/6 6.6] Address rename/readdir bugs in fs/libfs.c

2024-11-10 Thread cel
From: Chuck Lever Address several bugs in v6.6's libfs/shmemfs, including CVE-2024-46701. Link: https://lore.kernel.org/stable/976c0dd5-4337-4c7d-92c6-a38c2ec33...@oracle.com/T/#me685f54ac17ea1e39265dd5f1bb1f173c557a564 I'm still running the usual set of regression tests, but so far this set l

[RFC PATCH 4/6 6.6] libfs: Add simple_offset_rename() API

2024-11-10 Thread cel
From: Chuck Lever [ Upstream commit 5a1a25be995e1014abd01600479915683e356f5c ] I'm about to fix a tmpfs rename bug that requires the use of internal simple_offset helpers that are not available in mm/shmem.c Signed-off-by: Chuck Lever Link: https://lore.kernel.org/r/20240415152057.4605-3-...@k

[RFC PATCH 3/6 6.6] libfs: Fix simple_offset_rename_exchange()

2024-11-10 Thread cel
From: Chuck Lever [ Upstream commit 23cdd0eed3f1fff3af323092b0b88945a7950d8e ] User space expects the replacement (old) directory entry to have the same directory offset after the rename. Suggested-by: Christian Brauner Fixes: a2e459555c5f ("shmem: stable directory offsets") Signed-off-by: Chu

Recall: [PATCH 2/2] drm/amdkfd: use cache GTT buffer for PQ and wb pool

2024-11-10 Thread Liu, Monk
Liu, Monk would like to recall the message, "[PATCH 2/2] drm/amdkfd: use cache GTT buffer for PQ and wb pool".

Recall: [PATCH 2/2] drm/amdkfd: use cache GTT buffer for PQ and wb pool

2024-11-10 Thread Liu, Monk
Liu, Monk would like to recall the message, "[PATCH 2/2] drm/amdkfd: use cache GTT buffer for PQ and wb pool".

RE: [PATCH 2/2] drm/amdkfd: use cache GTT buffer for PQ and wb pool

2024-11-10 Thread Liu, Monk
[AMD Official Use Only - AMD Internal Distribution Only] Christian What do you mean "What happens instead is that the broken KVM patch applies the guest caching attributes to the ring buffer instead of the host ones." From what I heard there was a KVM patch to correct the mapping behavior -- p

Re: [PATCH-next v3] drm/amdgpu: Cleanup shift coding style

2024-11-10 Thread Advait Dhamorikar
Hello, I have addressed the previous comments, Is there something more that I need to address in this version of the patch? I would appreciate feedback. Best regards, Advait On Wed, 9 Oct 2024 at 00:46, Advait Dhamorikar wrote: > > Improves the coding style by updating bit-shift > operations in

RE: [PATCH 2/2] drm/amdkfd: use cache GTT buffer for PQ and wb pool

2024-11-10 Thread Liu, Monk
[AMD Official Use Only - AMD Internal Distribution Only] >> All prior loads/stores are supposed to be globally visible. Hence mb() >> followed by a write pointer update also should guarantee the same (From Arch >> manual). The MFENCE instruction establishes a memory fence for both loads

Re: [PATCH 0/2] drm/amd/display: Fix Null Pointer Dereference Issues

2024-11-10 Thread Zicheng Qu
Hi, Gentle ping. The patch link is: [PATCH 0/2] drm/amd/display: Fix Null Pointer Dereference Issues - Zicheng Qu (kernel.org) Best regards, Zicheng On 2024/11/5 22:01, Zicheng Qu wrote: Hi all, I am s

Re: [PATCH 6.6 00/28] fix CVE-2024-46701

2024-11-10 Thread Yu Kuai
Hi, 在 2024/11/09 1:03, Liam R. Howlett 写道: * Chuck Lever III [241108 08:23]: On Nov 7, 2024, at 8:19 PM, Yu Kuai wrote: Hi, 在 2024/11/07 22:41, Chuck Lever 写道: On Thu, Nov 07, 2024 at 08:57:23AM +0800, Yu Kuai wrote: Hi, 在 2024/11/06 23:19, Chuck Lever III 写道: On Nov 6, 2024, at 1

Re: [PATCH 6.6 00/28] fix CVE-2024-46701

2024-11-10 Thread Yu Kuai
Hi, 在 2024/11/08 21:23, Chuck Lever III 写道: On Nov 7, 2024, at 8:19 PM, Yu Kuai wrote: Hi, 在 2024/11/07 22:41, Chuck Lever 写道: On Thu, Nov 07, 2024 at 08:57:23AM +0800, Yu Kuai wrote: Hi, 在 2024/11/06 23:19, Chuck Lever III 写道: On Nov 6, 2024, at 1:16 AM, Greg KH wrote: On Thu, Oc

Re: [PATCH 6.6 00/28] fix CVE-2024-46701

2024-11-10 Thread Chuck Lever III
> On Nov 8, 2024, at 8:30 PM, Yu Kuai wrote: > > Hi, > > 在 2024/11/08 21:23, Chuck Lever III 写道: >>> On Nov 7, 2024, at 8:19 PM, Yu Kuai wrote: >>> >>> Hi, >>> >>> 在 2024/11/07 22:41, Chuck Lever 写道: On Thu, Nov 07, 2024 at 08:57:23AM +0800, Yu Kuai wrote: > Hi, > > 在 2024

Re: [PATCH 6.6 00/28] fix CVE-2024-46701

2024-11-10 Thread Liam R. Howlett
* Chuck Lever III [241108 08:23]: > > > > On Nov 7, 2024, at 8:19 PM, Yu Kuai wrote: > > > > Hi, > > > > 在 2024/11/07 22:41, Chuck Lever 写道: > >> On Thu, Nov 07, 2024 at 08:57:23AM +0800, Yu Kuai wrote: > >>> Hi, > >>> > >>> 在 2024/11/06 23:19, Chuck Lever III 写道: > > > > On

Re: no-retry page fault on 6.11.6 kernel with radeon VII

2024-11-10 Thread Kenneth Topp
On Thu, Nov 7, 2024 at 2:04 PM Alex Deucher wrote: > > On Thu, Nov 7, 2024 at 3:03 AM Kenneth Topp wrote: > > > > Greetings, > > > > I'm getting no-retry page fault fatal errors (kills Xwayland): > > > > [ 177.470230 <6.102062 >] myhost kernel: amdgpu :03:00.0: > > amdgpu: [gfxhub0] no-r

[PATCH v7 4/4] drm/amdgpu: track bo memory stats at runtime

2024-11-10 Thread Yunxiang Li
Before, every time fdinfo is queried we try to lock all the BOs in the VM and calculate memory usage from scratch. This works okay if the fdinfo is rarely read and the VMs don't have a ton of BOs. If either of these conditions is not true, we get a massive performance hit. In this new revision, we

[PATCH v7 0/4] rework bo mem stats tracking

2024-11-10 Thread Yunxiang Li
Right now every time the fdinfo is read, we go through the vm lists and lock all the BOs to calcuate the statistics. This causes a lot of lock contention when the VM is actively used. It gets worse if there is a lot of shared BOs or if there's a lot of submissions. We have seen submissions lock-up

[PATCH v7 3/4] drm/amdgpu: remove unused function parameter

2024-11-10 Thread Yunxiang Li
amdgpu_vm_bo_invalidate doesn't use the adev parameter and not all callers have a reference to adev handy, so remove it for cleanliness. Signed-off-by: Yunxiang Li Reviewed-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c

[PATCH v7 1/4] drm: add drm_memory_stats_is_zero

2024-11-10 Thread Yunxiang Li
Add a helper to check if the memory stats is zero, this will be used to check for memory accounting errors. Signed-off-by: Yunxiang Li Reviewed-by: Christian König CC: dri-de...@lists.freedesktop.org --- drivers/gpu/drm/drm_file.c | 10 ++ include/drm/drm_file.h | 1 + 2 files chan