Re: [RFC V2] virtio: Add platform specific DMA API translation for virito devices

2018-06-04 Thread David Gibson
On Mon, Jun 04, 2018 at 07:48:54PM +1000, Benjamin Herrenschmidt wrote: > On Mon, 2018-06-04 at 18:57 +1000, David Gibson wrote: > > > > > - First qemu doesn't know that the guest will switch to "secure mode" > > > in advance. There is no difference between a normal and a secure > > > partition un

[PATCH 0/5] powerpc/pkeys: fixes to pkeys

2018-06-04 Thread Ram Pai
Assortment of fixes to pkey. Patch 1 makes pkey consumable in multithreaded applications. Patch 2 fixes fork behavior to inherit the key attributes. Patch 3 A off-by-one bug made one key unusable. Fixes it. Patch 4 Makes pkey-0 less special. Ram Pai (5): powerpc/pkeys: Enable all user-al

[PATCH 2/5] powerpc/pkeys: Save the pkey registers before fork

2018-06-04 Thread Ram Pai
When a thread forks the contents of AMR, IAMR, UAMOR registers in the newly forked thread are not inherited. Save the registers before forking, for content of those registers to be automatically copied into the new thread. CC: Michael Ellerman CC: Florian Weimer CC: Andy Lutomirski CC: Thiago

[PATCH 1/5] powerpc/pkeys: Enable all user-allocatable pkeys at init.

2018-06-04 Thread Ram Pai
In a multithreaded application, a key allocated by one thread must be activate and usable on all threads. Currently this is not the case, because the UAMOR bits for all keys are disabled by default. When a new key is allocated in one thread, though the corresponding UAMOR bits for that thread get

[PATCH 3/5] powerpc/pkeys: fix calculation of total pkeys.

2018-06-04 Thread Ram Pai
Total number of pkeys calculation is off by 1. Fix it. CC: Florian Weimer CC: Michael Ellerman CC: Thiago Jung Bauermann Signed-off-by: Ram Pai --- arch/powerpc/mm/pkeys.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/powerpc/mm/pkeys.c b/arch/powerpc/mm/pkeys

[PATCH 4/5] powerpc/pkeys: Preallocate execute-only key

2018-06-04 Thread Ram Pai
execute-only key is allocated dynamically. This is a problem. When a thread implicitly creates a execute-only key, and resets UAMOR for that key, the UAMOR value does not percolate to all the other threads. Any other thread may ignorantly change the permissions on the key. This can cause the key

[PATCH 5/5] powerpc/pkeys: make protection key 0 less special

2018-06-04 Thread Ram Pai
Applications need the ability to associate an address-range with some key and latter revert to its initial default key. Pkey-0 comes close to providing this function but falls short, because the current implementation disallows applications to explicitly associate pkey-0 to the address range. Lets

Re: [PATCH v7 0/5] powerpc/64: memcmp() optimization

2018-06-04 Thread Michael Ellerman
Hi Simon, wei.guo.si...@gmail.com writes: > From: Simon Guo > > There is some room to optimize memcmp() in powerpc 64 bits version for > following 2 cases: > (1) Even src/dst addresses are not aligned with 8 bytes at the beginning, > memcmp() can align them and go with .Llong comparision mode wit

RE: [PATCH 09/10] dpaa_eth: add support for hardware timestamping

2018-06-04 Thread Y.b. Lu
Hi Richard, > -Original Message- > From: Richard Cochran [mailto:richardcoch...@gmail.com] > Sent: Monday, June 4, 2018 9:49 PM > To: Y.b. Lu > Cc: net...@vger.kernel.org; Madalin-cristian Bucur > ; Rob Herring ; Shawn Guo > ; David S . Miller ; > devicet...@vger.kernel.org; linuxppc-dev@

Re: [PATCH] cpuidle:powernv: Make the snooze timeout dynamic.

2018-06-04 Thread Stewart Smith
Michael Ellerman writes: > "Gautham R. Shenoy" writes: > >> From: "Gautham R. Shenoy" >> >> The commit 78eaa10f027c ("cpuidle: powernv/pseries: Auto-promotion of >> snooze to deeper idle state") introduced a timeout for the snooze idle >> state so that it could be eventually be promoted to a dee

Re: [PATCH v7 0/5] powerpc/64: memcmp() optimization

2018-06-04 Thread Simon Guo
Hi Michael, On Tue, Jun 05, 2018 at 12:16:22PM +1000, Michael Ellerman wrote: > Hi Simon, > > wei.guo.si...@gmail.com writes: > > From: Simon Guo > > > > There is some room to optimize memcmp() in powerpc 64 bits version for > > following 2 cases: > > (1) Even src/dst addresses are not aligned wi

Re: [RFC V2] virtio: Add platform specific DMA API translation for virito devices

2018-06-04 Thread Christoph Hellwig
On Tue, Jun 05, 2018 at 09:26:56AM +1000, Benjamin Herrenschmidt wrote: > Sorry Michael, that doesn't click. Yes of course virtio is implemented > in qemu, but the problem we are trying to solve is *not* a qemu problem > (the fact that the Linux drivers bypass the DMA API is wrong, needs > fixing,

Re: [RFC PATCH for 4.18 10/16] powerpc: Wire up restartable sequences system call

2018-06-04 Thread Michael Ellerman
Mathieu Desnoyers writes: > From: Boqun Feng > > Wire up the rseq system call on powerpc. > > This provides an ABI improving the speed of a user-space getcpu > operation on powerpc by skipping the getcpu system call on the fast > path, as well as improving the speed of user-space operations on p

Re: [RFC PATCH for 4.18 09/16] powerpc: Add syscall detection for restartable sequences

2018-06-04 Thread Michael Ellerman
Mathieu Desnoyers writes: > From: Boqun Feng > > Syscalls are not allowed inside restartable sequences, so add a call to > rseq_syscall() at the very beginning of system call exiting path for > CONFIG_DEBUG_RSEQ=y kernel. This could help us to detect whether there > is a syscall issued inside res

[PATCH] powerpc: fix build failure by disabling attribute-alias warning in pci_32

2018-06-04 Thread Christophe Leroy
Commit 2479bfc9bc600 ("powerpc: Fix build by disabling attribute-alias warning for SYSCALL_DEFINEx") forgot arch/powerpc/kernel/pci_32.c Latest GCC version emit the following warnings As arch/powerpc code is built with -Werror, this breaks build with GCC 8.1 This patch inhibits this warning In

<    1   2