Re: Linux 4.9: Reported regressions as of Sunday, 2016-10-30

2016-11-01 Thread Paul Bolle
On Sun, 2016-10-30 at 14:20 +0100, Thorsten Leemhuis wrote: > As always: Are you aware of any other regressions? Then please let me > know (simply CC regressi...@leemhuis.info). Do build regressions count? Because I was trying to fix an obscure build issue in arch/mips, choose a random configurat

Re: [PATCH v2 2/3] cpuidle:powernv: Add helper function to populate powernv idle states.

2016-11-01 Thread Oliver O'Halloran
On Thu, Oct 27, 2016 at 7:35 PM, Gautham R. Shenoy wrote: > From: "Gautham R. Shenoy" > > In the current code for powernv_add_idle_states, there is a lot of code > duplication while initializing an idle state in powernv_states table. > > Add an inline helper function to populate the powernv_state

Re: [Patch V6 2/6] irqchip: xilinx: Clean up irqdomain argument and read/write

2016-11-01 Thread Zubair Lutfullah Kakakhel
Hi, Thanks for the review. On 10/31/2016 07:51 PM, Thomas Gleixner wrote: On Mon, 31 Oct 2016, Zubair Lutfullah Kakakhel wrote: The drivers read/write function handling is a bit quirky. Can you please explain in more detail what's quirky and why it should be done differently, And the irqma

[TRIVIAL][PATCH] Fixup OOPS output

2016-11-01 Thread Balbir Singh
With recent update to printk, we get console output like below P O4.9.0-rc2-next-20161028-3-g23bf57759-dirty #125 c000ef5f4000 0001 P O (4.9.0-rc2-next-20161028-3-g23bf57759-dirty) 900010009033 < SF ,HV ,EE ,ME ,IR ,DR ,RI ,LE

[PATCH 0/3] Enable IAMR storage keys for radix

2016-11-01 Thread Balbir Singh
This series follows up on https://lists.ozlabs.org/pipermail/linuxppc-dev/2016-August/147840.html The first patch sets up AMOR in hypervisor mode. AMOR needs to be setup before IAMR (details of AMOR/IAMR in each patch). The second patch enables detection of exceptions generated due to instruction

[PATCH 1/3] Setup AMOR in HV mode

2016-11-01 Thread Balbir Singh
AMOR should be setup in HV mode, we set it up once and let the generic kernel handle IAMR. This patch is used to enable storage keys in a following patch as defined in ISA 3 Reported-by: Aneesh Kumar K.V Signed-off-by: Balbir Singh --- arch/powerpc/mm/pgtable-radix.c | 20

[PATCH 2/3] Detect instruction fetch denied and report

2016-11-01 Thread Balbir Singh
ISA 3 allows for prevention of instruction fetch and execution of user mode pages. If such an error occurs, SRR1 bit 35 reports the error. We catch and report the error in do_page_fault() Signed-off-by: Balbir Singh --- arch/powerpc/mm/fault.c | 4 1 file changed, 4 insertions(+) diff --gi

[PATCH 3/3] Enable storage keys for radix - user mode execution

2016-11-01 Thread Balbir Singh
ISA 3 defines new encoded access authority that allows instruction access prevention in privileged mode and allows normal access to problem state. This patch just enables IAMR (Instruction Authority Mask Register), enabling AMR would require more work. I've tested this with a buggy driver and a si

[PATCH 1/4] ibmebus: fix device reference leaks in sysfs interface

2016-11-01 Thread Johan Hovold
Make sure to drop any reference taken by bus_find_device() in the sysfs callbacks that are used to create and destroy devices based on device-tree entries. Fixes: 6bccf755ff53 ("[POWERPC] ibmebus: dynamic addition/removal...) Signed-off-by: Johan Hovold --- arch/powerpc/kernel/ibmebus.c | 8

[PATCH 2/4] ibmebus: fix further device reference leaks

2016-11-01 Thread Johan Hovold
Make sure to drop any reference taken by bus_find_device() when creating devices during init and driver registration. Fixes: 55347cc9962f ("[POWERPC] ibmebus: Add device creation...) Signed-off-by: Johan Hovold --- arch/powerpc/kernel/ibmebus.c | 8 ++-- 1 file changed, 6 insertions(+), 2 de

[PATCH 4/4] powerpc/pci: fix device reference leaks

2016-11-01 Thread Johan Hovold
Make sure to drop any device reference taken by vio_find_node() when adding and removing virtual I/O slots. Fixes: 5eeb8c63a38f ("[PATCH] PCI Hotplug: rpaphp: Move VIO...") Signed-off-by: Johan Hovold --- drivers/pci/hotplug/rpadlpar_core.c | 10 +- 1 file changed, 9 insertions(+), 1 del

[PATCH 3/4] powerpc/vio: clarify vio_find_node reference counting

2016-11-01 Thread Johan Hovold
Add comment clarifying that vio_find_node() takes a reference to the embedded struct device which needs to be dropped after use. Signed-off-by: Johan Hovold --- arch/powerpc/kernel/vio.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/powerpc/kernel/vio.c b/arch/powerpc/kernel/vio.c

[RFC v2 6/7] mm/powerpc: Use generic VDSO remap and unmap functions

2016-11-01 Thread Christopher Covington
The PowerPC VDSO remap and unmap code was copied to a generic location, only modifying the variable name expected in mm->context (vdso instead of vdso_base) to match most other architectures. Having adopted this generic naming, drop the code in arch/powerpc and use the generic version. Signed-off-

[RFC v2 5/7] powerpc: Rename context.vdso_base to context.vdso

2016-11-01 Thread Christopher Covington
Checkpoint/Restore In Userspace (CRIU) needs to be able to unmap and remap the VDSO to successfully checkpoint and restore applications in the face of changing VDSO addresses due to Address Space Layout Randomization (ASLR, randmaps). x86 and PowerPC have had architecture-specific code to support t

Re: [PATCH v2 2/3] cpuidle:powernv: Add helper function to populate powernv idle states.

2016-11-01 Thread Paul Mackerras
On Tue, Nov 01, 2016 at 07:32:58PM +1100, Oliver O'Halloran wrote: > On Thu, Oct 27, 2016 at 7:35 PM, Gautham R. Shenoy > wrote: > > From: "Gautham R. Shenoy" > > > > In the current code for powernv_add_idle_states, there is a lot of code > > duplication while initializing an idle state in powern

Re: [PATCH] cxl: Fix error handling

2016-11-01 Thread Jim Davis
On Sun, Oct 30, 2016 at 10:37 PM, Michael Ellerman wrote: > Christophe JAILLET writes: > >> 'cxl_dev_context_init()' returns an error pointer in case of error, not >> NULL. So test it with IS_ERR. >> >> Signed-off-by: Christophe JAILLET >> --- >> un-compiled because I don't have the required cr

Re: [PATCH kernel v4 4/4] powerpc/mm/iommu, vfio/spapr: Put pages on VFIO container shutdown

2016-11-01 Thread Alexey Kardashevskiy
On 31/10/16 15:23, David Gibson wrote: > On Mon, Oct 31, 2016 at 03:13:21PM +1100, Alexey Kardashevskiy wrote: >> On 31/10/16 14:13, David Gibson wrote: >>> On Tue, Oct 25, 2016 at 03:55:56PM +1100, Alexey Kardashevskiy wrote: On 25/10/16 15:44, David Gibson wrote: > On Mon, Oct 24, 2016 a

Re: [kernel-hardening] [PATCH] powerpc/kernel: Disable the latent entropy plugin unconditionally

2016-11-01 Thread Andrew Donnellan
On 27/06/16 01:34, Emese Revfy wrote: Reported-by: PaX Team Signed-off-by: Emese Revfy --- arch/powerpc/kernel/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/kernel/Makefile b/arch/powerpc/kernel/Makefile index 01935b8..e9ef44f 100644 --- a/arch/po

[PATCH v7 00/11] implement vcpu preempted check

2016-11-01 Thread Pan Xinhui
change from v6: fix typos and remove uncessary comments. change from v5: spilt x86/kvm patch into guest/host part. introduce kvm_write_guest_offset_cached. fix some typos. rebase patch onto 4.9.2 change from v4: spilt x86 kvm vcpu preempted check into

[PATCH v7 01/11] kernel/sched: introduce vcpu preempted check interface

2016-11-01 Thread Pan Xinhui
This patch support to fix lock holder preemption issue. For kernel users, we could use bool vcpu_is_preempted(int cpu) to detect if one vcpu is preempted or not. The default implementation is a macro defined by false. So compiler can wrap it out if arch dose not support such vcpu preempted check.

[PATCH v7 02/11] locking/osq: Drop the overload of osq_lock()

2016-11-01 Thread Pan Xinhui
An over-committed guest with more vCPUs than pCPUs has a heavy overload in osq_lock(). This is because vCPU A hold the osq lock and yield out, vCPU B wait per_cpu node->locked to be set. IOW, vCPU B wait vCPU A to run and unlock the osq lock. Kernel has an interface bool vcpu_is_preempted(int cpu

[PATCH v7 03/11] kernel/locking: Drop the overload of {mutex, rwsem}_spin_on_owner

2016-11-01 Thread Pan Xinhui
An over-committed guest with more vCPUs than pCPUs has a heavy overload in the two spin_on_owner. This blames on the lock holder preemption issue. Kernel has an interface bool vcpu_is_preempted(int cpu) to see if a vCPU is currently running or not. So break the spin loops on true condition. test-

[PATCH v7 04/11] powerpc/spinlock: support vcpu preempted check

2016-11-01 Thread Pan Xinhui
This is to fix some lock holder preemption issues. Some other locks implementation do a spin loop before acquiring the lock itself. Currently kernel has an interface of bool vcpu_is_preempted(int cpu). It takes the cpu as parameter and return true if the cpu is preempted. Then kernel can break the

[PATCH v7 05/11] s390/spinlock: Provide vcpu_is_preempted

2016-11-01 Thread Pan Xinhui
From: Christian Borntraeger this implements the s390 backend for commit "kernel/sched: introduce vcpu preempted check interface" by reworking the existing smp_vcpu_scheduled into arch_vcpu_is_preempted. We can then also get rid of the local cpu_is_preempted function by moving the CIF_ENABLED_WAIT

[PATCH v7 06/11] x86, paravirt: Add interface to support kvm/xen vcpu preempted check

2016-11-01 Thread Pan Xinhui
This is to fix some lock holder preemption issues. Some other locks implementation do a spin loop before acquiring the lock itself. Currently kernel has an interface of bool vcpu_is_preempted(int cpu). It takes the cpu as parameter and return true if the cpu is preempted. Then kernel can break the

[PATCH v7 07/11] KVM: Introduce kvm_write_guest_offset_cached

2016-11-01 Thread Pan Xinhui
It allows us to update some status or field of one struct partially. We can also save one kvm_read_guest_cached if we just update one filed of the struct regardless of its current value. Signed-off-by: Pan Xinhui Acked-by: Paolo Bonzini --- include/linux/kvm_host.h | 2 ++ virt/kvm/kvm_main.c

[PATCH v7 08/11] x86, kvm/x86.c: support vcpu preempted check

2016-11-01 Thread Pan Xinhui
Support the vcpu_is_preempted() functionality under KVM. This will enhance lock performance on overcommitted hosts (more runnable vcpus than physical cpus in the system) as doing busy waits for preempted vcpus will hurt system performance far worse than early yielding. Use one field of struct kvm_

[PATCH v7 09/11] x86, kernel/kvm.c: support vcpu preempted check

2016-11-01 Thread Pan Xinhui
Support the vcpu_is_preempted() functionality under KVM. This will enhance lock performance on overcommitted hosts (more runnable vcpus than physical cpus in the system) as doing busy waits for preempted vcpus will hurt system performance far worse than early yielding. struct kvm_steal_time::preem

[PATCH v7 10/11] x86, xen: support vcpu preempted check

2016-11-01 Thread Pan Xinhui
From: Juergen Gross Support the vcpu_is_preempted() functionality under Xen. This will enhance lock performance on overcommitted hosts (more runnable vcpus than physical cpus in the system) as doing busy waits for preempted vcpus will hurt system performance far worse than early yielding. A quic

[PATCH v7 11/11] Documentation: virtual: kvm: Support vcpu preempted check

2016-11-01 Thread Pan Xinhui
Commit ("x86, kvm: support vcpu preempted check") add one field "__u8 preempted" into struct kvm_steal_time. This field tells if one vcpu is running or not. It is zero if 1) some old KVM deos not support this filed. 2) the vcpu is not preempted. Other values means the vcpu has been preempted. Sig

[RFC] kexec_file: Add support for purgatory built as PIE

2016-11-01 Thread Thiago Jung Bauermann
Hello, The kexec_file code currently builds the purgatory as a partially linked object (using ld -r). Is there a particular reason to use that instead of a position independent executable (PIE)? I found a discussion from 2013 in the archives but from what I understood it was about the purgator

Re: [PATCH] powerpc/64s: relocation, register save fixes for system reset interrupt

2016-11-01 Thread Mahesh Jagannath Salgaonkar
On 10/13/2016 07:47 AM, Nicholas Piggin wrote: > This patch does a couple of things. First of all, powernv immediately > explodes when running a relocated kernel, because the system reset > exception for handling sleeps does not do correct relocated branches. > > Secondly, the sleep handling code

Re: [PATCH] powerpc/64s: relocation, register save fixes for system reset interrupt

2016-11-01 Thread Nicholas Piggin
On Wed, 2 Nov 2016 11:34:59 +0530 Mahesh Jagannath Salgaonkar wrote: > On 10/13/2016 07:47 AM, Nicholas Piggin wrote: > > This patch does a couple of things. First of all, powernv immediately > > explodes when running a relocated kernel, because the system reset > > exception for handling sleeps