Re: [PATCH v7 1/2] powerpc: Detect the presence of big-cores via "ibm,thread-groups"

2018-08-29 Thread Michael Neuling
> +What:/sys/devices/system/cpu/cpu[0-9]+/small_core_siblings Shouldn't we put this in the topology/ subdir with with the other items like it? Mikey

Re: [PATCH 1/6] net/wan/fsl_ucc_hdlc: allow ucc index up to 4

2018-08-29 Thread Christophe LEROY
Le 28/08/2018 à 15:34, Christophe LEROY a écrit : Le 28/08/2018 à 13:09, David Gounaris a écrit : There is a need to allow higher indexes to be able to support MPC83xx platforms. (UCC1-UCC5) As far as I can see, MPC8358 has 8 UCCs (ref https://www.nxp.com/products/processors-and-microcon

Re: [PATCH v7 1/2] powerpc: Detect the presence of big-cores via "ibm,thread-groups"

2018-08-29 Thread Michael Neuling
On Wed, 2018-08-29 at 17:04 +1000, Michael Neuling wrote: > > +What: /sys/devices/system/cpu/cpu[0-9]+/small_core_siblings > > Shouldn't we put this in the topology/ subdir with with the other items like > it? Also, please follow the same format as *_sibilings files topology/ where t

Re: [PATCH 4/6] net/wan/fsl_ucc_hdlc: default hmask value

2018-08-29 Thread Christophe LEROY
Le 29/08/2018 à 04:54, Qiang Zhao a écrit : From: David Gounaris Date: 2018/8/28 19:09 Subject: [PATCH 4/6] net/wan/fsl_ucc_hdlc: default hmask value Set default HMASK to 0x to use promiscuous mode in the hdlc controller. Why do you need to do that ? An HDLC frame encapsulating Ether

Re: [PATCH 4/6] net/wan/fsl_ucc_hdlc: default hmask value

2018-08-29 Thread Joakim Tjernlund
On Wed, 2018-08-29 at 09:18 +0200, Christophe LEROY wrote: > CAUTION: This email originated from outside of the organization. Do not click > links or open attachments unless you recognize the sender and know the > content is safe. > > > Le 29/08/2018 à 04:54, Qiang Zhao a écrit : > > From: Davi

[RFT] powerpc/boot: Fix missing crc32poly.h when building with KERNEL_XZ

2018-08-29 Thread Krzysztof Kozlowski
After commit faa16bc404d7 ("lib: Use existing define with polynomial") the lib/xz/xz_crc32.c includes a header from include/linux directory thus any other user of this code should define proper include path. This fixes the build error on powerpc with CONFIG_KERNEL_XZ: In file included from .

Re: [RFT] powerpc/boot: Fix missing crc32poly.h when building with KERNEL_XZ

2018-08-29 Thread Krzysztof Kozlowski
On Wed, 29 Aug 2018 at 09:32, Krzysztof Kozlowski wrote: > > After commit faa16bc404d7 ("lib: Use existing define with > polynomial") the lib/xz/xz_crc32.c includes a header from include/linux > directory thus any other user of this code should define proper include > path. > > This fixes the buil

[PATCH] powerpc/time: Calculate proper wday

2018-08-29 Thread Joakim Tjernlund
to_tm() hardcodes wday to -1 as "No-one uses the day of the week". But recently rtc driver ds1307 does care and tries to correct wday. Add wday calculation(stolen from rtc_time64_to_tm) to to_tm() to please ds1307. Signed-off-by: Joakim Tjernlund --- arch/powerpc/kernel/time.c | 8 +++- 1 f

Re: [PATCH 2/2] sched/topology: Expose numa_mask set/clear functions to arch

2018-08-29 Thread Peter Zijlstra
On Fri, Aug 10, 2018 at 10:30:19PM +0530, Srikar Dronamraju wrote: > With commit 051f3ca02e46 ("sched/topology: Introduce NUMA identity node > sched domain") scheduler introduces an new numa level. However on shared > lpars like powerpc, this extra sched domain creation can lead to > repeated rcu s

Re: [RFT] powerpc/boot: Fix missing crc32poly.h when building with KERNEL_XZ

2018-08-29 Thread Mathieu Malaterre
On Wed, Aug 29, 2018 at 9:59 AM Krzysztof Kozlowski wrote: > > On Wed, 29 Aug 2018 at 09:32, Krzysztof Kozlowski wrote: > > > > After commit faa16bc404d7 ("lib: Use existing define with > > polynomial") the lib/xz/xz_crc32.c includes a header from include/linux > > directory thus any other user o

Re: [PATCH] powerpc: disable support for relative ksymtab references

2018-08-29 Thread Nicholas Piggin
On Wed, 29 Aug 2018 08:47:53 +0200 Ard Biesheuvel wrote: > The newly added code that emits ksymtab entries as pairs of 32-bit > relative references interacts poorly with the way powerpc lays out > its address space: when a module exports a per-CPU variable, the > primary module region covering th

Re: [RFT] powerpc/boot: Fix missing crc32poly.h when building with KERNEL_XZ

2018-08-29 Thread Krzysztof Kozlowski
On Wed, 29 Aug 2018 at 10:06, Mathieu Malaterre wrote: > > On Wed, Aug 29, 2018 at 9:59 AM Krzysztof Kozlowski wrote: > > > > On Wed, 29 Aug 2018 at 09:32, Krzysztof Kozlowski wrote: > > > > > > After commit faa16bc404d7 ("lib: Use existing define with > > > polynomial") the lib/xz/xz_crc32.c in

Re: [PATCH] sched/topology: Use Identity node only if required

2018-08-29 Thread Peter Zijlstra
On Fri, Aug 10, 2018 at 09:45:33AM -0700, Srikar Dronamraju wrote: > available: 4 nodes (0-3) > node 0 cpus: 0 1 2 3 4 5 6 7 32 33 34 35 36 37 38 39 64 65 66 67 68 69 70 71 > 96 97 98 99 100 101 102 103 128 129 130 131 132 133 134 135 160 161 162 163 > 164 165 166 167 192 193 194 195 196 197 198

RE: [PATCH] soc: Convert to using %pOFn instead of device_node.name

2018-08-29 Thread Qiang Zhao
From: Rob Herring Date: 2018年8月28日 9:53 > To: linux-ker...@vger.kernel.org > Cc: Qiang Zhao ; Leo Li ; Andy > Gross ; David Brown ; Heiko > Stuebner ; Thierry Reding ; > Jonathan Hunter ; Santosh Shilimkar > ; linuxppc-dev@lists.ozlabs.org; > linux-arm-ker...@lists.infradead.org; linux-...@vger.ke

Re: [PATCH] sched/topology: Use Identity node only if required

2018-08-29 Thread Peter Zijlstra
On Wed, Aug 29, 2018 at 10:43:48AM +0200, Peter Zijlstra wrote: > DIE(j) should be: > > cpu_cpu_mask(j) := cpumask_of_node(cpu_to_node(j)) FWIW, I was expecting that to be topology_core_cpumask(), so I'm a little confused myself just now. > and NODE(j) should be: > > \Union_k cpumas

Re: [PATCH] soc: Convert to using %pOFn instead of device_node.name

2018-08-29 Thread Heiko Stübner
Am Dienstag, 28. August 2018, 03:52:44 CEST schrieb Rob Herring: > In preparation to remove the node name pointer from struct device_node, > convert printf users to use the %pOFn format specifier. > drivers/soc/rockchip/pm_domains.c | 44 +++ For the Rockchip-part Acke

[PATCH] fsl: remove redundant pointer 'priv'

2018-08-29 Thread Colin King
From: Colin Ian King Pointer 'priv' is being assigned but is never used hence it is redundant and can be removed. Cleans up clang warning: variable 'priv' set but not used [-Wunused-but-set-variable] Signed-off-by: Colin Ian King --- drivers/soc/fsl/dpio/dpio-driver.c | 3 --- 1 file changed,

Re: [PATCH] fsl/qe: ucc: copy and paste bug in ucc_get_tdm_sync_shift()

2018-08-29 Thread Dan Carpenter
On Mon, Jun 04, 2018 at 02:06:45PM +0200, Mathieu Malaterre wrote: > Where did the original go ? > > https://patchwork.ozlabs.org/patch/868158/ > > Btw, we still haven't pushed a patch for this bug. regards, dan carpenter

[RFC PATCH] powerpc/64/module: REL32 relocation range check

2018-08-29 Thread Nicholas Piggin
The recent module relocation overflow crash demonstrated that we have no range checking on REL32 relative relocations. This patch implements a basic check, the same kernel that previously oopsed and rebooted now continues with some of these errors when loading the module: module_64: x_tables:

Re: [RFT] powerpc/boot: Fix missing crc32poly.h when building with KERNEL_XZ

2018-08-29 Thread Michal Kubecek
On Wed, Aug 29, 2018 at 09:32:23AM +0200, Krzysztof Kozlowski wrote: > After commit faa16bc404d7 ("lib: Use existing define with > polynomial") the lib/xz/xz_crc32.c includes a header from include/linux > directory thus any other user of this code should define proper include > path. > > This fixe

Not able to boot cuImage for the target board with MPC8270 processor

2018-08-29 Thread sgosavi1
Hi Everyone, Recently I took up the activity of switching from Linux kernel version 2.16.17.6 to version 4.15.13 for our target board that supports MPC8270 PowerPC processor. As I understand the new kernel version mandates the use of a device tree in the kernel source to describe the target board

Re: Not able to boot cuImage for the target board with MPC8270 processor

2018-08-29 Thread Christophe LEROY
Le 29/08/2018 à 13:14, sgosavi1 a écrit : Hi Everyone, Recently I took up the activity of switching from Linux kernel version 2.16.17.6 to version 4.15.13 for our target board that supports MPC8270 PowerPC processor. As I understand the new kernel version mandates the use of a device tree in

[PATCH v2 1/6] net/wan/fsl_ucc_hdlc: allow ucc index up to 7

2018-08-29 Thread David Gounaris
There is a need to allow higher indexes to be able to support MPC83xx platforms. (UCC1-UCC8) Signed-off-by: David Gounaris --- drivers/net/wan/fsl_ucc_hdlc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wan/fsl_ucc_hdlc.c b/drivers/net/wan/fsl_ucc_hdlc.c index

[PATCH v2 0/6] Ethernet over hdlc

2018-08-29 Thread David Gounaris
Here is what has been changed in v2 after the review comments. v2-0001: Using UCC_MAX_NUM v2-0002: Unchanged v2-0003: Changed commit message v2-0004: Adding fsl,hmask into the dt instead of changing the default value. v2-0005: Unchanged v2-0006: Unchanged Adding robh...@kernel.org for comments re

[PATCH v2 2/6] net/wan/fsl_ucc_hdlc: allow PARITY_CRC16_PR0_CCITT parity

2018-08-29 Thread David Gounaris
Signed-off-by: David Gounaris --- drivers/net/wan/fsl_ucc_hdlc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/wan/fsl_ucc_hdlc.c b/drivers/net/wan/fsl_ucc_hdlc.c index 5cf6dcba039c..c8e526bf1130 100644 --- a/drivers/net/wan/fsl_ucc_hdlc.c +++ b/drivers/net/wan

[PATCH v2 3/6] net/wan/fsl_ucc_hdlc: Adding ARPHRD_ETHER

2018-08-29 Thread David Gounaris
This patch is to avoid discarding ethernet packets when using HDLC_ETH protocol. Signed-off-by: David Gounaris --- drivers/net/wan/fsl_ucc_hdlc.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/net/wan/fsl_ucc_hdlc.c b/drivers/net/wan/fsl_ucc_hdlc.c index c8e526bf1130..0f703d7b

[PATCH v2 4/6] net/wan/fsl_ucc_hdlc: hmask

2018-08-29 Thread David Gounaris
Ability to set hmask in the device-tree, which can be used to change address filtering of packets. Signed-off-by: David Gounaris --- Documentation/devicetree/bindings/soc/fsl/cpm_qe/network.txt | 6 ++ drivers/net/wan/fsl_ucc_hdlc.c | 5 - drivers/net/wan/fs

[PATCH v2 6/6] net/wan/fsl_ucc_hdlc: tx timeout handler

2018-08-29 Thread David Gounaris
Added tx timerout handler. This helps when troubleshooting. Signed-off-by: David Gounaris --- drivers/net/wan/fsl_ucc_hdlc.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/net/wan/fsl_ucc_hdlc.c b/drivers/net/wan/fsl_ucc_hdlc.c index 248f1f5bcd04..629ef5049d27 100644 --- a/driv

[PATCH v2 5/6] net/wan/fsl_ucc_hdlc: GUMR for non tsa mode

2018-08-29 Thread David Gounaris
The following bits in the GUMR is changed for non tsa mode: CDS, CTSP and CTSS are set to zero. When set, there is no tx interrupts from the controller. Signed-off-by: David Gounaris --- drivers/net/wan/fsl_ucc_hdlc.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/net/wan/fs

Re: Not able to boot cuImage for the target board with MPC8270 processor

2018-08-29 Thread sgosavi1
Yes, both these config options are enabled as you can see from the below details from my .config file. CONFIG_PPC_EARLY_DEBUG=y CONFIG_PPC_EARLY_DEBUG_CPM=y # CONFIG_PPC_EARLY_DEBUG_MEMCONS is not set CONFIG_PPC_EARLY_DEBUG_CPM_ADDR=0x11a80 -- Sent from: http://linuxppc.10917.n7.nabble.com/linu

Re: Not able to boot cuImage for the target board with MPC8270 processor

2018-08-29 Thread sgosavi1
Thanks for your reply. Yes, both the options are enabled in the kernel configuration for my board as seen below. CONFIG_PPC_EARLY_DEBUG=y CONFIG_PPC_EARLY_DEBUG_CPM=y # CONFIG_PPC_EARLY_DEBUG_MEMCONS is not set CONFIG_PPC_EARLY_DEBUG_CPM_ADDR=0x11a80 -- Sent from: http://linuxppc.10917.n7.nabbl

Re: [PATCH 2/3] mm/cow: optimise pte dirty/accessed bits handling in fork

2018-08-29 Thread Linus Torvalds
On Tue, Aug 28, 2018 at 4:20 AM Nicholas Piggin wrote: > > fork clears dirty/accessed bits from new ptes in the child. This logic > has existed since mapped page reclaim was done by scanning ptes when > it may have been quite important. Today with physical based pte > scanning, there is less reaso

Re: [PATCH] i2c: Convert to using %pOFn instead of device_node.name

2018-08-29 Thread Rob Herring
On Wed, Aug 29, 2018 at 1:03 PM Peter Rosin wrote: > > On 2018-08-28 03:52, Rob Herring wrote: > > In preparation to remove the node name pointer from struct device_node, > > convert printf users to use the %pOFn format specifier. > > > > Cc: Benjamin Herrenschmidt > > Cc: Paul Mackerras > > Cc:

[PATCH] of: make PowerMac cache node search conditional on CONFIG_PPC_PMAC

2018-08-29 Thread Rob Herring
Cache nodes under the cpu node(s) is PowerMac specific according to the comment above, so make the code enforce that. Signed-off-by: Rob Herring --- drivers/of/base.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/of/base.c b/drivers/of/base.c index 466e3c8582f0..cad

[PATCH] mtd: Convert to using %pOFn instead of device_node.name

2018-08-29 Thread Rob Herring
In preparation to remove the node name pointer from struct device_node, convert printf users to use the %pOFn format specifier. Cc: David Woodhouse Cc: Brian Norris Cc: Boris Brezillon Cc: Marek Vasut Cc: Richard Weinberger Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman

Re: [PATCH] i2c: Convert to using %pOFn instead of device_node.name

2018-08-29 Thread Peter Rosin
On 2018-08-29 20:42, Rob Herring wrote: > On Wed, Aug 29, 2018 at 1:03 PM Peter Rosin wrote: >> >> On 2018-08-28 03:52, Rob Herring wrote: >>> In preparation to remove the node name pointer from struct device_node, >>> convert printf users to use the %pOFn format specifier. >>> >>> Cc: Benjamin He

Re: Not able to boot cuImage for the target board with MPC8270 processor

2018-08-29 Thread Scott Wood
On Wed, 2018-08-29 at 04:14 -0700, sgosavi1 wrote: > Press to STOP AUTOBOOT!:autoboot in 2 seconds > ## Booting image at ffc0 ... >Image Name: Linux-4.15.13 >Created: 2018-08-29 10:45:39 UTC >Image Type: PowerPC Linux Kernel Image (gzip compressed) >Data Size:1166

[PATCH] hwmon: drop unnecessary OF name NULL checks

2018-08-29 Thread Rob Herring
Checking the child node names is pointless as the DT node name can never be NULL, so remove it. Cc: Jean Delvare Cc: Guenter Roeck Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: linux-hw...@vger.kernel.org Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Rob Herring -

[PATCH] soc: fsl/qe: Use of_get_child_by_name helper

2018-08-29 Thread Rob Herring
Use the of_get_child_by_name() helper instead of open coding searching for the 'firmware' child node. This removes directly accessing the name pointer as well. Cc: Qiang Zhao Cc: Li Yang Cc: linuxppc-dev@lists.ozlabs.org Cc: linux-arm-ker...@lists.infradead.org Signed-off-by: Rob Herring --- d

Re: [PATCH] hwmon: drop unnecessary OF name NULL checks

2018-08-29 Thread Guenter Roeck
On Wed, Aug 29, 2018 at 03:02:21PM -0500, Rob Herring wrote: > Checking the child node names is pointless as the DT node name can > never be NULL, so remove it. > > Cc: Jean Delvare > Cc: Guenter Roeck > Cc: Benjamin Herrenschmidt > Cc: Paul Mackerras > Cc: Michael Ellerman > Cc: linux-hw...@

Re: [PATCH] fsl/qe: ucc: copy and paste bug in ucc_get_tdm_sync_shift()

2018-08-29 Thread Li Yang
On Wed, Aug 29, 2018 at 4:42 AM Dan Carpenter wrote: > > On Mon, Jun 04, 2018 at 02:06:45PM +0200, Mathieu Malaterre wrote: > > Where did the original go ? > > > > https://patchwork.ozlabs.org/patch/868158/ > > > > > > Btw, we still haven't pushed a patch for this bug. I will combine Zhao Qiang's

Re: [PATCH 2/3] mm/cow: optimise pte dirty/accessed bits handling in fork

2018-08-29 Thread Nicholas Piggin
On Wed, 29 Aug 2018 08:42:09 -0700 Linus Torvalds wrote: > On Tue, Aug 28, 2018 at 4:20 AM Nicholas Piggin wrote: > > > > fork clears dirty/accessed bits from new ptes in the child. This logic > > has existed since mapped page reclaim was done by scanning ptes when > > it may have been quite imp

Re: [PATCH 2/3] mm/cow: optimise pte dirty/accessed bits handling in fork

2018-08-29 Thread Linus Torvalds
On Wed, Aug 29, 2018 at 4:12 PM Nicholas Piggin wrote: > > Dirty micro fault seems to be the big one for my Skylake, takes 300 > nanoseconds per access. Accessed takes about 100. (I think, have to > go over my benchmark a bit more carefully and re-test). Yeah, but they only happen for shared area

Re: FSL/NXP P5020: USB problems with the latest Git kernels

2018-08-29 Thread Scott Wood
On Tue, 2018-08-28 at 20:13 +0100, Darren Stevens wrote: > Hello Scott > > On 27/08/2018, Scott Wood wrote: > > On Mon, 2018-08-27 at 20:15 +0200, Christian Zigotzky wrote: > > > Hello, > > > > > > Our users tested the RC1 of kernel 4.19 on their P5020 boards today. > > > Unfortunately the USB bu

Re: [PATCH 2/3] mm/cow: optimise pte dirty/accessed bits handling in fork

2018-08-29 Thread Nicholas Piggin
On Wed, 29 Aug 2018 16:15:37 -0700 Linus Torvalds wrote: > On Wed, Aug 29, 2018 at 4:12 PM Nicholas Piggin wrote: > > > > Dirty micro fault seems to be the big one for my Skylake, takes 300 > > nanoseconds per access. Accessed takes about 100. (I think, have to > > go over my benchmark a bit mor

v4.17 regression: PowerMac G3 won't boot, was Re: [PATCH v5 1/3] of: cache phandle nodes to reduce cost of of_find_node_by_phandle()

2018-08-29 Thread Finn Thain
Hi Frank, Linux v4.17 and later will no longer boot on a G3 PowerMac. The boot hangs very early, before any video driver loads. Stan and I were able to bisect the regression between v4.16 and v4.17 and arrived at commit 0b3ce78e90fc ("of: cache phandle nodes to reduce cost of of_find_node_by_p

Re: [PATCH] i2c: Convert to using %pOFn instead of device_node.name

2018-08-29 Thread Rob Herring
On Wed, Aug 29, 2018 at 7:25 PM Peter Rosin wrote: > > On 2018-08-29 20:42, Rob Herring wrote: > > On Wed, Aug 29, 2018 at 1:03 PM Peter Rosin wrote: > >> > >> On 2018-08-28 03:52, Rob Herring wrote: > >>> In preparation to remove the node name pointer from struct device_node, > >>> convert print

Re: v4.17 regression: PowerMac G3 won't boot, was Re: [PATCH v5 1/3] of: cache phandle nodes to reduce cost of of_find_node_by_phandle()

2018-08-29 Thread Rob Herring
On Wed, Aug 29, 2018 at 7:44 PM Finn Thain wrote: > > Hi Frank, > > Linux v4.17 and later will no longer boot on a G3 PowerMac. The boot hangs > very early, before any video driver loads. > > Stan and I were able to bisect the regression between v4.16 and v4.17 and > arrived at commit 0b3ce78e90fc

RE: [PATCH] soc: fsl/qe: Use of_get_child_by_name helper

2018-08-29 Thread Qiang Zhao
From: Rob Herring date: 2018/8/30 4:04 > To: Qiang Zhao > Cc: linux-ker...@vger.kernel.org; Leo Li ; > linuxppc-dev@lists.ozlabs.org; linux-arm-ker...@lists.infradead.org > Subject: [PATCH] soc: fsl/qe: Use of_get_child_by_name helper > > Use the of_get_child_by_name() helper instead of open co

[PATCH kernel 4/4] KVM: PPC: Propagate errors to the guest when failed instead of ignoring

2018-08-29 Thread Alexey Kardashevskiy
At the moment if the PUT_TCE{_INDIRECT} handlers fail to update the hardware tables, we print a warning once, clear the entry and continue. This is so as at the time the assumption was that if a VFIO device is hotplugged into the guest, and the userspace replays virtual DMA mappings (i.e. TCEs) to

[PATCH kernel 0/4] KVM: PPC: Some error handling rework

2018-08-29 Thread Alexey Kardashevskiy
There are some inconsistencies in how I handle errors which prevents us from validating these properly: KVM: PPC: Check if IOMMU page is contained in the pinned physical page KVM: PPC: Book3S: Fix guest DMA when guest partially backed by THP pages This is based on sha1 ff69279 Ard Biesheuvel "pow

[PATCH kernel 1/4] KVM: PPC: Validate all tces before updating tables

2018-08-29 Thread Alexey Kardashevskiy
The KVM TCE handlers are written in a way so they fail when either something went horribly wrong or the userspace did some obvious mistake such as passing a misaligned address. We are going to enhance the TCE checker to fail on attempts to map bigger IOMMU page than the underlying pinned memory so

[PATCH kernel 2/4] KVM: PPC: Inform the userspace about TCE update failures

2018-08-29 Thread Alexey Kardashevskiy
We return H_TOO_HARD from TCE update handlers when we think that the next handler (realmode -> virtual mode -> user mode) has a chance to handle the request; H_HARDWARE/H_CLOSED otherwise. This changes the handlers to return H_TOO_HARD on every error giving the userspace an opportunity to handle a

[PATCH kernel 3/4] KVM: PPC: Validate TCEs against preregistered memory page sizes

2018-08-29 Thread Alexey Kardashevskiy
The userspace can request an arbitrary supported page size for a DMA window and this works fine as long as the mapped memory is backed with the pages of the same or bigger size; if this is not the case, mm_iommu_ua_to_hpa{_rm}() fail and tables do not populated with dangerously incorrect TCEs. How

Re: Not able to boot cuImage for the target board with MPC8270 processor

2018-08-29 Thread sgosavi1
> Are you sure the device tree you're using is correct for your board, including > all addresses being where your U-Boot configured them? I actually created one for the target board I am using but had similar problem. So I decided to take the pq2fads.dts tree as a reference since it is based o

Re: [PATCH kernel 1/4] KVM: PPC: Validate all tces before updating tables

2018-08-29 Thread David Gibson
On Thu, Aug 30, 2018 at 01:16:44PM +1000, Alexey Kardashevskiy wrote: > The KVM TCE handlers are written in a way so they fail when either > something went horribly wrong or the userspace did some obvious mistake > such as passing a misaligned address. > > We are going to enhance the TCE checker t

Re: [PATCH kernel 2/4] KVM: PPC: Inform the userspace about TCE update failures

2018-08-29 Thread David Gibson
On Thu, Aug 30, 2018 at 01:16:45PM +1000, Alexey Kardashevskiy wrote: > We return H_TOO_HARD from TCE update handlers when we think that > the next handler (realmode -> virtual mode -> user mode) has a chance to > handle the request; H_HARDWARE/H_CLOSED otherwise. > > This changes the handlers to

Re: [PATCH kernel 4/4] KVM: PPC: Propagate errors to the guest when failed instead of ignoring

2018-08-29 Thread David Gibson
On Thu, Aug 30, 2018 at 01:16:47PM +1000, Alexey Kardashevskiy wrote: > At the moment if the PUT_TCE{_INDIRECT} handlers fail to update > the hardware tables, we print a warning once, clear the entry and > continue. This is so as at the time the assumption was that if > a VFIO device is hotplugged

Re: [PATCH kernel 3/4] KVM: PPC: Validate TCEs against preregistered memory page sizes

2018-08-29 Thread David Gibson
On Thu, Aug 30, 2018 at 01:16:46PM +1000, Alexey Kardashevskiy wrote: > The userspace can request an arbitrary supported page size for a DMA > window and this works fine as long as the mapped memory is backed with > the pages of the same or bigger size; if this is not the case, > mm_iommu_ua_to_hpa