Re: [PATCH] cxl: Set the valid bit in PE for dedicated mode

2017-08-28 Thread Michael Ellerman
Vaibhav Jain writes: > Make sure to set the valid-bit in software-state field of the > populated PE. This was earlier missing for dedicated mode AFUs, hence > was causing a PSL freeze when the AFU was activated. > > Signed-off-by: Vaibhav Jain > --- > drivers/misc/cxl/native.c | 4 > 1 fil

Re: [PATCH] powerpc/kernel: Change retrieval of pci_dn

2017-08-28 Thread Michael Ellerman
"Bryant G. Ly" writes: > For a PCI device it's pci_dn can be retrieved from > pdev->dev.archdata.firmware_data, PCI_DN(devnode), or parent's list. > Thus, we should just use the generic function pci_get_pdn_by_devfn > to get the pci_dn. > > Signed-off-by: Bryant G. Ly Minor issue, it's preferab

Re: [PATCH] powerpc/kernel: Change retrieval of pci_dn

2017-08-28 Thread Michael Ellerman
Hi Bryant, Thanks for the patch, a few comments/questions. How have you tested this? "Bryant G. Ly" writes: > For a PCI device it's pci_dn can be retrieved from > pdev->dev.archdata.firmware_data, PCI_DN(devnode), or parent's list. > Thus, we should just use the generic function pci_get_pdn_by_

Re: [PATCH V3 6/6] crypto/nx: Add P9 NX support for 842 compression engine

2017-08-28 Thread Sukadev Bhattiprolu
Haren Myneni [ha...@linux.vnet.ibm.com] wrote: > > This patch adds P9 NX support for 842 compression engine. Virtual > Accelerator Switchboard (VAS) is used to access 842 engine on P9. > > For each NX engine per chip, setup receive window using > vas_rx_win_open() which configures RxFIFo with FIF

[PATCH v8 08/10] powerpc/vas: Define vas_win_close() interface

2017-08-28 Thread Sukadev Bhattiprolu
Define the vas_win_close() interface which should be used to close a send or receive windows. While the hardware configurations required to open send and receive windows differ, the configuration to close a window is the same for both. So we use a single interface to close the window. Signed-off-

[PATCH v8 10/10] powerpc/vas: Define copy/paste interfaces

2017-08-28 Thread Sukadev Bhattiprolu
Define interfaces (wrappers) to the 'copy' and 'paste' instructions (which are new in PowerISA 3.0). These are intended to be used to by NX driver(s) to submit Coprocessor Request Blocks (CRBs) to the NX hardware engines. Signed-off-by: Sukadev Bhattiprolu --- Changelog[v8]: - [Michael E

[PATCH v8 09/10] powerpc/vas: Define vas_tx_win_open()

2017-08-28 Thread Sukadev Bhattiprolu
Define an interface to open a VAS send window. This interface is intended to be used the Nest Accelerator (NX) driver(s) to open a send window and use it to submit compression/encryption requests to a VAS receive window. The receive window, identified by the [vasid, cop] parameters, must already b

[PATCH v8 07/10] powerpc/vas: Define vas_rx_win_open() interface

2017-08-28 Thread Sukadev Bhattiprolu
Define the vas_rx_win_open() interface. This interface is intended to be used by the Nest Accelerator (NX) driver(s) to setup receive windows for one or more NX engines (which implement compression/encryption algorithms in the hardware). Follow-on patches will provide an interface to close the win

[PATCH v8 06/10] powerpc/vas: Define helpers to alloc/free windows

2017-08-28 Thread Sukadev Bhattiprolu
Define helpers to allocate/free VAS window objects. These will be used in follow-on patches when opening/closing windows. Changelog[v8]: - [Michael Ellerman] Make some functions static; retry if ida_get_new() fails with EAGAIN; fix a couple of leak in ids Signed-off-by: Sukadev

[PATCH v8 05/10] powerpc/vas: Define helpers to init window context

2017-08-28 Thread Sukadev Bhattiprolu
Define helpers to initialize window context registers of the VAS hardware. These will be used in follow-on patches when opening/closing VAS windows. Signed-off-by: Sukadev Bhattiprolu --- Changelog[v8]: - Update comments (ISA references and some cleanup) - Use 0 or 1 when setting

[PATCH v8 04/10] powerpc/vas: Define helpers to access MMIO regions

2017-08-28 Thread Sukadev Bhattiprolu
Define some helper functions to access the MMIO regions. We use these in follow-on patches to read/write VAS hardware registers. They are also used to later issue 'paste' instructions to submit requests to the NX hardware engines. Signed-off-by: Sukadev Bhattiprolu --- Changelog [v8]: Min

[PATCH v8 02/10] Move GET_FIELD/SET_FIELD to vas.h

2017-08-28 Thread Sukadev Bhattiprolu
Move the GET_FIELD and SET_FIELD macros to vas.h as VAS and other users of VAS, including NX-842 can use those macros. There is a lot of related code between the VAS/NX kernel drivers and skiboot. For consistency, switch the order of parameters in SET_FIELD to match the order in skiboot. Signed-o

[PATCH v8 03/10] powerpc/vas: Define vas_init() and vas_exit()

2017-08-28 Thread Sukadev Bhattiprolu
Implement vas_init() and vas_exit() functions for a new VAS module. This VAS module is essentially a library for other device drivers and kernel users of the NX coprocessors like NX-842 and NX-GZIP. In the future this will be extended to add support for user space to access the NX coprocessors. VA

[PATCH v8 01/10] powerpc/vas: Define macros, register fields and structures

2017-08-28 Thread Sukadev Bhattiprolu
Define macros for the VAS hardware registers and bit-fields as well as couple of data structures needed by the VAS driver. Signed-off-by: Sukadev Bhattiprolu --- Changelog[v8] - Use u64/u32 instead of the uintXX versions. Changelog[v7] - Move the threshold control macros from uap

[PATCH v8 00/10] Enable VAS

2017-08-28 Thread Sukadev Bhattiprolu
Power9 introduces a hardware subsystem referred to as the Virtual Accelerator Switchboard (VAS). VAS allows kernel subsystems and user space processes to directly access the Nest Accelerator (NX) engines which implement compression and encryption algorithms in the hardware. NX has been in Power pr

Re: [PATCH] powerpc/kernel: Change retrieval of pci_dn

2017-08-28 Thread Sam Bobroff
On Mon, Aug 28, 2017 at 11:05:03AM -0500, Bryant G. Ly wrote: > For a PCI device it's pci_dn can be retrieved from > pdev->dev.archdata.firmware_data, PCI_DN(devnode), or parent's list. > Thus, we should just use the generic function pci_get_pdn_by_devfn > to get the pci_dn. > > Signed-off-by: Bry

Re: [PATCH] KVM: PPC: Book3S HV: Protect updates to spapr_tce_tables list

2017-08-28 Thread David Gibson
On Mon, Aug 28, 2017 at 02:42:29PM +1000, Paul Mackerras wrote: > Al Viro pointed out that while one thread of a process is executing > in kvm_vm_ioctl_create_spapr_tce(), another thread could guess the > file descriptor returned by anon_inode_getfd() and close() it before > the first thread has ad

Pull request: scottwood/linux.git next

2017-08-28 Thread Scott Wood
The following changes since commit d1d0d5ffb3006eaf9b5f41c89fe801e032cbbfe4: powerpc/64: Optimise set/clear of CTRL[RUN] (runlatch) (2017-08-23 23:48:38 +1000) are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/scottwood/linux.git next for you to fetch ch

Re: [RFC PATCH v5 0/5] vfio-pci: Add support for mmapping MSI-X table

2017-08-28 Thread Alexey Kardashevskiy
On 21/08/17 12:47, Alexey Kardashevskiy wrote: > Folks, > > Ok, people did talk, exchanged ideas, lovely :) What happens now? Do I > repost this or go back to PCI bus flags or something else? Thanks. Anyone, any help? How do we proceed with this? Thanks. > > > > On 14/08/17 19:45, Alexey K

[PATCH v7 05/11] mm: defining memblock_virt_alloc_try_nid_raw

2017-08-28 Thread Pavel Tatashin
* A new variant of memblock_virt_alloc_* allocations: memblock_virt_alloc_try_nid_raw() - Does not zero the allocated memory - Does not panic if request cannot be satisfied * optimize early system hash allocations Clients can call alloc_large_system_hash() with flag: HASH_ZERO to specify

[PATCH v7 06/11] mm: zero struct pages during initialization

2017-08-28 Thread Pavel Tatashin
Add struct page zeroing as a part of initialization of other fields in __init_single_page(). This single thread performance collected on: Intel(R) Xeon(R) CPU E7-8895 v3 @ 2.60GHz with 1T of memory (268400646 pages in 8 nodes): BASEFIX sparse_init 11.244671

[PATCH v7 11/11] mm: stop zeroing memory during allocation in vmemmap

2017-08-28 Thread Pavel Tatashin
vmemmap_alloc_block() will no longer zero the block, so zero memory at its call sites for everything except struct pages. Struct page memory is zero'd by struct page initialization. Replace allocators in sprase-vmemmap to use the non-zeroing version. So, we will get the performance improvement by

[PATCH v7 03/11] mm: deferred_init_memmap improvements

2017-08-28 Thread Pavel Tatashin
This patch fixes two issues in deferred_init_memmap = In deferred_init_memmap() where all deferred struct pages are initialized we have a check like this: if (page->flags) { VM_BUG_ON(page_zone(page) != zone); goto free_range; } This way we are checking if the current deferre

[PATCH v7 08/11] mm: zero reserved and unavailable struct pages

2017-08-28 Thread Pavel Tatashin
Some memory is reserved but unavailable: not present in memblock.memory (because not backed by physical pages), but present in memblock.reserved. Such memory has backing struct pages, but they are not initialized by going through __init_single_page(). In some cases these struct pages are accessed

[PATCH v7 00/11] complete deferred page initialization

2017-08-28 Thread Pavel Tatashin
Changelog: v7 - v6 - Addressed comments from Michal Hocko - memblock_discard() patch was removed from this series and integrated separately - Fixed bug reported by kbuild test robot new patch: mm: zero reserved and unavailable struct pages - Removed patch x86/mm: reserve only exiting low page

[PATCH v7 09/11] x86/kasan: explicitly zero kasan shadow memory

2017-08-28 Thread Pavel Tatashin
To optimize the performance of struct page initialization, vmemmap_populate() will no longer zero memory. We must explicitly zero the memory that is allocated by vmemmap_populate() for kasan, as this memory does not go through struct page initialization path. Signed-off-by: Pavel Tatashin Review

[PATCH v7 01/11] x86/mm: setting fields in deferred pages

2017-08-28 Thread Pavel Tatashin
Without deferred struct page feature (CONFIG_DEFERRED_STRUCT_PAGE_INIT), flags and other fields in "struct page"es are never changed prior to first initializing struct pages by going through __init_single_page(). With deferred struct page feature enabled, however, we set fields in register_page_bo

[PATCH v7 04/11] sparc64: simplify vmemmap_populate

2017-08-28 Thread Pavel Tatashin
Remove duplicating code by using common functions vmemmap_pud_populate and vmemmap_pgd_populate. Signed-off-by: Pavel Tatashin Reviewed-by: Steven Sistare Reviewed-by: Daniel Jordan Reviewed-by: Bob Picco --- arch/sparc/mm/init_64.c | 23 ++- 1 file changed, 6 insertions(+

[PATCH v7 02/11] sparc64/mm: setting fields in deferred pages

2017-08-28 Thread Pavel Tatashin
Without deferred struct page feature (CONFIG_DEFERRED_STRUCT_PAGE_INIT), flags and other fields in "struct page"es are never changed prior to first initializing struct pages by going through __init_single_page(). With deferred struct page feature enabled there is a case where we set some fields pr

[PATCH v7 07/11] sparc64: optimized struct page zeroing

2017-08-28 Thread Pavel Tatashin
Add an optimized mm_zero_struct_page(), so struct page's are zeroed without calling memset(). We do eight to ten regular stores based on the size of struct page. Compiler optimizes out the conditions of switch() statement. SPARC-M6 with 15T of memory, single thread performance:

[PATCH v7 10/11] arm64/kasan: explicitly zero kasan shadow memory

2017-08-28 Thread Pavel Tatashin
To optimize the performance of struct page initialization, vmemmap_populate() will no longer zero memory. We must explicitly zero the memory that is allocated by vmemmap_populate() for kasan, as this memory does not go through struct page initialization path. Signed-off-by: Pavel Tatashin Review

Re: [PATCH v3 4/4] powerpc/64s: idle ESL=0 stop can avoid MSR and save/restore overhead

2017-08-28 Thread Nicholas Piggin
On Tue, 29 Aug 2017 10:20:48 +1000 Paul Mackerras wrote: > On Fri, Aug 25, 2017 at 02:30:36PM +1000, Nicholas Piggin wrote: > > When stop is executed with EC=ESL=0, it appears to execute like a > > normal instruction (resuming from NIP when woken by interrupt). > > So all the save/restore handlin

[PATCH V11 3/3] powerpc/vphn: Better integrate vphn source code

2017-08-28 Thread Michael Bringmann
powerpc/vphn: Reorganize source code in order to better distinguish the VPHN code from the NUMA code better, by moving relevant functions to appropriate files. Signed-off-by: Michael Bringmann --- arch/powerpc/include/asm/topology.h|6 arch/powerpc/mm/numa.c | 550 +---

[PATCH V11 2/3] powerpc/nodes: Ensure enough nodes avail for operations

2017-08-28 Thread Michael Bringmann
powerpc/nodes: On systems like PowerPC which allow 'hot-add' of CPU or memory resources, it may occur that the new resources are to be inserted into nodes that were not used for these resources at bootup. In the kernel, any node that is used must be defined and initialized at boot. This patch ext

[PATCH V11 1/3] powerpc/numa: Update CPU topology when VPHN enabled

2017-08-28 Thread Michael Bringmann
powerpc/numa: Correct the currently broken capability to set the topology for shared CPUs in LPARs. At boot time for shared CPU lpars, the topology for each shared CPU is set to node zero, however, this is now updated correctly using the Virtual Processor Home Node (VPHN) capabilities information

[PATCH V11 0/3] powerpc/dlpar: Correct display of hot-add/hot-remove CPUs and memory

2017-08-28 Thread Michael Bringmann
On Power systems with shared configurations of CPUs and memory, there are some issues with association of additional CPUs and memory to nodes when hot-adding resources. These patches address some of those problems. powerpc/numa: Correct the currently broken capability to set the topology for sha

Re: [PATCH v3 4/4] powerpc/64s: idle ESL=0 stop can avoid MSR and save/restore overhead

2017-08-28 Thread Paul Mackerras
On Fri, Aug 25, 2017 at 02:30:36PM +1000, Nicholas Piggin wrote: > When stop is executed with EC=ESL=0, it appears to execute like a > normal instruction (resuming from NIP when woken by interrupt). > So all the save/restore handling can be avoided completely. In > particular NV GPRs do not have to

Re: [PATCH v3 2/4] powerpc/64s: idle POWER9 can execute stop without a sync sequence

2017-08-28 Thread Paul Mackerras
On Fri, Aug 25, 2017 at 02:30:34PM +1000, Nicholas Piggin wrote: > Reviewed-by: Gautham R. Shenoy > Signed-off-by: Nicholas Piggin > --- > arch/powerpc/include/asm/cpuidle.h | 16 > arch/powerpc/kernel/idle_book3s.S | 26 -- > 2 files changed, 20 inserti

Re: [PATCH v3 3/4] powerpc/64s: idle POWER9 can execute stop in virtual mode

2017-08-28 Thread Paul Mackerras
On Fri, Aug 25, 2017 at 02:30:35PM +1000, Nicholas Piggin wrote: > The hardware can execute stop in any context, and KVM does not > require real mode because siblings do not share MMU state. This > saves a switch to real-mode when going idle. > > Acked-by: Gautham R. Shenoy > Signed-off-by: Nicho

Re: [PATCH v3 1/4] KVM: PPC: Book3S HV: POWER9 does not require secondary thread management

2017-08-28 Thread Paul Mackerras
On Fri, Aug 25, 2017 at 02:30:33PM +1000, Nicholas Piggin wrote: > POWER9 CPUs have independent MMU contexts per thread, so KVM does not > need to quiesce secondary threads, so the hwthread_req/hwthread_state > protocol does not have to be used. So patch it away on POWER9, and patch > away the bran

Re: [PATCH v4 0/7] Add RSS to DPAA 1.x Ethernet driver

2017-08-28 Thread David Miller
From: Madalin Bucur Date: Sun, 27 Aug 2017 16:13:36 +0300 > This patch set introduces Receive Side Scaling for the DPAA Ethernet > driver. Documentation is updated with details related to the new > feature and limitations that apply. > Added also a small fix. > > v2: removed a C++ style comment

Re: [PATCH V3 6/6] crypto/nx: Add P9 NX support for 842 compression engine

2017-08-28 Thread Michael Ellerman
Hi Haren, Some comments inline ... Haren Myneni writes: > diff --git a/drivers/crypto/nx/nx-842-powernv.c > b/drivers/crypto/nx/nx-842-powernv.c > index c0dd4c7e17d3..13089a0b9dfa 100644 > --- a/drivers/crypto/nx/nx-842-powernv.c > +++ b/drivers/crypto/nx/nx-842-powernv.c > @@ -32,6 +33,9 @@ M

Re: [PATCH] leds-PowerNV: Delete an error message for a failed memory allocation in powernv_led_create()

2017-08-28 Thread Jacek Anaszewski
Hi Markus, Thanks for the patch. On 08/27/2017 10:10 PM, SF Markus Elfring wrote: > From: Markus Elfring > Date: Sun, 27 Aug 2017 22:00:22 +0200 > > Omit an extra message for a memory allocation failure in this function. > > This issue was detected by using the Coccinelle software. > > Signed

[PATCH] powerpc/kernel: Change retrieval of pci_dn

2017-08-28 Thread Bryant G. Ly
For a PCI device it's pci_dn can be retrieved from pdev->dev.archdata.firmware_data, PCI_DN(devnode), or parent's list. Thus, we should just use the generic function pci_get_pdn_by_devfn to get the pci_dn. Signed-off-by: Bryant G. Ly --- arch/powerpc/kernel/rtas_pci.c | 30 ++

Re: [PATCH v2 14/20] mm: Provide speculative fault infrastructure

2017-08-28 Thread Andi Kleen
> That makes me extremely nervous... there could be all sort of > assumptions esp. in arch code about the fact that we never populate the > tree without the mm sem. > > We'd have to audit archs closely. Things like the page walk cache > flushing on power etc... Yes the whole thing is quite risky.

Re: [PATCH v2 14/20] mm: Provide speculative fault infrastructure

2017-08-28 Thread Benjamin Herrenschmidt
On Mon, 2017-08-28 at 11:37 +0200, Peter Zijlstra wrote: > > Doing all this job and just give up because we cannot allocate page tables > > looks very wasteful to me. > > > > Have you considered to look how we can hand over from speculative to > > non-speculative path without starting from scratch

Re: [PATCH 2/2] cxl: Enable global TLBIs for cxl contexts

2017-08-28 Thread Benjamin Herrenschmidt
On Mon, 2017-08-28 at 19:37 +0200, Frederic Barrat wrote: > Good point, I had missed the change. It looks like I now need to call > radix__flush_all_mm(), which I would have to export outside of > tlb-radix.c first. > > Any problem with having a flush_all_mm() to complement a flush_tlb_mm()? >

Re: [PATCH] tty: hvcs: make ktermios const

2017-08-28 Thread Tyrel Datwyler
On 08/28/2017 11:30 AM, Bhumika Goyal wrote: > Make this const as it is not modified anywhere. > > Signed-off-by: Bhumika Goyal Reviewed-by: Tyrel Datwyler

[PATCH] tty: hvcs: make ktermios const

2017-08-28 Thread Bhumika Goyal
Make this const as it is not modified anywhere. Signed-off-by: Bhumika Goyal --- drivers/tty/hvc/hvcs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/tty/hvc/hvcs.c b/drivers/tty/hvc/hvcs.c index 79cc5be..40adf86 100644 --- a/drivers/tty/hvc/hvcs.c +++ b/drivers/tty

Re: [PATCH 2/2] cxl: Enable global TLBIs for cxl contexts

2017-08-28 Thread Frederic Barrat
Le 28/08/2017 à 14:03, Benjamin Herrenschmidt a écrit : On Mon, 2017-08-28 at 10:47 +0200, Frederic Barrat wrote: Signed-off-by: Frederic Barrat diff --git a/arch/powerpc/include/asm/mmu_context.h b/arch/powerpc/include/asm/mmu_context.h index 309592589e30..6447c0df7ec4 100644 --- a/

Re: [PATCH V10 1/2] powerpc/numa: Update CPU topology when VPHN enabled

2017-08-28 Thread Nathan Fontenot
On 08/24/2017 05:07 PM, Michael Bringmann wrote: > > powerpc/numa: Correct the currently broken capability to set the > topology for shared CPUs in LPARs. At boot time for shared CPU > lpars, the topology for each shared CPU is set to node zero, however, > this is now updated correctly using the

Re: [RESEND PATCH v5 00/16] eeprom: at24: Add OF device ID table

2017-08-28 Thread Wolfram Sang
> > But there is a dependency, no? If I apply the driver patch, > > non-converted device trees will not find their eeproms anymore. So, I > > I don't think that's correct. If you apply this patch before the DTS > changes, the driver will still match using the I2C device ID table > like it has bee

Re: [1/1] powerpc/traps : Updated MC for E6500 L1D cache err

2017-08-28 Thread Matthew Weber
All, On Wed, Jun 28, 2017 at 11:30 AM, Matthew Weber wrote: > Scott, > > On Sun, Apr 30, 2017 at 2:01 AM, Scott Wood wrote: >> On Thu, Apr 27, 2017 at 12:59:40PM -0500, Matt Weber wrote: >>> This patch updates the machine check handler of Linux kernel to >>> handle the e6500 architecture case. I

Re: [PATCH] powerpc/powernv: Turn on SCSI_AACRAID in powernv_defconfig

2017-08-28 Thread Guilherme G. Piccoli
On 08/28/2017 02:56 AM, Michael Ellerman wrote: > Some Power9 boxes will have this adapter installed, so add it to the > defconfig so we can boot on those machines without an initrd. Michael, not sure if this affects Petitboot (I know it has its own default config files), but in the past we had so

Linux 4.13: Reported regressions as of Monday, 2017-08-28

2017-08-28 Thread Thorsten Leemhuis
Hi! Find below my fourth regression report for Linux 4.13. It lists 6 regressions I'm currently aware of. 1 of them is new, 5 got fixed since the last report (that was two weeks ago; didn't find time for compiling one last week; sorry). You can also find the report at http://bit.ly/lnxregrep413 whe

Re: [PATCH 2/2] cxl: Enable global TLBIs for cxl contexts

2017-08-28 Thread Benjamin Herrenschmidt
On Mon, 2017-08-28 at 10:47 +0200, Frederic Barrat wrote: > > > Signed-off-by: Frederic Barrat > diff --git a/arch/powerpc/include/asm/mmu_context.h > b/arch/powerpc/include/asm/mmu_context.h > index 309592589e30..6447c0df7ec4 100644 > --- a/arch/powerpc/include/asm/mmu_context.h > +++ b/ar

Re: [PATCH v3 1/4] KVM: PPC: Book3S HV: POWER9 does not require secondary thread management

2017-08-28 Thread Michael Ellerman
Nicholas Piggin writes: > POWER9 CPUs have independent MMU contexts per thread, so KVM does not > need to quiesce secondary threads, so the hwthread_req/hwthread_state > protocol does not have to be used. So patch it away on POWER9, and patch > away the branch from the Linux idle wakeup to kvm_st

Re: [RFC Part1 PATCH v3 15/17] x86: Add support for changing memory encryption attribute in early boot

2017-08-28 Thread Brijesh Singh
Hi Boris, On 8/28/17 5:51 AM, Borislav Petkov wrote: [..] > +static int __init early_set_memory_enc_dec(resource_size_t paddr, >> + unsigned long size, bool enc) >> +{ >> +unsigned long vaddr, vaddr_end, vaddr_next; >> +unsigned long psize, pmask; >

Re: [PATCH v7 12/12] powerpc/vas: Define copy/paste interfaces

2017-08-28 Thread Michael Ellerman
Sukadev Bhattiprolu writes: > Michael Ellerman [m...@ellerman.id.au] wrote: >> Hi Suka, >> >> A few more things ... >> >> Sukadev Bhattiprolu writes: >> >> > diff --git a/arch/powerpc/platforms/powernv/copy-paste.h >> > b/arch/powerpc/platforms/powernv/copy-paste.h >> > new file mode 100644

Re: [PATCH v7 10/12] powerpc/vas: Define vas_win_close() interface

2017-08-28 Thread Michael Ellerman
Sukadev Bhattiprolu writes: > Michael Ellerman [m...@ellerman.id.au] wrote: >> Sukadev Bhattiprolu writes: >> > diff --git a/arch/powerpc/platforms/powernv/vas-window.c >> > b/arch/powerpc/platforms/powernv/vas-window.c >> > index 2dd4b63..24288dd 100644 >> > --- a/arch/powerpc/platforms/powern

Re: Re: [PATCH] fix memory leak on kvm_vm_ioctl_create_spapr_tce

2017-08-28 Thread Michael Ellerman
Al Viro writes: > On Mon, Aug 28, 2017 at 02:38:37PM +1000, Paul Mackerras wrote: >> On Sun, Aug 27, 2017 at 10:02:20PM +0100, Al Viro wrote: >> > On Wed, Aug 23, 2017 at 04:06:24PM +1000, Paul Mackerras wrote: >> > >> > > It seems to me that it would be better to do the anon_inode_getfd() >> >

Re: [PATCH] powerpc/44x: mask and shift to zero bug

2017-08-28 Thread Michael Ellerman
Dan Carpenter writes: > On Sun, Aug 27, 2017 at 02:56:31PM +1000, Benjamin Herrenschmidt wrote: >> On Fri, 2017-08-25 at 13:33 +0300, Dan Carpenter wrote: >> > My static checker complains that 0x1800 >> 13 is zero. Looking at >> > the context, it seems like a copy and paste bug from the line

Re: [linux-next][ppc] kernel hung when running trinity fuzzer

2017-08-28 Thread Kirill Tkhai
On 28.08.2017 13:28, Abdul Haleem wrote: > Hi, > > offlate we are seeing hung task call traces when running trinity fuzzer > test. kernel go hung and requires machine reboot. > > Machine Type : Power 8 > Kernel : 4.13.0-rc6-next-20170825 > config: Tul-VM-config > > > call traces: >

Re: [RFC Part1 PATCH v3 15/17] x86: Add support for changing memory encryption attribute in early boot

2017-08-28 Thread Borislav Petkov
On Mon, Jul 24, 2017 at 02:07:55PM -0500, Brijesh Singh wrote: > Some KVM-specific custom MSRs shares the guest physical address with s/shares/share/ > hypervisor. "the hypervisor." > When SEV is active, the shared physical address must be mapped > with encryption attribute cleared so that both

Re: [PATCH] leds-PowerNV: Delete an error message for a failed memory allocation in powernv_led_create()

2017-08-28 Thread Pavel Machek
On Sun 2017-08-27 22:10:08, SF Markus Elfring wrote: > From: Markus Elfring > Date: Sun, 27 Aug 2017 22:00:22 +0200 > > Omit an extra message for a memory allocation failure in this function. > > This issue was detected by using the Coccinelle software. > > Signed-off-by: Markus Elfring Acked

Re: [PATCH] cxl: Set the valid bit in PE for dedicated mode

2017-08-28 Thread Frederic Barrat
Le 28/08/2017 à 06:15, Vaibhav Jain a écrit : Make sure to set the valid-bit in software-state field of the populated PE. This was earlier missing for dedicated mode AFUs, hence was causing a PSL freeze when the AFU was activated. Signed-off-by: Vaibhav Jain --- Acked-by: Frederic Barrat

Re: [PATCH v2 14/20] mm: Provide speculative fault infrastructure

2017-08-28 Thread Peter Zijlstra
On Sun, Aug 27, 2017 at 03:18:23AM +0300, Kirill A. Shutemov wrote: > On Fri, Aug 18, 2017 at 12:05:13AM +0200, Laurent Dufour wrote: > > + /* > > +* Can't call vm_ops service has we don't know what they would do > > +* with the VMA. > > +* This include huge page from hugetlbfs. > > +

Re: [PATCH 1/2] cxl: Fix driver use count

2017-08-28 Thread Andrew Donnellan
On 28/08/17 18:47, Frederic Barrat wrote: cxl keeps a driver use count, which is used with the hash memory model on p8 to know when to upgrade local TLBIs to global and to trigger callbacks to manage the MMU for PSL8. If a process opens a context and closes without attaching or fails the attachm

Re: [PATCH v2] powerpc/mm/cxl: Add barrier when setting mm cpumask

2017-08-28 Thread Andrew Donnellan
On 28/08/17 18:35, Aneesh Kumar K.V wrote: We need to add memory barrier so that the page table walk doesn't happen before the cpumask is set and made visible to the other cpus. We need to use a sync here instead of lwsync because lwsync is not sufficient for store/load ordering. We also need to

Re: [PATCH] cxl: Set the valid bit in PE for dedicated mode

2017-08-28 Thread christophe lombard
Le 28/08/2017 à 06:15, Vaibhav Jain a écrit : Make sure to set the valid-bit in software-state field of the populated PE. This was earlier missing for dedicated mode AFUs, hence was causing a PSL freeze when the AFU was activated. Acked-by: Christophe Lombard Signed-off-by: Vaibhav Jain --

[PATCH 2/2] cxl: Enable global TLBIs for cxl contexts

2017-08-28 Thread Frederic Barrat
The PSL and nMMU need to see all TLB invalidations for the memory contexts used on the adapter. For the hash memory model, it is done by making all TLBIs global as soon as the cxl driver is in use. For radix, we need something similar, but we can refine and only convert to global the invalidations

[PATCH 1/2] cxl: Fix driver use count

2017-08-28 Thread Frederic Barrat
cxl keeps a driver use count, which is used with the hash memory model on p8 to know when to upgrade local TLBIs to global and to trigger callbacks to manage the MMU for PSL8. If a process opens a context and closes without attaching or fails the attachment, the driver use count is never decrement

Re: [PATCH] powerpc/44x: mask and shift to zero bug

2017-08-28 Thread Dan Carpenter
On Mon, Aug 28, 2017 at 10:57:05AM +0300, Dan Carpenter wrote: > I sent this email during kernel summit and neither of us could send a > patch at the time and we both problem forgot. I definitely forgot. > s/problem/probably/... I suck at email. :( regards, dan carpenter

[PATCH v2] powerpc/mm/cxl: Add barrier when setting mm cpumask

2017-08-28 Thread Aneesh Kumar K.V
We need to add memory barrier so that the page table walk doesn't happen before the cpumask is set and made visible to the other cpus. We need to use a sync here instead of lwsync because lwsync is not sufficient for store/load ordering. We also need to add an if (mm) check so that we do the right

Re: [PATCH] powerpc/mm/cxl: Add barrier when setting mm cpumask

2017-08-28 Thread Benjamin Herrenschmidt
On Mon, 2017-08-28 at 13:23 +0530, Aneesh Kumar K.V wrote: > Benjamin Herrenschmidt writes: > > > On Mon, 2017-08-28 at 11:55 +0530, Aneesh Kumar K.V wrote: > > > We need to add memory barrier so that the page table walk doesn't happen > > > before the cpumask is set and made visible to the other

Re: [PATCH] powerpc/44x: mask and shift to zero bug

2017-08-28 Thread Dan Carpenter
On Sun, Aug 27, 2017 at 02:56:31PM +1000, Benjamin Herrenschmidt wrote: > On Fri, 2017-08-25 at 13:33 +0300, Dan Carpenter wrote: > > My static checker complains that 0x1800 >> 13 is zero. Looking at > > the context, it seems like a copy and paste bug from the line below and > > probably 0x3 <

Re: [PATCH] powerpc/mm/cxl: Add barrier when setting mm cpumask

2017-08-28 Thread Aneesh Kumar K.V
Benjamin Herrenschmidt writes: > On Mon, 2017-08-28 at 11:55 +0530, Aneesh Kumar K.V wrote: >> We need to add memory barrier so that the page table walk doesn't happen >> before the cpumask is set and made visible to the other cpus. We need >> to use a sync here instead of lwsync because lwsync i

[PATCH resend] powerpc/vdso64: Add support for CLOCK_{REALTIME/MONOTONIC}_COARSE

2017-08-28 Thread Santosh Sivaraj
Current vDSO64 implementation does not have support for coarse clocks (CLOCK_MONOTONIC_COARSE, CLOCK_REALTIME_COARSE), for which it falls back to system call, increasing the response time, vDSO implementation reduces the cycle time. Below is a benchmark of the difference in execution time with and