[PATCH RFC 3/3] x86/sgx: Implement EAUG population with MAP_POPULATE

2022-03-05 Thread Jarkko Sakkinen
With SGX1 an enclave needs to be created with its maximum memory demands pre-allocated. Pages cannot be added to an enclave after it is initialized. SGX2 introduces a new function, ENCLS[EAUG] for adding pages to an initialized enclave. Add support for dynamically adding pages to an initialized en

[PATCH RFC 2/3] x86/sgx: Export sgx_encl_page_alloc()

2022-03-05 Thread Jarkko Sakkinen
Move sgx_encl_page_alloc() to encl.c and export it so that it can be used in the implementation for MAP_POPULATE, which requires to allocate new enclave pages. Signed-off-by: Jarkko Sakkinen --- arch/x86/kernel/cpu/sgx/encl.c | 38 + arch/x86/kernel/cpu/sgx/encl.

[PATCH RFC 1/3] mm: Add f_ops->populate()

2022-03-05 Thread Jarkko Sakkinen
Sometimes you might want to use MAP_POPULATE to ask a device driver to initialize the device memory in some specific manner. SGX driver can use this to request more memory by issuing ENCLS[EAUG] x86 opcode for each page in the address range. Add f_ops->populate() with the same parameters as f_ops-

[PATCH RFC 0/3] MAP_POPULATE for device memory

2022-03-05 Thread Jarkko Sakkinen
For device memory (aka VM_IO | VM_PFNMAP) MAP_POPULATE does nothing. Allow to use that for initializing the device memory by providing a new callback f_ops->populate() for the purpose. SGX patches are provided to show the callback in context. An obvious alternative is a ioctl but it is less elega

Re: [PATCH RFC] mm: Add f_ops->populate()

2022-03-05 Thread Matthew Wilcox
On Sun, Mar 06, 2022 at 06:25:52AM +0200, Jarkko Sakkinen wrote: > > Are you deliberately avoiding the question? I'm not asking about > > implementation. I'm asking about the semantics of MAP_POPULATE with > > your driver. > > No. I just noticed a bug in the guard from your comment that I wanted

Re: [PATCH RFC] mm: Add f_ops->populate()

2022-03-05 Thread Jarkko Sakkinen
On Sun, Mar 06, 2022 at 04:19:26AM +, Matthew Wilcox wrote: > On Sun, Mar 06, 2022 at 06:11:21AM +0200, Jarkko Sakkinen wrote: > > On Sun, Mar 06, 2022 at 03:52:12AM +, Matthew Wilcox wrote: > > > On Sun, Mar 06, 2022 at 05:21:11AM +0200, Jarkko Sakkinen wrote: > > > > On Sun, Mar 06, 2022

Re: [PATCH RFC] mm: Add f_ops->populate()

2022-03-05 Thread Matthew Wilcox
On Sun, Mar 06, 2022 at 06:11:21AM +0200, Jarkko Sakkinen wrote: > On Sun, Mar 06, 2022 at 03:52:12AM +, Matthew Wilcox wrote: > > On Sun, Mar 06, 2022 at 05:21:11AM +0200, Jarkko Sakkinen wrote: > > > On Sun, Mar 06, 2022 at 02:57:55AM +, Matthew Wilcox wrote: > > > > On Sun, Mar 06, 2022

Re: [PATCH RFC] mm: Add f_ops->populate()

2022-03-05 Thread Jarkko Sakkinen
On Sun, Mar 06, 2022 at 03:52:12AM +, Matthew Wilcox wrote: > On Sun, Mar 06, 2022 at 05:21:11AM +0200, Jarkko Sakkinen wrote: > > On Sun, Mar 06, 2022 at 02:57:55AM +, Matthew Wilcox wrote: > > > On Sun, Mar 06, 2022 at 04:15:33AM +0200, Jarkko Sakkinen wrote: > > > > Sometimes you might w

Re: [PATCH RFC] mm: Add f_ops->populate()

2022-03-05 Thread Matthew Wilcox
On Sun, Mar 06, 2022 at 05:21:11AM +0200, Jarkko Sakkinen wrote: > On Sun, Mar 06, 2022 at 02:57:55AM +, Matthew Wilcox wrote: > > On Sun, Mar 06, 2022 at 04:15:33AM +0200, Jarkko Sakkinen wrote: > > > Sometimes you might want to use MAP_POPULATE to ask a device driver to > > > initialize the d

Re: Report 2 in ext4 and journal based on v5.17-rc1

2022-03-05 Thread Theodore Ts'o
On Sat, Mar 05, 2022 at 11:55:34PM +0900, Byungchul Park wrote: > > that is why some of the DEPT reports were completely incomprehensible > > It's because you are blinded to blame at it without understanding how > Dept works at all. I will fix those that must be fixed. Don't worry. Users of DEPT

[PATCH RFC v2] mm: Add f_ops->populate()

2022-03-05 Thread Jarkko Sakkinen
Sometimes you might want to use MAP_POPULATE to ask a device driver to initialize the device memory in some specific manner. SGX driver can use this to request more memory by issuing ENCLS[EAUG] x86 opcode for each page in the address range. Add f_ops->populate() with the same parameters as f_ops-

Re: [PATCH RFC] mm: Add f_ops->populate()

2022-03-05 Thread Jarkko Sakkinen
On Sun, Mar 06, 2022 at 02:57:55AM +, Matthew Wilcox wrote: > On Sun, Mar 06, 2022 at 04:15:33AM +0200, Jarkko Sakkinen wrote: > > Sometimes you might want to use MAP_POPULATE to ask a device driver to > > initialize the device memory in some specific manner. SGX driver can use > > this to requ

Re: [PATCH RFC] mm: Add f_ops->populate()

2022-03-05 Thread Matthew Wilcox
On Sun, Mar 06, 2022 at 04:15:33AM +0200, Jarkko Sakkinen wrote: > Sometimes you might want to use MAP_POPULATE to ask a device driver to > initialize the device memory in some specific manner. SGX driver can use > this to request more memory by issuing ENCLS[EAUG] x86 opcode for each > page in the

[PATCH RFC] mm: Add f_ops->populate()

2022-03-05 Thread Jarkko Sakkinen
Sometimes you might want to use MAP_POPULATE to ask a device driver to initialize the device memory in some specific manner. SGX driver can use this to request more memory by issuing ENCLS[EAUG] x86 opcode for each page in the address range. Add f_ops->populate() with the same parameters as f_ops-

[CI 2/2] drm/i915/gem: Don't try to map and fence large scanout buffers (v9)

2022-03-05 Thread Vivek Kasireddy
On platforms capable of allowing 8K (7680 x 4320) modes, pinning 2 or more framebuffers/scanout buffers results in only one that is mappable/ fenceable. Therefore, pageflipping between these 2 FBs where only one is mappable/fenceable creates latencies large enough to miss alternate vblanks thereby

[CI 0/2] drm/mm: Add an iterator to optimally walk over holes suitable for an allocation

2022-03-05 Thread Vivek Kasireddy
The first patch is a drm core patch that replaces the for loop in drm_mm_insert_node_in_range() with the iterator and would not cause any functional changes. The second patch is a i915 driver specific patch that also uses the iterator but solves a different problem. v2: - Added a new patch to this

[CI 1/2] drm/mm: Add an iterator to optimally walk over holes for an allocation (v5)

2022-03-05 Thread Vivek Kasireddy
This iterator relies on drm_mm_first_hole() and drm_mm_next_hole() functions to identify suitable holes for an allocation of a given size by efficiently traversing the rbtree associated with the given allocator. It replaces the for loop in drm_mm_insert_node_in_range() and can also be used by drm

Re: [PATCH v2 2/2] dt-bindings: gpu: Convert aspeed-gfx bindings to yaml

2022-03-05 Thread Krzysztof Kozlowski
On 04/03/2022 01:03, Joel Stanley wrote: > Convert the bindings to yaml and add the ast2600 compatible string. > > The legacy mfd description was put in place before the gfx bindings > existed, to document the compatible that is used in the pinctrl > bindings. > > Signed-off-by: Joel Stanley > -

[PATCH] drm/msm/a6xx: Fix missing ARRAY_SIZE() check

2022-03-05 Thread Rob Clark
From: Rob Clark Fixes: f6d62d091cfd ("drm/msm/a6xx: add support for Adreno 660 GPU") Signed-off-by: Rob Clark Reviewed-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/msm/adreno/a6xx

Re: [PATCH v3 3/5] drm/print: RFC add choice to use dynamic debug in drm-debug

2022-03-05 Thread Jim Cromie
From: Daniel Vetter Hi Daniel, everyone, Ive substantially updated this patchset, and I thought it useful to reply here. Im noting the biggest changes in context below, trimming heavily otherwize. Also, Ive lost the msg in my gmail-cloud, so this lacks the usual "Daniel said: " attribution, a

Re: Report 2 in ext4 and journal based on v5.17-rc1

2022-03-05 Thread Byungchul Park
On Fri, Mar 04, 2022 at 10:40:35PM -0500, Theodore Ts'o wrote: > On Fri, Mar 04, 2022 at 12:20:02PM +0900, Byungchul Park wrote: > > > > I found a point that the two wait channels don't lead a deadlock in > > some cases thanks to Jan Kara. I will fix it so that Dept won't > > complain it. > > I s

Re: Report 2 in ext4 and journal based on v5.17-rc1

2022-03-05 Thread Byungchul Park
On Fri, Mar 04, 2022 at 10:26:23PM -0500, Theodore Ts'o wrote: > On Fri, Mar 04, 2022 at 09:42:37AM +0900, Byungchul Park wrote: > > > > All contexts waiting for any of the events in the circular dependency > > chain will be definitely stuck if there is a circular dependency as I > > explained. So

Re: [PATCH] drm/msm/a6xx: Fix missing ARRAY_SIZE() check

2022-03-05 Thread Dmitry Baryshkov
On Sat, 5 Mar 2022 at 00:57, Rob Clark wrote: > > On Fri, Mar 4, 2022 at 1:47 PM Dmitry Baryshkov > wrote: > > > > On Fri, 4 Mar 2022 at 23:23, Rob Clark wrote: > > > > > > From: Rob Clark > > > > > > Fixes: f6d62d091cfd ("drm/msm/a6xx: add support for Adreno 660 GPU") > > > Signed-off-by: Rob

Re: [PATCH] drm/nouveau/bios: Rename prom_init() and friends functions

2022-03-05 Thread Christophe Leroy
Le 05/03/2022 à 08:38, Christophe Leroy a écrit : Le 04/03/2022 à 21:24, Lyude Paul a écrit : This mostly looks good to me. Just one question (and one comment down below that needs addressing). Is this with ppc32? (I ask because ppc64le doesn't seem to hit this compilation error). That'