[PATCH 2/5] drm/amdgpu: Mark KFD VRAM allocations for wipe on release

2019-07-09 Thread Kuehling, Felix
Memory used by KFD applications can contain sensitive information that should not be leaked to other processes. The current approach to prevent leaks is to clear VRAM at allocation time. This is not effective because memory can be reused in other ways without being cleared. Synchronously clearing m

[PATCH 5/5] drm/amdgpu: Fix potential integer overflows

2019-07-09 Thread Kuehling, Felix
With mm_nodes larger than 4GB, byte_count in amdgpu_fill_buffer would overflow. Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/am

[PATCH 1/5] drm/amdgpu: Add flag to wipe VRAM on release

2019-07-09 Thread Kuehling, Felix
This memory allocation flag will be used to indicate BOs containing sensitive data that should not be leaked to other processes. Signed-off-by: Felix Kuehling --- include/uapi/drm/amdgpu_drm.h | 4 1 file changed, 4 insertions(+) diff --git a/include/uapi/drm/amdgpu_drm.h b/include/uapi/dr

[PATCH 3/5] drm/ttm: Add release_notify callback to ttm_bo_driver

2019-07-09 Thread Kuehling, Felix
This notifies the driver that a BO is about to be released. Releasing a BO also invokes the move_notify callback from ttm_bo_cleanup_memtype_use, but that happens too late for anything that would add fences to the BO and require a delayed delete. Signed-off-by: Felix Kuehling --- drivers/gpu/dr

[PATCH 4/5] drm/amdgpu: Implement VRAM wipe on release

2019-07-09 Thread Kuehling, Felix
Wipe VRAM memory containing sensitive data when moving or releasing BOs. Clearing the memory is pipelined to minimize any impact on subsequent memory allocation latency. Use of a poison value should help debug future use-after-free bugs. When moving BOs, the existing ttm_bo_pipelined_move ensures

[PATCH 1/1] drm/amdgpu: Dump PDEs and PTEs on VM faults

2019-07-09 Thread Kuehling, Felix
Walk page table for the faulting address and dump PDEs and PTEs at all levels. Also flag discrepancies where a PDE points to a different address than the next level PDB or PTB BO. Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 5 +- drivers/gpu/drm/amd/amdgpu/amdgpu

[pull] amdgpu, amdkfd drm-next-5.3

2019-07-09 Thread Alex Deucher
Hi Dave, Daniel, Fixes for 5.3. Mostly fixes for Navi10 and a few other odds and ends. Also contains a patch to ease the merge with hmm. Trivial merge fix when the trees are merged: diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c @@ -783,7 +783,7

[PATCH] SWDEV-187506: drm/amdgpu: [Gibraltar][v320]VM-destroy3 (case 29) failed 5/5

2019-07-09 Thread Jesse Zhang
Issue: On host P520 with S03J3226A SBIOS platform, passthrough both gfx and audio device to VM, the first time start VM after host bootup, driver woule load fail. Root cause: Passthrough both devices allows VFIO to do hot reset on bridge, this reset clears register BIOS_SCRATCH_7 which is used for

Re: [PATCH 2/2] drm/amd/display: Add drm_audio_component support to amdgpu_dm

2019-07-09 Thread Alex Deucher
On Tue, Jul 9, 2019 at 12:30 PM Nicholas Kazlauskas wrote: > > [Why] > The drm_audio_component can be used to give pin ELD notifications > directly to the sound driver. This fixes audio endpoints disappearing > due to missing unsolicited notifications. > > [How] > Send the notification via the aud

[PATCH -next] drm/amdgpu: remove duplicated include from gfx_v9_0.c

2019-07-09 Thread YueHaibing
Remove duplicated include. Signed-off-by: YueHaibing --- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c index 5ba332376710..822f45161240 100644 --- a/drivers/gpu/drm/amd/amdgp

[PATCH] SWDEV-187506: [Gibraltar][v320]VM-destroy3 (case 29) failed 5/5

2019-07-09 Thread Jesse Zhang
Issue: On host P520 with S03J3226A SBIOS platform, passthrough both gfx and audio device to VM, the first time start VM after host bootup, driver woule load fail. Root cause: Passthrough both devices allows VFIO to do hot reset on bridge, this reset clears register BIOS_SCRATCH_7 which is used for

RE: [PATCH] drm/amd/powerplay: increase the SMU msg response waiting time

2019-07-09 Thread Quan, Evan
Hi Alex, There are actually two MAX_USEC_TIMEOUT related macros. AMD_MAX_USEC_TIMEOUT is used for SMU and AMDGPU_MAX_USEC_TIMEOUT is used widely in other parts. Maybe you mistreated it as AMDGPU_MAX_USEC_TIMEOUT. I was confused by them too. drivers/gpu/drm/amd/include/amd_shared.h:29:#define AM

Re: [PATCH 5/7] drm/amd/display: Use proper enum conversion functions

2019-07-09 Thread Nathan Chancellor
On Tue, Jul 09, 2019 at 08:51:33PM +0200, Arnd Bergmann wrote: > On Thu, Jul 4, 2019 at 7:52 AM Nathan Chancellor > wrote: > > > > clang warns: > > > > drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_pp_smu.c:336:8: > > warning: implicit conversion from enumeration type 'enum smu_clk_typ

Re: [PATCH] drm/amd/display: avoid 64-bit division

2019-07-09 Thread Arnd Bergmann
On Tue, Jul 9, 2019 at 6:40 PM Deucher, Alexander wrote: > > I'll just apply Arnd's patch. If the display team wants to adjust it later > to clarify the > operation, they should go ahead as a follow up patch. Thanks! > From: Abramov, Slava > Sent: Tuesday, July 9, 2019 12:31 PM > > Thanks for

Re: Intermittent errors when using amdgpu_job_submit_direct

2019-07-09 Thread Kuehling, Felix
On 2019-07-09 8:58 a.m., Zhou, David(ChunMing) wrote: > I've raised it up when Christian make page fault, at that patch, > amdgpu_job_submit_direct uses exclusive page fault ring for that. > > But if you use amdgpu_job_submit_direct for gerneral rings ocuppied by > scheduler, I guess varias bugs wi

[GIT PULL] Please pull hmm changes

2019-07-09 Thread Jason Gunthorpe
Hi Linus, As was discussed some time ago here are the mostly -mm patches related to hmm functions. In agreement with Andrew we split this out from quilt into a git topic branch so it can be shared between the DRM and RDMA git trees. However, this cycle did not see dependencies with work in DRM or

Re: [PATCH 00/10] Enable MST Aux devices (v2)

2019-07-09 Thread Li, Sun peng (Leo)
Hi Lyude, sorry - just realized I forgot to CC you on this series! Let me know if I should resend them. Adding some additional reviewers as well. Thanks, Leo On 2019-07-04 3:05 p.m., sunpeng...@amd.com wrote: > From: Leo Li > > Hi all, > > Here's the second revision of patches to enable mst

Re: [PATCH 1/3] drm/amdgpu: Add flag for allocating memory for sensitive data

2019-07-09 Thread Kuehling, Felix
On 2019-07-09 8:59 a.m., Alex Deucher wrote: > On Tue, Jul 9, 2019 at 1:32 AM Kuehling, Felix wrote: >> This memory allocation flag will be used to indicate BOs containing >> sensitive data that should not be leaked to other processes. >> >> Signed-off-by: Felix Kuehling >> --- >> include/uapi/

Re: [PATCH 1/3] drm/amdgpu: Add flag for allocating memory for sensitive data

2019-07-09 Thread Kuehling, Felix
On 2019-07-09 6:34 a.m., Michel Dänzer wrote: > On 2019-07-09 7:32 a.m., Kuehling, Felix wrote: >> This memory allocation flag will be used to indicate BOs containing >> sensitive data that should not be leaked to other processes. >> >> Signed-off-by: Felix Kuehling >> --- >> include/uapi/drm/am

Re: [PATCH 5/7] drm/amd/display: Use proper enum conversion functions

2019-07-09 Thread Arnd Bergmann
On Thu, Jul 4, 2019 at 7:52 AM Nathan Chancellor wrote: > > clang warns: > > drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_pp_smu.c:336:8: > warning: implicit conversion from enumeration type 'enum smu_clk_type' > to different enumeration type 'enum amd_pp_clock_type' > [-Wenum-convers

Re: [PATCH] drm/amd/display: avoid 64-bit division

2019-07-09 Thread Deucher, Alexander
I'll just apply Arnd's patch. If the display team wants to adjust it later to clarify the operation, they should go ahead as a follow up patch. Thanks, Alex From: Abramov, Slava Sent: Tuesday, July 9, 2019 12:31 PM To: Arnd Bergmann; Wentland, Harry; Li, Sun pen

Re: [PATCH] drm/amd/display: avoid 64-bit division

2019-07-09 Thread Abramov, Slava
Hi Arnd! Thanks for bisecting this issue. I wonder whether you are going to commit your patch or planning to update it and it's still in your work queue. We have one of our 32-bit builds failing because of this issue, so that I would like either to fix it or wait to your fix if it has chanc

[PATCH 1/2] drm/amd/display: Expose audio inst from DC to DM

2019-07-09 Thread Nicholas Kazlauskas
[Why] In order to give pin notifications to the sound driver from DM we need to know whether audio is enabled on a stream and what pin it's using from DC. [How] Expose the instance via stream status if it's a mapped resource for the stream. It will be -1 if there's no audio mapped. Cc: Leo Li Cc

[PATCH 2/2] drm/amd/display: Add drm_audio_component support to amdgpu_dm

2019-07-09 Thread Nicholas Kazlauskas
[Why] The drm_audio_component can be used to give pin ELD notifications directly to the sound driver. This fixes audio endpoints disappearing due to missing unsolicited notifications. [How] Send the notification via the audio component whenever we enable or disable audio state on a stream. This ma

Re: [PATCH] drm/amdgpu: Fix build without CONFIG_HMM_MIRROR

2019-07-09 Thread Alex Deucher
On Tue, Jul 9, 2019 at 8:55 AM YueHaibing wrote: > > If CONFIG_HMM_MIRROR is not set, building may fails: > > In file included from drivers/gpu/drm/amd/amdgpu/amdgpu.h:72:0, > from drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:40: > drivers/gpu/drm/amd/amdgpu/amdgpu_mn.h:69:20: error

Re: [PATCH 1/3] drm/amdgpu: Add flag for allocating memory for sensitive data

2019-07-09 Thread Alex Deucher
On Tue, Jul 9, 2019 at 1:32 AM Kuehling, Felix wrote: > > This memory allocation flag will be used to indicate BOs containing > sensitive data that should not be leaked to other processes. > > Signed-off-by: Felix Kuehling > --- > include/uapi/drm/amdgpu_drm.h | 4 > 1 file changed, 4 inser

Re: Intermittent errors when using amdgpu_job_submit_direct

2019-07-09 Thread Chunming Zhou
I've raised it up when Christian make page fault, at that patch, amdgpu_job_submit_direct uses exclusive page fault ring for that. But if you use amdgpu_job_submit_direct for gerneral rings ocuppied by scheduler, I guess varias bugs will happen. -David 在 2019/7/9 12:53, Kuehling, Felix 写道: > I

Re: [PATCH] drm/amd/powerplay: increase the SMU msg response waiting time

2019-07-09 Thread Deucher, Alexander
If this is just for the SMU, maybe it would be better to add a separate timeout for the SMU since this will increase the timeout for lots of things, unless we need an overall timeout increase for mode1 reset. Alex From: amd-gfx on behalf of Evan Quan Sent: Tue

Re: [PATCH 1/3] drm/amdgpu: Add flag for allocating memory for sensitive data

2019-07-09 Thread Michel Dänzer
On 2019-07-09 7:32 a.m., Kuehling, Felix wrote: > This memory allocation flag will be used to indicate BOs containing > sensitive data that should not be leaked to other processes. > > Signed-off-by: Felix Kuehling > --- > include/uapi/drm/amdgpu_drm.h | 4 > 1 file changed, 4 insertions(+)

[PATCH] drm/amdgpu: Fix build without CONFIG_HMM_MIRROR

2019-07-09 Thread YueHaibing
If CONFIG_HMM_MIRROR is not set, building may fails: In file included from drivers/gpu/drm/amd/amdgpu/amdgpu.h:72:0, from drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:40: drivers/gpu/drm/amd/amdgpu/amdgpu_mn.h:69:20: error: field mirror has incomplete type struct hmm_mirror mirro

Re: [PATCH 0/7] amdgpu clang warning fixes on next-20190703

2019-07-09 Thread Nathan Chancellor
On Mon, Jul 08, 2019 at 11:55:50AM -0400, Alex Deucher wrote: > Applied the series. thanks! > > Alex Thank you :) I don't see the enum conversion ones in your current tree. If they indeed caused issues, could you guys please look into fixing the warnings properly yourselves (maybe something lik