Re: [PATCH] drm/amd/amdgpu: Bail out of BO node creation if not enough VRAM (v2)

2019-06-12 Thread Christian König
Am 11.06.19 um 18:54 schrieb StDenis, Tom: (v2): Return 0 and set mem->mm_node to NULL. Signed-off-by: Tom St Denis --- drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c | 18 +- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git

Re: [PATCH v16 02/16] arm64: untag user pointers in access_ok and __uaccess_mask_ptr

2019-06-12 Thread Catalin Marinas
Hi Vincenzo, On Tue, Jun 11, 2019 at 06:09:10PM +0100, Vincenzo Frascino wrote: > > diff --git a/arch/arm64/kernel/process.c b/arch/arm64/kernel/process.c > > index 3767fb21a5b8..69d0be1fc708 100644 > > --- a/arch/arm64/kernel/process.c > > +++ b/arch/arm64/kernel/process.c > > @@ -30,6 +30,7 @@

Re: [PATCH] drm/amdgpu: Reserve space for shared fence

2019-06-12 Thread Christian König
Am 11.06.19 um 18:20 schrieb Zeng, Oak: Call reservation_object_reserve_shared to reserve space for shared fence. Otherwise it will trigger BUG_ON condition in reservation_object_add_shared_fence. Change-Id: Ib0fae16247e33ee68f95bffa723451c0cd619344 Signed-off-by: Oak Zeng Acked-by:

Re: [PATCH] drm/amd/amdgpu: Bail out of BO node creation if not enough VRAM (v2)

2019-06-12 Thread Michel Dänzer
On 2019-06-11 6:54 p.m., StDenis, Tom wrote: > (v2): Return 0 and set mem->mm_node to NULL. > > Signed-off-by: Tom St Denis > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c | 18 +- > 1 file changed, 13 insertions(+), 5 deletions(-) > > [...] > > @@ -284,6 +284,14 @@

Re: [PATCH] drm/amdgpu: explicitly set mmGDS_VMID0_BASE to 0

2019-06-12 Thread Christian König
Am 10.06.19 um 19:26 schrieb Zhu, James: Explicitly set mmGDS_VMID0_BASE to 0. Also update GDS_VMID0_BASE/_SIZE with direct register writes. Signed-off-by: James Zhu --- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 33 +++-- 1 file changed, 15 insertions(+), 18

Re: [PATCH v16 16/16] selftests, arm64: add a selftest for passing tagged pointers to kernel

2019-06-12 Thread Andrey Konovalov
On Tue, Jun 11, 2019 at 7:50 PM Catalin Marinas wrote: > > On Tue, Jun 11, 2019 at 07:18:04PM +0200, Andrey Konovalov wrote: > > On Tue, Jun 11, 2019 at 5:01 PM Catalin Marinas > > wrote: > > > static void *tag_ptr(void *ptr) > > > { > > > static int tagged_addr_err = 1; > > >

Re: [PATCH v16 09/16] fs, arm64: untag user pointers in fs/userfaultfd.c

2019-06-12 Thread Catalin Marinas
On Mon, Jun 03, 2019 at 06:55:11PM +0200, Andrey Konovalov wrote: > This patch is a part of a series that extends arm64 kernel ABI to allow to > pass tagged user pointers (with the top byte set to something else other > than 0x00) as syscall arguments. > > userfaultfd code use provided user

[PATCH v17 08/15] userfaultfd, arm64: untag user pointers

2019-06-12 Thread Andrey Konovalov
This patch is a part of a series that extends arm64 kernel ABI to allow to pass tagged user pointers (with the top byte set to something else other than 0x00) as syscall arguments. userfaultfd code use provided user pointers for vma lookups, which can only by done with untagged pointers. Untag

[PATCH v17 12/15] media/v4l2-core, arm64: untag user pointers in videobuf_dma_contig_user_get

2019-06-12 Thread Andrey Konovalov
This patch is a part of a series that extends arm64 kernel ABI to allow to pass tagged user pointers (with the top byte set to something else other than 0x00) as syscall arguments. videobuf_dma_contig_user_get() uses provided user pointers for vma lookups, which can only by done with untagged

[PATCH v17 14/15] vfio/type1, arm64: untag user pointers in vaddr_get_pfn

2019-06-12 Thread Andrey Konovalov
This patch is a part of a series that extends arm64 kernel ABI to allow to pass tagged user pointers (with the top byte set to something else other than 0x00) as syscall arguments. vaddr_get_pfn() uses provided user pointers for vma lookups, which can only by done with untagged pointers. Untag

[PATCH v17 04/15] mm, arm64: untag user pointers passed to memory syscalls

2019-06-12 Thread Andrey Konovalov
This patch is a part of a series that extends arm64 kernel ABI to allow to pass tagged user pointers (with the top byte set to something else other than 0x00) as syscall arguments. This patch allows tagged pointers to be passed to the following memory syscalls: get_mempolicy, madvise, mbind,

[PATCH v17 10/15] drm/radeon, arm64: untag user pointers in radeon_gem_userptr_ioctl

2019-06-12 Thread Andrey Konovalov
This patch is a part of a series that extends arm64 kernel ABI to allow to pass tagged user pointers (with the top byte set to something else other than 0x00) as syscall arguments. In radeon_gem_userptr_ioctl() an MMU notifier is set up with a (tagged) userspace pointer. The untagged address

[PATCH v17 07/15] fs, arm64: untag user pointers in copy_mount_options

2019-06-12 Thread Andrey Konovalov
This patch is a part of a series that extends arm64 kernel ABI to allow to pass tagged user pointers (with the top byte set to something else other than 0x00) as syscall arguments. In copy_mount_options a user address is being subtracted from TASK_SIZE. If the address is lower than TASK_SIZE, the

[PATCH v17 09/15] drm/amdgpu, arm64: untag user pointers

2019-06-12 Thread Andrey Konovalov
This patch is a part of a series that extends arm64 kernel ABI to allow to pass tagged user pointers (with the top byte set to something else other than 0x00) as syscall arguments. In amdgpu_gem_userptr_ioctl() and amdgpu_amdkfd_gpuvm.c/init_user_pages() an MMU notifier is set up with a (tagged)

[PATCH v17 15/15] selftests, arm64: add a selftest for passing tagged pointers to kernel

2019-06-12 Thread Andrey Konovalov
This patch is a part of a series that extends arm64 kernel ABI to allow to pass tagged user pointers (with the top byte set to something else other than 0x00) as syscall arguments. This patch adds a simple test, that calls the uname syscall with a tagged user pointer as an argument. Without the

[PATCH v17 13/15] tee/shm, arm64: untag user pointers in tee_shm_register

2019-06-12 Thread Andrey Konovalov
This patch is a part of a series that extends arm64 kernel ABI to allow to pass tagged user pointers (with the top byte set to something else other than 0x00) as syscall arguments. tee_shm_register()->optee_shm_unregister()->check_mem_type() uses provided user pointers for vma lookups (via

[PATCH v17 11/15] IB/mlx4, arm64: untag user pointers in mlx4_get_umem_mr

2019-06-12 Thread Andrey Konovalov
This patch is a part of a series that extends arm64 kernel ABI to allow to pass tagged user pointers (with the top byte set to something else other than 0x00) as syscall arguments. mlx4_get_umem_mr() uses provided user pointers for vma lookups, which can only by done with untagged pointers.

Re: [PATCH] drm/amd/amdgpu: Bail out of BO node creation if not enough VRAM (v3)

2019-06-12 Thread Christian König
Am 12.06.19 um 13:08 schrieb StDenis, Tom: (v2): Return 0 and set mem->mm_node to NULL. (v3): Use atomic64_add_return instead. Signed-off-by: Tom St Denis Reviewed-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c | 17 - 1 file changed, 12

Re: [PATCH v16 15/16] vfio/type1, arm64: untag user pointers in vaddr_get_pfn

2019-06-12 Thread Catalin Marinas
On Mon, Jun 03, 2019 at 06:55:17PM +0200, Andrey Konovalov wrote: > This patch is a part of a series that extends arm64 kernel ABI to allow to > pass tagged user pointers (with the top byte set to something else other > than 0x00) as syscall arguments. > > vaddr_get_pfn() uses provided user

Re: [PATCH v16 12/16] IB, arm64: untag user pointers in ib_uverbs_(re)reg_mr()

2019-06-12 Thread Catalin Marinas
On Tue, Jun 04, 2019 at 03:09:26PM +0200, Andrey Konovalov wrote: > On Tue, Jun 4, 2019 at 3:02 PM Jason Gunthorpe wrote: > > On Tue, Jun 04, 2019 at 02:45:32PM +0200, Andrey Konovalov wrote: > > > On Tue, Jun 4, 2019 at 2:27 PM Jason Gunthorpe wrote: > > > > On Tue, Jun 04, 2019 at 02:18:19PM

Re: [PATCH v16 02/16] arm64: untag user pointers in access_ok and __uaccess_mask_ptr

2019-06-12 Thread Andrey Konovalov
On Tue, Jun 11, 2019 at 7:39 PM Catalin Marinas wrote: > > On Tue, Jun 11, 2019 at 07:09:46PM +0200, Andrey Konovalov wrote: > > On Tue, Jun 11, 2019 at 4:57 PM Catalin Marinas > > wrote: > > > > > > On Mon, Jun 10, 2019 at 06:53:27PM +0100, Catalin Marinas wrote: > > > > On Mon, Jun 03, 2019

[PATCH v17 00/15] arm64: untag user pointers passed to the kernel

2019-06-12 Thread Andrey Konovalov
=== Overview arm64 has a feature called Top Byte Ignore, which allows to embed pointer tags into the top byte of each pointer. Userspace programs (such as HWASan, a memory debugging tool [1]) might use this feature and pass tagged user pointers to the kernel through syscalls or other interfaces.

[PATCH v17 02/15] lib, arm64: untag user pointers in strn*_user

2019-06-12 Thread Andrey Konovalov
This patch is a part of a series that extends arm64 kernel ABI to allow to pass tagged user pointers (with the top byte set to something else other than 0x00) as syscall arguments. strncpy_from_user and strnlen_user accept user addresses as arguments, and do not go through the same path as

[PATCH v17 03/15] arm64: Introduce prctl() options to control the tagged user addresses ABI

2019-06-12 Thread Andrey Konovalov
From: Catalin Marinas It is not desirable to relax the ABI to allow tagged user addresses into the kernel indiscriminately. This patch introduces a prctl() interface for enabling or disabling the tagged ABI with a global sysctl control for preventing applications from enabling the relaxed ABI

[PATCH v17 05/15] mm, arm64: untag user pointers in mm/gup.c

2019-06-12 Thread Andrey Konovalov
This patch is a part of a series that extends arm64 kernel ABI to allow to pass tagged user pointers (with the top byte set to something else other than 0x00) as syscall arguments. mm/gup.c provides a kernel interface that accepts user addresses and manipulates user pages directly (for example

[PATCH v17 06/15] mm, arm64: untag user pointers in get_vaddr_frames

2019-06-12 Thread Andrey Konovalov
This patch is a part of a series that extends arm64 kernel ABI to allow to pass tagged user pointers (with the top byte set to something else other than 0x00) as syscall arguments. get_vaddr_frames uses provided user pointers for vma lookups, which can only by done with untagged pointers. Instead

[PATCH v17 01/15] arm64: untag user pointers in access_ok and __uaccess_mask_ptr

2019-06-12 Thread Andrey Konovalov
This patch is a part of a series that extends arm64 kernel ABI to allow to pass tagged user pointers (with the top byte set to something else other than 0x00) as syscall arguments. copy_from_user (and a few other similar functions) are used to copy data from user memory into the kernel memory or

Re: [PATCH v16 02/16] arm64: untag user pointers in access_ok and __uaccess_mask_ptr

2019-06-12 Thread Catalin Marinas
On Wed, Jun 12, 2019 at 01:03:10PM +0200, Andrey Konovalov wrote: > On Tue, Jun 11, 2019 at 7:39 PM Catalin Marinas > wrote: > > On Tue, Jun 11, 2019 at 07:09:46PM +0200, Andrey Konovalov wrote: > > > Should I drop access_ok() change from my patch, since yours just reverts > > > it? > > > > Not

Re: [PATCH v16 05/16] arm64: untag user pointers passed to memory syscalls

2019-06-12 Thread Andrey Konovalov
On Tue, Jun 11, 2019 at 7:45 PM Catalin Marinas wrote: > > On Tue, Jun 11, 2019 at 05:35:31PM +0200, Andrey Konovalov wrote: > > On Mon, Jun 10, 2019 at 4:28 PM Catalin Marinas > > wrote: > > > On Mon, Jun 03, 2019 at 06:55:07PM +0200, Andrey Konovalov wrote: > > > > This patch is a part of a

Re: [PATCH v16 02/16] arm64: untag user pointers in access_ok and __uaccess_mask_ptr

2019-06-12 Thread Vincenzo Frascino
Hi Catalin, On 12/06/2019 10:32, Catalin Marinas wrote: > Hi Vincenzo, > > On Tue, Jun 11, 2019 at 06:09:10PM +0100, Vincenzo Frascino wrote: >>> diff --git a/arch/arm64/kernel/process.c b/arch/arm64/kernel/process.c >>> index 3767fb21a5b8..69d0be1fc708 100644 >>> ---

Re: [PATCH v16 08/16] fs, arm64: untag user pointers in copy_mount_options

2019-06-12 Thread Andrey Konovalov
On Tue, Jun 11, 2019 at 4:38 PM Andrey Konovalov wrote: > > On Sat, Jun 8, 2019 at 6:02 AM Kees Cook wrote: > > > > On Mon, Jun 03, 2019 at 06:55:10PM +0200, Andrey Konovalov wrote: > > > This patch is a part of a series that extends arm64 kernel ABI to allow to > > > pass tagged user pointers

Re: [PATCH v17 15/15] selftests, arm64: add a selftest for passing tagged pointers to kernel

2019-06-12 Thread Szabolcs Nagy
On 12/06/2019 12:43, Andrey Konovalov wrote: > --- /dev/null > +++ b/tools/testing/selftests/arm64/tags_lib.c > @@ -0,0 +1,62 @@ > +// SPDX-License-Identifier: GPL-2.0 > + > +#include > +#include > + > +#define TAG_SHIFT(56) > +#define TAG_MASK (0xffUL << TAG_SHIFT) > + > +#define

Re: [PATCH v16 04/16] mm: untag user pointers in do_pages_move

2019-06-12 Thread Andrey Konovalov
On Tue, Jun 11, 2019 at 10:18 PM Khalid Aziz wrote: > > On 6/3/19 10:55 AM, Andrey Konovalov wrote: > > This patch is a part of a series that extends arm64 kernel ABI to allow to > > pass tagged user pointers (with the top byte set to something else other > > than 0x00) as syscall arguments. > >

[PATCH] drm/amd/amdgpu: Bail out of BO node creation if not enough VRAM (v3)

2019-06-12 Thread StDenis, Tom
(v2): Return 0 and set mem->mm_node to NULL. (v3): Use atomic64_add_return instead. Signed-off-by: Tom St Denis --- drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c | 17 - 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c

[PATCH v2] drm/amdgpu: explicitly set mmGDS_VMID0_BASE to 0

2019-06-12 Thread Zhu, James
Explicitly set mmGDS_VMID0_BASE to 0. Also update GDS_VMID0_BASE/_SIZE with direct register writes. Signed-off-by: James Zhu --- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 35 +-- 1 file changed, 17 insertions(+), 18 deletions(-) diff --git

Re: [PATCH v17 04/15] mm, arm64: untag user pointers passed to memory syscalls

2019-06-12 Thread Vincenzo Frascino
On 12/06/2019 12:43, Andrey Konovalov wrote: > This patch is a part of a series that extends arm64 kernel ABI to allow to > pass tagged user pointers (with the top byte set to something else other > than 0x00) as syscall arguments. > > This patch allows tagged pointers to be passed to the

Re: [PATCH v17 08/15] userfaultfd, arm64: untag user pointers

2019-06-12 Thread Vincenzo Frascino
On 12/06/2019 12:43, Andrey Konovalov wrote: > This patch is a part of a series that extends arm64 kernel ABI to allow to > pass tagged user pointers (with the top byte set to something else other > than 0x00) as syscall arguments. > > userfaultfd code use provided user pointers for vma lookups,

Re: [PATCH] drm/amdgpu: only use kernel zone if need_dma32 is not required

2019-06-12 Thread Yang, Philip
That's kind of hack because dma32 zone is not needed, it has bad effect to trigger unnecessary eviction for KFDTest.BigBufStressTest. But ttm_bo_global_init->ttm_mem_global_init always create dma32 zone without accepting any parameter. To avoid ttm_mem_global_alloc_page account to dma32 zone,

Re: [PATCH v2 hmm 00/11] Various revisions from a locking/code review

2019-06-12 Thread Kuehling, Felix
[+Philip] Hi Jason, I'm out of the office this week. Hi Philip, can you give this a go? Not sure how much you've been following this patch series review. Message or call me on Skype to discuss any questions. Thanks,   Felix On 2019-06-11 12:48, Jason Gunthorpe wrote: > On Thu, Jun 06, 2019

Re: [PATCH] drm/amd/amdgpu: Bail out of BO node creation if not enough VRAM (v3)

2019-06-12 Thread Kuehling, Felix
On 2019-06-12 4:08, StDenis, Tom wrote: > (v2): Return 0 and set mem->mm_node to NULL. > (v3): Use atomic64_add_return instead. > > Signed-off-by: Tom St Denis > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c | 17 - > 1 file changed, 12 insertions(+), 5 deletions(-) > >

Re: [PATCH v17 14/15] vfio/type1, arm64: untag user pointers in vaddr_get_pfn

2019-06-12 Thread Auger Eric
Hi Andrey, On 6/12/19 1:43 PM, Andrey Konovalov wrote: > This patch is a part of a series that extends arm64 kernel ABI to allow to > pass tagged user pointers (with the top byte set to something else other > than 0x00) as syscall arguments. > > vaddr_get_pfn() uses provided user pointers for

Re: [PATCH] drm/amdgpu: only use kernel zone if need_dma32 is not required

2019-06-12 Thread Kuehling, Felix
TTM itself has some logic for need_dma32 and TTM_PAGE_FLAG_DMA32. I believe that should already handle this. need_dma32 is passed from amdgpu to ttm_bo_device_init to bdev->need_dma32. ttm_tt_create translates that to page_flags |= TTM_PAGE_FLAG_DMA32 and passes that to

Re: [PATCH v2 hmm 02/11] mm/hmm: Use hmm_mirror not mm as an argument for hmm_range_register

2019-06-12 Thread Christoph Hellwig
On Tue, Jun 11, 2019 at 04:44:31PM -0300, Jason Gunthorpe wrote: > On Sat, Jun 08, 2019 at 01:54:25AM -0700, Christoph Hellwig wrote: > > FYI, I very much disagree with the direction this is moving. > > > > struct hmm_mirror literally is a trivial duplication of the > > mmu_notifiers. All these

Re: [PATCH v2 hmm 02/11] mm/hmm: Use hmm_mirror not mm as an argument for hmm_range_register

2019-06-12 Thread Christoph Hellwig
On Wed, Jun 12, 2019 at 08:41:25AM -0300, Jason Gunthorpe wrote: > > I like the idea. A few nitpicks: Can we avoid having to store the > > mm in struct mmu_notifier? I think we could just easily pass it as a > > parameter to the helpers. > > Yes, but I think any driver that needs to use this API

Re: [PATCH v2 hmm 02/11] mm/hmm: Use hmm_mirror not mm as an argument for hmm_range_register

2019-06-12 Thread Jason Gunthorpe
On Wed, Jun 12, 2019 at 12:12:34AM -0700, Christoph Hellwig wrote: > On Tue, Jun 11, 2019 at 04:44:31PM -0300, Jason Gunthorpe wrote: > > On Sat, Jun 08, 2019 at 01:54:25AM -0700, Christoph Hellwig wrote: > > > FYI, I very much disagree with the direction this is moving. > > > > > > struct

Re: [PATCH v17 01/15] arm64: untag user pointers in access_ok and __uaccess_mask_ptr

2019-06-12 Thread Vincenzo Frascino
On 12/06/2019 12:43, Andrey Konovalov wrote: > This patch is a part of a series that extends arm64 kernel ABI to allow to > pass tagged user pointers (with the top byte set to something else other > than 0x00) as syscall arguments. > > copy_from_user (and a few other similar functions) are used

Re: [PATCH v17 07/15] fs, arm64: untag user pointers in copy_mount_options

2019-06-12 Thread Vincenzo Frascino
On 12/06/2019 12:43, Andrey Konovalov wrote: > This patch is a part of a series that extends arm64 kernel ABI to allow to > pass tagged user pointers (with the top byte set to something else other > than 0x00) as syscall arguments. > > In copy_mount_options a user address is being subtracted from

Re: [PATCH v17 14/15] vfio/type1, arm64: untag user pointers in vaddr_get_pfn

2019-06-12 Thread Vincenzo Frascino
On 12/06/2019 12:43, Andrey Konovalov wrote: > This patch is a part of a series that extends arm64 kernel ABI to allow to > pass tagged user pointers (with the top byte set to something else other > than 0x00) as syscall arguments. > > vaddr_get_pfn() uses provided user pointers for vma lookups,

[PATCH] drm/amdgpu: only use kernel zone if need_dma32 is not required

2019-06-12 Thread Yang, Philip
TTM create two zones, kernel zone and dma32 zone for system memory. If system memory address allocated is below 4GB, this account to dma32 zone and will exhaust dma32 zone and trigger unnesssary TTM eviction. Patch "drm/ttm: Account for kernel allocations in kernel zone only" only handle the

Re: [PATCH] drm/amd/amdgpu: Bail out of BO node creation if not enough VRAM (v2)

2019-06-12 Thread Christian König
Am 12.06.19 um 09:26 schrieb Michel Dänzer: On 2019-06-11 6:54 p.m., StDenis, Tom wrote: (v2): Return 0 and set mem->mm_node to NULL. Signed-off-by: Tom St Denis --- drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c | 18 +- 1 file changed, 13 insertions(+), 5 deletions(-)

Re: [PATCH v17 02/15] lib, arm64: untag user pointers in strn*_user

2019-06-12 Thread Vincenzo Frascino
On 12/06/2019 12:43, Andrey Konovalov wrote: > This patch is a part of a series that extends arm64 kernel ABI to allow to > pass tagged user pointers (with the top byte set to something else other > than 0x00) as syscall arguments. > > strncpy_from_user and strnlen_user accept user addresses as

Re: [PATCH v17 05/15] mm, arm64: untag user pointers in mm/gup.c

2019-06-12 Thread Vincenzo Frascino
On 12/06/2019 12:43, Andrey Konovalov wrote: > This patch is a part of a series that extends arm64 kernel ABI to allow to > pass tagged user pointers (with the top byte set to something else other > than 0x00) as syscall arguments. > > mm/gup.c provides a kernel interface that accepts user

[PATCH v3] drm/amdgpu: explicitly set mmGDS_VMID0_BASE to 0

2019-06-12 Thread Zhu, James
Explicitly set mmGDS_VMID0_BASE to 0. Also update GDS_VMID0_BASE/_SIZE with direct register writes. Signed-off-by: James Zhu --- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 35 +-- 1 file changed, 17 insertions(+), 18 deletions(-) diff --git

Re: [PATCH v3] drm/amdgpu: explicitly set mmGDS_VMID0_BASE to 0

2019-06-12 Thread Christian König
Am 12.06.19 um 15:11 schrieb Zhu, James: Explicitly set mmGDS_VMID0_BASE to 0. Also update GDS_VMID0_BASE/_SIZE with direct register writes. Signed-off-by: James Zhu Reviewed-by: Christian König --- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 35 +-- 1 file

Re: [PATCH v17 06/15] mm, arm64: untag user pointers in get_vaddr_frames

2019-06-12 Thread Vincenzo Frascino
On 12/06/2019 12:43, Andrey Konovalov wrote: > This patch is a part of a series that extends arm64 kernel ABI to allow to > pass tagged user pointers (with the top byte set to something else other > than 0x00) as syscall arguments. > > get_vaddr_frames uses provided user pointers for vma lookups,

Re: [PATCH v17 03/15] arm64: Introduce prctl() options to control the tagged user addresses ABI

2019-06-12 Thread Catalin Marinas
On Wed, Jun 12, 2019 at 01:43:20PM +0200, Andrey Konovalov wrote: > From: Catalin Marinas > > It is not desirable to relax the ABI to allow tagged user addresses into > the kernel indiscriminately. This patch introduces a prctl() interface > for enabling or disabling the tagged ABI with a global

Re: [PATCH v2] drm/amdgpu: explicitly set mmGDS_VMID0_BASE to 0

2019-06-12 Thread Deucher, Alexander
Please use udelay directly rather than DRM_UDELAY() those old macros are deprecated and going away. Alex From: amd-gfx on behalf of Zhu, James Sent: Wednesday, June 12, 2019 8:59 AM To: amd-gfx@lists.freedesktop.org Cc: Shamis, Leonid;

Re: [PATCH v17 03/15] arm64: Introduce prctl() options to control the tagged user addresses ABI

2019-06-12 Thread Vincenzo Frascino
On 12/06/2019 12:43, Andrey Konovalov wrote: > From: Catalin Marinas > > It is not desirable to relax the ABI to allow tagged user addresses into > the kernel indiscriminately. This patch introduces a prctl() interface > for enabling or disabling the tagged ABI with a global sysctl control > for

Re: [PATCH v17 15/15] selftests, arm64: add a selftest for passing tagged pointers to kernel

2019-06-12 Thread Catalin Marinas
On Wed, Jun 12, 2019 at 01:30:36PM +0100, Szabolcs Nagy wrote: > On 12/06/2019 12:43, Andrey Konovalov wrote: > > --- /dev/null > > +++ b/tools/testing/selftests/arm64/tags_lib.c > > @@ -0,0 +1,62 @@ > > +// SPDX-License-Identifier: GPL-2.0 > > + > > +#include > > +#include > > + > > +#define

Re: [PATCH] drm/amdgpu: Reserve space for shared fence

2019-06-12 Thread Kuehling, Felix
On 2019-06-11 9:20, Zeng, Oak wrote: > Call reservation_object_reserve_shared to reserve > space for shared fence. Otherwise it will trigger > BUG_ON condition in reservation_object_add_shared_fence. > > Change-Id: Ib0fae16247e33ee68f95bffa723451c0cd619344 > Signed-off-by: Oak Zeng Reviewed-by:

Re: [PATCH] drm/amdgpu: only use kernel zone if need_dma32 is not required

2019-06-12 Thread Christian König
Well that we evict here is perfectly intentional. The laptop I'm typing on actually don't work without this, so please don't touch any of that. Christian. Am 12.06.19 um 20:06 schrieb Yang, Philip: That's kind of hack because dma32 zone is not needed, it has bad effect to trigger

Re: [PATCH] drm/amdgpu: only use kernel zone if need_dma32 is not required

2019-06-12 Thread Christian König
Am 12.06.19 um 17:13 schrieb Yang, Philip: TTM create two zones, kernel zone and dma32 zone for system memory. If system memory address allocated is below 4GB, this account to dma32 zone and will exhaust dma32 zone and trigger unnesssary TTM eviction. Patch "drm/ttm: Account for kernel

Re: [PATCH v2 hmm 00/11] Various revisions from a locking/code review

2019-06-12 Thread Yang, Philip
Rebase to https://github.com/jgunthorpe/linux.git hmm branch, need some changes because of interface hmm_range_register change. Then run a quick amdgpu_test. Test is finished, result is ok. But there is below kernel BUG message, seems hmm_free_rcu calls down_write. [ 1171.919921] BUG:

Re: [PATCH] drm/amdgpu: only use kernel zone if need_dma32 is not required

2019-06-12 Thread Yang, Philip
On 2019-06-12 3:28 p.m., Christian König wrote: > Am 12.06.19 um 17:13 schrieb Yang, Philip: >> TTM create two zones, kernel zone and dma32 zone for system memory. If >> system memory address allocated is below 4GB, this account to dma32 zone >> and will exhaust dma32 zone and trigger unnesssary

Re: [PATCH] drm/amd/display: fix compilation error

2019-06-12 Thread Hariprasad Kelam
On Wed, Jun 12, 2019 at 10:35:26PM -0400, Alex Deucher wrote: > On Wed, Jun 12, 2019 at 10:34 PM Hariprasad Kelam > wrote: > > > > this patch fixes below compilation error > > > > drivers/gpu/drm/amd/amdgpu/../display/dc/dcn10/dcn10_hw_sequencer.c: In > > function ‘dcn10_apply_ctx_for_surface’: >

Re: [PATCH] drm/amd/powerplay/smu7_hwmgr: replace blocking delay with non-blocking

2019-06-12 Thread Dieter Nützel
CC trimmed Hello Alex and Harry, any comments on this? I'm running my Xeon X3470 (4c/8t) with this under amd-staging-drm-next (as always ;-) ) and see no issues so far. Thanks! Dieter Am 04.06.2019 22:21, schrieb Yrjan Skrimstad: On Thu, May 30, 2019 at 02:08:21AM +0200, Yrjan Skrimstad

[pull] amdgpu drm-fixes-5.2

2019-06-12 Thread Alex Deucher
Hi Dave, Daniel, Fixes for 5.2: - Extend previous vce fix for resume to uvd and vcn - Fix bounds checking in ras debugfs interface - Fix a regression on SI using amdgpu The following changes since commit 671e2ee5ee2127179ca884b439ab6001a623edd6: Merge branch 'linux-5.2' of

[PATCH] drm/amd/display: fix compilation error

2019-06-12 Thread Hariprasad Kelam
this patch fixes below compilation error drivers/gpu/drm/amd/amdgpu/../display/dc/dcn10/dcn10_hw_sequencer.c: In function ‘dcn10_apply_ctx_for_surface’: drivers/gpu/drm/amd/amdgpu/../display/dc/dcn10/dcn10_hw_sequencer.c:2378:3: error: implicit declaration of function ‘udelay’

Re: [PATCH] drm/amd/display: fix compilation error

2019-06-12 Thread Alex Deucher
On Wed, Jun 12, 2019 at 10:34 PM Hariprasad Kelam wrote: > > this patch fixes below compilation error > > drivers/gpu/drm/amd/amdgpu/../display/dc/dcn10/dcn10_hw_sequencer.c: In > function ‘dcn10_apply_ctx_for_surface’: > drivers/gpu/drm/amd/amdgpu/../display/dc/dcn10/dcn10_hw_sequencer.c:2378:3: