Re: [PATCH 0/2] powerpc/xive: fix CPU hot unplug

2017-10-02 Thread David Gibson
On Tue, Oct 03, 2017 at 08:24:07AM +0200, Cédric Le Goater wrote: > On 10/03/2017 05:36 AM, David Gibson wrote: > > On Mon, Oct 02, 2017 at 06:27:20PM +0200, Cédric Le Goater wrote: > >> On 09/23/2017 10:26 AM, Cédric Le Goater wrote: > >>> Hi, > >>> > >>> Here are a couple of small fixes to suppor

Re: [patch V2 22/29] lockup_detector: Make watchdog_nmi_reconfigure() two stage

2017-10-02 Thread Thomas Gleixner
On Tue, 3 Oct 2017, Michael Ellerman wrote: > Hi Thomas, > Unfortunately this is hitting the WARN_ON in start_wd_cpu() on powerpc > because we're calling it multiple times for the boot CPU. > > The first call is via: > > start_wd_on_cpu+0x80/0x2f0 > watchdog_nmi_reconfigure+0x124/0x170 > so

Re: [PATCH 0/2] powerpc/xive: fix CPU hot unplug

2017-10-02 Thread Cédric Le Goater
On 10/03/2017 05:36 AM, David Gibson wrote: > On Mon, Oct 02, 2017 at 06:27:20PM +0200, Cédric Le Goater wrote: >> On 09/23/2017 10:26 AM, Cédric Le Goater wrote: >>> Hi, >>> >>> Here are a couple of small fixes to support CPU hot unplug. There are >>> still some issues to be investigated as, in so

[PATCH] kernel/module_64.c: Add REL24 relocation support of livepatch symbols

2017-10-02 Thread Kamalesh Babulal
With commit 425595a7fc20 ("livepatch: reuse module loader code to write relocations") livepatch uses module loader to write relocations of livepatch symbols, instead of managing them by arch-dependent klp_write_module_reloc() function. livepatch module managed relocation entries are written to sec

[PATCH v3] powerpc: fix compile error on 64K pages on 40x, 44x

2017-10-02 Thread Christian Lamparter
The mmu context on the 40x, 44x does not define pte_frag entry. This causes gcc abort the compilation due to: setup-common.c: In function ‘setup_arch’: setup-common.c:908: error: ‘mm_context_t’ has no ‘pte_frag’ This patch fixes the issue by removing the pte_frag initialization in setup-common.c.

Re: [PATCH v2] powerpc: fix compile error on 64K pages on 40x, 44x

2017-10-02 Thread Christian Lamparter
On Saturday, September 30, 2017 10:25:45 AM CEST christophe leroy wrote: > > Le 28/09/2017 à 20:32, Christian Lamparter a écrit : > > The mmu context on the 40x, 44x does not define pte_frag > > entry. This causes gcc abort the compilation due to: > > > > setup-common.c: In function ‘setup_arch’:

Re: [PATCH 0/2] powerpc/xive: fix CPU hot unplug

2017-10-02 Thread David Gibson
On Mon, Oct 02, 2017 at 06:27:20PM +0200, Cédric Le Goater wrote: > On 09/23/2017 10:26 AM, Cédric Le Goater wrote: > > Hi, > > > > Here are a couple of small fixes to support CPU hot unplug. There are > > still some issues to be investigated as, in some occasions, after a > > couple of plug and u

Re: [PATCH v3 00/20] Speculative page faults

2017-10-02 Thread Michael Ellerman
Laurent Dufour writes: > Hi Andrew, > > On 28/09/2017 22:38, Andrew Morton wrote: >> On Thu, 28 Sep 2017 14:29:02 +0200 Laurent Dufour >> wrote: >> Laurent's [0/n] provides some nice-looking performance benefits for workloads which are chosen to show performance benefits(!) but, alas

Re: [PATCH v2] KVM: PPC: Book3S PR: only install valid SLBs during KVM_SET_SREGS

2017-10-02 Thread David Gibson
On Mon, Oct 02, 2017 at 10:40:22AM +0200, Greg Kurz wrote: > Userland passes an array of 64 SLB descriptors to KVM_SET_SREGS, > some of which are valid (ie, SLB_ESID_V is set) and the rest are > likely all-zeroes (with QEMU at least). > > Each of them is then passed to kvmppc_mmu_book3s_64_slbmte(

Re: [patch V2 22/29] lockup_detector: Make watchdog_nmi_reconfigure() two stage

2017-10-02 Thread Michael Ellerman
Hi Thomas, Thomas Gleixner writes: > Both the perf reconfiguration and the powerpc watchdog_nmi_reconfigure() > need to be done in two steps. > > 1) Stop all NMIs > 2) Read the new parameters and start NMIs > > Right now watchdog_nmi_reconfigure() is a combination of both. To allow a >

Re: [PATCH] drivers: of: increase MAX_RESERVED_REGIONS to 32

2017-10-02 Thread Mauricio Faria de Oliveira
On 09/26/2017 05:40 AM, Stewart Smith wrote: The simple fix is to bump the length of the array to 32 which "should be enough for everyone(TM)". Tested-by: Mauricio Faria de Oliveira # uname -r 4.14.0-rc3 # dmesg [0.00] opal: OPAL detected ! [0.00] crashkernel: memory value ex

Re: [RFC GIT Pull] core watchdog sanitizing

2017-10-02 Thread Thomas Gleixner
On Mon, 2 Oct 2017, Don Zickus wrote: > On Mon, Oct 02, 2017 at 07:32:57PM +, Thomas Gleixner wrote: > > static void softlockup_reconfigure_threads(void) > > There is a second copy of , you will need to add identical locking there > too. Good catch, but then we might move it further out

Re: [RFC GIT Pull] core watchdog sanitizing

2017-10-02 Thread Don Zickus
On Mon, Oct 02, 2017 at 07:32:57PM +, Thomas Gleixner wrote: > On Mon, 2 Oct 2017, Linus Torvalds wrote: > > Side note: would it perhaps make sense to have that > > cpus_read_lock/unlock() sequence around the whole reconfiguration > > section? > > > > Because while looking at that sequence, it

Re: [PATCH] mm: fix RODATA_TEST failure "rodata_test: test data was not read only"

2017-10-02 Thread Kees Cook
On Mon, Oct 2, 2017 at 1:08 PM, Segher Boessenkool wrote: > On Mon, Oct 02, 2017 at 12:29:45PM -0700, Kees Cook wrote: >> On Mon, Sep 25, 2017 at 12:41 PM, Segher Boessenkool >> wrote: >> > On Mon, Sep 25, 2017 at 04:01:55PM +, David Laight wrote: >> >> From: Segher Boessenkool >> >> > The co

Re: [PATCH] mm: fix RODATA_TEST failure "rodata_test: test data was not read only"

2017-10-02 Thread Segher Boessenkool
On Mon, Oct 02, 2017 at 12:29:45PM -0700, Kees Cook wrote: > On Mon, Sep 25, 2017 at 12:41 PM, Segher Boessenkool > wrote: > > On Mon, Sep 25, 2017 at 04:01:55PM +, David Laight wrote: > >> From: Segher Boessenkool > >> > The compiler puts this item in .sdata, for 32-bit. There is no .srodata

Re: [RFC GIT Pull] core watchdog sanitizing

2017-10-02 Thread Thomas Gleixner
On Mon, 2 Oct 2017, Linus Torvalds wrote: > Side note: would it perhaps make sense to have that > cpus_read_lock/unlock() sequence around the whole reconfiguration > section? > > Because while looking at that sequence, it looks a bit odd to me that > cpu's can come and go in the middle of the nmi

Re: [PATCH] mm: fix RODATA_TEST failure "rodata_test: test data was not read only"

2017-10-02 Thread Kees Cook
On Mon, Sep 25, 2017 at 12:41 PM, Segher Boessenkool wrote: > On Mon, Sep 25, 2017 at 04:01:55PM +, David Laight wrote: >> From: Segher Boessenkool >> > The compiler puts this item in .sdata, for 32-bit. There is no .srodata, >> > so if it wants to use a small data section, it must use .sdata

Re: [RFC GIT Pull] core watchdog sanitizing

2017-10-02 Thread Linus Torvalds
On Mon, Oct 2, 2017 at 11:46 AM, Thomas Gleixner wrote: > > I agree that adding that 'run' argument was certainly not a piece of > art. Though I disagree with the sentiment that non-functional garbage is > preferrable over functionally correct code which merily contains a bad > implementation choi

Re: [RFC GIT Pull] core watchdog sanitizing

2017-10-02 Thread Thomas Gleixner
On Sun, 1 Oct 2017, Linus Torvalds wrote: > So get rid of that kind of shit, and I may reconsider. But as is, I > look at that patch and say "no, this is worse than the garbage it used > to be". I agree that adding that 'run' argument was certainly not a piece of art. Though I disagree with the se

Re: [PATCH 0/2] powerpc/xive: fix CPU hot unplug

2017-10-02 Thread Cédric Le Goater
On 10/02/2017 06:52 PM, Benjamin Herrenschmidt wrote: > On Mon, 2017-10-02 at 18:27 +0200, Cédric Le Goater wrote: >> On 09/23/2017 10:26 AM, Cédric Le Goater wrote: >>> Hi, >>> >>> Here are a couple of small fixes to support CPU hot unplug. There are >>> still some issues to be investigated as, in

Re: [PATCH 0/2] powerpc/xive: fix CPU hot unplug

2017-10-02 Thread Benjamin Herrenschmidt
On Mon, 2017-10-02 at 18:27 +0200, Cédric Le Goater wrote: > On 09/23/2017 10:26 AM, Cédric Le Goater wrote: > > Hi, > > > > Here are a couple of small fixes to support CPU hot unplug. There are > > still some issues to be investigated as, in some occasions, after a > > couple of plug and unplug,

Re: [PATCH 0/2] powerpc/xive: fix CPU hot unplug

2017-10-02 Thread Cédric Le Goater
On 09/23/2017 10:26 AM, Cédric Le Goater wrote: > Hi, > > Here are a couple of small fixes to support CPU hot unplug. There are > still some issues to be investigated as, in some occasions, after a > couple of plug and unplug, the cpu which was removed receives a 'lost' > interrupt. This showed to

[PATCH v2] KVM: PPC: Book3S PR: only install valid SLBs during KVM_SET_SREGS

2017-10-02 Thread Greg Kurz
Userland passes an array of 64 SLB descriptors to KVM_SET_SREGS, some of which are valid (ie, SLB_ESID_V is set) and the rest are likely all-zeroes (with QEMU at least). Each of them is then passed to kvmppc_mmu_book3s_64_slbmte(), which assumes to find the SLB index in the 3 lower bits of its rb

Re: [PATCH] powernv: Add OCC driver to mmap sensor area

2017-10-02 Thread Benjamin Herrenschmidt
On Mon, 2017-10-02 at 14:14 +1100, Stewart Smith wrote: > Shilpasri G Bhat writes: > > This driver provides interface to mmap the OCC sensor area > > to userspace to parse and read OCC inband sensors. > > Why? > > Is this for debug? If so, the existing exports interface should be used. > > If t

Re: [PATCH 1/1] KVM: PPC: Book3S: Fix server always zero from kvmppc_xive_get_xive()

2017-10-02 Thread David Gibson
On Thu, Sep 28, 2017 at 10:07:13AM +0200, Benjamin Herrenschmidt wrote: > On Thu, 2017-09-28 at 11:45 +1000, David Gibson wrote: > > On Tue, Sep 26, 2017 at 04:47:04PM +1000, Sam Bobroff wrote: > > > In KVM's XICS-on-XIVE emulation, kvmppc_xive_get_xive() returns the > > > value of state->guest_ser