Re: [PATCH v4 01/12] powerpc: Add #defs for paca->soft_enabled flags

2016-12-19 Thread Balbir Singh
+/* + * flags for paca->soft_enabled + */ +#define IRQ_DISABLE_MASK_NONE 1 +#define IRQ_DISABLE_MASK_LINUX 0 + Isn't one just the complement of the other? Balbir

Re: [RFC PATCH v7 0/3] PCI: Introduce a way to enforce all MMIO BARs not to share PAGE_SIZE

2016-12-19 Thread Alexey Kardashevskiy
On 01/12/16 13:32, Alexey Kardashevskiy wrote: > On 15/11/16 13:53, Yongji Xie wrote: >> Hi Bjorn, >> >> >> Kindly ping. What do you think of the way to fix the bug that resources's >> size is changed >> >> when using resource_alignment. Thanks. > > > Could anyone please comment on this? Thanks!

[PATCH kernel v3] KVM: PPC: Add in-kernel acceleration for VFIO

2016-12-19 Thread Alexey Kardashevskiy
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 back. This adds H_PUT_TCE/H_PUT_TCE_INDIRECT/H_STUFF_TCE handlers to KVM. KVM

[PATCH] drivers/pci/hotplug: Handle presence detection change properly

2016-12-19 Thread Gavin Shan
The surprise hotplug is driven by interrupt in PowerNV PCI hotplug driver. In the interrupt handler, pnv_php_interrupt(), we bail when pnv_pci_get_presence_state() returns zero wrongly. It causes the presence change event is always ignored incorrectly. This fixes the issue by bailing on error

[PATCH v3 6/6] powerpc/perf: IMC pmu cpumask and cpu hotplug support

2016-12-19 Thread Hemant Kumar
Adds cpumask attribute to be used by each IMC pmu. Only one cpu (any online CPU) from each chip for nest PMUs is designated to read counters. On CPU hotplug, dying CPU is checked to see whether it is one of the designated cpus, if yes, next online cpu from the same chip (for nest units) is

[PATCH v3 5/6] powerpc/perf: Generic imc pmu event functions

2016-12-19 Thread Hemant Kumar
Since, the IMC counters' data are periodically fed to a memory location, the functions to read/update, start/stop, add/del can be generic and can be used by all IMC PMU units. This patch adds a set of generic imc pmu related event functions to be used by each imc pmu unit. Add code to setup

[PATCH v3 4/6] powerpc/perf: Add event attribute and group to IMC pmus

2016-12-19 Thread Hemant Kumar
Device tree IMC driver code parses the IMC units and their events. It passes the information to IMC pmu code which is placed in powerpc/perf as "imc-pmu.c". This patch creates only event attributes and attribute groups for the IMC pmus. Cc: Madhavan Srinivasan Cc:

[PATCH v3 3/6] powerpc/powernv: Detect supported IMC units and its events

2016-12-19 Thread Hemant Kumar
Parse device tree to detect IMC units. Traverse through each IMC unit node to find supported events and corresponding unit/scale files (if any). Right now, only nest IMC units are supported. The nest IMC unit event node from device tree will contain the offset in the reserved memory region to get

[PATCH v3 2/6] powerpc/powernv: Autoload IMC device driver module

2016-12-19 Thread Hemant Kumar
This patch does three things : - Enables "opal.c" to create a platform device for the IMC interface according to the appropriate compatibility string. - Find the reserved-memory region details from the system device tree and get the base address of HOMER region address for each chip. - We

[PATCH v3 1/6] powerpc/powernv: Data structure and macros definitions

2016-12-19 Thread Hemant Kumar
Create new header file "imc-pmu.h" to add the data structures and macros needed for IMC pmu support. Cc: Madhavan Srinivasan Cc: Michael Ellerman Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Anton

[PATCH v3 0/6] IMC Instrumentation Support

2016-12-19 Thread Hemant Kumar
Power 9 has In-Memory-Collection (IMC) infrastructure which contains various Performance Monitoring Units (PMUs) at Nest level (these are on-chip but off-core). These Nest PMU counters are handled by a Nest IMC microcode. This microcode runs in the OCC (On-Chip Controller) complex and its purpose

Re: [PATCH v3 3/5] powerpc/mm: add radix__create_section_mapping()

2016-12-19 Thread Balbir Singh
+#ifdef CONFIG_MEMORY_HOTPLUG +int radix__create_section_mapping(unsigned long start, unsigned long end) +{ + unsigned long page_size = 1 << mmu_psize_defs[mmu_linear_psize].shift; Can we refactor bits from radix_init_pgtable() and reuse? Balbir

Re: a question about powervm

2016-12-19 Thread Benjamin Herrenschmidt
On Tue, 2016-12-20 at 11:30 +0800, Liu ping fan wrote: > Thank you for the explanation. And sorry not to explain my question > clearly. > I wonders about the mapping between guest-CPU and physical cpu. On > powerVM, except the feature exposed by host, it is 1:1 map right? No, not necessarily.

[PATCHv2 09/11] powerpc/kvm: Outline of KVM-HV HPT resizing implementation

2016-12-19 Thread David Gibson
This adds a not yet working outline of the HPT resizing PAPR extension. Specifically it adds the necessary ioctl() functions, their basic steps, the work function which will handle preparation for the resize, and synchronization between these, the guest page fault path and guest HPT update path.

[PATCHv2 08/11] powerpc/kvm: Create kvmppc_unmap_hpte_helper()

2016-12-19 Thread David Gibson
The kvm_unmap_rmapp() function, called from certain MMU notifiers, is used to force all guest mappings of a particular host page to be set ABSENT, and removed from the reverse mappings. For HPT resizing, we will have some cases where we want to set just a single guest HPTE ABSENT and remove its

[PATCHv2 11/11] powerpc/kvm: Advertise availablity of HPT resizing on KVM HV

2016-12-19 Thread David Gibson
This updates the KVM_CAP_SPAPR_RESIZE_HPT capability to advertise the presence of in-kernel HPT resizing on KVM HV. Signed-off-by: David Gibson --- arch/powerpc/kvm/powerpc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/powerpc/kvm/powerpc.c

[PATCHv2 05/11] powerpc/kvm: Don't store values derivable from HPT order

2016-12-19 Thread David Gibson
Currently the kvm_hpt_info structure stores the hashed page table's order, and also the number of HPTEs it contains and a mask for its size. The last two can be easily derived from the order, so remove them and just calculate them as necessary with a couple of helper inlines. Signed-off-by:

[PATCHv2 07/11] powerpc/kvm: Allow KVM_PPC_ALLOCATE_HTAB ioctl() to change HPT size

2016-12-19 Thread David Gibson
The KVM_PPC_ALLOCATE_HTAB ioctl() is used to set the size of hashed page table (HPT) that userspace expects a guest VM to have, and is also used to clear that HPT when necessary (e.g. guest reboot). At present, once the ioctl() is called for the first time, the HPT size can never be changed

[PATCHv2 10/11] powerpc/kvm: KVM-HV HPT resizing implementation

2016-12-19 Thread David Gibson
This adds the "guts" of the implementation for the HPT resizing PAPR extension. It has the code to allocate and clear a new HPT, rehash an existing HPT's entries into it, and accomplish the switchover for a KVM guest from the old HPT to the new one. Signed-off-by: David Gibson

[PATCHv2 06/11] powerpc/kvm: Split HPT allocation from activation

2016-12-19 Thread David Gibson
Currently, kvmppc_alloc_hpt() both allocates a new hashed page table (HPT) and sets it up as the active page table for a VM. For the upcoming HPT resize implementation we're going to want to allocate HPTs separately from activating them. So, split the allocation itself out into

[PATCHv2 02/11] powerpc/kvm: HPT resizing documentation and reserved numbers

2016-12-19 Thread David Gibson
This adds a new powerpc-specific KVM_CAP_SPAPR_RESIZE_HPT capability to advertise whether KVM is capable of handling the PAPR extensions for resizing the hashed page table during guest runtime. It also adds definitions for two new VM ioctl()s to implement this extension, and documentation of the

[PATCHv2 04/11] powerpc/kvm: Gather HPT related variables into sub-structure

2016-12-19 Thread David Gibson
Currently, the powerpc kvm_arch structure contains a number of variables tracking the state of the guest's hashed page table (HPT) in KVM HV. This patch gathers them all together into a single kvm_hpt_info substructure. This makes life more convenient for the upcoming HPT resizing implementation.

[PATCHv2 00/11] KVM implementation of PAPR HPT resizing extension

2016-12-19 Thread David Gibson
Here is the KVM implementation for the proposed PAPR extension which allows the runtime resizing of a PAPR guest's Hashed Page Table (HPT). Using this requires a guest kernel with support for the extension. Patches for guest side support in Linux were posted earlier:

[PATCHv2 03/11] powerpc/kvm: Rename kvm_alloc_hpt() for clarity

2016-12-19 Thread David Gibson
The difference between kvm_alloc_hpt() and kvmppc_alloc_hpt() is not at all obvious from the name. In practice kvmppc_alloc_hpt() allocates an HPT by whatever means, and calls kvm_alloc_hpt() which will attempt to allocate it with CMA only. To make this less confusing, rename kvm_alloc_hpt() to

[PATCHv2 01/11] Documentation: Correct duplicate section number in kvm/api.txt

2016-12-19 Thread David Gibson
Both KVM_CREATE_SPAPR_TCE_64 and KVM_REINJECT_CONTROL have section number 4.98 in Documentation/virtual/kvm/api.txt, presumably due to a naive merge. This corrects the duplication. Signed-off-by: David Gibson --- Documentation/virtual/kvm/api.txt | 2 +- 1 file

Re: [PATCH v3 2/5] powerpc/mm: refactor {create,remove}_section_mapping()

2016-12-19 Thread Balbir Singh
On 12/16/2016 06:50 AM, Reza Arbab wrote: Change {create,remove}_section_mapping() to be wrappers around functions prefixed with "hash__". This is preparation for the addition of their "radix__" variants. No functional change. Signed-off-by: Reza Arbab Acked-by:

[PATCH] tty: hvc_dcc: Add basic early_con support

2016-12-19 Thread Nishanth Menon
In some cases, earlycon can help catch errors with kernel boot prior to standard console is available. Example bootargs: console=hvc0 earlycon=hvcdcc Signed-off-by: Nishanth Menon <n...@ti.com> --- Based on: v4.9 tag Also applies on: next-20161219 Tested on Simulation environment (whi

Re: a question about powervm

2016-12-19 Thread Liu ping fan
On Mon, Dec 19, 2016 at 5:58 PM, Michal Suchanek wrote: > Hello, > > On 19 December 2016 at 10:09, Liu ping fan wrote: >> Hi guys, >> >> I am using a pSeries. It runs on powerVM. >> My question is whether the cpuX under /sys/devices/system/cpu >>

Re: [PATCH v4 12/12] powerpc: Rename soft_enabled to soft_disabled_mask

2016-12-19 Thread Nicholas Piggin
On Mon, 19 Dec 2016 13:37:08 +0530 Madhavan Srinivasan wrote: > Rename the paca->soft_enabled to paca->soft_disabled_mask as > it is no more used as a flag for interrupt state. > This makes it much more readable, thanks. I have a question which isn't part of this

Re: [PATCH v4 10/12] powerpc: Add new set of soft_enabled_ functions

2016-12-19 Thread Nicholas Piggin
On Mon, 19 Dec 2016 13:37:06 +0530 Madhavan Srinivasan wrote: > To support disabling and enabling of irq with PMI, set of > new powerpc_local_irq_pmu_save() and powerpc_local_irq_restore() > functions are added. And powerpc_local_irq_save() implemented, > by adding a

Re: [PATCH v4 07/12] powerpc: Add support to take additional parameter in MASKABLE_* macro

2016-12-19 Thread Nicholas Piggin
On Mon, 19 Dec 2016 13:37:03 +0530 Madhavan Srinivasan wrote: > To support addition of "bitmask" to MASKABLE_* macros, > factor out the EXCPETION_PROLOG_1 macro. > > Currently soft_enabled is used as the flag to determine > the interrupt state. Patch extends the

Re: [PATCH v3 1/5] powerpc/mm: set the radix linear page mapping size

2016-12-19 Thread Aneesh Kumar K.V
Benjamin Herrenschmidt writes: > On Mon, 2016-12-19 at 14:28 +0530, Aneesh Kumar K.V wrote: >> Reza Arbab writes: >> >> > This was defaulting to 4K, regardless of PAGE_SIZE. >> > >> > Signed-off-by: Reza Arbab >> >

Re: [PATCH 06/11] powerpc/kvm: Allow KVM_PPC_ALLOCATE_HTAB ioctl() to change HPT size

2016-12-19 Thread David Gibson
On Mon, Dec 19, 2016 at 08:49:24AM +0100, Thomas Huth wrote: > On 19.12.2016 01:48, David Gibson wrote: > > On Fri, Dec 16, 2016 at 01:44:57PM +0100, Thomas Huth wrote: > >> On 15.12.2016 06:53, David Gibson wrote: > >>> The KVM_PPC_ALLOCATE_HTAB ioctl() is used to set the size of hashed page >

Re: [PATCH kernel v2 10/11] vfio: Check for unregistered notifiers when group is actually released

2016-12-19 Thread Alexey Kardashevskiy
On 20/12/16 03:28, Alex Williamson wrote: > On Mon, 19 Dec 2016 18:41:05 +0800 > Jike Song wrote: > >> On 12/18/2016 09:28 AM, Alexey Kardashevskiy wrote: >>> This moves a check for unregistered notifiers from fops release >>> callback to the place where the group will

Re: [PATCH v3 4/5] powerpc/mm: add radix__remove_section_mapping()

2016-12-19 Thread Benjamin Herrenschmidt
On Mon, 2016-12-19 at 15:18 +0530, Aneesh Kumar K.V wrote: > > + pte = pte_start + pte_index(addr); > > + for (; addr < end; addr = next, pte++) { > > + next = (addr + PAGE_SIZE) & PAGE_MASK; > > + if (next > end) > > + next = end; > > + > > +

Re: [PATCH v3 1/5] powerpc/mm: set the radix linear page mapping size

2016-12-19 Thread Benjamin Herrenschmidt
On Mon, 2016-12-19 at 14:28 +0530, Aneesh Kumar K.V wrote: > Reza Arbab writes: > > > This was defaulting to 4K, regardless of PAGE_SIZE. > > > > Signed-off-by: Reza Arbab > > --- > >  arch/powerpc/mm/pgtable-radix.c | 2 ++ > >  1 file

Re: [PATCH kernel v2 10/11] vfio: Check for unregistered notifiers when group is actually released

2016-12-19 Thread Jike Song
On 12/18/2016 09:28 AM, Alexey Kardashevskiy wrote: > This moves a check for unregistered notifiers from fops release > callback to the place where the group will actually be released. > > Signed-off-by: Alexey Kardashevskiy > --- > > This is going to be used in the following

RE: [upstream-release] [PATCH net v3 2/4] powerpc: fsl/fman: remove fsl, fman from of_device_ids[]

2016-12-19 Thread Madalin-Cristian Bucur
> From: Scott Wood [mailto:o...@buserror.net] > Sent: Monday, December 19, 2016 9:46 PM > > On Mon, 2016-12-19 at 18:13 +0200, Madalin Bucur wrote: > > The fsl/fman drivers will use of_platform_populate() on all > > supported platforms. Call of_platform_populate() to probe the > > FMan sub-nodes.

[PATCH net v4 4/4] fsl/fman: enable compilation on ARM64

2016-12-19 Thread Madalin Bucur
Signed-off-by: Madalin Bucur --- drivers/net/ethernet/freescale/fman/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/freescale/fman/Kconfig b/drivers/net/ethernet/freescale/fman/Kconfig index 79b7c84..dc0850b 100644 ---

[PATCH net v4 3/4] fsl/fman: A007273 only applies to PPC SoCs

2016-12-19 Thread Madalin Bucur
Signed-off-by: Madalin Bucur Reviewed-by: Camelia Groza --- drivers/net/ethernet/freescale/fman/fman.c | 8 1 file changed, 8 insertions(+) diff --git a/drivers/net/ethernet/freescale/fman/fman.c

[PATCH net v4 2/4] powerpc: fsl/fman: remove fsl, fman from of_device_ids[]

2016-12-19 Thread Madalin Bucur
The fsl/fman drivers will use of_platform_populate() on all supported platforms. Call of_platform_populate() to probe the FMan sub-nodes. Signed-off-by: Igal Liberman Signed-off-by: Madalin Bucur Acked-by: Scott Wood ---

[PATCH net v4 1/4] fsl/fman: fix 1G support for QSGMII interfaces

2016-12-19 Thread Madalin Bucur
QSGMII ports were not advertising 1G speed. Signed-off-by: Madalin Bucur Reviewed-by: Camelia Groza --- drivers/net/ethernet/freescale/fman/mac.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/freescale/fman/mac.c

[PATCH net v4 0/4] fsl/fman: fixes for ARM

2016-12-19 Thread Madalin Bucur
The patch set fixes advertised speeds for QSGMII interfaces, disables A007273 erratum workaround on non-PowerPC platforms where it does not apply, enables compilation on ARM64 and addresses a probing issue on non PPC platforms. Changes from v3: removed redundant comment, added ack by Scott

Re: [upstream-release] [PATCH net v3 2/4] powerpc: fsl/fman: remove fsl, fman from of_device_ids[]

2016-12-19 Thread Scott Wood
On Mon, 2016-12-19 at 18:13 +0200, Madalin Bucur wrote: > The fsl/fman drivers will use of_platform_populate() on all > supported platforms. Call of_platform_populate() to probe the > FMan sub-nodes. > > Signed-off-by: Igal Liberman > Signed-off-by: Madalin Bucur

[PATCH 10/10] powerpc: xmon wait for secondaries before sending IPI

2016-12-19 Thread Nicholas Piggin
An externally triggered system reset (e.g., via QEMU nmi command, or pseries reset button) can cause system reset interrupts on all CPUs. In case this causes xmon to be entered, it is undesirable for the primary (first) CPU into xmon to trigger an NMI IPI to others, because this may cause a nested

[PATCH 09/10] powerpc/pseries: implement NMI IPI with H_SIGNAL_SYS_RESET

2016-12-19 Thread Nicholas Piggin
Signed-off-by: Nicholas Piggin --- arch/powerpc/platforms/pseries/ras.c | 4 arch/powerpc/platforms/pseries/smp.c | 23 ++- 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/platforms/pseries/ras.c

[PATCH 08/10] powerpc: add struct smp_ops_t.cause_nmi_ipi operation

2016-12-19 Thread Nicholas Piggin
Have the NMI IPI code use this op when the platform defines it. Signed-off-by: Nicholas Piggin --- arch/powerpc/include/asm/smp.h| 1 + arch/powerpc/kernel/smp.c | 3 +++ arch/powerpc/platforms/85xx/smp.c | 1 +

[PATCH 07/10] powerpc: add NMI IPI infrastructure

2016-12-19 Thread Nicholas Piggin
Add a simple NMI IPI system that handles concurrency and reentrancy. The platform does not have to implement a true non-maskable interrupt, the default is to simply use the debugger break IPI message. This has now been co-opted for a general IPI message, and users (debugger and crash) have been

[PATCH 06/10] powerpc: nmi_enter for system reset

2016-12-19 Thread Nicholas Piggin
System reset is a non-maskable interrupt from Linux's point of view (occurs under local_irq_disable()), so it should use nmi_enter/exit. Signed-off-by: Nicholas Piggin --- arch/powerpc/kernel/traps.c | 11 +++ 1 file changed, 11 insertions(+) diff --git

[PATCH 05/10] powerpc/64s: dedicated system reset interrupt stack

2016-12-19 Thread Nicholas Piggin
The system reset interrupt is used for crash/debug situations, so it is desirable to have as little impact on the normal state of the system as possible. Currently it uses the current kernel stack to process the exception. This stores into the stack which may be involved with the crash. The stack

[PATCH 04/10] powerpc/64s: disallow system reset vs system reset reentrancy

2016-12-19 Thread Nicholas Piggin
In preparation for using a dedicated stack for system reset interrupts, prevent a nested system reset from recovering, in order to simplify code that is called in crash/debug path. This allows a system reset interrupt to just use the base stack pointer. Keep an in_nmi nesting counter similarly to

[PATCH 03/10] powerpc/64s: fix system reset vs general interrupt reentrancy

2016-12-19 Thread Nicholas Piggin
The system reset interrupt can occur when MSR_EE=0, and it currently uses the PACA_EXGEN save area. Some PACA_EXGEN interrupts have a window where MSR_RI=1 and MSR_EE=0 when the save area is still in use. A system reset interrupt in this window can lead to undetected corruption when the save area

[PATCH 02/10] powerpc/64s: exception macro for stack frame and initial register save

2016-12-19 Thread Nicholas Piggin
This code is common to a few exceptions, and another user will be added. This causes a trivial change to generated code: - 604: std r9,416(r1) - 608: mfspr r11,314 - 60c: std r11,368(r1) - 610: mfspr r12,315 + 604: mfspr r11,314 + 608: mfspr r12,315 +

[PATCH 01/10] powerpc/64s: add exception macro that does not enable RI

2016-12-19 Thread Nicholas Piggin
Subsequent patches will add more non-RI variant exceptions, so create a macro for it rather than open-code it. This does not change generated instructions. Signed-off-by: Nicholas Piggin --- arch/powerpc/include/asm/exception-64s.h | 15 +++

[PATCH 00/10] Improving debugging with NMIs

2016-12-19 Thread Nicholas Piggin
Hi, These patches have been posted a few times before. Since then I've split them up and tried to simplify the NMI IPI stuff as much as possible. I've been testing using David Gibson's QEMU branch ppc-for-2.9, which implements the required hcall. Thanks, Nick Nicholas Piggin (10):

Re: [PATCH v3 01/15] stacktrace/x86: add function for detecting reliable stack traces

2016-12-19 Thread Miroslav Benes
On Mon, 19 Dec 2016, Josh Poimboeuf wrote: > On Mon, Dec 19, 2016 at 05:25:19PM +0100, Miroslav Benes wrote: > > On Thu, 8 Dec 2016, Josh Poimboeuf wrote: > > > > > diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig > > > index 215612c..b4a6663 100644 > > > --- a/arch/x86/Kconfig > > > +++

Re: [PATCH] perf TUI: Don't throw error for zero length symbols

2016-12-19 Thread Arnaldo Carvalho de Melo
Em Sat, Dec 17, 2016 at 07:27:54AM +1100, Anton Blanchard escreveu: > Hi Ravi, > > > > perf report (with TUI) exits with error when it finds a sample of > > > zero length symbol(i.e. addr == sym->start == sym->end). Actually > > > these are valid samples. Don't exit TUI and show report with such

Re: [PATCH v3 4/5] powerpc/mm: add radix__remove_section_mapping()

2016-12-19 Thread Reza Arbab
On Mon, Dec 19, 2016 at 03:18:07PM +0530, Aneesh Kumar K.V wrote: Reza Arbab writes: +static void remove_pte_table(pte_t *pte_start, unsigned long addr, +unsigned long end) +{ + unsigned long next; + pte_t *pte; + + pte =

Re: [PATCH v3 3/5] powerpc/mm: add radix__create_section_mapping()

2016-12-19 Thread Reza Arbab
On Mon, Dec 19, 2016 at 02:34:13PM +0530, Aneesh Kumar K.V wrote: Reza Arbab writes: Add the linear page mapping function for radix, used by memory hotplug. This is similar to vmemmap_populate(). Ok with this patch your first patch becomes useful. Can you merge

Re: [PATCH v3 2/5] powerpc/mm: refactor {create,remove}_section_mapping()

2016-12-19 Thread Reza Arbab
On Mon, Dec 19, 2016 at 02:30:28PM +0530, Aneesh Kumar K.V wrote: Reza Arbab writes: Change {create,remove}_section_mapping() to be wrappers around functions prefixed with "hash__". This is preparation for the addition of their "radix__" variants. No functional

Re: [PATCH v3 0/5] powerpc/mm: enable memory hotplug on radix

2016-12-19 Thread Reza Arbab
On Sat, Dec 17, 2016 at 01:38:40AM +1100, Balbir Singh wrote: Do we care about alt maps yet? Good question. I'll try to see if/how altmaps might need special consideration here. -- Reza Arbab

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

2016-12-19 Thread Alex Williamson
On Wed, 14 Dec 2016 14:53:13 +1100 Alexey Kardashevskiy wrote: > On 10/12/16 02:35, Alex Williamson wrote: > > On Fri, 9 Dec 2016 18:53:43 +1100 > > Alexey Kardashevskiy wrote: > > > >> On 09/12/16 04:55, Alex Williamson wrote: > >>> On Thu, 8 Dec 2016

Re: [PATCH v3 01/15] stacktrace/x86: add function for detecting reliable stack traces

2016-12-19 Thread Josh Poimboeuf
On Mon, Dec 19, 2016 at 05:25:19PM +0100, Miroslav Benes wrote: > On Thu, 8 Dec 2016, Josh Poimboeuf wrote: > > > diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig > > index 215612c..b4a6663 100644 > > --- a/arch/x86/Kconfig > > +++ b/arch/x86/Kconfig > > @@ -155,6 +155,7 @@ config X86 > >

Re: [PATCH v3 02/15] x86/entry: define _TIF_ALLWORK_MASK flags explicitly

2016-12-19 Thread Miroslav Benes
On Thu, 8 Dec 2016, Josh Poimboeuf wrote: > The _TIF_ALLWORK_MASK macro automatically includes the least-significant > 16 bits of the thread_info flags, which is less than obvious and tends > to create confusion and surprises when reading or modifying the code. Yes. > Define the flags

Re: [PATCH kernel v2 10/11] vfio: Check for unregistered notifiers when group is actually released

2016-12-19 Thread Alex Williamson
On Mon, 19 Dec 2016 18:41:05 +0800 Jike Song wrote: > On 12/18/2016 09:28 AM, Alexey Kardashevskiy wrote: > > This moves a check for unregistered notifiers from fops release > > callback to the place where the group will actually be released. > > > > Signed-off-by: Alexey

Re: [PATCH v3 01/15] stacktrace/x86: add function for detecting reliable stack traces

2016-12-19 Thread Miroslav Benes
On Thu, 8 Dec 2016, Josh Poimboeuf wrote: > diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig > index 215612c..b4a6663 100644 > --- a/arch/x86/Kconfig > +++ b/arch/x86/Kconfig > @@ -155,6 +155,7 @@ config X86 > select HAVE_PERF_REGS > select HAVE_PERF_USER_STACK_DUMP > select

[PATCH net v3 4/4] fsl/fman: enable compilation on ARM64

2016-12-19 Thread Madalin Bucur
Signed-off-by: Madalin Bucur --- drivers/net/ethernet/freescale/fman/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/freescale/fman/Kconfig b/drivers/net/ethernet/freescale/fman/Kconfig index 79b7c84..dc0850b 100644 ---

[PATCH net v3 3/4] fsl/fman: A007273 only applies to PPC SoCs

2016-12-19 Thread Madalin Bucur
Signed-off-by: Madalin Bucur Reviewed-by: Camelia Groza --- drivers/net/ethernet/freescale/fman/fman.c | 8 1 file changed, 8 insertions(+) diff --git a/drivers/net/ethernet/freescale/fman/fman.c

[PATCH net v3 2/4] powerpc: fsl/fman: remove fsl, fman from of_device_ids[]

2016-12-19 Thread Madalin Bucur
The fsl/fman drivers will use of_platform_populate() on all supported platforms. Call of_platform_populate() to probe the FMan sub-nodes. Signed-off-by: Igal Liberman Signed-off-by: Madalin Bucur ---

[PATCH net v3 1/4] fsl/fman: fix 1G support for QSGMII interfaces

2016-12-19 Thread Madalin Bucur
QSGMII ports were not advertising 1G speed. Signed-off-by: Madalin Bucur Reviewed-by: Camelia Groza --- drivers/net/ethernet/freescale/fman/mac.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/freescale/fman/mac.c

[PATCH net v3 0/4] fsl/fman: fixes for ARM

2016-12-19 Thread Madalin Bucur
The patch set fixes advertised speeds for QSGMII interfaces, disables A007273 erratum workaround on non-PowerPC platforms where it does not apply, enables compilation on ARM64 and addresses a probing issue on non PPC platforms. Changes from v2: merged fsl/fman changes to avoid a point of failure

RE: [PATCH net v2 2/5] powerpc: remove fsl,fman from of_device_ids[]

2016-12-19 Thread Madalin-Cristian Bucur
> From: David Miller [mailto:da...@davemloft.net] > Sent: Monday, December 19, 2016 5:37 PM > > From: Madalin Bucur > Date: Mon, 19 Dec 2016 11:22:20 +0200 > > > The fsl/fman drivers will use of_platform_populate() on all > > supported platforms. > > > > Signed-off-by:

Re: [PATCH net v2 2/5] powerpc: remove fsl,fman from of_device_ids[]

2016-12-19 Thread David Miller
From: Madalin Bucur Date: Mon, 19 Dec 2016 11:22:20 +0200 > The fsl/fman drivers will use of_platform_populate() on all > supported platforms. > > Signed-off-by: Madalin Bucur It seems that this creates a failure point between patches #2 and #3.

[PATCH V3 2/4] powerpc: add helper to check if offset is within rel branch range

2016-12-19 Thread Anju T Sudhakar
From: "Naveen N. Rao" To permit the use of relative branch instruction in powerpc, the target address has to be relatively nearby, since the address is specified in an immediate field (24 bit filed) in the instruction opcode itself. Here nearby refers to 32MB

[PATCH V3 1/4] powerpc: asm/ppc-opcode.h: introduce __PPC_SH64()

2016-12-19 Thread Anju T Sudhakar
From: "Naveen N. Rao" Introduce __PPC_SH64() as a 64-bit variant to encode shift field in some of the shift and rotate instructions operating on double-words. Convert some of the BPF instruction macros to use the same. Signed-off-by: Naveen N. Rao

[PATCH V3 4/4] arch/powerpc: Optimize kprobe in kretprobe_trampoline

2016-12-19 Thread Anju T Sudhakar
Kprobe placed on the kretprobe_trampoline during boot time can be optimized, since the instruction at probe point is a 'nop'. Signed-off-by: Anju T Sudhakar Acked-by: Masami Hiramatsu --- arch/powerpc/kernel/kprobes.c | 8

[PATCH V3 3/4] arch/powerpc: Implement Optprobes

2016-12-19 Thread Anju T Sudhakar
Detour buffer contains instructions to create an in memory pt_regs. After the execution of the pre-handler, a call is made for instruction emulation. The NIP is determined in advanced through dummy instruction emulation and a branch instruction is created to the NIP at the end of the trampoline.

[PATCH V3 0/4] OPTPROBES for powerpc

2016-12-19 Thread Anju T Sudhakar
This is the V3 patchset of the kprobes jump optimization (a.k.a OPTPROBES)for powerpc. Kprobe being an inevitable tool for kernel developers, enhancing the performance of kprobe has got much importance. Currently kprobes inserts a trap instruction to probe a running kernel. Jump optimization

Re: [PATCH v3 12/15] livepatch: store function sizes

2016-12-19 Thread Petr Mladek
On Thu 2016-12-08 12:08:37, Josh Poimboeuf wrote: > For the consistency model we'll need to know the sizes of the old and > new functions to determine if they're on the stacks of any tasks. > > Signed-off-by: Josh Poimboeuf Reviewed-by: Petr Mladek Best

[PATCH] selftest/powerpc: Wrong PMC initialized in pmc56_overflow test

2016-12-19 Thread Madhavan Srinivasan
Test uses PMC2 to count the event. But PMC1 is being initialized. Patch to fix it. Fixes: 3752e453f6ba ('selftests/powerpc: Add tests of PMU EBBs') Signed-off-by: Madhavan Srinivasan --- tools/testing/selftests/powerpc/pmu/ebb/pmc56_overflow_test.c | 2 +- 1 file

Re: [PATCH] powerpc/livepatch: Remove klp_write_module_reloc() stub

2016-12-19 Thread Jiri Kosina
On Fri, 16 Dec 2016, Kamalesh Babulal wrote: > commit 425595a7fc20 ("livepatch: reuse module loader code > to write relocations") offloads livepatch module relocation > write to arch specific module loader code. > > Remove unused klp_write_module_reloc() function stub. > > Signed-off-by:

Re: a question about powervm

2016-12-19 Thread Michal Suchanek
Hello, On 19 December 2016 at 10:09, Liu ping fan wrote: > Hi guys, > > I am using a pSeries. It runs on powerVM. > My question is whether the cpuX under /sys/devices/system/cpu > corresponds to a real cpu or not. > I think it is not the same as the cpu on kvm-guest, which

Re: [PATCH v3 4/5] powerpc/mm: add radix__remove_section_mapping()

2016-12-19 Thread Aneesh Kumar K.V
Reza Arbab writes: > Tear down and free the four-level page tables of the linear mapping > during memory hotremove. > > We borrow the basic structure of remove_pagetable() and friends from the > identically-named x86 functions. > Can you add more details here, which

[PATCH net v2 5/5] fsl/fman: enable compilation on ARM64

2016-12-19 Thread Madalin Bucur
Signed-off-by: Madalin Bucur --- drivers/net/ethernet/freescale/fman/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/freescale/fman/Kconfig b/drivers/net/ethernet/freescale/fman/Kconfig index 79b7c84..dc0850b 100644 ---

[PATCH net v2 4/5] fsl/fman: A007273 only applies to PPC SoCs

2016-12-19 Thread Madalin Bucur
Signed-off-by: Madalin Bucur Reviewed-by: Camelia Groza --- drivers/net/ethernet/freescale/fman/fman.c | 8 1 file changed, 8 insertions(+) diff --git a/drivers/net/ethernet/freescale/fman/fman.c

[PATCH net v2 3/5] fsl/fman: call of_platform_populate()

2016-12-19 Thread Madalin Bucur
From: Igal Liberman Call of_platform_populate() to probe the FMan sub-nodes. Signed-off-by: Igal Liberman Signed-off-by: Madalin Bucur --- drivers/net/ethernet/freescale/fman/fman.c | 8 1 file changed,

[PATCH net v2 2/5] powerpc: remove fsl,fman from of_device_ids[]

2016-12-19 Thread Madalin Bucur
The fsl/fman drivers will use of_platform_populate() on all supported platforms. Signed-off-by: Madalin Bucur --- arch/powerpc/platforms/85xx/corenet_generic.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/arch/powerpc/platforms/85xx/corenet_generic.c

[PATCH net v2 1/5] fsl/fman: fix 1G support for QSGMII interfaces

2016-12-19 Thread Madalin Bucur
QSGMII ports were not advertising 1G speed. Signed-off-by: Madalin Bucur Reviewed-by: Camelia Groza --- drivers/net/ethernet/freescale/fman/mac.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/freescale/fman/mac.c

[PATCH net v2 0/5] fsl/fman: fixes for ARM

2016-12-19 Thread Madalin Bucur
The patch set fixes advertised speeds for QSGMII interfaces, disables A007273 erratum workaround on non-PowerPC platforms where it does not apply, enables compilation on ARM64 and addresses a probing issue on non PPC platforms. Changes from v1: unifying probing on all supported platforms Igal

a question about powervm

2016-12-19 Thread Liu ping fan
Hi guys, I am using a pSeries. It runs on powerVM. My question is whether the cpuX under /sys/devices/system/cpu corresponds to a real cpu or not. I think it is not the same as the cpu on kvm-guest, which is emulated by a linux process. Thx.

Re: [PATCH v3 3/5] powerpc/mm: add radix__create_section_mapping()

2016-12-19 Thread Aneesh Kumar K.V
Reza Arbab writes: > Add the linear page mapping function for radix, used by memory hotplug. > This is similar to vmemmap_populate(). > Ok with this patch your first patch becomes useful. Can you merge that with this and rename mmu_linear_psize to mmu_hotplug_psize or

Re: [PATCH v3 2/5] powerpc/mm: refactor {create, remove}_section_mapping()

2016-12-19 Thread Aneesh Kumar K.V
Reza Arbab writes: > Change {create,remove}_section_mapping() to be wrappers around functions > prefixed with "hash__". > > This is preparation for the addition of their "radix__" variants. No > functional change. > I think this can go upstream now ? To fixup broken

Re: [PATCH v3 1/5] powerpc/mm: set the radix linear page mapping size

2016-12-19 Thread Aneesh Kumar K.V
Reza Arbab writes: > This was defaulting to 4K, regardless of PAGE_SIZE. > > Signed-off-by: Reza Arbab > --- > arch/powerpc/mm/pgtable-radix.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/arch/powerpc/mm/pgtable-radix.c

Re: [PATCH 01/11] powerpc/kvm: Reserve capabilities and ioctls for HPT resizing

2016-12-19 Thread David Gibson
On Fri, Dec 16, 2016 at 10:25:55AM +0100, Thomas Huth wrote: > On 15.12.2016 06:53, David Gibson wrote: > > This adds a new powerpc-specific KVM_CAP_SPAPR_RESIZE_HPT capability to > > advertise whether KVM is capable of handling the PAPR extensions for > > resizing the hashed page table during

Re: [PATCH 01/11] powerpc/kvm: Reserve capabilities and ioctls for HPT resizing

2016-12-19 Thread David Gibson
On Fri, Dec 16, 2016 at 02:15:30PM +0100, Thomas Huth wrote: > On 15.12.2016 06:53, David Gibson wrote: > > This adds a new powerpc-specific KVM_CAP_SPAPR_RESIZE_HPT capability to > > advertise whether KVM is capable of handling the PAPR extensions for > > resizing the hashed page table during

[PATCH v4 12/12] powerpc: Rename soft_enabled to soft_disabled_mask

2016-12-19 Thread Madhavan Srinivasan
Rename the paca->soft_enabled to paca->soft_disabled_mask as it is no more used as a flag for interrupt state. Signed-off-by: Madhavan Srinivasan --- arch/powerpc/include/asm/hw_irq.h | 32 arch/powerpc/include/asm/kvm_ppc.h | 2 +-

[PATCH v4 11/12] powerpc: rewrite local_t using soft_irq

2016-12-19 Thread Madhavan Srinivasan
Local atomic operations are fast and highly reentrant per CPU counters. Used for percpu variable updates. Local atomic operations only guarantee variable modification atomicity wrt the CPU which owns the data and these needs to be executed in a preemption safe way. Here is the design of this

[PATCH v4 10/12] powerpc: Add new set of soft_enabled_ functions

2016-12-19 Thread Madhavan Srinivasan
To support disabling and enabling of irq with PMI, set of new powerpc_local_irq_pmu_save() and powerpc_local_irq_restore() functions are added. And powerpc_local_irq_save() implemented, by adding a new soft_enabled manipulation function soft_enabled_or_return(). Local_irq_pmu_* macros are provided

[PATCH v4 09/12] powerpc:Add new kconfig IRQ_DEBUG_SUPPORT

2016-12-19 Thread Madhavan Srinivasan
New Kconfig is added "CONFIG_IRQ_DEBUG_SUPPORT" to add warn_on to alert the invalid transitions. Also moved the code under the CONFIG_TRACE_IRQFLAGS in arch_local_irq_restore() to new Kconfig. Signed-off-by: Madhavan Srinivasan --- arch/powerpc/Kconfig | 4

[PATCH v4 08/12] powerpc: Add support to mask perf interrupts and replay them

2016-12-19 Thread Madhavan Srinivasan
New bit mask field "IRQ_DISABLE_MASK_PMU" is introduced to support the masking of PMI. Couple of new irq #defs "PACA_IRQ_PMI" and "SOFTEN_VALUE_0xf0*" added to use in the exception code to check for PMI interrupts. In the masked_interrupt handler, for PMIs we reset the MSR[EE] and return. In the

  1   2   >