Re: [PATCH 6/6] kernel: add a kernel_wait helper

2020-06-19 Thread Christoph Hellwig
On Fri, Jun 19, 2020 at 09:17:00PM +, Luis Chamberlain wrote: > On Thu, Jun 18, 2020 at 04:46:27PM +0200, Christoph Hellwig wrote: > > --- a/kernel/exit.c > > +++ b/kernel/exit.c > > @@ -1626,6 +1626,22 @@ long kernel_wait4(pid_t upid, int __user *stat_addr, > > int options, > > return ret

Re: [PATCH 4/4] powerpc/pseries/iommu: Remove default DMA window before creating DDW

2020-06-19 Thread kernel test robot
https://git-scm.com/docs/git-format-patch] url: https://github.com/0day-ci/linux/commits/Leonardo-Bras/Remove-default-DMA-window-before-creating-DDW/20200619-131022 base: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next config: powerpc-randconfig-r031-20200619 (attached

Re: [PATCH net] ibmveth: Fix max MTU limit

2020-06-19 Thread David Miller
From: Thomas Falcon Date: Thu, 18 Jun 2020 10:43:46 -0500 > The max MTU limit defined for ibmveth is not accounting for > virtual ethernet buffer overhead, which is twenty-two additional > bytes set aside for the ethernet header and eight additional bytes > of an opaque handle reserved for use by

Re: [V2 PATCH 2/3] dt-bindings: chosen: Document ima-kexec-buffer

2020-06-19 Thread Thiago Jung Bauermann
Prakhar Srivastava writes: > Integrity measurement architecture(IMA) validates if files > have been accidentally or maliciously altered, both remotely and > locally, appraise a file's measurement against a "good" value stored > as an extended attribute, and enforce local file integrity. > > IMA

Re: [PATCH] powerpc/pseries: new lparcfg key/value pair: partition_affinity_score

2020-06-19 Thread Nathan Lynch
Hi Tyrel, Tyrel Datwyler writes: > On 6/19/20 8:34 AM, Scott Cheloha wrote: >> The H_GetPerformanceCounterInfo PHYP hypercall has a subcall, >> Affinity_Domain_Info_By_Partition, which returns, among other things, >> a "partition affinity score" for a given LPAR. This score, a value on >> [0-100

Re: [V2 PATCH 1/3] Refactoring powerpc code for carrying over IMA measurement logs, to move non architecture specific code to security/ima.

2020-06-19 Thread Thiago Jung Bauermann
Prakhar Srivastava writes: > Powerpc has support to carry over the IMA measurement logs. Refatoring the > non-architecture specific code out of arch/powerpc and into security/ima. > > The code adds support for reserving and freeing up of memory for IMA > measurement > logs. Last week, Mimi pr

[PATCH v3 4/4] KVM: PPC: Book3S HV: migrate hot plugged memory

2020-06-19 Thread Ram Pai
From: Laurent Dufour When a memory slot is hot plugged to a SVM, PFNs associated with the GFNs in that slot must be migrated to the secure-PFNs, aka device-PFNs. kvmppc_uv_migrate_mem_slot() is called to accomplish this. UV_PAGE_IN ucall is skipped, since the ultravisor does not trust the conten

[PATCH v3 3/4] KVM: PPC: Book3S HV: migrate remaining normal-GFNs to secure-GFNs in H_SVM_INIT_DONE

2020-06-19 Thread Ram Pai
H_SVM_INIT_DONE incorrectly assumes that the Ultravisor has explicitly called H_SVM_PAGE_IN for all secure pages. These GFNs continue to be normal GFNs associated with normal PFNs; when infact, these GFNs should have been secure GFNs, associated with device PFNs. Move all the PFNs associated with

[PATCH v3 2/4] KVM: PPC: Book3S HV: track the state GFNs associated with secure VMs

2020-06-19 Thread Ram Pai
During the life of SVM, its GFNs transition through normal, secure and shared states. Since the kernel does not track GFNs that are shared, it is not possible to disambiguate a shared GFN from a GFN whose PFN has not yet been migrated to a secure-PFN. Also it is not possible to disambiguate a secur

[PATCH v3 1/4] KVM: PPC: Book3S HV: Fix function definition in book3s_hv_uvmem.c

2020-06-19 Thread Ram Pai
Without this fix, git is confused. It generates wrong function context for code changes in subsequent patches. Weird, but true. Cc: Paul Mackerras Cc: Benjamin Herrenschmidt Cc: Michael Ellerman Cc: Bharata B Rao Cc: Aneesh Kumar K.V Cc: Sukadev Bhattiprolu Cc: Laurent Dufour Cc: Thiago Jun

[PATCH v3 0/4] Migrate non-migrated pages of a SVM.

2020-06-19 Thread Ram Pai
The time taken to switch a VM to Secure-VM, increases by the size of the VM. A 100GB VM takes about 7minutes. This is unacceptable. This linear increase is caused by a suboptimal behavior by the Ultravisor and the Hypervisor. The Ultravisor unnecessarily migrates all the GFN of the VM from norma

Re: [PATCH 6/6] kernel: add a kernel_wait helper

2020-06-19 Thread Luis Chamberlain
On Thu, Jun 18, 2020 at 04:46:27PM +0200, Christoph Hellwig wrote: > --- a/kernel/exit.c > +++ b/kernel/exit.c > @@ -1626,6 +1626,22 @@ long kernel_wait4(pid_t upid, int __user *stat_addr, > int options, > return ret; > } > > +int kernel_wait(pid_t pid, int *stat) > +{ > + struct wait

Re: [PATCH] powerpc/pseries: new lparcfg key/value pair: partition_affinity_score

2020-06-19 Thread Tyrel Datwyler
On 6/19/20 8:34 AM, Scott Cheloha wrote: > The H_GetPerformanceCounterInfo PHYP hypercall has a subcall, > Affinity_Domain_Info_By_Partition, which returns, among other things, > a "partition affinity score" for a given LPAR. This score, a value on > [0-100], represents the processor-memory affini

Re: [PATCH 00/22] ReST conversion patches (final?)

2020-06-19 Thread Jonathan Corbet
On Mon, 15 Jun 2020 08:50:05 +0200 Mauro Carvalho Chehab wrote: > That's my final(*) series of conversion patches from .txt to ReST. > > (*) Well, running the script I'm using to check, I noticed a couple of new > *.txt files. > If I have some time, I'll try to address those last pending things

Re: [PATCH] pci: pcie: AER: Fix logging of Correctable errors

2020-06-19 Thread Joe Perches
On Fri, 2020-06-19 at 13:17 -0400, Sinan Kaya wrote: > On 6/18/2020 11:55 AM, Matt Jolly wrote: > > > + pci_warn(dev, " device [%04x:%04x] error > > status/mask=%08x/%08x\n", > > + dev->vendor, dev->device, > > + info->status, info->mask); > > + }

[PATCH] hvc: unify console setup naming

2020-06-19 Thread Sergey Senozhatsky
Use the 'common' foo_console_setup() naming scheme. There are 71 foo_console_setup() callbacks and only one foo_setup_console(). Signed-off-by: Sergey Senozhatsky Cc: Andy Shevchenko Cc: Steven Rostedt Cc: Greg Kroah-Hartman Cc: Jiri Slaby --- drivers/tty/hvc/hvc_xen.c | 4 ++-- 1 file chang

Re: [PATCH] pci: pcie: AER: Fix logging of Correctable errors

2020-06-19 Thread Sinan Kaya
On 6/18/2020 11:55 AM, Matt Jolly wrote: > + pci_warn(dev, " device [%04x:%04x] error > status/mask=%08x/%08x\n", > + dev->vendor, dev->device, > + info->status, info->mask); > + } else { > + pci_err(dev, " device [%04x:%04x

[PATCH 16/26] mm/powerpc: Use general page fault accounting

2020-06-19 Thread Peter Xu
Use the general page fault accounting by passing regs into handle_mm_fault(). CC: Michael Ellerman CC: Benjamin Herrenschmidt CC: Paul Mackerras CC: linuxppc-dev@lists.ozlabs.org Signed-off-by: Peter Xu --- arch/powerpc/mm/fault.c | 11 +++ 1 file changed, 3 insertions(+), 8 deletions

[PATCH] powerpc/pseries: new lparcfg key/value pair: partition_affinity_score

2020-06-19 Thread Scott Cheloha
The H_GetPerformanceCounterInfo PHYP hypercall has a subcall, Affinity_Domain_Info_By_Partition, which returns, among other things, a "partition affinity score" for a given LPAR. This score, a value on [0-100], represents the processor-memory affinity for the LPAR in question. A score of 0 indica

[PATCH v1 6/8] powerpc/32s: Only leave NX unset on segments used for modules

2020-06-19 Thread Christophe Leroy
Instead of leaving NX unset on all segments above the start of vmalloc space, only leave NX unset on segments used for modules. Signed-off-by: Christophe Leroy --- arch/powerpc/mm/book3s32/mmu.c | 17 ++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/m

[PATCH v1 5/8] powerpc: Use MODULES_VADDR if defined

2020-06-19 Thread Christophe Leroy
In order to allow allocation of modules outside of vmalloc space, use MODULES_VADDR and MODULES_END when MODULES_VADDR is defined. Redefine module_alloc() when MODULES_VADDR defined. Unmap corresponding KASAN shadow memory. Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/module.c

[PATCH v1 7/8] powerpc/32s: Kernel space starts at TASK_SIZE

2020-06-19 Thread Christophe Leroy
Kernel space starts at TASK_SIZE. Select kernel page table when address is over TASK_SIZE. Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/head_32.S | 12 ++-- arch/powerpc/mm/book3s32/hash_low.S | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/arch/p

[PATCH v1 8/8] powerpc/32s: Use dedicated segment for modules with STRICT_KERNEL_RWX

2020-06-19 Thread Christophe Leroy
When STRICT_KERNEL_RWX is set, we want to set NX bit on vmalloc segments. But modules require exec. Use a dedicated segment for modules. There is not much space above kernel, and we don't waste vmalloc space to do alignment. Therefore, we take the segment before PAGE_OFFSET for modules. Signed-of

[PATCH v1 2/8] powerpc/ptdump: Refactor update of pg_state

2020-06-19 Thread Christophe Leroy
In note_page(), the pg_state is updated the same way in two places. Add note_page_update_state() to do it. Also include the display of boundary markers there as it is missing "no level" leg, leading to a mismatch when the first two markers are at the same address and the first displayed area uses

[PATCH v1 4/8] powerpc/lib: Prepare code-patching for modules allocated outside vmalloc space

2020-06-19 Thread Christophe Leroy
Use is_vmalloc_or_module_addr() instead of is_vmalloc_addr() Signed-off-by: Christophe Leroy --- arch/powerpc/lib/code-patching.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/lib/code-patching.c b/arch/powerpc/lib/code-patching.c index 0a051dfeb177..8c3934ea62

[PATCH v1 0/8] powerpc/32s: Allocate modules outside of vmalloc space for STRICT_KERNEL_RWX

2020-06-19 Thread Christophe Leroy
On book3s32 (hash), exec protection is set per 256Mb segments with NX bit. Instead of clearing NX bit on vmalloc space when CONFIG_MODULES is selected, allocate modules in a dedicated segment (0xb000-0xbfff by default). This allows to keep exec protection on vmalloc space while allowing exe

[PATCH v1 1/8] powerpc/ptdump: Refactor update of st->last_pa

2020-06-19 Thread Christophe Leroy
st->last_pa is always updated in note_page() so it can be done outside the if/elseif/else block. Signed-off-by: Christophe Leroy --- arch/powerpc/mm/ptdump/ptdump.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/arch/powerpc/mm/ptdump/ptdump.c b/arch/powerpc/mm/ptdump/pt

[PATCH v1 3/8] powerpc: Set user/kernel boundary at TASK_SIZE instead of PAGE_OFFSET

2020-06-19 Thread Christophe Leroy
User space stops at TASK_SIZE. At the moment, kernel space starts at PAGE_OFFSET. In order to use space between TASK_SIZE and PAGE_OFFSET for modules, make TASK_SIZE the limit between user and kernel space. Note that fault.c already considers TASK_SIZE as the boundary between user and kernel spac

[PATCH v5] ocxl: control via sysfs whether the FPGA is reloaded on a link reset

2020-06-19 Thread Frederic Barrat
From: Philippe Bergheaud Some opencapi FPGA images allow to control if the FPGA should be reloaded on the next adapter reset. If it is supported, the image specifies it through a Vendor Specific DVSEC in the config space of function 0. Signed-off-by: Philippe Bergheaud Signed-off-by: Frederic B

Re: linux-next: manual merge of the pidfd tree with the powerpc-fixes tree

2020-06-19 Thread Christian Brauner
On Fri, Jun 19, 2020 at 09:17:30PM +1000, Michael Ellerman wrote: > Stephen Rothwell writes: > > Hi all, > > > > Today's linux-next merge of the pidfd tree got a conflict in: > > > > arch/powerpc/kernel/syscalls/syscall.tbl > > > > between commit: > > > > 35e32a6cb5f6 ("powerpc/syscalls: Split

[PATCH v5 26/26] powerpc/selftest/ptrace-pkey: IAMR and uamor cannot be updated by ptrace

2020-06-19 Thread Aneesh Kumar K.V
Both IAMR and uamor are privileged and cannot be updated by userspace. Hence we also don't allow ptrace interface to update them. Don't update them in the test. Also expected_iamr is only changed if we can allocate a DISABLE_EXECUTE pkey. Signed-off-by: Aneesh Kumar K.V --- tools/testing/selfte

[PATCH v5 25/26] powerpc/selftest/ptrace-pkey: Update the test to mark an invalid pkey correctly

2020-06-19 Thread Aneesh Kumar K.V
Signed-off-by: Aneesh Kumar K.V --- .../selftests/powerpc/ptrace/ptrace-pkey.c| 30 --- 1 file changed, 12 insertions(+), 18 deletions(-) diff --git a/tools/testing/selftests/powerpc/ptrace/ptrace-pkey.c b/tools/testing/selftests/powerpc/ptrace/ptrace-pkey.c index f9216c7a18

[PATCH v5 24/26] powerpc/selftest/ptrave-pkey: Rename variables to make it easier to follow code

2020-06-19 Thread Aneesh Kumar K.V
Rename variable to indicate that they are invalid values which we will use to test ptrace update of pkeys. Signed-off-by: Aneesh Kumar K.V --- .../selftests/powerpc/ptrace/ptrace-pkey.c| 26 +-- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/tools/testing/sel

[PATCH v5 23/26] powerpc/book3s64/kuap: Move UAMOR setup to key init function

2020-06-19 Thread Aneesh Kumar K.V
UAMOR values are not application-specific. The kernel initializes its value based on different reserved keys. Remove the thread-specific UAMOR value and don't switch the UAMOR on context switch. Move UAMOR initialization to key initialization code. Now that KUAP/KUEP feature depends on PPC_MEM_KEY

[PATCH v5 22/26] powerpc/book3s64/kuap/kuep: Make KUAP and KUEP a subfeature of PPC_MEM_KEYS

2020-06-19 Thread Aneesh Kumar K.V
The next set of patches adds support for kuap with hash translation. Hence make KUAP a BOOK3S_64 feature. Also make it a subfeature of PPC_MEM_KEYS. Hash translation is going to use pkeys to support KUAP/KUEP. Adding this dependency reduces the code complexity and enables us to move some of the ini

[PATCH v5 21/26] powerpc/book3s64/kuap: Rename MMU_FTR_RADIX_KUAP to MMU_FTR_KUAP

2020-06-19 Thread Aneesh Kumar K.V
The next set of patches adds support for kuap with hash translation. In preparation for that rename/move kuap related functions to non radix names. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/book3s/64/kup.h | 20 ++-- arch/powerpc/include/asm/mmu.h |

[PATCH v5 20/26] powerpc/book3s64/kuep: Move KUEP related function outside radix

2020-06-19 Thread Aneesh Kumar K.V
The next set of patches adds support for kuep with hash translation. In preparation for that rename/move kuap related functions to non radix names. Also set MMU_FTR_KUEP and add the missing isync(). Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/book3s/64/kup.h | 1 + arch/powerp

[PATCH v5 19/26] powerpc/book3s64/kuap: Move KUAP related function outside radix

2020-06-19 Thread Aneesh Kumar K.V
The next set of patches adds support for kuap with hash translation. In preparation for that rename/move kuap related functions to non radix names. Signed-off-by: Aneesh Kumar K.V --- .../asm/book3s/64/{kup-radix.h => kup.h} | 6 +++--- arch/powerpc/include/asm/kup.h| 2 +-

[PATCH v5 18/26] powerpc/book3s64/keys/kuap: Reset AMR/IAMR values on kexec

2020-06-19 Thread Aneesh Kumar K.V
As we kexec across kernels that use AMR/IAMR for different purposes we need to ensure that new kernels get kexec'd with a reset value of AMR/IAMR. For ex: the new kernel can use key 0 for kernel mapping and the old AMR value prevents access to key 0. This patch also removes reset if IAMR and AMOR

[PATCH v5 17/26] powerpc/book3s64/keys: Print information during boot.

2020-06-19 Thread Aneesh Kumar K.V
Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/mm/book3s64/pkeys.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/powerpc/mm/book3s64/pkeys.c b/arch/powerpc/mm/book3s64/pkeys.c index 810118123e70..0d72c0246052 100644 --- a/arch/powerpc/mm/book3s64/pkeys.c +++ b/arch/powerpc/mm/book3s6

[PATCH v5 16/26] powerpc/book3s64/pkeys: Use MMU_FTR_PKEY instead of pkey_disabled static key

2020-06-19 Thread Aneesh Kumar K.V
Instead of pkey_disabled static key use mmu feature MMU_FTR_PKEY. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/book3s/64/pkeys.h | 2 +- arch/powerpc/include/asm/pkeys.h | 14 ++ arch/powerpc/mm/book3s64/pkeys.c | 16 +++- 3 files chan

[PATCH v5 15/26] powerpc/book3s64/pkeys: Use execute_pkey_disable static key

2020-06-19 Thread Aneesh Kumar K.V
Use execute_pkey_disabled static key to check for execute key support instead of pkey_disabled. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/pkeys.h | 10 +- arch/powerpc/mm/book3s64/pkeys.c | 5 - 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/arch/

[PATCH v5 14/26] powerpc/book3s64/kuep: Add MMU_FTR_KUEP

2020-06-19 Thread Aneesh Kumar K.V
This will be used to enable/disable Kernel Userspace Execution Prevention (KUEP). Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/mmu.h | 5 + arch/powerpc/mm/book3s64/radix_pgtable.c | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/

[PATCH v5 13/26] powerpc/book3s64/pkeys: Enable MMU_FTR_PKEY

2020-06-19 Thread Aneesh Kumar K.V
Parse storage keys related device tree entry in early_init_devtree and enable MMU feature MMU_FTR_PKEY if pkeys are supported. MMU feature is used instead of CPU feature because this enables us to group MMU_FTR_KUAP and MMU_FTR_PKEY in asm feature fixup code. Signed-off-by: Aneesh Kumar K.V ---

[PATCH v5 12/26] powerpc/book3s64/pkeys: Mark all the pkeys above max pkey as reserved

2020-06-19 Thread Aneesh Kumar K.V
The hypervisor can return less than max allowed pkey (for ex: 31) instead of 32. We should mark all the pkeys above max allowed as reserved so that we avoid the allocation of the wrong pkey(for ex: key 31 in the above case) by userspace. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/mm/book3s

[PATCH v5 11/26] powerpc/book3s64/pkeys: Make initial_allocation_mask static

2020-06-19 Thread Aneesh Kumar K.V
initial_allocation_mask is not used outside this file. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/pkeys.h | 1 - arch/powerpc/mm/book3s64/pkeys.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/powerpc/include/asm/pkeys.h b/arch/powerpc/include/asm/pk

[PATCH v5 10/26] powerpc/book3s64/pkeys: Convert pkey_total to max_pkey

2020-06-19 Thread Aneesh Kumar K.V
max_pkey now represents max key value that userspace can allocate. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/pkeys.h | 7 +-- arch/powerpc/mm/book3s64/pkeys.c | 14 +++--- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/arch/powerpc/include/asm/pke

[PATCH v5 09/26] powerpc/book3s64/pkeys: Simplify pkey disable branch

2020-06-19 Thread Aneesh Kumar K.V
Make the default value FALSE (pkey enabled) and set to TRUE when we find the total number of keys supported to be zero. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/pkeys.h | 2 +- arch/powerpc/mm/book3s64/pkeys.c | 7 +++ 2 files changed, 4 insertions(+), 5 deletions(-) dif

[PATCH v5 08/26] powerpc/book3s64/pkeys: Convert execute key support to static key

2020-06-19 Thread Aneesh Kumar K.V
Convert the bool to a static key like pkey_disabled. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/mm/book3s64/pkeys.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/arch/powerpc/mm/book3s64/pkeys.c b/arch/powerpc/mm/book3s64/pkeys.c index 9e68a08799ee..7d400

[PATCH v5 05/26] powerpc/book3s64/pkeys: Simplify the key initialization

2020-06-19 Thread Aneesh Kumar K.V
Add documentation explaining the execute_only_key. The reservation and initialization mask details are also explained in this patch. No functional change in this patch. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/mm/book3s64/pkeys.c | 186 ++- 1 file changed, 1

[PATCH v5 07/26] powerpc/book3s64/pkeys: kill cpu feature key CPU_FTR_PKEY

2020-06-19 Thread Aneesh Kumar K.V
We don't use CPU_FTR_PKEY anymore. Remove the feature bit and mark it free. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/cputable.h | 13 ++--- arch/powerpc/kernel/dt_cpu_ftrs.c | 6 -- 2 files changed, 6 insertions(+), 13 deletions(-) diff --git a/arch/powerpc/in

[PATCH v5 06/26] powerpc/book3s64/pkeys: Prevent key 1 modification from userspace.

2020-06-19 Thread Aneesh Kumar K.V
Key 1 is marked reserved by ISA. Setup uamor to prevent userspace modification of the same. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/mm/book3s64/pkeys.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/powerpc/mm/book3s64/pkeys.c b/arch/powerpc/mm/book3s64/pkeys.c index 3db0b3cfc

[PATCH v5 04/26] powerpc/book3s64/pkeys: Explain key 1 reservation details

2020-06-19 Thread Aneesh Kumar K.V
This explains the details w.r.t key 1. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/mm/book3s64/pkeys.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/mm/book3s64/pkeys.c b/arch/powerpc/mm/book3s64/pkeys.c index 1199fc2bfaec..d60e6bfa3e03 100644 --- a/ar

[PATCH v5 03/26] powerpc/book3s64/pkeys: Move pkey related bits in the linux page table

2020-06-19 Thread Aneesh Kumar K.V
To keep things simple, all the pkey related bits are kept together in linux page table for 64K config with hash translation. With hash-4k kernel requires 4 bits to store slots details. This is done by overloading some of the RPN bits for storing the slot details. Due to this PKEY_BIT0 on the 4K con

[PATCH v5 02/26] powerpc/book3s64/pkeys: pkeys are supported only on hash on book3s.

2020-06-19 Thread Aneesh Kumar K.V
Move them to hash specific file and add BUG() for radix path. --- .../powerpc/include/asm/book3s/64/hash-pkey.h | 32 arch/powerpc/include/asm/book3s/64/pkeys.h| 25 + arch/powerpc/include/asm/pkeys.h | 37 --- 3 files changed, 64 inser

[PATCH v5 01/26] powerpc/book3s64/pkeys: Fixup bit numbering

2020-06-19 Thread Aneesh Kumar K.V
This number the pkey bit such that it is easy to follow. PKEY_BIT0 is the lower order bit. This makes further changes easy to follow. No functional change in this patch other than linux page table for hash translation now maps pkeys differently. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/

[PATCH v5 00/26] powerpc/book3s/64/pkeys: Simplify the code

2020-06-19 Thread Aneesh Kumar K.V
This patch series update the pkey subsystem with more documentation and rename variables so that it is easy to follow the code. We drop the changes to support KUAP/KUEP with hash translation in this update. The changes are adding 200 cycles to null syscalls benchmark and I want to look at that clos

Re: [PATCH v2] ASoC: fsl_spdif: Add pm runtime function

2020-06-19 Thread Mark Brown
On Fri, 19 Jun 2020 15:54:33 +0800, Shengjiu Wang wrote: > Add pm runtime support and move clock handling there. > Close the clocks at suspend to reduce the power consumption. > > fsl_spdif_suspend is replaced by pm_runtime_force_suspend. > fsl_spdif_resume is replaced by pm_runtime_force_resume.

Re: [PATCH v5 00/10] Support new pmem flush and sync instructions for POWER

2020-06-19 Thread Aneesh Kumar K.V
"Aneesh Kumar K.V" writes: > This patch series enables the usage os new pmem flush and sync instructions > on POWER > architecture. POWER10 introduces two new variants of dcbf instructions > (dcbstps and dcbfps) > that can be used to write modified locations back to persistent storage. > Add

Re: [PATCH 2/2] powerpc/syscalls: Split SPU-ness out of ABI

2020-06-19 Thread Arnd Bergmann
On Tue, Jun 16, 2020 at 3:56 PM Michael Ellerman wrote: > > Using the ABI field to encode whether a syscall is usable by SPU > programs or not is a bit of kludge. > > The ABI of the syscall doesn't change depending on the SPU-ness, but > in order to make the syscall generation work we have to pret

Re: linux-next: manual merge of the pidfd tree with the powerpc-fixes tree

2020-06-19 Thread Michael Ellerman
Stephen Rothwell writes: > Hi all, > > Today's linux-next merge of the pidfd tree got a conflict in: > > arch/powerpc/kernel/syscalls/syscall.tbl > > between commit: > > 35e32a6cb5f6 ("powerpc/syscalls: Split SPU-ness out of ABI") > > from the powerpc-fixes tree and commit: > > 9b4feb630e8e

Re: [PATCH] mm/debug_vm_pgtable: Fix build failure with powerpc 8xx

2020-06-19 Thread Anshuman Khandual
On 06/18/2020 08:01 PM, Christophe Leroy wrote: > Fix it by using the recently added ptep_get() helper. > > Fixes: 9e343b467c70 ("READ_ONCE: Enforce atomicity for {READ,WRITE}_ONCE() > memory accesses") > Signed-off-by: Christophe Leroy > --- > mm/debug_vm_pgtable.c | 4 ++-- > 1 file changed

Re: [PATCH v5 01/13] powerpc: Remove Xilinx PPC405/PPC440 support

2020-06-19 Thread Michael Ellerman
Nathan Chancellor writes: > On Thu, Jun 18, 2020 at 10:48:21AM +1000, Michael Ellerman wrote: >> Nick Desaulniers writes: >> > On Wed, Jun 17, 2020 at 3:20 AM Michael Ellerman >> > wrote: >> >> Michael Ellerman writes: >> >> > Michal Simek writes: >> >> >> >> >> >> >> Or if bamboo requires u

Re: [PATCH 2/2] powerpc/syscalls: Split SPU-ness out of ABI

2020-06-19 Thread Michael Ellerman
Michael Ellerman writes: > Using the ABI field to encode whether a syscall is usable by SPU > programs or not is a bit of kludge. > > The ABI of the syscall doesn't change depending on the SPU-ness, but > in order to make the syscall generation work we have to pretend that > it does. > > It also m

Re: [PATCH 3/6] exec: cleanup the count() function

2020-06-19 Thread Sergei Shtylyov
Hello! On 18.06.2020 17:46, Christoph Hellwig wrote: Remove the max argument as it is hard wired to MAX_ARG_STRINGS, and Technically, argument is what's actually passed to a function, you're removing a function parameter. give the function a slightly less generic name. Signed-off-by:

[PATCH v2] ASoC: fsl_spdif: Add pm runtime function

2020-06-19 Thread Shengjiu Wang
Add pm runtime support and move clock handling there. Close the clocks at suspend to reduce the power consumption. fsl_spdif_suspend is replaced by pm_runtime_force_suspend. fsl_spdif_resume is replaced by pm_runtime_force_resume. Signed-off-by: Shengjiu Wang Acked-by: Nicolin Chen --- changes

Re: [PATCH] mm/debug_vm_pgtable: Fix build failure with powerpc 8xx

2020-06-19 Thread Will Deacon
On Thu, Jun 18, 2020 at 02:31:29PM +, Christophe Leroy wrote: > diff --git a/mm/debug_vm_pgtable.c b/mm/debug_vm_pgtable.c > index e45623016aea..61ab16fb2e36 100644 > --- a/mm/debug_vm_pgtable.c > +++ b/mm/debug_vm_pgtable.c > @@ -246,13 +246,13 @@ static void __init pgd_populate_tests(struct m

Re: [PATCH] ASoC: fsl_spdif: Add pm runtime function

2020-06-19 Thread Shengjiu Wang
On Fri, Jun 19, 2020 at 1:51 PM Nicolin Chen wrote: > > On Thu, Jun 18, 2020 at 07:55:34PM +0800, Shengjiu Wang wrote: > > Add pm runtime support and move clock handling there. > > Close the clocks at suspend to reduce the power consumption. > > > > fsl_spdif_suspend is replaced by pm_runtime_forc

[PATCH V2] powerpc/pseries/svm: Remove unwanted check for shared_lppaca_size

2020-06-19 Thread Satheesh Rajendran
Early secure guest boot hits the below crash while booting with vcpus numbers aligned with page boundary for PAGE size of 64k and LPPACA size of 1k i.e 64, 128 etc, due to the BUG_ON assert for shared_lppaca_total_size equal to shared_lppaca_size, [0.00] Partition configured for 64 cpus.