Re: [PATCH] powerpc/pasemi/nemo: Fix low memory values for boot.

2017-01-22 Thread Michael Ellerman
Darren Stevens writes: > Commit 5c0484e25ec0 ('powerpc: Endian safe trampoline') added a > macro 'FIXUP_ENDIAN' to head_64.S. The CFE on Nemo has a bug > that shows up when this is included, the system hangs right after > printing the initial memory map, before the CPU's are started. > > Clearin

Query regarding randomization bits for a ASLR elf on PPC64

2017-01-22 Thread Bhupesh Sharma
Hi Experts, I was recently looking at ways to extend the randomization range for a ASLR elf on a PPC64LE system. I basically have been using 28-bits of randomization on x86_64 for an ASLR elf using appropriate ARCH_MMAP_RND_BITS_MIN and ARCH_MMAP_RND_BITS_MAX values: http://lxr.free-electrons.co

Re: [PATCH 13/18] KVM: PPC: Book3S HV: Page table construction and page faults for radix guests

2017-01-22 Thread Paul Mackerras
On Mon, Jan 23, 2017 at 02:17:20PM +1100, Suraj Jitindar Singh wrote: > On Thu, 2017-01-12 at 20:07 +1100, Paul Mackerras wrote: > > This adds the code to construct the second-level ("partition-scoped" > > in > > architecturese) page tables for guests using the radix MMU.  Apart > > from > > the PG

Re: [PATCH 10/18] KVM: PPC: Book3S HV: Set process table for HPT guests on POWER9

2017-01-22 Thread Paul Mackerras
On Mon, Jan 23, 2017 at 01:39:27PM +1100, Suraj Jitindar Singh wrote: > On Thu, 2017-01-12 at 20:07 +1100, Paul Mackerras wrote: > > This adds the implementation of the KVM_PPC_CONFIGURE_V3_MMU ioctl > > for HPT guests on POWER9.  With this, we can return 1 for the > > KVM_CAP_PPC_MMU_HASH_V3 capab

Re: [PATCH 17/18] KVM: PPC: Book3S HV: Enable radix guest support

2017-01-22 Thread Suraj Jitindar Singh
On Thu, 2017-01-12 at 20:07 +1100, Paul Mackerras wrote: > This adds a few last pieces of the support for radix guests: > > * Implement the backends for the KVM_PPC_CONFIGURE_V3_MMU and >   KVM_PPC_GET_RMMU_INFO ioctls for radix guests > > * On POWER9, allow secondary threads to be on/off-lined w

Re: [PATCH 14/18] KVM: PPC: Book3S HV: MMU notifier callbacks for radix guests

2017-01-22 Thread Suraj Jitindar Singh
On Thu, 2017-01-12 at 20:07 +1100, Paul Mackerras wrote: > This adapts our implementations of the MMU notifier callbacks > (unmap_hva, unmap_hva_range, age_hva, test_age_hva, set_spte_hva) > to call radix functions when the guest is using radix.  These > implementations are much simpler than for HP

Re: [PATCH 13/18] KVM: PPC: Book3S HV: Page table construction and page faults for radix guests

2017-01-22 Thread Suraj Jitindar Singh
On Thu, 2017-01-12 at 20:07 +1100, Paul Mackerras wrote: > This adds the code to construct the second-level ("partition-scoped" > in > architecturese) page tables for guests using the radix MMU.  Apart > from > the PGD level, which is allocated when the guest is created, the rest > of the tree is a

Re: [PATCH 10/18] KVM: PPC: Book3S HV: Set process table for HPT guests on POWER9

2017-01-22 Thread Suraj Jitindar Singh
On Thu, 2017-01-12 at 20:07 +1100, Paul Mackerras wrote: > This adds the implementation of the KVM_PPC_CONFIGURE_V3_MMU ioctl > for HPT guests on POWER9.  With this, we can return 1 for the > KVM_CAP_PPC_MMU_HASH_V3 capability. > > Signed-off-by: Paul Mackerras > --- >  arch/powerpc/include/asm/k

[PATCH 3/3] powerpc/kernel: Fix unbalanced refcount on RTAS device node

2017-01-22 Thread Gavin Shan
The RTAS device-tree node's refcount has been increased by one in the function call of_find_node_by_name(), but it's missed to be decreased by one in the error path. It leads to unbalanced refcount on RTAS device-tree node. This fixes above issue by decreasing RTAS device-tree node's refcount in e

[PATCH 1/3] powerpc/kernel: Remove nested if statements in rtas_initialize()

2017-01-22 Thread Gavin Shan
This removes the unnecessary nested if statements in function rtas_initialize(), to simplify the code. No functional changes introduced. Signed-off-by: Gavin Shan --- arch/powerpc/kernel/rtas.c | 33 - 1 file changed, 16 insertions(+), 17 deletions(-) diff --git

[PATCH 0/3] powerpc/kernel: Simplify rtas_initialize()

2017-01-22 Thread Gavin Shan
This simplifies rtas_initialize(), no functional changes introduced: * PATCH[1/3] removes the unnecessary nested if statements. * PATCH[2/3] uses of_property_read_u32() instead of converting the property's data to target in CPU endian. * PATCH[3/3] decreases RTAS device-tree node's r

[PATCH 2/3] powerpc/kernel: Use of_property_read_u32() in rtas_initialize()

2017-01-22 Thread Gavin Shan
This uses of_property_read_u32() in rtas_initialize() so that we needn't explicitly care the CPU's endian. Signed-off-by: Gavin Shan --- arch/powerpc/kernel/rtas.c | 20 +--- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/arch/powerpc/kernel/rtas.c b/arch/powerpc/