Re: linux-next: Tree for Oct 4

2018-10-04 Thread Stephen Rothwell
Hi Guenter, On Thu, 4 Oct 2018 18:33:02 -0700 Guenter Roeck wrote: > > Most of the boot failures are hopefully fixed with > https://lore.kernel.org/patchwork/patch/995254/ I have added that commit to linux-next today. -- Cheers, Stephen Rothwell pgpGh31TN9eMx.pgp Description: OpenPGP

Re: [PATCH v4 25/32] KVM: PPC: Book3S HV: Invalidate TLB when nested vcpu moves physical cpu

2018-10-04 Thread Paul Mackerras
On Fri, Oct 05, 2018 at 02:54:28PM +1000, David Gibson wrote: > On Fri, Oct 05, 2018 at 02:23:50PM +1000, Paul Mackerras wrote: > > On Fri, Oct 05, 2018 at 02:09:08PM +1000, David Gibson wrote: > > > On Thu, Oct 04, 2018 at 09:56:02PM +1000, Paul Mackerras wrote: > > > > From: Suraj Jitindar Singh

Re: [PATCH v4 25/32] KVM: PPC: Book3S HV: Invalidate TLB when nested vcpu moves physical cpu

2018-10-04 Thread David Gibson
On Fri, Oct 05, 2018 at 02:23:50PM +1000, Paul Mackerras wrote: > On Fri, Oct 05, 2018 at 02:09:08PM +1000, David Gibson wrote: > > On Thu, Oct 04, 2018 at 09:56:02PM +1000, Paul Mackerras wrote: > > > From: Suraj Jitindar Singh > > > > > > This is only done at level 0, since only level 0 knows

Re: [PATCH v4 25/32] KVM: PPC: Book3S HV: Invalidate TLB when nested vcpu moves physical cpu

2018-10-04 Thread Paul Mackerras
On Fri, Oct 05, 2018 at 02:09:08PM +1000, David Gibson wrote: > On Thu, Oct 04, 2018 at 09:56:02PM +1000, Paul Mackerras wrote: > > From: Suraj Jitindar Singh > > > > This is only done at level 0, since only level 0 knows which physical > > CPU a vcpu is running on. This does for nested guests

Re: [PATCH v4 06/32] KVM: PPC: Book3S HV: Simplify real-mode interrupt handling

2018-10-04 Thread David Gibson
On Thu, Oct 04, 2018 at 09:55:43PM +1000, Paul Mackerras wrote: > This streamlines the first part of the code that handles a hypervisor > interrupt that occurred in the guest. With this, all of the real-mode > handling that occurs is done before the "guest_exit_cont" label; once > we get to that

Re: [PATCH v4 17/32] KVM: PPC: Book3S HV: Framework and hcall stubs for nested virtualization

2018-10-04 Thread David Gibson
On Thu, Oct 04, 2018 at 09:55:54PM +1000, Paul Mackerras wrote: > This starts the process of adding the code to support nested HV-style > virtualization. It defines a new H_SET_PARTITION_TABLE hypercall which > a nested hypervisor can use to set the base address and size of a > partition table in

Re: [PATCH v4 25/32] KVM: PPC: Book3S HV: Invalidate TLB when nested vcpu moves physical cpu

2018-10-04 Thread David Gibson
On Thu, Oct 04, 2018 at 09:56:02PM +1000, Paul Mackerras wrote: > From: Suraj Jitindar Singh > > This is only done at level 0, since only level 0 knows which physical > CPU a vcpu is running on. This does for nested guests what L0 already > did for its own guests, which is to flush the TLB on a

Re: [PATCH v4 24/32] KVM: PPC: Book3S HV: Use hypercalls for TLB invalidation when nested

2018-10-04 Thread David Gibson
On Thu, Oct 04, 2018 at 09:56:01PM +1000, Paul Mackerras wrote: > This adds code to call the H_TLB_INVALIDATE hypercall when running as > a guest, in the cases where we need to invalidate TLBs (or other MMU > caches) as part of managing the mappings for a nested guest. Calling > H_TLB_INVALIDATE

Re: [PATCH v4 23/32] KVM: PPC: Book3S HV: Implement H_TLB_INVALIDATE hcall

2018-10-04 Thread David Gibson
On Thu, Oct 04, 2018 at 09:56:00PM +1000, Paul Mackerras wrote: 11;rgb://> From: Suraj Jitindar Singh > > When running a nested (L2) guest the guest (L1) hypervisor will use > the H_TLB_INVALIDATE hcall when it needs to change the partition > scoped page tables or the partition table

Re: [PATCH v3 33/33] KVM: PPC: Book3S HV: Add a VM capability to enable nested virtualization

2018-10-04 Thread David Gibson
On Thu, Oct 04, 2018 at 07:48:26PM +1000, Paul Mackerras wrote: > On Wed, Oct 03, 2018 at 04:21:44PM +1000, David Gibson wrote: > > On Tue, Oct 02, 2018 at 09:31:32PM +1000, Paul Mackerras wrote: > > > With this, userspace can enable a KVM-HV guest to run nested guests > > > under it. > [snip] > >

Re: [PATCH v4 22/32] KVM: PPC: Book3S HV: Introduce rmap to track nested guest mappings

2018-10-04 Thread David Gibson
On Thu, Oct 04, 2018 at 09:55:59PM +1000, Paul Mackerras wrote: > From: Suraj Jitindar Singh > > When a host (L0) page which is mapped into a (L1) guest is in turn > mapped through to a nested (L2) guest we keep a reverse mapping (rmap) > so that these mappings can be retrieved later. > >

Re: [PATCH v3 22/33] KVM: PPC: Book3S HV: Handle page fault for a nested guest

2018-10-04 Thread David Gibson
On Thu, Oct 04, 2018 at 07:21:20PM +1000, Paul Mackerras wrote: > On Wed, Oct 03, 2018 at 03:39:13PM +1000, David Gibson wrote: > > On Tue, Oct 02, 2018 at 09:31:21PM +1000, Paul Mackerras wrote: > > > From: Suraj Jitindar Singh > > > @@ -367,7 +367,9 @@ struct kvmppc_pte { > > > bool may_write

Re: [PATCH v3 30/33] KVM: PPC: Book3S HV: Allow HV module to load without hypervisor mode

2018-10-04 Thread David Gibson
On Thu, Oct 04, 2018 at 01:03:21PM +1000, Paul Mackerras wrote: > On Wed, Oct 03, 2018 at 04:15:15PM +1000, David Gibson wrote: > > On Tue, Oct 02, 2018 at 09:31:29PM +1000, Paul Mackerras wrote: > > > With this, the KVM-HV module can be loaded in a guest running under > > > KVM-HV, and if the

Re: [PATCH v4 30/32] KVM: PPC: Book3S HV: Allow HV module to load without hypervisor mode

2018-10-04 Thread David Gibson
On Thu, Oct 04, 2018 at 09:56:07PM +1000, Paul Mackerras wrote: > With this, the KVM-HV module can be loaded in a guest running under > KVM-HV, and if the hypervisor supports nested virtualization, this > guest can now act as a nested hypervisor and run nested guests. > > This also adds some

Re: [PATCH v4 32/32] KVM: PPC: Book3S HV: Add a VM capability to enable nested virtualization

2018-10-04 Thread David Gibson
On Thu, Oct 04, 2018 at 09:56:09PM +1000, Paul Mackerras wrote: > With this, userspace can enable a KVM-HV guest to run nested guests > under it. > > The administrator can control whether any nested guests can be run; > setting the "nested" module parameter to false prevents any guests > becoming

[PATCH 2/2] fsl: add i2c controlled qixis driver

2018-10-04 Thread Pankaj Bansal
FPGA on LX2160AQDS/LX2160ARDB connected on I2C bus, so add qixis driver which is basically an i2c client driver to control FPGA. Signed-off-by: Wang Dongsheng Signed-off-by: Pankaj Bansal --- drivers/soc/fsl/Kconfig| 9 drivers/soc/fsl/Makefile | 1 +

[PATCH 1/2] dt-bindings: soc: fsl: Document Qixis FPGA usage

2018-10-04 Thread Pankaj Bansal
an FPGA-based system controller, called “Qixis”, which manages several critical system features, including: • Reset sequencing • Power supply configuration • Board configuration • hardware configuration The qixis registers are accessible over one or more system-specific interfaces, typically I2C,

[PATCH 0/2] add i2c controlled qixis driver

2018-10-04 Thread Pankaj Bansal
FPGA on LX2160AQDS/LX2160ARDB connected on I2C bus, so add qixis driver which is basically an i2c client driver to control FPGA. This driver is essential to control MDIO mux multiplexing. Cc: Varun Sethi Pankaj Bansal (2): dt-bindings: soc: fsl: Document Qixis FPGA usage fsl: add i2c

[PATCH 16/16] of: unittest: find overlays[] entry by name instead of index

2018-10-04 Thread frowand . list
From: Frank Rowand One accessor of overlays[] was using a hard coded index value to find the correct array entry instead of searching for the entry containing the correct name. Signed-off-by: Frank Rowand --- drivers/of/unittest.c | 21 + 1 file changed, 17 insertions(+),

[PATCH 15/16] of: unittest: initialize args before calling of_irq_parse_one()

2018-10-04 Thread frowand . list
From: Frank Rowand Callers of of_irq_parse_one() blindly use the pointer args.np without checking whether of_irq_parse_one() had an error and thus did not set the value of args.np. Initialize args to zero so that using the format "%pOF" to show the value of args.np will show "(null)" when

[PATCH 14/16] of: unittest: remove unused of_unittest_apply_overlay() argument

2018-10-04 Thread frowand . list
From: Frank Rowand Argument unittest_nr is not used in of_unittest_apply_overlay(), remove it. Signed-off-by: Frank Rowand --- drivers/of/unittest.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/of/unittest.c b/drivers/of/unittest.c index

[PATCH 13/16] of: overlay: check prevents multiple fragments touching same property

2018-10-04 Thread frowand . list
From: Frank Rowand Add test case of two fragments updating the same property. After adding the test case, the system hangs at end of boot, after after slub stack dumps from kfree() in crypto modprobe code. Multiple overlay fragments adding, modifying, or deleting the same property is not

[PATCH 12/16] of: overlay: check prevents multiple fragments add or delete same node

2018-10-04 Thread frowand . list
From: Frank Rowand Multiple overlay fragments adding or deleting the same node is not supported. Replace code comment of such, with check to detect the attempt and fail the overlay apply. Devicetree unittest where multiple fragments added the same node was added in the previous patch in the

[PATCH 11/16] of: overlay: test case of two fragments adding same node

2018-10-04 Thread frowand . list
From: Frank Rowand Multiple overlay fragments adding or deleting the same node is not supported. An attempt to do so results in an incorrect devicetree. The node name will be munged for the second add. After adding this patch, the unittest messages will show: Duplicate name in motor-1,

[PATCH 10/16] of: overlay: make all pr_debug() and pr_err() messages unique

2018-10-04 Thread frowand . list
From: Frank Rowand Make overlay.c debug and error messages unique so that they can be unambiguously found by grep. Signed-off-by: Frank Rowand --- drivers/of/overlay.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/drivers/of/overlay.c b/drivers/of/overlay.c

[PATCH 09/16] of: overlay: validate overlay properties #address-cells and #size-cells

2018-10-04 Thread frowand . list
From: Frank Rowand If overlay properties #address-cells or #size-cells are already in the live devicetree for any given node, then the values in the overlay must match the values in the live tree. If the properties are already in the live tree then there is no need to create a changeset entry

[PATCH 08/16] of: overlay: reorder fields in struct fragment

2018-10-04 Thread frowand . list
From: Frank Rowand Order the fields of struct fragment in the same order as struct of_overlay_notify_data. The order in struct fragment is not significant. If both structs are ordered the same then when examining the data in a debugger or dump the human involved does not have to remember which

[PATCH 07/16] of: dynamic: change type of of_{at, de}tach_node() to void

2018-10-04 Thread frowand . list
From: Frank Rowand of_attach_node() and of_detach_node() always return zero, so their return value is meaningless. Change their type to void and fix all callers to ignore return value. Signed-off-by: Frank Rowand --- Powerpc files not tested arch/powerpc/platforms/pseries/dlpar.c| 13

[PATCH 06/16] of: overlay: do not duplicate properties from overlay for new nodes

2018-10-04 Thread frowand . list
From: Frank Rowand When allocating a new node, add_changeset_node() was duplicating the properties from the respective node in the overlay instead of allocating a node with no properties. When this patch is applied the errors reported by the devictree unittest from patch "of: overlay: add tests

[PATCH 05/16] of: overlay: use prop add changeset entry for property in new nodes

2018-10-04 Thread frowand . list
From: Frank Rowand The changeset entry 'update property' was used for new properties in an overlay instead of 'add property'. The decision of whether to use 'update property' was based on whether the property already exists in the subtree where the node is being spliced into. At the top level

[PATCH 04/16] powerpc/pseries: add of_node_put() in dlpar_detach_node()

2018-10-04 Thread frowand . list
From: Frank Rowand "of: overlay: add missing of_node_get() in __of_attach_node_sysfs" added a missing of_node_get() to __of_attach_node_sysfs(). This results in a refcount imbalance for nodes attached with dlpar_attach_node(). The calling sequence from dlpar_attach_node() to

[PATCH 03/16] of: overlay: add missing of_node_get() in __of_attach_node_sysfs

2018-10-04 Thread frowand . list
From: Frank Rowand There is a matching of_node_put() in __of_detach_node_sysfs() Remove misleading comment from function header comment for of_detach_node(). This patch may result in memory leaks from code that directly calls the dynamic node add and delete functions directly instead of using

[PATCH 02/16] of: overlay: add missing of_node_put() after add new node to changeset

2018-10-04 Thread frowand . list
From: Frank Rowand The refcount of a newly added overlay node decrements to one (instead of zero) when the overlay changeset is destroyed. This change will cause the final decrement be to zero. After applying this patch, new validation warnings will be reported from the devicetree unittest

[PATCH 01/16] of: overlay: add tests to validate kfrees from overlay removal

2018-10-04 Thread frowand . list
From: Frank Rowand Add checks: - attempted kfree due to refcount reaching zero before overlay is removed - properties linked to an overlay node when the node is removed - node refcount > one during node removal in a changeset destroy, if the node was created by the changeset After

[PATCH 00/16] of: overlay: validation checks, subsequent fixes

2018-10-04 Thread frowand . list
From: Frank Rowand Add checks to (1) overlay apply process and (2) memory freeing triggered by overlay release. The checks are intended to detect possible memory leaks and invalid overlays. The checks revealed bugs in existing code. Fixed the bugs. While fixing bugs, noted other issues,

Re: [PATCH v4 4/6] clk: qoriq: Add clockgen support for lx2160a

2018-10-04 Thread Viresh Kumar
On 04-10-18, 06:33, Vabhav Sharma wrote: > diff --git a/drivers/cpufreq/qoriq-cpufreq.c b/drivers/cpufreq/qoriq-cpufreq.c > index 3d773f6..83921b7 100644 > --- a/drivers/cpufreq/qoriq-cpufreq.c > +++ b/drivers/cpufreq/qoriq-cpufreq.c > @@ -295,6 +295,7 @@ static const struct of_device_id

Re: [PATCH] memblock: stop using implicit alignement to SMP_CACHE_BYTES

2018-10-04 Thread Benjamin Herrenschmidt
On Fri, 2018-10-05 at 00:07 +0300, Mike Rapoport wrote: > When a memblock allocation APIs are called with align = 0, the alignment is > implicitly set to SMP_CACHE_BYTES. > > Replace all such uses of memblock APIs with the 'align' parameter explicitly > set to SMP_CACHE_BYTES and stop implicit

Re: powerpc/lib: fix book3s/32 boot failure due to code patching

2018-10-04 Thread Michael Ellerman
On Mon, 2018-10-01 at 12:21:10 UTC, Christophe Leroy wrote: > Commit 51c3c62b58b3 ("powerpc: Avoid code patching freed init > sections") accesses 'init_mem_is_free' flag too early, before the > kernel is relocated. This provokes early boot failure (before the > console is active). > > As it is

Re: lib/xz: Put CRC32_POLY_LE in xz_private.h

2018-10-04 Thread Michael Ellerman
On Fri, 2018-09-21 at 02:54:31 UTC, Joel Stanley wrote: > This fixes a regression introduced by faa16bc404d72a5 ("lib: Use > existing define with polynomial"). > > The cleanup added a dependency on include/linux, which broke the PowerPC > boot wrapper/decompresser when KERNEL_XZ is enabled: > >

Re: [PATCH] powerpc/xmon/ppc-opc: Use ARRAY_SIZE macro

2018-10-04 Thread Tyrel Datwyler
On 10/04/2018 10:10 AM, Gustavo A. R. Silva wrote: > Use ARRAY_SIZE instead of dividing sizeof array with sizeof an element. > > This code was detected with the help of Coccinelle. > > Signed-off-by: Gustavo A. R. Silva Reviewed-by: Tyrel Datwyler

[PATCH] memblock: stop using implicit alignement to SMP_CACHE_BYTES

2018-10-04 Thread Mike Rapoport
When a memblock allocation APIs are called with align = 0, the alignment is implicitly set to SMP_CACHE_BYTES. Replace all such uses of memblock APIs with the 'align' parameter explicitly set to SMP_CACHE_BYTES and stop implicit alignment assignment in the memblock internal allocation functions.

[PATCH] powerpc/migration: Init nodes before remove memory

2018-10-04 Thread Michael Bringmann
In some LPAR migration scenarios, device-tree modifications are made to the affinity of the memory in the system. For instance, it may occur that memory is installed to nodes 0,3 on a source system, and to nodes 0,2 on a target system. Node 2 may not have been initialized/allocated on the target

Re: [PATCH RFC] mm/memory_hotplug: Introduce memory block types

2018-10-04 Thread Michal Suchánek
On Thu, 4 Oct 2018 17:45:13 +0200 David Hildenbrand wrote: > On 04/10/2018 17:28, Michal Suchánek wrote: > > > > The state of the art is to determine what to do with hotplugged > > memory in userspace based on platform and virtualization type. > > Exactly. > > > > > Changing the default

[PATCH] powerpc/xmon/ppc-opc: Use ARRAY_SIZE macro

2018-10-04 Thread Gustavo A. R. Silva
Use ARRAY_SIZE instead of dividing sizeof array with sizeof an element. This code was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva --- arch/powerpc/xmon/ppc-opc.c | 12 1 file changed, 4 insertions(+), 8 deletions(-) diff --git

Re: [PATCH RFC] mm/memory_hotplug: Introduce memory block types

2018-10-04 Thread David Hildenbrand
On 04/10/2018 17:28, Michal Suchánek wrote: > On Thu, 4 Oct 2018 10:13:48 +0200 > David Hildenbrand wrote: > > ok, so what is the problem here? > > Handling the hotplug in userspace through udev may be suboptimal and > kernel handling might be faster but that's orthogonal to the problem at >

[PATCH v4 9/9] powerpc: clean stack pointers naming

2018-10-04 Thread Christophe Leroy
Some stack pointers used to also be thread_info pointers and were called tp. Now that they are only stack pointers, rename them sp. Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/irq.c | 17 +++-- arch/powerpc/kernel/setup_64.c | 20 ++-- 2 files

[PATCH v4 8/9] powerpc/64: Remove CURRENT_THREAD_INFO

2018-10-04 Thread Christophe Leroy
Now that current_thread_info is located at the beginning of 'current' task struct, CURRENT_THREAD_INFO macro is not really needed any more. This patch replaces it by loads of the value at PACACURRENT(r13). Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/exception-64s.h | 4

[PATCH v4 7/9] powerpc/32: Remove CURRENT_THREAD_INFO and rename TI_CPU

2018-10-04 Thread Christophe Leroy
Now that thread_info is similar to task_struct, it's address is in r2 so CURRENT_THREAD_INFO() macro is useless. This patch removes it. At the same time, as the 'cpu' field is not anymore in thread_info, this patch renames it to TASK_CPU. Signed-off-by: Christophe Leroy ---

[PATCH v4 6/9] powerpc: 'current_set' is now a table of task_struct pointers

2018-10-04 Thread Christophe Leroy
The table of pointers 'current_set' has been used for retrieving the stack and current. They used to be thread_info pointers as they were pointing to the stack and current was taken from the 'task' field of the thread_info. Now, the pointers of 'current_set' table are now both pointers to

[PATCH v4 5/9] powerpc: regain entire stack space

2018-10-04 Thread Christophe Leroy
thread_info is not anymore in the stack, so the entire stack can now be used. In the meantime, with the previous patch all pointers to the stacks are not anymore pointers to thread_info so this patch changes them to void* Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/irq.h

[PATCH v4 4/9] powerpc: Activate CONFIG_THREAD_INFO_IN_TASK

2018-10-04 Thread Christophe Leroy
This patch activates CONFIG_THREAD_INFO_IN_TASK which moves the thread_info into task_struct. Moving thread_info into task_struct has the following advantages: - It protects thread_info from corruption in the case of stack overflows. - Its address is harder to determine if stack addresses are

[PATCH v4 3/9] powerpc: Prepare for moving thread_info into task_struct

2018-10-04 Thread Christophe Leroy
This patch cleans the powerpc kernel before activating CONFIG_THREAD_INFO_IN_TASK: - The purpose of the pointer given to call_do_softirq() and call_do_irq() is to point the new stack ==> change it to void* and rename it 'sp' - Don't use CURRENT_THREAD_INFO() to locate the stack. - Fix a few

[PATCH v4 2/9] powerpc: Only use task_struct 'cpu' field on SMP

2018-10-04 Thread Christophe Leroy
When moving to CONFIG_THREAD_INFO_IN_TASK, the thread_info 'cpu' field gets moved into task_struct and only defined when CONFIG_SMP is set. This patch ensures that TI_CPU is only used when CONFIG_SMP is set and that task_struct 'cpu' field is not used directly out of SMP code. Signed-off-by:

[PATCH v4 1/9] book3s/64: avoid circular header inclusion in mmu-hash.h

2018-10-04 Thread Christophe Leroy
When activating CONFIG_THREAD_INFO_IN_TASK, linux/sched.h includes asm/current.h. This generates a circular dependency. To avoid that, asm/processor.h shall not be included in mmu-hash.h In order to do that, this patch moves into a new header called asm/task_size_user64.h the information from

[PATCH v4 0/9] powerpc: Switch to CONFIG_THREAD_INFO_IN_TASK

2018-10-04 Thread Christophe Leroy
The purpose of this serie is to activate CONFIG_THREAD_INFO_IN_TASK which moves the thread_info into task_struct. Moving thread_info into task_struct has the following advantages: - It protects thread_info from corruption in the case of stack overflows. - Its address is harder to determine if

Re: [PATCH RFC] mm/memory_hotplug: Introduce memory block types

2018-10-04 Thread Michal Suchánek
On Thu, 4 Oct 2018 10:13:48 +0200 David Hildenbrand wrote: ok, so what is the problem here? Handling the hotplug in userspace through udev may be suboptimal and kernel handling might be faster but that's orthogonal to the problem at hand. The state of the art is to determine what to do with

Re: [PATCH] dma-direct: Fix return value of dma_direct_supported

2018-10-04 Thread Alexander Duyck
On Thu, Oct 4, 2018 at 4:25 AM Robin Murphy wrote: > > On 04/10/18 00:48, Alexander Duyck wrote: > > It appears that in commit 9d7a224b463e ("dma-direct: always allow dma mask > > <= physiscal memory size") the logic of the test was changed from a "<" to > > a ">=" however I don't see any reason

Re: [RFC PATCH v3 2/7] powerpc: Prepare for moving thread_info into task_struct

2018-10-04 Thread Christophe LEROY
Le 03/10/2018 à 07:49, Christophe LEROY a écrit : Le 03/10/2018 à 07:02, Nicholas Piggin a écrit : On Mon,  1 Oct 2018 12:30:21 + (UTC) Christophe Leroy wrote: This patch cleans the powerpc kernel before activating CONFIG_THREAD_INFO_IN_TASK: - The purpose of the pointer given to

[PATCH v4 6/6] arm64: dts: add LX2160ARDB board support

2018-10-04 Thread Vabhav Sharma
LX2160A reference design board (RDB) is a high-performance computing, evaluation, and development platform with LX2160A SoC. Signed-off-by: Priyanka Jain Signed-off-by: Sriram Dash Signed-off-by: Vabhav Sharma --- arch/arm64/boot/dts/freescale/Makefile| 1 +

[PATCH v4 5/6] arm64: dts: add QorIQ LX2160A SoC support

2018-10-04 Thread Vabhav Sharma
LX2160A SoC is based on Layerscape Chassis Generation 3.2 Architecture. LX2160A features an advanced 16 64-bit ARM v8 CortexA72 processor cores in 8 cluster, CCN508, GICv3,two 64-bit DDR4 memory controller, 8 I2C controllers, 3 dspi, 2 esdhc,2 USB 3.0, mmu 500, 3 SATA, 4 PL011 SBSA UARTs etc.

[PATCH v4 4/6] clk: qoriq: Add clockgen support for lx2160a

2018-10-04 Thread Vabhav Sharma
From: Yogesh Gaur Add clockgen support for lx2160a. Added entry for compat 'fsl,lx2160a-clockgen'. Signed-off-by: Tang Yuantian Signed-off-by: Yogesh Gaur Signed-off-by: Vabhav Sharma Acked-by: Stephen Boyd --- drivers/clk/clk-qoriq.c | 12

[PATCH v4 3/6] clk: qoriq: increase array size of cmux_to_group

2018-10-04 Thread Vabhav Sharma
From: Yogesh Gaur Increase size of cmux_to_group array, to accomdate entry of -1 termination. Added -1, terminated, entry for 4080_cmux_grpX. Signed-off-by: Yogesh Gaur Signed-off-by: Vabhav Sharma --- drivers/clk/clk-qoriq.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff

[PATCH v4 2/6] soc/fsl/guts: Add compatible string for LX2160A

2018-10-04 Thread Vabhav Sharma
Adding compatible string "lx2160a-dcfg" to initialize guts driver for lx2160 Signed-off-by: Vabhav Sharma --- drivers/soc/fsl/guts.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/soc/fsl/guts.c b/drivers/soc/fsl/guts.c index 302e0c8..5e1e633 100644 --- a/drivers/soc/fsl/guts.c +++

[PATCH v4 1/6] dt-bindings: arm64: add compatible for LX2160A

2018-10-04 Thread Vabhav Sharma
Add compatible for LX2160A SoC,QDS and RDB board Add lx2160a compatible for clockgen and dcfg Signed-off-by: Vabhav Sharma Reviewed-by: Rob Herring --- Documentation/devicetree/bindings/arm/fsl.txt | 14 +- Documentation/devicetree/bindings/clock/qoriq-clock.txt | 1 + 2

[PATCH v4 0/6] arm64: dts: NXP: add basic dts file for LX2160A SoC

2018-10-04 Thread Vabhav Sharma
Changes for v4: -Updated bindings for lx2160a clockgen and dcfg -Modified commit message for lx2160a clockgen changes -Updated interrupt property with macro definition -Added required enable-method property to each core node with psci value -Removed unused node syscon in device tree -Removed blank

Re: [PATCH 1/7] macintosh: Use common code to access RTC

2018-10-04 Thread Geert Uytterhoeven
On Wed, Sep 12, 2018 at 2:18 AM Finn Thain wrote: > Now that the 68k Mac port has adopted the via-pmu driver, the same RTC > code can be shared between m68k and powerpc. Replace duplicated code in > arch/powerpc and arch/m68k with common RTC accessors for Cuda and PMU. > > Drop the problematic

[PATCH v4 32/32] KVM: PPC: Book3S HV: Add a VM capability to enable nested virtualization

2018-10-04 Thread Paul Mackerras
With this, userspace can enable a KVM-HV guest to run nested guests under it. The administrator can control whether any nested guests can be run; setting the "nested" module parameter to false prevents any guests becoming nested hypervisors (that is, any attempt to enable the nested capability on

[PATCH v4 31/32] KVM: PPC: Book3S HV: Add nested shadow page tables to debugfs

2018-10-04 Thread Paul Mackerras
This adds a list of valid shadow PTEs for each nested guest to the 'radix' file for the guest in debugfs. This can be useful for debugging. Reviewed-by: David Gibson Signed-off-by: Paul Mackerras --- arch/powerpc/include/asm/kvm_book3s_64.h | 1 + arch/powerpc/kvm/book3s_64_mmu_radix.c |

[PATCH v4 30/32] KVM: PPC: Book3S HV: Allow HV module to load without hypervisor mode

2018-10-04 Thread Paul Mackerras
With this, the KVM-HV module can be loaded in a guest running under KVM-HV, and if the hypervisor supports nested virtualization, this guest can now act as a nested hypervisor and run nested guests. This also adds some checks to inform userspace that HPT guests are not supported by nested

[PATCH v4 29/32] KVM: PPC: Book3S HV: Handle differing endianness for H_ENTER_NESTED

2018-10-04 Thread Paul Mackerras
From: Suraj Jitindar Singh The hcall H_ENTER_NESTED takes two parameters: the address in L1 guest memory of a hv_regs struct and the address of a pt_regs struct. The hcall requests the L0 hypervisor to use the register values in these structs to run a L2 guest and to return the exit state of

[PATCH v4 27/32] KVM: PPC: Book3S HV: Add one-reg interface to virtual PTCR register

2018-10-04 Thread Paul Mackerras
This adds a one-reg register identifier which can be used to read and set the virtual PTCR for the guest. This register identifies the address and size of the virtual partition table for the guest, which contains information about the nested guests under this guest. Migrating this value is the

[PATCH v4 28/32] KVM: PPC: Book3S HV: Sanitise hv_regs on nested guest entry

2018-10-04 Thread Paul Mackerras
From: Suraj Jitindar Singh restore_hv_regs() is used to copy the hv_regs L1 wants to set to run the nested (L2) guest into the vcpu structure. We need to sanitise these values to ensure we don't let the L1 guest hypervisor do things we don't want it to. We don't let data address watchpoints or

[PATCH v4 26/32] KVM: PPC: Book3S HV: Don't access HFSCR, LPIDR or LPCR when running nested

2018-10-04 Thread Paul Mackerras
When running as a nested hypervisor, this avoids reading hypervisor privileged registers (specifically HFSCR, LPIDR and LPCR) at startup; instead reasonable default values are used. This also avoids writing LPIDR in the single-vcpu entry/exit path. Also, this removes the check for CPU_FTR_HVMODE

[PATCH v4 25/32] KVM: PPC: Book3S HV: Invalidate TLB when nested vcpu moves physical cpu

2018-10-04 Thread Paul Mackerras
From: Suraj Jitindar Singh This is only done at level 0, since only level 0 knows which physical CPU a vcpu is running on. This does for nested guests what L0 already did for its own guests, which is to flush the TLB on a pCPU when it goes to run a vCPU there, and there is another vCPU in the

[PATCH v4 24/32] KVM: PPC: Book3S HV: Use hypercalls for TLB invalidation when nested

2018-10-04 Thread Paul Mackerras
This adds code to call the H_TLB_INVALIDATE hypercall when running as a guest, in the cases where we need to invalidate TLBs (or other MMU caches) as part of managing the mappings for a nested guest. Calling H_TLB_INVALIDATE lets the nested hypervisor inform the parent hypervisor about changes to

[PATCH v4 23/32] KVM: PPC: Book3S HV: Implement H_TLB_INVALIDATE hcall

2018-10-04 Thread Paul Mackerras
From: Suraj Jitindar Singh When running a nested (L2) guest the guest (L1) hypervisor will use the H_TLB_INVALIDATE hcall when it needs to change the partition scoped page tables or the partition table which it manages. It will use this hcall in the situations where it would use a

[PATCH v4 22/32] KVM: PPC: Book3S HV: Introduce rmap to track nested guest mappings

2018-10-04 Thread Paul Mackerras
From: Suraj Jitindar Singh When a host (L0) page which is mapped into a (L1) guest is in turn mapped through to a nested (L2) guest we keep a reverse mapping (rmap) so that these mappings can be retrieved later. Whenever we create an entry in a shadow_pgtable for a nested guest we create a

[PATCH v4 21/32] KVM: PPC: Book3S HV: Handle page fault for a nested guest

2018-10-04 Thread Paul Mackerras
From: Suraj Jitindar Singh Consider a normal (L1) guest running under the main hypervisor (L0), and then a nested guest (L2) running under the L1 guest which is acting as a nested hypervisor. L0 has page tables to map the address space for L1 providing the translation from L1 real address -> L0

[PATCH v4 20/32] KVM: PPC: Book3S HV: Handle hypercalls correctly when nested

2018-10-04 Thread Paul Mackerras
When we are running as a nested hypervisor, we use a hypercall to enter the guest rather than code in book3s_hv_rmhandlers.S. This means that the hypercall handlers listed in hcall_real_table never get called. There are some hypercalls that are handled there and not in kvmppc_pseries_do_hcall(),

[PATCH v4 19/32] KVM: PPC: Book3S HV: Use XICS hypercalls when running as a nested hypervisor

2018-10-04 Thread Paul Mackerras
This adds code to call the H_IPI and H_EOI hypercalls when we are running as a nested hypervisor (i.e. without the CPU_FTR_HVMODE cpu feature) and we would otherwise access the XICS interrupt controller directly or via an OPAL call. Reviewed-by: David Gibson Signed-off-by: Paul Mackerras ---

[PATCH v4 18/32] KVM: PPC: Book3S HV: Nested guest entry via hypercall

2018-10-04 Thread Paul Mackerras
This adds a new hypercall, H_ENTER_NESTED, which is used by a nested hypervisor to enter one of its nested guests. The hypercall supplies register values in two structs. Those values are copied by the level 0 (L0) hypervisor (the one which is running in hypervisor mode) into the vcpu struct of

[PATCH v4 17/32] KVM: PPC: Book3S HV: Framework and hcall stubs for nested virtualization

2018-10-04 Thread Paul Mackerras
This starts the process of adding the code to support nested HV-style virtualization. It defines a new H_SET_PARTITION_TABLE hypercall which a nested hypervisor can use to set the base address and size of a partition table in its memory (analogous to the PTCR register). On the host (level 0

[PATCH v4 16/32] KVM: PPC: Book3S HV: Use kvmppc_unmap_pte() in kvm_unmap_radix()

2018-10-04 Thread Paul Mackerras
kvmppc_unmap_pte() does a sequence of operations that are open-coded in kvm_unmap_radix(). This extends kvmppc_unmap_pte() a little so that it can be used by kvm_unmap_radix(), and makes kvm_unmap_radix() call it. Reviewed-by: David Gibson Signed-off-by: Paul Mackerras ---

[PATCH v4 15/32] KVM: PPC: Book3S HV: Refactor radix page fault handler

2018-10-04 Thread Paul Mackerras
From: Suraj Jitindar Singh The radix page fault handler accounts for all cases, including just needing to insert a pte. This breaks it up into separate functions for the two main cases; setting rc and inserting a pte. This allows us to make the setting of rc and inserting of a pte generic for

[PATCH v4 14/32] KVM: PPC: Book3S HV: Make kvmppc_mmu_radix_xlate process/partition table agnostic

2018-10-04 Thread Paul Mackerras
From: Suraj Jitindar Singh kvmppc_mmu_radix_xlate() is used to translate an effective address through the process tables. The process table and partition tables have identical layout. Exploit this fact to make the kvmppc_mmu_radix_xlate() function able to translate either an effective address

[PATCH v4 13/32] KVM: PPC: Book3S HV: Clear partition table entry on vm teardown

2018-10-04 Thread Paul Mackerras
From: Suraj Jitindar Singh When destroying a VM we return the LPID to the pool, however we never zero the partition table entry. This is instead done when we reallocate the LPID. Zero the partition table entry on VM teardown before returning the LPID to the pool. This means if we were running

[PATCH v4 12/32] KVM: PPC: Use ccr field in pt_regs struct embedded in vcpu struct

2018-10-04 Thread Paul Mackerras
When the 'regs' field was added to struct kvm_vcpu_arch, the code was changed to use several of the fields inside regs (e.g., gpr, lr, etc.) but not the ccr field, because the ccr field in struct pt_regs is 64 bits on 64-bit platforms, but the cr field in kvm_vcpu_arch is only 32 bits. This

[PATCH v4 11/32] KVM: PPC: Book3S HV: Add a debugfs file to dump radix mappings

2018-10-04 Thread Paul Mackerras
This adds a file called 'radix' in the debugfs directory for the guest, which when read gives all of the valid leaf PTEs in the partition-scoped radix tree for a radix guest, in human-readable format. It is analogous to the existing 'htab' file which dumps the HPT entries for a HPT guest.

[PATCH v4 09/32] KVM: PPC: Book3S HV: Streamlined guest entry/exit path on P9 for radix guests

2018-10-04 Thread Paul Mackerras
This creates an alternative guest entry/exit path which is used for radix guests on POWER9 systems when we have indep_threads_mode=Y. In these circumstances there is exactly one vcpu per vcore and there is no coordination required between vcpus or vcores; the vcpu can enter the guest without

[PATCH v4 10/32] KVM: PPC: Book3S HV: Handle hypervisor instruction faults better

2018-10-04 Thread Paul Mackerras
Currently the code for handling hypervisor instruction page faults passes 0 for the flags indicating the type of fault, which is OK in the usual case that the page is not mapped in the partition-scoped page tables. However, there are other causes for hypervisor instruction page faults, such as

[PATCH v4 08/32] KVM: PPC: Book3S HV: Call kvmppc_handle_exit_hv() with vcore unlocked

2018-10-04 Thread Paul Mackerras
Currently kvmppc_handle_exit_hv() is called with the vcore lock held because it is called within a for_each_runnable_thread loop. However, we already unlock the vcore within kvmppc_handle_exit_hv() under certain circumstances, and this is safe because (a) any vcpus that become runnable and are

[PATCH v4 07/32] KVM: PPC: Book3S: Rework TM save/restore code and make it C-callable

2018-10-04 Thread Paul Mackerras
This adds a parameter to __kvmppc_save_tm and __kvmppc_restore_tm which allows the caller to indicate whether it wants the nonvolatile register state to be preserved across the call, as required by the C calling conventions. This parameter being non-zero also causes the MSR bits that enable TM,

[PATCH v4 06/32] KVM: PPC: Book3S HV: Simplify real-mode interrupt handling

2018-10-04 Thread Paul Mackerras
This streamlines the first part of the code that handles a hypervisor interrupt that occurred in the guest. With this, all of the real-mode handling that occurs is done before the "guest_exit_cont" label; once we get to that label we are committed to exiting to host virtual mode. Thus the machine

[PATCH v4 05/32] KVM: PPC: Book3S HV: Extract PMU save/restore operations as C-callable functions

2018-10-04 Thread Paul Mackerras
This pulls out the assembler code that is responsible for saving and restoring the PMU state for the host and guest into separate functions so they can be used from an alternate entry path. The calling convention is made compatible with C. Reviewed-by: David Gibson Signed-off-by: Paul Mackerras

[PATCH v4 00/32] KVM: PPC: Book3S HV: Nested HV virtualization

2018-10-04 Thread Paul Mackerras
This patch series implements nested virtualization in the KVM-HV module for radix guests on POWER9 systems. Unlike PR KVM, nested guests are able to run in supervisor mode, meaning that performance is much better than with PR KVM, and is very close to the performance of a non-nested guests for

[PATCH v4 01/32] powerpc: Turn off CPU_FTR_P9_TM_HV_ASSIST in non-hypervisor mode

2018-10-04 Thread Paul Mackerras
When doing nested virtualization, it is only necessary to do the transactional memory hypervisor assist at level 0, that is, when we are in hypervisor mode. Nested hypervisors can just use the TM facilities as architected. Therefore we should clear the CPU_FTR_P9_TM_HV_ASSIST bit when we are not

[PATCH v4 03/32] KVM: PPC: Book3S HV: Remove left-over code in XICS-on-XIVE emulation

2018-10-04 Thread Paul Mackerras
This removes code that clears the external interrupt pending bit in the pending_exceptions bitmap. This is left over from an earlier iteration of the code where this bit was set when an escalation interrupt arrived in order to wake the vcpu from cede. Currently we set the vcpu->arch.irq_pending

[PATCH v4 02/32] KVM: PPC: Book3S: Simplify external interrupt handling

2018-10-04 Thread Paul Mackerras
Currently we use two bits in the vcpu pending_exceptions bitmap to indicate that an external interrupt is pending for the guest, one for "one-shot" interrupts that are cleared when delivered, and one for interrupts that persist until cleared by an explicit action of the OS (e.g. an acknowledge to

[PATCH v4 04/32] KVM: PPC: Book3S HV: Move interrupt delivery on guest entry to C code

2018-10-04 Thread Paul Mackerras
This is based on a patch by Suraj Jitindar Singh. This moves the code in book3s_hv_rmhandlers.S that generates an external, decrementer or privileged doorbell interrupt just before entering the guest to C code in book3s_hv_builtin.c. This is to make future maintenance and modification easier.

Re: [PATCH] dma-direct: Fix return value of dma_direct_supported

2018-10-04 Thread Robin Murphy
On 04/10/18 00:48, Alexander Duyck wrote: It appears that in commit 9d7a224b463e ("dma-direct: always allow dma mask <= physiscal memory size") the logic of the test was changed from a "<" to a ">=" however I don't see any reason for that change. I am assuming that there was some additional

  1   2   >