Re: [PATCH] powerpc/papr_scm: Add PAPR command family to pass-through command-set

2020-09-28 Thread Vaibhav Jain
Hi Dan, Ira and Vishal, Can you please take a look at this patch. Without it the functionality to report nvdimm health via ndctl breaks on 5.9 Thanks, ~ Vaibhav Vaibhav Jain writes: > Add NVDIMM_FAMILY_PAPR to the list of valid 'dimm_family_mask' > acceptable by papr_scm. This is needed as

[PATCH] powerpc: net: bpf_jit_comp: Fix misuse of fallthrough

2020-09-28 Thread zhe.he
From: He Zhe The user defined label following "fallthrough" is not considered by GCC and causes build failure. kernel-source/include/linux/compiler_attributes.h:208:41: error: attribute 'fallthrough' not preceding a case label or default label [-Werror] 208 define fallthrough

Re: [PATCH] powerpc/papr_scm: Add PAPR command family to pass-through command-set

2020-09-28 Thread Ira Weiny
On Mon, Sep 28, 2020 at 06:44:52PM +0530, Vaibhav Jain wrote: > Hi Dan, Ira and Vishal, > > Can you please take a look at this patch. Without it the functionality > to report nvdimm health via ndctl breaks on 5.9 Sorry... > > Thanks, > ~ Vaibhav > > Vaibhav Jain writes: > > > Add

Re: [PATCH 1/5] Documentation: dt: binding: fsl: Add 'fsl,ippdexpcr1-alt-addr' property

2020-09-28 Thread Rob Herring
On Wed, Sep 23, 2020 at 1:44 AM Ran Wang wrote: > > Hi Rob, > > On Wednesday, September 23, 2020 10:33 AM, Rob Herring wrote: > > > > On Wed, Sep 16, 2020 at 04:18:27PM +0800, Ran Wang wrote: > > > From: Biwen Li > > > > > > The 'fsl,ippdexpcr1-alt-addr' property is used to handle an errata > >

Re: [PATCH] tpm: of: avoid __va() translation for event log address

2020-09-28 Thread Jarkko Sakkinen
On Mon, Sep 28, 2020 at 08:20:18AM +0200, Ard Biesheuvel wrote: > On Mon, 28 Sep 2020 at 07:56, Christophe Leroy > wrote: > > > > > > > > Le 28/09/2020 à 01:44, Jarkko Sakkinen a écrit : > > > On Fri, Sep 25, 2020 at 09:00:18AM -0300, Jason Gunthorpe wrote: > > >> On Fri, Sep 25, 2020 at

Re: [PATCH] powerpc/papr_scm: Support dynamic enable/disable of performance statistics

2020-09-28 Thread Ira Weiny
On Mon, Sep 14, 2020 at 02:51:15AM +0530, Vaibhav Jain wrote: > Collection of performance statistics of an NVDIMM can be dynamically > enabled/disabled from the Hypervisor Management Console even when the > guest lpar is running. The current implementation however will check if > the performance

Re: [PATCH v8 2/8] powerpc/vdso: Remove __kernel_datapage_offset and simplify __get_datapage()

2020-09-28 Thread Dmitry Safonov
On 9/27/20 8:43 AM, Christophe Leroy wrote: > > > Le 21/09/2020 à 13:26, Will Deacon a écrit : >> On Fri, Aug 28, 2020 at 12:14:28PM +1000, Michael Ellerman wrote: >>> Dmitry Safonov <0x7f454...@gmail.com> writes: [..] I'll cook a patch for vm_special_mapping if you don't mind :-) >>> >>>

Re: [PATCH] tpm: of: avoid __va() translation for event log address

2020-09-28 Thread Ard Biesheuvel
On Mon, 28 Sep 2020 at 07:56, Christophe Leroy wrote: > > > > Le 28/09/2020 à 01:44, Jarkko Sakkinen a écrit : > > On Fri, Sep 25, 2020 at 09:00:18AM -0300, Jason Gunthorpe wrote: > >> On Fri, Sep 25, 2020 at 01:29:20PM +0300, Jarkko Sakkinen wrote: > >>> On Fri, Sep 25, 2020 at 09:00:56AM +0200,

Re: [PATCH v2 3/3] selftests/lkdtm: Enable selftest for SLB multihit

2020-09-28 Thread Ganesh
On 9/26/20 1:29 AM, Kees Cook wrote: On Fri, Sep 25, 2020 at 04:01:23PM +0530, Ganesh Goudar wrote: Add PPC_SLB_MULTIHIT to lkdtm selftest framework. Signed-off-by: Ganesh Goudar --- tools/testing/selftests/lkdtm/tests.txt | 1 + 1 file changed, 1 insertion(+) diff --git

Re: [PATCH v2 2/3] lkdtm/powerpc: Add SLB multihit test

2020-09-28 Thread Ganesh
On 9/26/20 1:27 AM, Kees Cook wrote: On Fri, Sep 25, 2020 at 04:01:22PM +0530, Ganesh Goudar wrote: Add support to inject slb multihit errors, to test machine check handling. Thank you for more tests in here! Based on work by Mahesh Salgaonkar and Michal Suchánek. Cc: Mahesh Salgaonkar

Re: [PATCH] rpadlpar_io:Add MODULE_DESCRIPTION entries to kernel modules

2020-09-28 Thread Tyrel Datwyler
On 9/23/20 11:41 PM, Oliver O'Halloran wrote: > On Thu, Sep 24, 2020 at 3:15 PM Mamatha Inamdar > wrote: >> >> This patch adds a brief MODULE_DESCRIPTION to rpadlpar_io kernel modules >> (descriptions taken from Kconfig file) >> >> Signed-off-by: Mamatha Inamdar >> --- >>

RE: [PATCH 1/5] Documentation: dt: binding: fsl: Add 'fsl,ippdexpcr1-alt-addr' property

2020-09-28 Thread Ran Wang
Hi Rob, On Monday, September 28, 2020 9:57 PM, Rob Herring wrote: > > On Wed, Sep 23, 2020 at 1:44 AM Ran Wang wrote: > > > > Hi Rob, > > > > On Wednesday, September 23, 2020 10:33 AM, Rob Herring wrote: > > > > > > On Wed, Sep 16, 2020 at 04:18:27PM +0800, Ran Wang wrote: > > > > From: Biwen

Re: [PATCH] rpadlpar_io:Add MODULE_DESCRIPTION entries to kernel modules

2020-09-28 Thread Oliver O'Halloran
On Tue, Sep 29, 2020 at 6:50 AM Tyrel Datwyler wrote: > > On 9/23/20 11:41 PM, Oliver O'Halloran wrote: > > On Thu, Sep 24, 2020 at 3:15 PM Mamatha Inamdar > > wrote: > >> > >> This patch adds a brief MODULE_DESCRIPTION to rpadlpar_io kernel modules > >> (descriptions taken from Kconfig file) >

Re: [PATCH v2 25/25] powerpc/signal32: Transform save_user_regs() and save_tm_user_regs() in 'unsafe' version

2020-09-28 Thread Christopher M. Riedl
On Tue Aug 18, 2020 at 12:19 PM CDT, Christophe Leroy wrote: > Change those two functions to be used within a user access block. > > For that, change save_general_regs() to and unsafe_save_general_regs(), > then replace all user accesses by unsafe_ versions. > > This series leads to a reduction

Re: [PATCH v2 23/25] powerpc/signal: Create 'unsafe' versions of copy_[ck][fpr/vsx]_to_user()

2020-09-28 Thread Christopher M. Riedl
On Tue Aug 18, 2020 at 12:19 PM CDT, Christophe Leroy wrote: > For the non VSX version, that's trivial. Just use unsafe_copy_to_user() > instead of __copy_to_user(). > > For the VSX version, remove the intermediate step through a buffer and > use unsafe_put_user() directly. This generates a far

Re: [PATCH v2 14/14] powerpc/pseries/iommu: Rename "direct window" to "dma window"

2020-09-28 Thread Alexey Kardashevskiy
On 12/09/2020 03:07, Leonardo Bras wrote: Cc: linuxppc-dev@lists.ozlabs.org, linux-ker...@vger.kernel.org, A previous change introduced the usage of DDW as a bigger indirect DMA mapping when the DDW available size does not map the whole partition. As most of the code that manipulates direct

Re: [PATCH v2 13/14] powerpc/pseries/iommu: Make use of DDW for indirect mapping

2020-09-28 Thread Alexey Kardashevskiy
On 12/09/2020 03:07, Leonardo Bras wrote: Cc: linuxppc-dev@lists.ozlabs.org, linux-ker...@vger.kernel.org, So far it's assumed possible to map the guest RAM 1:1 to the bus, which works with a small number of devices. SRIOV changes it as the user can configure hundreds VFs and since phyp

Re: [PATCH v2 09/14] powerpc/pseries/iommu: Add ddw_property_create() and refactor enable_ddw()

2020-09-28 Thread Alexey Kardashevskiy
On 12/09/2020 03:07, Leonardo Bras wrote: Cc: linuxppc-dev@lists.ozlabs.org, linux-ker...@vger.kernel.org, Code used to create a ddw property that was previously scattered in enable_ddw() is now gathered in ddw_property_create(), which deals with allocation and filling the property, letting

Re: [PATCH v2 01/14] powerpc/pseries/iommu: Replace hard-coded page shift

2020-09-28 Thread Alexey Kardashevskiy
On 12/09/2020 03:07, Leonardo Bras wrote: Cc: linuxppc-dev@lists.ozlabs.org, linux-ker...@vger.kernel.org, These normally go right before "signed-off-by". Some functions assume IOMMU page size can only be 4K (pageshift == 12). Update them to accept any page size passed, so we can use

Re: [PATCH v2 02/14] powerpc/pseries/iommu: Makes sure IOMMU_PAGE_SIZE <= PAGE_SIZE

2020-09-28 Thread Alexey Kardashevskiy
On 12/09/2020 03:07, Leonardo Bras wrote: Cc: linuxppc-dev@lists.ozlabs.org, linux-ker...@vger.kernel.org, Having System pagesize < IOMMU pagesize may cause a page owned by another process/VM to be written by a buggy driver / device. As it's intended to use DDW for indirect mapping, it's

Re: [PATCH v2 25/25] powerpc/signal32: Transform save_user_regs() and save_tm_user_regs() in 'unsafe' version

2020-09-28 Thread Christophe Leroy
Le 29/09/2020 à 04:55, Christopher M. Riedl a écrit : On Tue Aug 18, 2020 at 12:19 PM CDT, Christophe Leroy wrote: Change those two functions to be used within a user access block. For that, change save_general_regs() to and unsafe_save_general_regs(), then replace all user accesses by

Re: [PATCH v2 23/25] powerpc/signal: Create 'unsafe' versions of copy_[ck][fpr/vsx]_to_user()

2020-09-28 Thread Christophe Leroy
Le 29/09/2020 à 04:04, Christopher M. Riedl a écrit : On Tue Aug 18, 2020 at 12:19 PM CDT, Christophe Leroy wrote: For the non VSX version, that's trivial. Just use unsafe_copy_to_user() instead of __copy_to_user(). For the VSX version, remove the intermediate step through a buffer and use

Re: [PATCH v2 11/14] powerpc/pseries/iommu: Update remove_dma_window() to accept property name

2020-09-28 Thread Alexey Kardashevskiy
On 12/09/2020 03:07, Leonardo Bras wrote: Cc: linuxppc-dev@lists.ozlabs.org, linux-ker...@vger.kernel.org, Update remove_dma_window() so it can be used to remove DDW with a given property name. Out of context this seems useless. How about? === At the moment pseries stores information

Re: [PATCH v2 10/14] powerpc/pseries/iommu: Reorganize iommu_table_setparms*() with new helper

2020-09-28 Thread Alexey Kardashevskiy
On 12/09/2020 03:07, Leonardo Bras wrote: Cc: linuxppc-dev@lists.ozlabs.org, linux-ker...@vger.kernel.org, Add a new helper _iommu_table_setparms(), and use it in iommu_table_setparms() and iommu_table_setparms_lpar() to avoid duplicated code. Also, setting tbl->it_ops was happening outsite

Re: [PATCH v2 05/14] powerpc/kernel/iommu: Add new iommu_table_in_use() helper

2020-09-28 Thread Alexey Kardashevskiy
On 12/09/2020 03:07, Leonardo Bras wrote: Cc: linuxppc-dev@lists.ozlabs.org, linux-ker...@vger.kernel.org, Having a function to check if the iommu table has any allocation helps deciding if a tbl can be reset for using a new DMA window. It should be enough to replace all instances of

Re: [PATCH v2 03/14] powerpc/kernel/iommu: Align size for IOMMU_PAGE_SIZE() to save TCEs

2020-09-28 Thread Alexey Kardashevskiy
On 12/09/2020 03:07, Leonardo Bras wrote: Cc: linuxppc-dev@lists.ozlabs.org, linux-ker...@vger.kernel.org, Currently both iommu_alloc_coherent() and iommu_free_coherent() align the desired allocation size to PAGE_SIZE, and gets system pages and IOMMU mappings (TCEs) for that value. When

Re: [PATCH v2 07/14] powerpc/pseries/iommu: Add ddw_list_new_entry() helper

2020-09-28 Thread Alexey Kardashevskiy
On 12/09/2020 03:07, Leonardo Bras wrote: Cc: linuxppc-dev@lists.ozlabs.org, linux-ker...@vger.kernel.org, There are two functions creating direct_window_list entries in a similar way, so create a ddw_list_new_entry() to avoid duplicity and simplify those functions. Signed-off-by: Leonardo

Re: [PATCH v2 23/25] powerpc/signal: Create 'unsafe' versions of copy_[ck][fpr/vsx]_to_user()

2020-09-28 Thread Christophe Leroy
Le 29/09/2020 à 07:22, Christophe Leroy a écrit : Le 29/09/2020 à 04:04, Christopher M. Riedl a écrit : On Tue Aug 18, 2020 at 12:19 PM CDT, Christophe Leroy wrote: For the non VSX version, that's trivial. Just use unsafe_copy_to_user() instead of __copy_to_user(). For the VSX version,