Re: [PATCH] powerpc/powernv: add hdat attribute to sysfs

2017-02-22 Thread Andrew Donnellan
On 23/02/17 18:42, Andrew Donnellan wrote: I haven't checked the actual important bit of how HDAT is exposed in device tree but other than that things look fairly good. Boring stylistic comments below! And now that I have - it's probably worth noting that this patch depends on a corresponding

Re: [PATCH] powerpc/powernv: add hdat attribute to sysfs

2017-02-22 Thread Andrew Donnellan
On 23/02/17 13:29, Matt Brown wrote: From: Matt Brown Did you intend for this to be different from the email you're using to send + sign-off? The HDAT data area is consumed by skiboot and turned into a device-tree. In some cases we would like to look directly at the HDAT, so this patch ad

[PATCH] selftest/powerpc/alignment: Fix false failures for skipped tests

2017-02-22 Thread Sachin Sant
Tests under alignment subdirectory are skipped when executed on previous generation hardware, but harness still marks them as failed. test: test_copy_unaligned tags: git_version:unknown [SKIP] Test skipped on line 26 skip: test_copy_unaligned selftests: copy_unaligned [FAIL] The MAGIC_SKIP_RETURN

Re: [RFC] Remove memory from nodes for memtrace.

2017-02-22 Thread RashmicaGupta
On 23/02/17 14:56, Nicholas Piggin wrote: + +static bool memtrace_offline_pages(u32 nid, u64 start_pfn, u64 nr_pages) +{ + u64 end_pfn = start_pfn + nr_pages - 1; + + if (walk_memory_range(start_pfn, end_pfn, NULL, + check_memblock_online)) + return false;

Re: [RFC] Remove memory from nodes for memtrace.

2017-02-22 Thread Andrew Donnellan
On 23/02/17 15:23, RashmicaGupta wrote: You'll want to include the Signed-off-by of all authors involved Even without them seeing any changes first? IIUC, you should either run the changes past them first, or add a note (e.g. "[rashmica: general cleanup, refactored foo]") with the changes b

Re: [PATCH kernel v5 09/10] KVM: PPC: iommu: Unify TCE checking

2017-02-22 Thread David Gibson
On Wed, Feb 22, 2017 at 07:21:32PM +1100, Alexey Kardashevskiy wrote: > Signed-off-by: Alexey Kardashevskiy I like this, except for one detail > --- > arch/powerpc/include/asm/iommu.h| 20 +++- > arch/powerpc/include/asm/kvm_ppc.h | 6 -- > arch/powerpc/kernel/iommu.c

Re: [RFC NO-MERGE 1/2] arch/powerpc/prom_init: Parse the command line before calling CAS

2017-02-22 Thread Paul Mackerras
On Tue, Feb 21, 2017 at 05:06:10PM +1100, Suraj Jitindar Singh wrote: > CAS now requires the guest to tell the host whether it would like to use Readers might not know what CAS is. It would be kind to reword this as "On POWER9, the hypervisor requires the guest ... hash or radix MMU at the time o

Re: [RFC NO-MERGE 2/2] arch/powerpc/CAS: Update to new option-vector-5 format for CAS

2017-02-22 Thread Paul Mackerras
On Tue, Feb 21, 2017 at 05:06:11PM +1100, Suraj Jitindar Singh wrote: > The CAS process has been updated to change how the host to guest Once again, explain CAS; perhaps "The ibm,client-architecture-support (CAS) negotiation process has been updated for POWER9 to ..." > negotiation is done for th

Re: [RFC] Remove memory from nodes for memtrace.

2017-02-22 Thread RashmicaGupta
On 23/02/17 14:56, Nicholas Piggin wrote: On Thu, 23 Feb 2017 08:39:10 +1100 Rashmica Gupta wrote: Some powerpc hardware features may want to gain access to a chunk of undisturbed real memory. This update provides a means to unplug said memory from the kernel with a set of sysfs calls

Re: [RFC] Remove memory from nodes for memtrace.

2017-02-22 Thread RashmicaGupta
On 23/02/17 15:01, Andrew Donnellan wrote: On 23/02/17 14:56, Nicholas Piggin wrote: Written by Douglas Lehr . You could mention original author in the changelog. I thought Anton wrote some of it too? You'll want to include the Signed-off-by of all authors involved Even without them seei

Re: [RFC] Remove memory from nodes for memtrace.

2017-02-22 Thread Andrew Donnellan
On 23/02/17 14:56, Nicholas Piggin wrote: Written by Douglas Lehr . You could mention original author in the changelog. I thought Anton wrote some of it too? You'll want to include the Signed-off-by of all authors involved. -- Andrew Donnellan OzLabs, ADL Canberra andrew.donnel

Re: [PATCH] powerpc: Remove leftover cputime_to_nsecs call causing build error

2017-02-22 Thread Frederic Weisbecker
On Thu, Feb 23, 2017 at 08:34:15AM +1100, Michael Ellerman wrote: > Frederic Weisbecker writes: > > > This type conversion is a leftover that got ignored during the kcpustat > > conversion to nanosecs, resulting in build breakage with config having > > CONFIG_NO_HZ_FULL=y. > > > > arch/powerp

Re: [PATCH kernel v5 03/10] powerpc/iommu/vfio_spapr_tce: Cleanup iommu_table disposal

2017-02-22 Thread David Gibson
On Wed, Feb 22, 2017 at 07:21:26PM +1100, Alexey Kardashevskiy wrote: > At the moment iommu_table can be disposed by either calling > iommu_table_free() directly or it_ops::free(); the only implementation > of free() is in IODA2 - pnv_ioda2_table_free() - and it calls > iommu_table_free() anyway. >

Re: [RFC] Remove memory from nodes for memtrace.

2017-02-22 Thread Nicholas Piggin
On Thu, 23 Feb 2017 08:39:10 +1100 Rashmica Gupta wrote: > Some powerpc hardware features may want to gain access to a > chunk of undisturbed real memory. This update provides a means to unplug > said memory from the kernel with a set of sysfs calls. By writing an integer > containing the

Re: [PATCH] powernv/opal: Handle OPAL_WRONG_STATE error from OPAL fails

2017-02-22 Thread Stewart Smith
Michael Ellerman writes: > Stewart Smith writes: > >> Vipin K Parashar writes: >>> On Monday 13 February 2017 06:13 AM, Michael Ellerman wrote: Vipin K Parashar writes: > OPAL returns OPAL_WRONG_STATE for XSCOM operations > > done to read any core FIR which is sleeping, o

Re: [PATCH] powerpc/powernv: add hdat attribute to sysfs

2017-02-22 Thread Oliver O'Halloran
On Thu, Feb 23, 2017 at 1:29 PM, Matt Brown wrote: > From: Matt Brown > > The HDAT data area is consumed by skiboot and turned into a device-tree. > In some cases we would like to look directly at the HDAT, so this patch > adds a sysfs node to allow it to be viewed. This is not possible through

Re: [RFC] Remove memory from nodes for memtrace.

2017-02-22 Thread Stewart Smith
Rashmica Gupta writes: > +} > +machine_device_initcall(powernv, memtrace_init); > + > + > + > +/* XXX FIXME DEBUG CRAP */ > +machine_device_initcall(pseries, memtrace_init); Should the fixme be there? -- Stewart Smith OPAL Architect, IBM.

Re: [PATCH kernel 1/1] powerpc/Documentation/misc-devices/: Fix one compile error

2017-02-22 Thread Feng Gao
On Wed, Feb 22, 2017 at 5:09 PM, Winkler, Tomas wrote: > >> >> On Wed, Feb 22, 2017 at 4:14 PM, Winkler, Tomas >> wrote: >> > On Wed, 2017-02-22 at 15:22 +0800, f...@ikuai8.com wrote: >> >> From: Gao Feng >> >> >> >> When make allyesconfig, there is one compile error on my platform >> >> "gcc (U

Re: [PATCH] cxl: Route eeh events to all slices for pci_channel_io_perm_failure state

2017-02-22 Thread Vaibhav Jain
Thanks for reviewing the patch Matt and Andrew. I have updated the patch description as you have suggested and sent-out an updated one. -- Vaibhav Jain Linux Technology Center, IBM India Pvt. Ltd.

[RESEND PATCH] cxl: Route eeh events to all slices for pci_channel_io_perm_failure state

2017-02-22 Thread Vaibhav Jain
Fix a boundary condition where in some cases an eeh event with state == pci_channel_io_perm_failure wont be passed on to a driver attached to the virtual pci device associated with a slice. This will happen in case the slice just before (n-1) doesn't have any vPHB bus associated with it, that resul

[PATCH] powerpc/powernv: add hdat attribute to sysfs

2017-02-22 Thread Matt Brown
From: Matt Brown The HDAT data area is consumed by skiboot and turned into a device-tree. In some cases we would like to look directly at the HDAT, so this patch adds a sysfs node to allow it to be viewed. This is not possible through /dev/mem as it is reserved memory which is stopped by the /de

Re: [PATCH] cxl: Route eeh events to all slices for pci_channel_io_perm_failure state

2017-02-22 Thread Andrew Donnellan
On 22/02/17 21:51, Vaibhav Jain wrote: Fix a boundary condition where in some cases an eeh event with state == pci_channel_io_perm_failure wont be passed on to a driver attached to the virtual pci device associated with a slice. This will happen in case the slice just before (n-1) doesn't have an

[PATCH] memory-hotplug: Use dev_online for memhp_auto_online

2017-02-22 Thread Nathan Fontenot
Commit 31bc3858e "add automatic onlining policy for the newly added memory" provides the capability to have added memory automatically onlined during add, but this appears to be slightly broken. The current implementation uses walk_memory_range() to call online_memory_block, which uses memory_bloc

[RFC] Remove memory from nodes for memtrace.

2017-02-22 Thread Rashmica Gupta
Some powerpc hardware features may want to gain access to a chunk of undisturbed real memory. This update provides a means to unplug said memory from the kernel with a set of sysfs calls. By writing an integer containing the size of memory to be unplugged into /sys/kernel/debug/powerpc/memt

Re: [PATCH] powerpc: Remove leftover cputime_to_nsecs call causing build error

2017-02-22 Thread Michael Ellerman
Frederic Weisbecker writes: > This type conversion is a leftover that got ignored during the kcpustat > conversion to nanosecs, resulting in build breakage with config having > CONFIG_NO_HZ_FULL=y. > > arch/powerpc/kernel/time.c: In function 'running_clock': > arch/powerpc/kernel/time

Re: [PATCH] powerpc/mm/hash: Always clear UPRT and Host Radix bits when setting up CPU

2017-02-22 Thread Michael Ellerman
"Aneesh Kumar K.V" writes: > We will set LPCR with correct value for radix during int. This make sure we > start with a sanitized value of LPCR. In case of kexec, cpus can have LPCR > value based on the previous translation mode we were running. > > Fixes: fe036a0605d60 ("powerpc/64/kexec: Fix MM

Re: [PATCH 2/2] crypto: vmx - Use skcipher for xts fallback

2017-02-22 Thread Marcelo Cerri
In addition to cbc comments: On Wed, Feb 22, 2017 at 03:00:45PM -0300, Paulo Flabiano Smorigo wrote: > Signed-off-by: Paulo Flabiano Smorigo > --- > drivers/crypto/vmx/aes_xts.c | 32 ++-- > 1 file changed, 18 insertions(+), 14 deletions(-) > > diff --git a/drivers/c

Re: [PATCH 1/2] crypto: vmx - Use skcipher for cbc fallback

2017-02-22 Thread Marcelo Cerri
Hi Paulo. On Wed, Feb 22, 2017 at 03:00:15PM -0300, Paulo Flabiano Smorigo wrote: > Signed-off-by: Paulo Flabiano Smorigo > --- > drivers/crypto/vmx/aes_cbc.c | 41 - > 1 file changed, 20 insertions(+), 21 deletions(-) > > diff --git a/drivers/crypto/vmx/

[PATCH 2/2] crypto: vmx - Use skcipher for xts fallback

2017-02-22 Thread Paulo Flabiano Smorigo
Signed-off-by: Paulo Flabiano Smorigo --- drivers/crypto/vmx/aes_xts.c | 32 ++-- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/drivers/crypto/vmx/aes_xts.c b/drivers/crypto/vmx/aes_xts.c index 24353ec3..a8245e1 100644 --- a/drivers/crypto/vmx/aes_xts

[PATCH 1/2] crypto: vmx - Use skcipher for cbc fallback

2017-02-22 Thread Paulo Flabiano Smorigo
Signed-off-by: Paulo Flabiano Smorigo --- drivers/crypto/vmx/aes_cbc.c | 41 - 1 file changed, 20 insertions(+), 21 deletions(-) diff --git a/drivers/crypto/vmx/aes_cbc.c b/drivers/crypto/vmx/aes_cbc.c index 94ad5c0..5aa70997 100644 --- a/drivers/crypto/vm

[PATCH 0/2] crypto: vmx - fix vmx failures by changing fallback to skcipher

2017-02-22 Thread Paulo Flabiano Smorigo
Currently, neither cbc or xts are working with upstream kernel due to a failure in the fallback allocation. This can be fixed by changing the fallback to skcipher. Paulo Flabiano Smorigo (2): crypto: vmx - Use skcipher for cbc fallback crypto: vmx - Use skcipher for xts fallback drivers/cryp

Re: [PATCH] cxl: Route eeh events to all slices for pci_channel_io_perm_failure state

2017-02-22 Thread Matthew R. Ochs
> On Feb 22, 2017, at 4:51 AM, Vaibhav Jain wrote: > > Fix a boundary condition where in some cases an eeh event with > state == pci_channel_io_perm_failure wont be passed on to a driver > attached to the virtual pci device associated with a slice. This will > happen in case the slice just before

Re: next-20170217 boot on POWER8 LPAR : WARNING @kernel/jump_label.c:287

2017-02-22 Thread Jason Baron
On 02/22/2017 12:38 AM, Michael Ellerman wrote: > Jason Baron writes: > >> On 02/20/2017 10:05 PM, Sachin Sant wrote: >>> On 20-Feb-2017, at 8:27 PM, Jason Baron >>> > wrote: Hi, On 02/19/2017 09:07 AM, Sachin Sant wrote: > While booting next

Re: [PATCH] cxl: Enable PCI device ID for future IBM CXL adapter

2017-02-22 Thread Frederic Barrat
Le 17/02/2017 à 04:45, Uma Krishnan a écrit : From: "Matthew R. Ochs" Add support for a future IBM Coherent Accelerator (CXL) device with an ID of 0x0623. Signed-off-by: Matthew R. Ochs Signed-off-by: Uma Krishnan --- Acked-by: Frederic Barrat drivers/misc/cxl/pci.c | 1 + 1 file

Re: [PATCH] powerpc: optprobes: fix TOC handling in optprobes trampoline

2017-02-22 Thread Naveen N. Rao
On 2017/02/21 08:30PM, Naveen N Rao wrote: > Optprobes on powerpc is limited to kernel text area. We decided to also > optimize kretprobe_trampoline since that is also in kernel text area. > However,we failed to take into consideration the fact that the same > trampoline is also used to catch funct

[PATCH v2 5/5] perf: powerpc: choose local entry point with kretprobes

2017-02-22 Thread Naveen N. Rao
perf now uses an offset from _text/_stext for kretprobes if the kernel supports it, rather than the actual function name. As such, let's choose the LEP for powerpc ABIv2 so as to ensure the probe gets hit. Do it only if the kernel supports specifying offsets with kretprobes. Signed-off-by: Naveen

[PATCH v2 4/5] perf: kretprobes: offset from reloc_sym if kernel supports it

2017-02-22 Thread Naveen N. Rao
We indicate support for accepting sym+offset with kretprobes through a line in ftrace README. Parse the same to identify support and choose the appropriate format for kprobe_events. Signed-off-by: Naveen N. Rao --- tools/perf/util/probe-event.c | 47 --- t

[PATCH v2 3/5] trace/kprobes: allow return probes with offsets and absolute addresses

2017-02-22 Thread Naveen N. Rao
Since the kernel includes many non-global functions with same names, we will need to use offsets from other symbols (typically _text/_stext) or absolute addresses to place return probes on specific functions. Also, the core register_kretprobe() API never forbid use of offsets or absolute addresses

[PATCH v2 2/5] powerpc: kretprobes: override default function entry offset

2017-02-22 Thread Naveen N. Rao
With ABIv2, we offset 8 bytes into a function to get at the local entry point. Signed-off-by: Naveen N. Rao --- arch/powerpc/kernel/kprobes.c | 9 + 1 file changed, 9 insertions(+) diff --git a/arch/powerpc/kernel/kprobes.c b/arch/powerpc/kernel/kprobes.c index 735ff3d3f77d..e37b76b8b6b

[PATCH v2 1/5] kretprobes: ensure probe location is at function entry

2017-02-22 Thread Naveen N. Rao
kretprobes can be registered by specifying an absolute address or by specifying offset to a symbol. However, we need to ensure this falls at function entry so as to be able to determine the return address. Validate the same during kretprobe registration. By default, there should not be any offset

[PATCH v2 0/5] kretprobe fixes

2017-02-22 Thread Naveen N. Rao
I'm including all patches (generic and powerpc changes) in this series as suggested by Masami. v1 patches: https://marc.info/?l=linux-kernel&m=148718276424380 https://marc.info/?l=linux-kernel&m=148723314105453&w=2 Patches 1 and 2 are the same as v1. Patch 3 is updated to include a line in ftrace

Re: [PATCH 0/2] powerpc: kretprobe updates

2017-02-22 Thread Naveen N. Rao
On 2017/02/21 10:07PM, Masami Hiramatsu wrote: > On Mon, 20 Feb 2017 15:20:24 +0530 > "Naveen N. Rao" wrote: > > > On 2017/02/19 01:42PM, Masami Hiramatsu wrote: > > > On Fri, 17 Feb 2017 17:42:54 -0300 > > > Arnaldo Carvalho de Melo wrote: > > > > > > > Em Fri, Feb 17, 2017 at 07:44:33PM +0900

[GIT PULL] Please pull powerpc/linux.git powerpc-4.11-1 tag

2017-02-22 Thread Michael Ellerman
Hi Linus, Please pull the first set of powerpc updates for 4.11. I've split it in two because I had a last minute query on one of the commits in my next branch. This pull includes everything up to but not including that commit. I'll send you a second pull once that's resolved. The changes to arc

[PATCH] cxl: Route eeh events to all slices for pci_channel_io_perm_failure state

2017-02-22 Thread Vaibhav Jain
Fix a boundary condition where in some cases an eeh event with state == pci_channel_io_perm_failure wont be passed on to a driver attached to the virtual pci device associated with a slice. This will happen in case the slice just before (n-1) doesn't have any vph bus associated with it, that result

RE: [PATCH kernel 1/1] powerpc/Documentation/misc-devices/: Fix one compile error

2017-02-22 Thread Winkler, Tomas
> > On Wed, Feb 22, 2017 at 4:14 PM, Winkler, Tomas > wrote: > > On Wed, 2017-02-22 at 15:22 +0800, f...@ikuai8.com wrote: > >> From: Gao Feng > >> > >> When make allyesconfig, there is one compile error on my platform > >> "gcc (Ubuntu 4.8.4-2ubuntu1~14.04.3) 4.8.4". > >> The following is the

Re: [RFC PATCH] memory-hotplug: Use dev_online for memhp_auto_offline

2017-02-22 Thread Vitaly Kuznetsov
Hi, s,memhp_auto_offline,memhp_auto_online, in the subject please :-) Nathan Fontenot writes: > Commit 31bc3858e "add automatic onlining policy for the newly added memory" > provides the capability to have added memory automatically onlined > during add, but this appears to be slightly broken.

[PATCH kernel 1/1] powerpc/platforms/spufs: Use corresponding finish_wait for DEFINE_WAIT in spu_prio_wait

2017-02-22 Thread fgao
From: Gao Feng It should use finish_wait instead of remove_wait_queue when define the waitqueue by DEFINE_WAIT. Signed-off-by: Gao Feng --- arch/powerpc/platforms/cell/spufs/sched.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/powerpc/platforms/cell/spufs/sched.c

Re: [PATCH kernel 1/1] powerpc/Documentation/misc-devices/: Fix one compile error

2017-02-22 Thread Feng Gao
On Wed, Feb 22, 2017 at 4:14 PM, Winkler, Tomas wrote: > On Wed, 2017-02-22 at 15:22 +0800, f...@ikuai8.com wrote: >> From: Gao Feng >> >> When make allyesconfig, there is one compile error on my platform >> "gcc (Ubuntu 4.8.4-2ubuntu1~14.04.3) 4.8.4". >> The following is the output. >> >> Docume

Re: [PATCH kernel 1/1] powerpc/Documentation/misc-devices/: Fix one compile error

2017-02-22 Thread Winkler, Tomas
On Wed, 2017-02-22 at 15:22 +0800, f...@ikuai8.com wrote: > From: Gao Feng > > When make allyesconfig, there is one compile error on my platform > "gcc (Ubuntu 4.8.4-2ubuntu1~14.04.3) 4.8.4". > The following is the output. > > Documentation/misc-devices/mei/mei-amt-version.c: In function ‘main’:

[PATCH kernel 1/1] powerpc/Documentation/misc-devices/: Fix one compile error

2017-02-22 Thread fgao
From: Gao Feng When make allyesconfig, there is one compile error on my platform "gcc (Ubuntu 4.8.4-2ubuntu1~14.04.3) 4.8.4". The following is the output. Documentation/misc-devices/mei/mei-amt-version.c: In function ‘main’: Documentation/misc-devices/mei/mei-amt-version.c:103:5: warning: ‘acmd.

Re: [PATCH v5 13/15] livepatch: change to a per-task consistency model

2017-02-22 Thread Miroslav Benes
On Tue, 21 Feb 2017, Josh Poimboeuf wrote: > On Fri, Feb 17, 2017 at 09:51:29AM +0100, Miroslav Benes wrote: > > On Thu, 16 Feb 2017, Josh Poimboeuf wrote: > > > What do you think about the following? I tried to put the logic in > > > klp_complete_transition(), so the module_put()'s would be in o

Re: [tip:sched/core] sched/core: Add debugging code to catch missing update_rq_clock() calls

2017-02-22 Thread Wanpeng Li
2017-02-02 23:55 GMT+08:00 Peter Zijlstra : > On Tue, Jan 31, 2017 at 10:22:47AM -0700, Ross Zwisler wrote: >> On Tue, Jan 31, 2017 at 4:48 AM, Mike Galbraith wrote: >> > On Tue, 2017-01-31 at 16:30 +0530, Sachin Sant wrote: > > > Could some of you test this? It seems to cure things in my (very) >

[PATCH kernel v5 04/10] powerpc/vfio_spapr_tce: Add reference counting to iommu_table

2017-02-22 Thread Alexey Kardashevskiy
So far iommu_table obejcts were only used in virtual mode and had a single owner. We are going to change this by implementing in-kernel acceleration of DMA mapping requests. The proposed acceleration will handle requests in real mode and KVM will keep references to tables. This adds a kref to iomm

[PATCH kernel v5 00/10] powerpc/kvm/vfio: Enable in-kernel acceleration

2017-02-22 Thread Alexey Kardashevskiy
This is my current queue of patches to add acceleration of TCE updates in KVM. This is based on the v4.10 release. Please comment. Thanks. Changes: v5: * replaced "KVM: PPC: Separate TCE validation from update" with "KVM: PPC: iommu: Unify TCE checking" * changed already reviewed "powerpc/iommu/

[PATCH kernel v5 10/10] KVM: PPC: VFIO: Add in-kernel acceleration for VFIO

2017-02-22 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 tr

[PATCH kernel v5 09/10] KVM: PPC: iommu: Unify TCE checking

2017-02-22 Thread Alexey Kardashevskiy
Signed-off-by: Alexey Kardashevskiy --- arch/powerpc/include/asm/iommu.h| 20 +++- arch/powerpc/include/asm/kvm_ppc.h | 6 -- arch/powerpc/kernel/iommu.c | 37 + arch/powerpc/kvm/book3s_64_vio_hv.c | 31 +++-

[PATCH kernel v5 08/10] KVM: PPC: Use preregistered memory API to access TCE list

2017-02-22 Thread Alexey Kardashevskiy
VFIO on sPAPR already implements guest memory pre-registration when the entire guest RAM gets pinned. This can be used to translate the physical address of a guest page containing the TCE list from H_PUT_TCE_INDIRECT. This makes use of the pre-registrered memory API to access TCE list pages in ord

[PATCH kernel v5 07/10] KVM: PPC: Pass kvm* to kvmppc_find_table()

2017-02-22 Thread Alexey Kardashevskiy
The guest view TCE tables are per KVM anyway (not per VCPU) so pass kvm* there. This will be used in the following patches where we will be attaching VFIO containers to LIOBNs via ioctl() to KVM (rather than to VCPU). Signed-off-by: Alexey Kardashevskiy Reviewed-by: David Gibson --- arch/powerp

[PATCH kernel v5 06/10] KVM: PPC: Enable IOMMU_API for KVM_BOOK3S_64 permanently

2017-02-22 Thread Alexey Kardashevskiy
It does not make much sense to have KVM in book3s-64 and not to have IOMMU bits for PCI pass through support as it costs little and allows VFIO to function on book3s KVM. Having IOMMU_API always enabled makes it unnecessary to have a lot of "#ifdef IOMMU_API" in arch/powerpc/kvm/book3s_64_vio*. Wi

[PATCH kernel v5 05/10] KVM: PPC: Reserve KVM_CAP_SPAPR_TCE_VFIO capability number

2017-02-22 Thread Alexey Kardashevskiy
This adds a capability number for in-kernel support for VFIO on SPAPR platform. The capability will tell the user space whether in-kernel handlers of H_PUT_TCE can handle VFIO-targeted requests or not. If not, the user space must not attempt allocating a TCE table in the host kernel via the KVM_CR

[PATCH kernel v5 03/10] powerpc/iommu/vfio_spapr_tce: Cleanup iommu_table disposal

2017-02-22 Thread Alexey Kardashevskiy
At the moment iommu_table can be disposed by either calling iommu_table_free() directly or it_ops::free(); the only implementation of free() is in IODA2 - pnv_ioda2_table_free() - and it calls iommu_table_free() anyway. As we are going to have reference counting on tables, we need an unified way o

[PATCH kernel v5 02/10] powerpc/powernv/iommu: Add real mode version of iommu_table_ops::exchange()

2017-02-22 Thread Alexey Kardashevskiy
In real mode, TCE tables are invalidated using special cache-inhibited store instructions which are not available in virtual mode This defines and implements exchange_rm() callback. This does not define set_rm/clear_rm/flush_rm callbacks as there is no user for those - exchange/exchange_rm are onl

[PATCH kernel v5 01/10] powerpc/mmu: Add real mode support for IOMMU preregistered memory

2017-02-22 Thread Alexey Kardashevskiy
This makes mm_iommu_lookup() able to work in realmode by replacing list_for_each_entry_rcu() (which can do debug stuff which can fail in real mode) with list_for_each_entry_lockless(). This adds realmode version of mm_iommu_ua_to_hpa() which adds explicit vmalloc'd-to-linear address conversion. Un

Re: [PATCH 0/2] Allow configurable stack size (especially 32k on PPC64)

2017-02-22 Thread Benjamin Herrenschmidt
On Wed, 2017-02-22 at 17:25 +1100, Michael Ellerman wrote: > > Thanks for the detailed explanation. > > The patches look fine, so I don't see any reason why we wouldn't merge > this. I might make the config option depend on EXPERT, but that's just > cosmetic. > > > You're right about the differ

Re: [PATCH] powerpc/mm: Add translation mode information in /proc/cpuinfo

2017-02-22 Thread Benjamin Herrenschmidt
On Wed, 2017-02-22 at 11:19 +0530, Aneesh Kumar K.V wrote: > I avoided using MMU, because it will confuse hardware guys. Why would it ? I don't see how anybody would be confused. And they aren't the primary consumers of /proc/cpuinfo anyway. I agree with Michal here. > Radix is not  > clearly th

RE: [PATCH 0/9] QorIQ DPAA 1 updates

2017-02-22 Thread Madalin-Cristian Bucur
> -Original Message- > From: David Miller [mailto:da...@davemloft.net] > Sent: Tuesday, February 21, 2017 8:20 PM > > From: Madalin Bucur > Date: Tue, 21 Feb 2017 13:52:45 +0200 > > > This patch set introduces a series of fixes and features to the DPAA 1 > > drivers. Besides activating h