Re: [PATCH v3 5/6] mm/mmu_gather: invalidate TLB correctly on batch allocation failure and flush

2021-01-05 Thread Greg KH
On Thu, Mar 12, 2020 at 06:57:39PM +0530, Santosh Sivaraj wrote: > From: Peter Zijlstra > > commit 0ed1325967ab5f7a4549a2641c6ebe115f76e228 upstream. > > Architectures for which we have hardware walkers of Linux page table > should flush TLB on mmu gather batch allocation failures and batch flus

[PATCH v3 0/2] Support for H_RPT_INVALIDATE in PowerPC KVM

2021-01-05 Thread Bharata B Rao
This patchset adds support for the new hcall H_RPT_INVALIDATE and replaces the nested tlb flush calls with this new hcall if support for the same exists. Changes in v3: - - Reused the tlb flush routines from radix_tlb.c - Ensured fixups are take care of due to the above change. v2:

[PATCH v3 1/2] KVM: PPC: Book3S HV: Add support for H_RPT_INVALIDATE

2021-01-05 Thread Bharata B Rao
Implement H_RPT_INVALIDATE hcall and add KVM capability KVM_CAP_PPC_RPT_INVALIDATE to indicate the support for the same. This hcall does two types of TLB invalidations: 1. Process-scoped invalidations for guests with LPCR[GTSE]=0. This is currently not used in KVM as GTSE is not usually dis

[PATCH v3 2/2] KVM: PPC: Book3S HV: Use H_RPT_INVALIDATE in nested KVM

2021-01-05 Thread Bharata B Rao
In the nested KVM case, replace H_TLB_INVALIDATE by the new hcall H_RPT_INVALIDATE if available. The availability of this hcall is determined from "hcall-rpt-invalidate" string in ibm,hypertas-functions DT property. Signed-off-by: Bharata B Rao Reviewed-by: Fabiano Rosas --- arch/powerpc/kvm/bo

Re: [PATCH] net: ethernet: fs_enet: Add missing MODULE_LICENSE

2021-01-05 Thread Michael Ellerman
Andrew Lunn writes: > On Tue, Jan 05, 2021 at 01:22:29PM +1100, Michael Ellerman wrote: >> Since commit 1d6cd3929360 ("modpost: turn missing MODULE_LICENSE() >> into error") the ppc32_allmodconfig build fails with: >> >> ERROR: modpost: missing MODULE_LICENSE() in >> drivers/net/ethernet/frees

[PATCH v2] net: ethernet: fs_enet: Add missing MODULE_LICENSE

2021-01-05 Thread Michael Ellerman
Since commit 1d6cd3929360 ("modpost: turn missing MODULE_LICENSE() into error") the ppc32_allmodconfig build fails with: ERROR: modpost: missing MODULE_LICENSE() in drivers/net/ethernet/freescale/fs_enet/mii-fec.o ERROR: modpost: missing MODULE_LICENSE() in drivers/net/ethernet/freescale/fs_

Re: [RFC please help] membarrier: Rewrite sync_core_before_usermode()

2021-01-05 Thread Will Deacon
Hi Andy, Sorry for the slow reply, I was socially distanced from my keyboard. On Mon, Dec 28, 2020 at 04:36:11PM -0800, Andy Lutomirski wrote: > On Mon, Dec 28, 2020 at 4:11 PM Nicholas Piggin wrote: > > > +static inline void membarrier_sync_core_before_usermode(void) > > > +{ > > > + /* > >

Re: [PATCH 01/20] ethernet: ucc_geth: set dev->max_mtu to 1518

2021-01-05 Thread Joakim Tjernlund
On Thu, 2020-12-10 at 02:25 +0100, Andrew Lunn wrote: > On Sat, Dec 05, 2020 at 08:17:24PM +0100, Rasmus Villemoes wrote: > > All the buffers and registers are already set up appropriately for an > > MTU slightly above 1500, so we just need to expose this to the > > networking stack. AFAICT, there'

Re: [PATCH 01/20] ethernet: ucc_geth: set dev->max_mtu to 1518

2021-01-05 Thread Andrew Lunn
On Tue, Jan 05, 2021 at 02:17:42PM +, Joakim Tjernlund wrote: > On Thu, 2020-12-10 at 02:25 +0100, Andrew Lunn wrote: > > On Sat, Dec 05, 2020 at 08:17:24PM +0100, Rasmus Villemoes wrote: > > > All the buffers and registers are already set up appropriately for an > > > MTU slightly above 1500,

Re: [PATCH 01/20] ethernet: ucc_geth: set dev->max_mtu to 1518

2021-01-05 Thread Joakim Tjernlund
On Tue, 2021-01-05 at 15:33 +0100, Andrew Lunn wrote: > On Tue, Jan 05, 2021 at 02:17:42PM +, Joakim Tjernlund wrote: > > On Thu, 2020-12-10 at 02:25 +0100, Andrew Lunn wrote: > > > On Sat, Dec 05, 2020 at 08:17:24PM +0100, Rasmus Villemoes wrote: > > > > All the buffers and registers are alrea

Re: [PATCH 01/20] ethernet: ucc_geth: set dev->max_mtu to 1518

2021-01-05 Thread Andrew Lunn
> Hi Andrew > > I found here: > https://patchwork.kernel.org/project/netdevbpf/patch/20201218105538.30563-2-rasmus.villem...@prevas.dk/ > > Seem to be underway but stable isn't included, I think it should be. Stable should happen, since this was posted with [net,v2,3/3]. David or Jakub handles

Re: [PATCH v2] net: ethernet: fs_enet: Add missing MODULE_LICENSE

2021-01-05 Thread Andrew Lunn
On Tue, Jan 05, 2021 at 08:15:15PM +1100, Michael Ellerman wrote: > Since commit 1d6cd3929360 ("modpost: turn missing MODULE_LICENSE() > into error") the ppc32_allmodconfig build fails with: > > ERROR: modpost: missing MODULE_LICENSE() in > drivers/net/ethernet/freescale/fs_enet/mii-fec.o > E

Re: [RFC please help] membarrier: Rewrite sync_core_before_usermode()

2021-01-05 Thread Andy Lutomirski
> On Jan 5, 2021, at 5:26 AM, Will Deacon wrote: > > Hi Andy, > > Sorry for the slow reply, I was socially distanced from my keyboard. > >> On Mon, Dec 28, 2020 at 04:36:11PM -0800, Andy Lutomirski wrote: >> On Mon, Dec 28, 2020 at 4:11 PM Nicholas Piggin wrote: +static inline void me

Re: [RFC please help] membarrier: Rewrite sync_core_before_usermode()

2021-01-05 Thread Peter Zijlstra
On Tue, Jan 05, 2021 at 08:20:51AM -0800, Andy Lutomirski wrote: > > Interestingly, the architecture recently added a control bit to remove > > this synchronisation from exception return, so if we set that then we'd > > have a problem with SYNC_CORE and adding an ISB would be necessary

Re: [PATCH v2 -next] misc: ocxl: use DEFINE_MUTEX() for mutex lock

2021-01-05 Thread Andrew Donnellan
On 25/12/20 12:24 am, Zheng Yongjun wrote: mutex lock can be initialized automatically with DEFINE_MUTEX() rather than explicitly calling mutex_init(). Signed-off-by: Zheng Yongjun Acked-by: Andrew Donnellan -- Andrew Donnellan OzLabs, ADL Canberra a...@linux.ibm.com

Power9 NV linux-next random process hang

2021-01-05 Thread Qian Cai
.config: https://cailca.coding.net/public/linux/mm/git/files/master/powerpc.config Today's linux-next starts to generate random process hang quite easily. Yesterday's build seems work fine. Sometimes, the process stack seems corrupt while the process is running 100% CPU with gdb shows it just ent

Re: [RFC please help] membarrier: Rewrite sync_core_before_usermode()

2021-01-05 Thread Will Deacon
On Tue, Jan 05, 2021 at 08:20:51AM -0800, Andy Lutomirski wrote: > > On Jan 5, 2021, at 5:26 AM, Will Deacon wrote: > > Sorry for the slow reply, I was socially distanced from my keyboard. > > > >> On Mon, Dec 28, 2020 at 04:36:11PM -0800, Andy Lutomirski wrote: > >> On Mon, Dec 28, 2020 at 4:11

Re: [PATCH v2] net: ethernet: fs_enet: Add missing MODULE_LICENSE

2021-01-05 Thread David Miller
From: Michael Ellerman Date: Tue, 5 Jan 2021 20:15:15 +1100 > Since commit 1d6cd3929360 ("modpost: turn missing MODULE_LICENSE() > into error") the ppc32_allmodconfig build fails with: > > ERROR: modpost: missing MODULE_LICENSE() in > drivers/net/ethernet/freescale/fs_enet/mii-fec.o > ERRO

[RFC PATCH v3 0/6] Restricted DMA

2021-01-05 Thread Claire Chang
This series implements mitigations for lack of DMA access control on systems without an IOMMU, which could result in the DMA accessing the system memory at unexpected times and/or unexpected addresses, possibly leading to data leakage or corruption. For example, we plan to use the PCI-e bus for Wi

[RFC PATCH v3 1/6] swiotlb: Add io_tlb_mem struct

2021-01-05 Thread Claire Chang
Added a new struct, io_tlb_mem, as the IO TLB memory pool descriptor and moved relevant global variables into that struct. This will be useful later to allow for restricted DMA pool. Signed-off-by: Claire Chang --- arch/powerpc/platforms/pseries/svm.c | 4 +- drivers/xen/swiotlb-xen.c

[RFC PATCH v3 2/6] swiotlb: Add restricted DMA pool

2021-01-05 Thread Claire Chang
Add the initialization function to create restricted DMA pools from matching reserved-memory nodes in the device tree. Signed-off-by: Claire Chang --- include/linux/device.h | 4 ++ include/linux/swiotlb.h | 7 +- kernel/dma/Kconfig | 1 + kernel/dma/swiotlb.c| 144 ++

[RFC PATCH v3 3/6] swiotlb: Use restricted DMA pool if available

2021-01-05 Thread Claire Chang
Regardless of swiotlb setting, the restricted DMA pool is preferred if available. The restricted DMA pools provide a basic level of protection against the DMA overwriting buffer contents at unexpected times. However, to protect against general data leakage and system memory corruption, the system

[RFC PATCH v3 4/6] swiotlb: Add restricted DMA alloc/free support.

2021-01-05 Thread Claire Chang
Add the functions, swiotlb_alloc and swiotlb_free to support the memory allocation from restricted DMA pool. Signed-off-by: Claire Chang --- include/linux/swiotlb.h | 6 ++ kernel/dma/direct.c | 12 +++ kernel/dma/swiotlb.c| 171 +--- 3 files change

[RFC PATCH v3 5/6] dt-bindings: of: Add restricted DMA pool

2021-01-05 Thread Claire Chang
Introduce the new compatible string, restricted-dma-pool, for restricted DMA. One can specify the address and length of the restricted DMA memory region by restricted-dma-pool in the device tree. Signed-off-by: Claire Chang --- .../reserved-memory/reserved-memory.txt | 24 +

[RFC PATCH v3 6/6] of: Add plumbing for restricted DMA pool

2021-01-05 Thread Claire Chang
If a device is not behind an IOMMU, we look up the device node and set up the restricted DMA when the restricted-dma-pool is presented. Signed-off-by: Claire Chang --- drivers/of/address.c| 21 + drivers/of/device.c | 4 drivers/of/of_private.h | 5 + 3 fil

Re: [PATCH v2 4/5] ibmvfc: complete commands outside the host/queue lock

2021-01-05 Thread Martin K. Petersen
Tyrel, > Drain the command queue and place all commands on a completion list. > Perform command completion on that list outside the host/queue locks. > Further, move purged command compeletions outside the host_lock as well. Please resubmit entire series instead of amending individual patches.

Re: [RFC PATCH v3 2/6] swiotlb: Add restricted DMA pool

2021-01-05 Thread Greg KH
On Wed, Jan 06, 2021 at 11:41:20AM +0800, Claire Chang wrote: > Add the initialization function to create restricted DMA pools from > matching reserved-memory nodes in the device tree. > > Signed-off-by: Claire Chang > --- > include/linux/device.h | 4 ++ > include/linux/swiotlb.h | 7 +- >