Re: [PATCH kernel v4 08/10] KVM: PPC: Separate TCE validation from update

2017-02-09 Thread Alexey Kardashevskiy
On 10/02/17 15:50, David Gibson wrote: > On Fri, Feb 10, 2017 at 03:09:30PM +1100, Alexey Kardashevskiy wrote: >> On 10/02/17 14:07, David Gibson wrote: >>> On Thu, Feb 09, 2017 at 07:20:11PM +1100, Alexey Kardashevskiy wrote: On 09/02/17 14:51, David Gibson wrote: > On Tue, Feb 07, 2017

Re: [PATCH 1/3] kprobes: introduce weak variant of kprobe_exceptions_notify

2017-02-09 Thread Ingo Molnar
* Michael Ellerman wrote: > "Naveen N. Rao" writes: > > > kprobe_exceptions_notify() is not used on some of the architectures such > > as arm[64] and powerpc anymore. Introduce a weak variant for such > > architectures. > > I'll merge

Re: [PATCH] powerpc: Blacklist GCC 5.4 6.1 and 6.2

2017-02-09 Thread Christophe LEROY
Le 10/02/2017 à 06:31, Cyril Bur a écrit : A bug in the -02 optimisation of GCC 5.4 6.1 and 6.2 causes setup_command_line() to not pass the correct first argument to strcpy and therefore not actually copy the command_line. A workaround patch was proposed:

Re: [kernel-hardening] [PATCH v2 1/1] powerpc: mm: support ARCH_MMAP_RND_BITS

2017-02-09 Thread Bhupesh Sharma
Hi Michael, On Tue, Feb 7, 2017 at 7:57 AM, Michael Ellerman wrote: > Bhupesh Sharma writes: > >> powerpc: arch_mmap_rnd() uses hard-coded values, (23-PAGE_SHIFT) for >> 32-bit and (30-PAGE_SHIFT) for 64-bit, to generate the random offset >> for the

[PATCH] powerpc: Blacklist GCC 5.4 6.1 and 6.2

2017-02-09 Thread Cyril Bur
A bug in the -02 optimisation of GCC 5.4 6.1 and 6.2 causes setup_command_line() to not pass the correct first argument to strcpy and therefore not actually copy the command_line. A workaround patch was proposed: http://patchwork.ozlabs.org/patch/673130/ some discussion ensued. A GCC bug was

[PATCH 2/2] powerpc/mm/radix: rename _PAGE_LARGE to R_PAGE_LARGE

2017-02-09 Thread Aneesh Kumar K.V
This bit is only used by radix and it is nice to follow the naming style of having bit name start with H_/R_ depending on which translation mode they are used. No functional change in this patch. Signed-off-by: Aneesh Kumar K.V ---

[PATCH 1/2] powerpc/mm: Cleanup bits definition between hash and radix.

2017-02-09 Thread Aneesh Kumar K.V
Define everything based on bits present in pgtable.h. This will help in easily identifying overlapping bits between hash/radix. No functional change with this patch. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/book3s/64/hash-64k.h | 4

Re: [PATCH kernel v4 08/10] KVM: PPC: Separate TCE validation from update

2017-02-09 Thread David Gibson
On Fri, Feb 10, 2017 at 03:09:30PM +1100, Alexey Kardashevskiy wrote: > On 10/02/17 14:07, David Gibson wrote: > > On Thu, Feb 09, 2017 at 07:20:11PM +1100, Alexey Kardashevskiy wrote: > >> On 09/02/17 14:51, David Gibson wrote: > >>> On Tue, Feb 07, 2017 at 06:17:09PM +1100, Alexey Kardashevskiy

Re: [PATCH kernel v4 08/10] KVM: PPC: Separate TCE validation from update

2017-02-09 Thread Alexey Kardashevskiy
On 10/02/17 14:07, David Gibson wrote: > On Thu, Feb 09, 2017 at 07:20:11PM +1100, Alexey Kardashevskiy wrote: >> On 09/02/17 14:51, David Gibson wrote: >>> On Tue, Feb 07, 2017 at 06:17:09PM +1100, Alexey Kardashevskiy wrote: For the emulated devices it does not matter much if we get a

Re: [PATCH kernel v4 10/10] KVM: PPC: VFIO: Add in-kernel acceleration for VFIO

2017-02-09 Thread David Gibson
On Fri, Feb 10, 2017 at 01:50:31PM +1100, Alexey Kardashevskiy wrote: > On 09/02/17 17:41, David Gibson wrote: > > On Tue, Feb 07, 2017 at 06:17:11PM +1100, Alexey Kardashevskiy wrote: > >> This allows the host kernel to handle H_PUT_TCE, H_PUT_TCE_INDIRECT > >> and H_STUFF_TCE requests targeted

linux-next: manual merge of the kvm tree with the powerpc tree

2017-02-09 Thread Stephen Rothwell
Hi all, Today's linux-next merge of the kvm tree got a conflict in: arch/powerpc/kernel/exceptions-64s.S between commit: 1a6822d194c3 ("powerpc/64s: Use (start, size) rather than (start, end) for exception handlers") from the powerpc tree and commit: bc3551257af8 ("powerpc/64: Allow

linux-next: manual merge of the kvm tree with the powerpc tree

2017-02-09 Thread Stephen Rothwell
Hi all, Today's linux-next merge of the kvm tree got a conflict in: arch/powerpc/include/asm/head-64.h between commit: 852e5da99d15 ("powerpc/64s: Tidy up after exception handler rework") from the powerpc tree and commit: 7ede531773ea ("KVM: PPC: Book3S: Move 64-bit KVM interrupt

Re: [PATCH 1/3] kprobes: introduce weak variant of kprobe_exceptions_notify

2017-02-09 Thread Michael Ellerman
"Naveen N. Rao" writes: > kprobe_exceptions_notify() is not used on some of the architectures such > as arm[64] and powerpc anymore. Introduce a weak variant for such > architectures. I'll merge patch 1 & 3 via the powerpc tree for v4.11. You can then send

Re: [PATCH kernel v4 08/10] KVM: PPC: Separate TCE validation from update

2017-02-09 Thread David Gibson
On Thu, Feb 09, 2017 at 07:20:11PM +1100, Alexey Kardashevskiy wrote: > On 09/02/17 14:51, David Gibson wrote: > > On Tue, Feb 07, 2017 at 06:17:09PM +1100, Alexey Kardashevskiy wrote: > >> For the emulated devices it does not matter much if we get a broken TCE > >> half way handling a TCE list

Re: [PATCH kernel v4 10/10] KVM: PPC: VFIO: Add in-kernel acceleration for VFIO

2017-02-09 Thread Alexey Kardashevskiy
On 09/02/17 17:41, David Gibson wrote: > On Tue, Feb 07, 2017 at 06:17:11PM +1100, Alexey Kardashevskiy wrote: >> This allows the host kernel to handle H_PUT_TCE, H_PUT_TCE_INDIRECT >> and H_STUFF_TCE requests targeted an IOMMU TCE table used for VFIO >> without passing them to user space which

[PATCH] powerpc: Add a prototype for mcount() so it can be versioned

2017-02-09 Thread Michael Ellerman
Currently we get a warning that _mcount() can't be versioned: WARNING: EXPORT symbol "_mcount" [vmlinux] version generation failed, symbol will not be versioned. Add a prototype to asm-prototypes.h to fix it. The prototype is not really correct, mcount() is not a normal function, it has a

[PATCH] powerpc: Fix confusing help text for DISABLE_MPROFILE_KERNEL

2017-02-09 Thread Anton Blanchard
From: Anton Blanchard The final paragraph of the help text is reversed - we want to enable this option by default, and disable it if the toolchain has a working -mprofile-kernel. Signed-off-by: Anton Blanchard --- arch/powerpc/Kconfig | 4 ++-- 1 file

Re: [PATCH 2/2] soc/fsl/qe: get rid of immrbar_virt_to_phys()

2017-02-09 Thread Li Yang
On Tue, Feb 7, 2017 at 3:05 AM, Christophe Leroy wrote: > immrbar_virt_to_phys() is not used anymore > > Signed-off-by: Christophe Leroy Acked-by: Li Yang Regards, Leo

Re: [PATCH 1/2] net: ethernet: ucc_geth: fix MEM_PART_MURAM mode

2017-02-09 Thread Li Yang
On Tue, Feb 7, 2017 at 3:05 AM, Christophe Leroy wrote: > Since commit 5093bb965a163 ("powerpc/QE: switch to the cpm_muram > implementation"), muram area is not part of immrbar mapping anymore > so immrbar_virt_to_phys() is not usable anymore. > > Fixes: 5093bb965a163

RE: [PATCH] powerpc: Fix inconsistent of_node_to_nid EXPORT_SYMBOL handling

2017-02-09 Thread Shailendra Singh
Hi Michael, >>>Which was merged in May 2006. So the powerpc version has almost 10 years >>>precedence. Agreed but keeping the licensing consistent will help drivers making seamless use of it on all architectures. >>> But I guess it's a pretty boring API. So I'll merge this unless anyone else

Re: [PATCH] block: sed-opal: reduce stack size of ioctl handler

2017-02-09 Thread Arnd Bergmann
On Wed, Feb 8, 2017 at 11:12 PM, Scott Bauer wrote: > On Wed, Feb 08, 2017 at 02:58:28PM -0700, Scott Bauer wrote: >> Thank you for the report. We want to keep the function calls agnostic to >> userland. >> In the future we will have in-kernel callers and I don't want to

RE: [PATCH] block: sed-opal: reduce stack size of ioctl handler

2017-02-09 Thread David Laight
From: Arnd Bergmann > Sent: 08 February 2017 21:15 > > When CONFIG_KASAN is in use, the sed_ioctl function uses unusually large > stack, > as each possible ioctl argument gets its own stack area plus redzone: Why not do a single copy_from_user() at the top of sed_ioctl() based on the _IOC_DIR()

Re: "Unable to handle kernel paging request for instruction fetch" on P4080

2017-02-09 Thread Laurentiu Tudor
Hi Thomas, On 02/01/2017 11:46 AM, Thomas De Schampheleire wrote: > On Wed, Jan 25, 2017 at 10:46 AM, Thomas De Schampheleire > wrote: >> Hi, >> >> We are experiencing kernel panics of the type "Unable to handle kernel paging >> request for instruction fetch" but are

Re: [2/2] powerpc/powernv: Properly set "host-ipi" on IPIs

2017-02-09 Thread Michael Ellerman
On Tue, 2017-02-07 at 00:35:36 UTC, Benjamin Herrenschmidt wrote: > Otherwise KVM will fail to pass them through to the host > > Signed-off-by: Benjamin Herrenschmidt Applied to powerpc fixes, thanks. https://git.kernel.org/powerpc/c/f83e6862047e1e371bdc5d512dd6ca

Re: [1/2] powerpc/powernv: Fix CPU hotplug to handle waking on HVI

2017-02-09 Thread Michael Ellerman
On Tue, 2017-02-07 at 00:35:31 UTC, Benjamin Herrenschmidt wrote: > The IPIs come in as HVI not EE, so we need to test the appropriate > SRR1 bits. The encoding is such that it won't have false positives > on P7 and P8 so we can just test it like that. We also need to handle > the icp-opal variant

Re: powerpc/mm/radix: Update ERAT flushes when invalidating TLB

2017-02-09 Thread Michael Ellerman
On Mon, 2017-02-06 at 02:05:16 UTC, Benjamin Herrenschmidt wrote: > Three tiny changes to the ERAT flushing logic: First don't make > it depend on DD1. It hasn't been decided yet but we might run > DD2 in a mode that also requires explicit flushes for performance > reasons so make it

Re: powerpc/mm: Fix spurrious segfaults on radix with Autonuma

2017-02-09 Thread Michael Ellerman
On Fri, 2017-02-03 at 06:10:28 UTC, Benjamin Herrenschmidt wrote: > When autonuma marks a PTE inaccessible it clears all the protection > bits but leave the PTE valid. > > With the Radix MMU, an attempt at executing from such a PTE will > take a fault with bit 35 of SRR1 set "SRR1_ISI_N_OR_G". >

Re: [v2] powerpc/opal-irqchip: Use interrupt names if present

2017-02-09 Thread Michael Ellerman
On Wed, 2017-02-08 at 05:33:32 UTC, Michael Ellerman wrote: > From: Benjamin Herrenschmidt > > Recent versions of OPAL can provide names for the various OPAL interrupts, > so let's use them. This also modernises the code that fetches the > interrupt array to use the

Re: powerpc/opal-lpc: Remove unneeded include

2017-02-09 Thread Michael Ellerman
On Tue, 2017-02-07 at 00:37:28 UTC, Benjamin Herrenschmidt wrote: > We don't need asm/xics.h > > Signed-off-by: Benjamin Herrenschmidt Applied to powerpc next, thanks. https://git.kernel.org/powerpc/c/86f7ce4b4751aaf51ebcff6dc21e38 cheers

Re: powerpc/mm: Add MMU_FTR_KERNEL_RO to possible feature mask

2017-02-09 Thread Michael Ellerman
On Mon, 2017-02-06 at 18:39:27 UTC, "Aneesh Kumar K.V" wrote: > Without this we will always find the feature disabled > > Fixes: 984d7a1ec6 ("powerpc/mm: Fixup kernel read only mapping") > Signed-off-by: Aneesh Kumar K.V > Acked-by: Balbir Singh

Re: [1/2] powerpc/powernv: Add XHCI and USB storage to defconfig

2017-02-09 Thread Michael Ellerman
On Mon, 2017-02-06 at 02:55:43 UTC, Michael Neuling wrote: > These are common on bare metal machines, so put them in the defconfig. > > This adds 216KB to the vmlinux size > > Signed-off-by: Michael Neuling Applied to powerpc next, thanks.

Re: Documentation: powerpc/fsl: Update compatible for l2cache binding

2017-02-09 Thread Michael Ellerman
On Fri, 2017-02-03 at 00:43:16 UTC, Chris Packham wrote: > List all the current valid compatible strings for the l2cache binding. > This should stop checkpatch.pl from complaining and will hopefully save > someone from having to debug a typo in their dts. > > Signed-off-by: Chris Packham

Re: [2/2] powerpc/powernv: Add more BPF in defconfig

2017-02-09 Thread Michael Ellerman
On Tue, 2017-02-07 at 18:06:41 UTC, "Naveen N. Rao" wrote: > On 2017/02/07 10:00PM, Michael Ellerman wrote: > > > > I'll mush the patches all together and turn them all on across > > pseries/ppc64/powernv. > > Here's a version that does that. I have merged all the patches > (including

Re: [RESEND,01/10] via-cuda: Cleanup printk calls

2017-02-09 Thread Michael Ellerman
On Sun, 2017-01-01 at 00:56:26 UTC, Finn Thain wrote: > Add missing log message severity, remove old debug messages and > replace printk() loop with print_hex_dump() call. > > Tested-by: Stan Johnson > Signed-off-by: Finn Thain Series applied to

Re: [RFC] powerpc/64s: use start, size rather than start, end for exception handlers

2017-02-09 Thread Michael Ellerman
On Tue, 2016-12-06 at 01:41:12 UTC, Nicholas Piggin wrote: > start,size has the benefit of being easier to search for (start,end > usually gives you the preceeding vector from the one you want, as first > result). > > Suggested-by: Benjamin Herrenschmidt >

Re: powerpc/64s: tidy up after exception handler rework

2017-02-09 Thread Michael Ellerman
On Tue, 2016-12-06 at 01:40:15 UTC, Nicholas Piggin wrote: > Somewhere along the line, search/replace left some naming garbled, > and untidy alignment. Might as well fix them all up now while git > blame history doesn't extend too far. > > Signed-off-by: Nicholas Piggin

Re: powernv/hmi: Display the correct error info for CAPP errors.

2017-02-09 Thread Michael Ellerman
On Wed, 2016-11-16 at 05:28:02 UTC, Mahesh Salgaonkar wrote: > From: Mahesh Salgaonkar > > On some CAPP errors we see console messages that prints unknown HMIs for > which CAPI recovery is in progress. This patch fixes this by printing > correct error info for HMI

Re: [PATCH] powerpc: Fix inconsistent of_node_to_nid EXPORT_SYMBOL handling

2017-02-09 Thread Michael Ellerman
Shailendra Singh writes: > The generic implementation of of_node_to_nid is EXPORT_SYMBOL. True. Added in 298535c00a2c, in April 2016. > The powerpc implementation added by following commit is EXPORT_SYMBOL_GPL. > commit 953039c8df7b ("[PATCH] powerpc: Allow devices to

Re: linux-next: manual merge of the kvm-ppc tree with the powerpc tree

2017-02-09 Thread Michael Ellerman
Stephen Rothwell writes: > Hi Paul, > > Today's linux-next merge of the kvm-ppc tree got conflicts in: > > arch/powerpc/include/asm/opal.h > arch/powerpc/platforms/powernv/opal-wrappers.S > > between commit: > > 1d0761d2557d ("powerpc/powernv: Initialise nest mmu") >

Re: [PATCH 1/2] net: ethernet: ucc_geth: fix MEM_PART_MURAM mode

2017-02-09 Thread Christophe LEROY
Acked-by: David S. Miller Le 07/02/2017 à 10:05, Christophe Leroy a écrit : Since commit 5093bb965a163 ("powerpc/QE: switch to the cpm_muram implementation"), muram area is not part of immrbar mapping anymore so immrbar_virt_to_phys() is not usable anymore. Fixes:

Re: [PATCH v4 13/15] livepatch: change to a per-task consistency model

2017-02-09 Thread Petr Mladek
On Wed 2017-02-08 10:46:36, Josh Poimboeuf wrote: > On Wed, Feb 08, 2017 at 04:47:50PM +0100, Petr Mladek wrote: > > > Notice in this case that klp_target_state is KLP_PATCHED. Which means > > > that klp_complete_transition() would not call synchronize_rcu() at the > > > right time, nor would it

Re: [PATCH kernel v4 10/10] KVM: PPC: VFIO: Add in-kernel acceleration for VFIO

2017-02-09 Thread David Gibson
On Tue, Feb 07, 2017 at 06:17:11PM +1100, Alexey Kardashevskiy wrote: > This allows the host kernel to handle H_PUT_TCE, H_PUT_TCE_INDIRECT > and H_STUFF_TCE requests targeted an IOMMU TCE table used for VFIO > without passing them to user space which saves time on switching > to user space and

[PATCH 5/5] selftests/powerpc: Fix remaining fallout from recent changes

2017-02-09 Thread Michael Ellerman
In benchmarks we need to use $(TEST_GEN_PROGS) after we include lib.mk, because lib.mk does the substitution to add $(OUTPUT). In math the vmx and fpu names were typoed so they no longer matched correctly, put back the 'v' and 'f'. In tm we need to substitute $(OUTPUT) into

[PATCH 4/5] selftests/powerpc: Fix the clean rule since recent changes

2017-02-09 Thread Michael Ellerman
The clean rule is broken for the powerpc tests: make[1]: Entering directory 'tools/testing/selftests/powerpc' Makefile:63: warning: overriding recipe for target 'clean' ../lib.mk:51: warning: ignoring old recipe for target 'clean' /bin/sh: 3: Syntax error: end of file unexpected

[PATCH 3/5] selftests: Fix the .S and .S -> .o rules

2017-02-09 Thread Michael Ellerman
Both these rules incorrectly use $< (first prerequisite) rather than $^ (all prerequisites), meaning they don't work if we're using more than one .S file as input. Switch them to using $^. They also don't include $(CPPFLAGS) and other variables used in the default rules, which breaks targets that

[PATCH 2/5] selftests: Fix the .c linking rule

2017-02-09 Thread Michael Ellerman
Currently we can't build some tests, for example: $ make -C tools/testing/selftests/ TARGETS=vm ... gcc -Wall -I ../../../../usr/include -lrt -lpthread ../../../../usr/include/linux/kernel.h userfaultfd.c -o tools/testing/selftests/vm/userfaultfd /tmp/ccmOkQSM.o: In function `stress':

[PATCH 1/5] selftests: Fix selftests build to just build, not run tests

2017-02-09 Thread Michael Ellerman
In commit 88baa78d1f31 ("selftests: remove duplicated all and clean target"), the "all" target was removed from individual Makefiles and added to lib.mk. However the "all" target was added to lib.mk *after* the existing "runtests" target. This means "runtests" becomes the first (default) target

Re: [PATCH kernel v4 08/10] KVM: PPC: Separate TCE validation from update

2017-02-09 Thread Alexey Kardashevskiy
On 09/02/17 14:51, David Gibson wrote: > On Tue, Feb 07, 2017 at 06:17:09PM +1100, Alexey Kardashevskiy wrote: >> For the emulated devices it does not matter much if we get a broken TCE >> half way handling a TCE list but for VFIO it will matter as it has >> more chances to fail so we try to do