Re: [PATCH v3 0/3] Off-load TLB invalidations to host for !GTSE

2020-07-16 Thread Bharata B Rao
On Fri, Jul 17, 2020 at 12:44:00PM +1000, Nicholas Piggin wrote: > Excerpts from Nicholas Piggin's message of July 17, 2020 12:08 pm: > > Excerpts from Qian Cai's message of July 17, 2020 3:27 am: > >> On Fri, Jul 03, 2020 at 11:06:05AM +0530, Bharata B Rao wrote: > >>> Hypervisor may choose not

Re: [PATCH v3 03/12] powerpc/kexec_file: add helper functions for getting memory ranges

2020-07-16 Thread Hari Bathini
On 15/07/20 5:19 am, Thiago Jung Bauermann wrote: > > Hello Hari, > > Hari Bathini writes: > >> In kexec case, the kernel to be loaded uses the same memory layout as >> the running kernel. So, passing on the DT of the running kernel would >> be good enough. >> >> But in case of kdump,

[PATCH v4 04/10] powerpc/watchpoint: Enable watchpoint functionality on power10 guest

2020-07-16 Thread Ravi Bangoria
CPU_FTR_DAWR is by default enabled for host via CPU_FTRS_DT_CPU_BASE (controlled by CONFIG_PPC_DT_CPU_FTRS). But cpu-features device-tree node is not PAPR compatible and thus not yet used by kvm or pHyp guests. Enable watchpoint functionality on power10 guest (both kvm and powervm) by adding

Re: [PATCH v4 04/10] powerpc/watchpoint: Enable watchpoint functionality on power10 guest

2020-07-16 Thread Jordan Niethe
On Fri, Jul 17, 2020 at 2:10 PM Ravi Bangoria wrote: > > CPU_FTR_DAWR is by default enabled for host via CPU_FTRS_DT_CPU_BASE > (controlled by CONFIG_PPC_DT_CPU_FTRS). But cpu-features device-tree > node is not PAPR compatible and thus not yet used by kvm or pHyp > guests. Enable watchpoint

Re: [PATCH 01/11] powerpc/smp: Cache node for reuse

2020-07-16 Thread Gautham R Shenoy
On Tue, Jul 14, 2020 at 10:06:14AM +0530, Srikar Dronamraju wrote: > While cpu_to_node is inline function with access to per_cpu variable. > However when using repeatedly, it may be cleaner to cache it in a local > variable. > > Also fix a build error in a some weird config. > "error:

[PATCH v4 05/10] powerpc/dt_cpu_ftrs: Add feature for 2nd DAWR

2020-07-16 Thread Ravi Bangoria
Add new device-tree feature for 2nd DAWR. If this feature is present, 2nd DAWR is supported, otherwise not. Signed-off-by: Ravi Bangoria --- arch/powerpc/include/asm/cputable.h | 7 +-- arch/powerpc/kernel/dt_cpu_ftrs.c | 7 +++ 2 files changed, 12 insertions(+), 2 deletions(-) diff

[PATCH v4 00/10] powerpc/watchpoint: Enable 2nd DAWR on baremetal and powervm

2020-07-16 Thread Ravi Bangoria
Last series[1] was to add basic infrastructure support for more than one watchpoint on Book3S powerpc. This series actually enables the 2nd DAWR for baremetal and powervm. Kvm guest is still not supported. v3: https://lore.kernel.org/lkml/20200708045046.135702-1-ravi.bango...@linux.ibm.com

[PATCH v4 09/10] powerpc/watchpoint: Return available watchpoints dynamically

2020-07-16 Thread Ravi Bangoria
So far Book3S Powerpc supported only one watchpoint. Power10 is introducing 2nd DAWR. Enable 2nd DAWR support for Power10. Availability of 2nd DAWR will depend on CPU_FTR_DAWR1. Signed-off-by: Ravi Bangoria --- arch/powerpc/include/asm/cputable.h | 4 +++-

[PATCH v4 08/10] powerpc/watchpoint: Guest support for 2nd DAWR hcall

2020-07-16 Thread Ravi Bangoria
2nd DAWR can be set/unset using H_SET_MODE hcall with resource value 5. Enable powervm guest support with that. This has no effect on kvm guest because kvm will return error if guest does hcall with resource value 5. Signed-off-by: Ravi Bangoria --- arch/powerpc/include/asm/hvcall.h | 1

Re: [PATCH 02/11] powerpc/smp: Merge Power9 topology with Power topology

2020-07-16 Thread Gautham R Shenoy
Hi Srikar, On Tue, Jul 14, 2020 at 10:06:15AM +0530, Srikar Dronamraju wrote: > A new sched_domain_topology_level was added just for Power9. However the > same can be achieved by merging powerpc_topology with power9_topology > and makes the code more simpler especially when adding a new sched >

Re: [PATCH v4 05/10] powerpc/dt_cpu_ftrs: Add feature for 2nd DAWR

2020-07-16 Thread Jordan Niethe
On Fri, Jul 17, 2020 at 2:10 PM Ravi Bangoria wrote: > > Add new device-tree feature for 2nd DAWR. If this feature is present, > 2nd DAWR is supported, otherwise not. > > Signed-off-by: Ravi Bangoria > --- > arch/powerpc/include/asm/cputable.h | 7 +-- > arch/powerpc/kernel/dt_cpu_ftrs.c

Re: [PATCH v3] powerpc/pseries: detect secure and trusted boot state of the system.

2020-07-16 Thread Daniel Axtens
Michal Suchánek writes: > On Wed, Jul 15, 2020 at 07:52:01AM -0400, Nayna Jain wrote: >> The device-tree property to check secure and trusted boot state is >> different for guests(pseries) compared to baremetal(powernv). >> >> This patch updates the existing is_ppc_secureboot_enabled() and >>

Re: [RFC PATCH 4/7] x86: use exit_lazy_tlb rather than membarrier_mm_sync_core_before_usermode

2020-07-16 Thread Alan Stern
On Thu, Jul 16, 2020 at 02:58:41PM -0400, Mathieu Desnoyers wrote: > - On Jul 16, 2020, at 12:03 PM, Mathieu Desnoyers > mathieu.desnoy...@efficios.com wrote: > > > - On Jul 16, 2020, at 11:46 AM, Mathieu Desnoyers > > mathieu.desnoy...@efficios.com wrote: > > > >> - On Jul 16,

Re: [PATCH v3 06/12] ppc64/kexec_file: restrict memory usage of kdump kernel

2020-07-16 Thread Hari Bathini
On 17/07/20 3:33 am, Thiago Jung Bauermann wrote: > > Hari Bathini writes: > >> On 16/07/20 4:22 am, Thiago Jung Bauermann wrote: >>> >>> Hari Bathini writes: >>> + * each representing a memory range. + */ + ranges = (len >> 2) / (n_mem_addr_cells +

Re: [PATCH 03/11] powerpc/smp: Move powerpc_topology above

2020-07-16 Thread Gautham R Shenoy
On Tue, Jul 14, 2020 at 10:06:16AM +0530, Srikar Dronamraju wrote: > Just moving the powerpc_topology description above. > This will help in using functions in this file and avoid declarations. > > No other functional changes > > Cc: linuxppc-dev > Cc: Michael Ellerman > Cc: Nick Piggin > Cc:

Re: [PATCH v3 0/3] Off-load TLB invalidations to host for !GTSE

2020-07-16 Thread Nicholas Piggin
Excerpts from Nicholas Piggin's message of July 17, 2020 12:08 pm: > Excerpts from Qian Cai's message of July 17, 2020 3:27 am: >> On Fri, Jul 03, 2020 at 11:06:05AM +0530, Bharata B Rao wrote: >>> Hypervisor may choose not to enable Guest Translation Shootdown Enable >>> (GTSE) option for the

Re: [PATCH -next] cpuidle/pseries: Make symbol 'pseries_idle_driver' static

2020-07-16 Thread Daniel Lezcano
On 16/07/2020 14:56, Michael Ellerman wrote: > On Tue, 14 Jul 2020 22:24:24 +0800, Wei Yongjun wrote: >> The sparse tool complains as follows: >> >> drivers/cpuidle/cpuidle-pseries.c:25:23: warning: >> symbol 'pseries_idle_driver' was not declared. Should it be static? >> >> 'pseries_idle_driver'

Re: [PATCH V5 1/4] mm/debug_vm_pgtable: Add tests validating arch helpers for core MM features

2020-07-16 Thread Anshuman Khandual
On 07/16/2020 07:44 PM, Steven Price wrote: > On 13/07/2020 04:23, Anshuman Khandual wrote: >> This adds new tests validating arch page table helpers for these following >> core memory features. These tests create and test specific mapping types at >> various page table levels. >> >> 1. SPECIAL

[PATCH v4 02/10] powerpc/watchpoint: Fix DAWR exception constraint

2020-07-16 Thread Ravi Bangoria
Pedro Miraglia Franco de Carvalho noticed that on p8/p9, DAR value is inconsistent with different type of load/store. Like for byte,word etc. load/stores, DAR is set to the address of the first byte of overlap between watch range and real access. But for quadword load/ store it's sometime set to

[PATCH v4 03/10] powerpc/watchpoint: Fix DAWR exception for CACHEOP

2020-07-16 Thread Ravi Bangoria
'ea' returned by analyse_instr() needs to be aligned down to cache block size for CACHEOP instructions. analyse_instr() does not set size for CACHEOP, thus size also needs to be calculated manually. Fixes: 27985b2a640e ("powerpc/watchpoint: Don't ignore extraneous exceptions blindly") Fixes:

ASMedia USB 3.x host controllers triggering EEH on POWER9

2020-07-16 Thread Forest Crossman
Hi, all, I have several ASMedia USB 3.x host controllers (ASM2142 and ASM3142, both share the same Vendor ID/Device ID pair) that I'd like to use with a POWER9 system (a Raptor Computing Systems Talos II). Unfortunately, while the kernel recognizes the controllers just fine, as soon as I plug in

Re: [PATCH v3 02/12] powerpc/kexec_file: mark PPC64 specific code

2020-07-16 Thread Hari Bathini
On 16/07/20 7:19 am, Thiago Jung Bauermann wrote: > > I didn't forget about this patch. I just wanted to see more of the > changes before comenting on it. > > Hari Bathini writes: > >> Some of the kexec_file_load code isn't PPC64 specific. Move PPC64 >> specific code from kexec/file_load.c

Re: [PATCH 04/11] powerpc/smp: Enable small core scheduling sooner

2020-07-16 Thread Gautham R Shenoy
On Tue, Jul 14, 2020 at 10:06:17AM +0530, Srikar Dronamraju wrote: > Enable small core scheduling as soon as we detect that we are in a > system that supports thread group. Doing so would avoid a redundant > check. > > Cc: linuxppc-dev > Cc: Michael Ellerman > Cc: Nick Piggin > Cc: Oliver

[PATCH v4 01/10] powerpc/watchpoint: Fix 512 byte boundary limit

2020-07-16 Thread Ravi Bangoria
Milton Miller reported that we are aligning start and end address to wrong size SZ_512M. It should be SZ_512. Fix that. While doing this change I also found a case where ALIGN() comparison fails. Within a given aligned range, ALIGN() of two addresses does not match when start address is pointing

[PATCH v4 10/10] powerpc/watchpoint: Remove 512 byte boundary

2020-07-16 Thread Ravi Bangoria
Power10 has removed 512 bytes boundary from match criteria. i.e. The watch range can cross 512 bytes boundary. Signed-off-by: Ravi Bangoria --- arch/powerpc/kernel/hw_breakpoint.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/kernel/hw_breakpoint.c

Re: [powerpc:next-test 125/127] arch/powerpc/mm/book3s64/pkeys.c:392:7: error: implicit declaration of function 'is_pkey_enabled'; did you mean

2020-07-16 Thread Aneesh Kumar K.V
On 7/17/20 7:29 AM, kernel test robot wrote: tree: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next-test head: 0fbd1eb4df96e1cbd039e0b95fdf62cf65a7faf9 commit: ed411c66eea2ccf93a634ae661a1f79c2bc63d88 [125/127] powerpc/book3s64/pkeys: Remove is_pkey_enabled() config:

[PATCH v4 07/10] powerpc/watchpoint: Rename current H_SET_MODE DAWR macro

2020-07-16 Thread Ravi Bangoria
Current H_SET_MODE hcall macro name for setting/resetting DAWR0 is H_SET_MODE_RESOURCE_SET_DAWR. Add suffix 0 to macro name as well. Signed-off-by: Ravi Bangoria --- arch/powerpc/include/asm/hvcall.h | 2 +- arch/powerpc/include/asm/plpar_wrappers.h | 2 +- arch/powerpc/kvm/book3s_hv.c

[PATCH v4 06/10] powerpc/watchpoint: Set CPU_FTR_DAWR1 based on pa-features bit

2020-07-16 Thread Ravi Bangoria
As per the PAPR, bit 0 of byte 64 in pa-features property indicates availability of 2nd DAWR registers. i.e. If this bit is set, 2nd DAWR is present, otherwise not. Host generally uses "cpu-features", which masks "pa-features". But "cpu-features" are still not used for guests and thus this change

[PATCH v2 3/4] powerpc ppc-opcode: add opcodes for vsx vector paired instructions

2020-07-16 Thread Balamuruhan S
add instruction opcodes for new vsx vector paired instructions, * Load VSX Vector Paired (lxvp) * Load VSX Vector Paired Indexed (lxvpx) * Store VSX Vector Paired (stxvp) * Store VSX Vector Paired Indexed (stxvpx) Signed-off-by: Balamuruhan S ---

[PATCH v2 1/4] powerpc/sstep: support new VSX vector paired storage access instructions

2020-07-16 Thread Balamuruhan S
VSX Vector Paired instructions loads/stores an octword (32 bytes) from/to storage into two sequential VSRs. Add `analyse_instr()` support to these new instructions, * Load VSX Vector Paired (lxvp) * Load VSX Vector Paired Indexed (lxvpx) * Prefixed Load VSX Vector Paired

[PATCH v2 2/4] powerpc/sstep: support emulation for vsx vector paired storage access instructions

2020-07-16 Thread Balamuruhan S
add emulate_step() changes to support vsx vector paired storage access instructions that provides octword operands loads/stores between storage and set of 2 Vector Scalar Registers (VSRs). Signed-off-by: Balamuruhan S --- arch/powerpc/include/asm/sstep.h | 2 +- arch/powerpc/lib/sstep.c

Re: [RFC PATCH 4/7] x86: use exit_lazy_tlb rather than membarrier_mm_sync_core_before_usermode

2020-07-16 Thread Nicholas Piggin
Excerpts from Andy Lutomirski's message of July 16, 2020 3:18 pm: > > >> On Jul 15, 2020, at 9:15 PM, Nicholas Piggin wrote: >> >> Excerpts from Mathieu Desnoyers's message of July 14, 2020 12:13 am: >>> - On Jul 13, 2020, at 9:47 AM, Nicholas Piggin npig...@gmail.com wrote: >>>

[PATCH v2 4/4] powerpc sstep: add testcases for vsx load/store instructions

2020-07-16 Thread Balamuruhan S
add testcases for vsx load/store vector paired instructions, * Load VSX Vector Paired (lxvp) * Load VSX Vector Paired Indexed (lxvpx) * Prefixed Load VSX Vector Paired (plxvp) * Store VSX Vector Paired (stxvp) * Store VSX Vector Paired Indexed (stxvpx)

Re: [PATCH v2 1/4] powerpc/sstep: support new VSX vector paired storage access instructions

2020-07-16 Thread Ravi Bangoria
Hi Bala, @@ -2382,6 +2386,15 @@ int analyse_instr(struct instruction_op *op, const struct pt_regs *regs, op->vsx_flags = VSX_SPLAT; break; + case 333: /* lxvpx */ + if (!cpu_has_feature(CPU_FTR_ARCH_31)) +

[PATCH v2 0/4] VSX 32-byte vector paired load/store instructions

2020-07-16 Thread Balamuruhan S
VSX vector paired instructions operates with octword (32-byte) operand for loads and stores between storage and a pair of two sequential Vector-Scalar Registers (VSRs). There are 4 word instructions and 2 prefixed instructions that provides this 32-byte storage access operations - lxvp, lxvpx,

[PATCH v4 0/7] Remove default DMA window before creating DDW

2020-07-16 Thread Leonardo Bras
There are some devices in which a hypervisor may only allow 1 DMA window to exist at a time, and in those cases, a DDW is never created to them, since the default DMA window keeps using this resource. LoPAR recommends this procedure: 1. Remove the default DMA window, 2. Query for which configs

[PATCH v4 1/7] powerpc/pseries/iommu: Create defines for operations in ibm, ddw-applicable

2020-07-16 Thread Leonardo Bras
Create defines to help handling ibm,ddw-applicable values, avoiding confusion about the index of given operations. Signed-off-by: Leonardo Bras --- arch/powerpc/platforms/pseries/iommu.c | 43 -- 1 file changed, 26 insertions(+), 17 deletions(-) diff --git

[powerpc:merge] BUILD SUCCESS 58a4eb09c4aebaaffa8b4517c71543a41539c096

2020-07-16 Thread kernel test robot
tree/branch: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git merge branch HEAD: 58a4eb09c4aebaaffa8b4517c71543a41539c096 Automatic merge of 'master', 'next' and 'fixes' (2020-07-15 23:12) elapsed time: 1031m configs tested: 94 configs skipped: 4 The following configs have

Re: [PATCH v3] powerpc/pseries: detect secure and trusted boot state of the system.

2020-07-16 Thread Michal Suchánek
On Wed, Jul 15, 2020 at 07:52:01AM -0400, Nayna Jain wrote: > The device-tree property to check secure and trusted boot state is > different for guests(pseries) compared to baremetal(powernv). > > This patch updates the existing is_ppc_secureboot_enabled() and > is_ppc_trustedboot_enabled()

[RFC PATCH] powerpc/pseries/svm: capture instruction faulting on MMIO access, in sprg0 register

2020-07-16 Thread Ram Pai
An instruction accessing a mmio address, generates a HDSI fault. This fault is appropriately handled by the Hypervisor. However in the case of secureVMs, the fault is delivered to the ultravisor. Unfortunately the Ultravisor has no correct-way to fetch the faulting instruction. The PEF

Re: [RFC PATCH 4/7] x86: use exit_lazy_tlb rather than membarrier_mm_sync_core_before_usermode

2020-07-16 Thread Nicholas Piggin
Excerpts from Peter Zijlstra's message of July 16, 2020 6:50 pm: > On Wed, Jul 15, 2020 at 10:18:20PM -0700, Andy Lutomirski wrote: >> > On Jul 15, 2020, at 9:15 PM, Nicholas Piggin wrote: > >> > CPU0 CPU1 >> > 1. user stuff >> > a. membarrier()

[PATCH v4 5/7] powerpc/iommu: Move iommu_table cleaning routine to iommu_table_clean

2020-07-16 Thread Leonardo Bras
Move the part of iommu_table_free() that does struct iommu_table cleaning into iommu_table_clean, so we can invoke it separately. This new function is useful for cleaning struct iommu_table before initializing it again with a new DMA window, without having it freed and allocated again.

Re: [PATCH] pseries: Fix 64 bit logical memory block panic

2020-07-16 Thread Paul Mackerras
On Wed, Jul 15, 2020 at 06:12:25PM +0530, Aneesh Kumar K.V wrote: > Anton Blanchard writes: > > > Booting with a 4GB LMB size causes us to panic: > > > > qemu-system-ppc64: OS terminated: OS panic: > > Memory block size not suitable: 0x0 > > > > Fix pseries_memory_block_size() to handle

[PATCH -next] powerpc: Convert to DEFINE_SHOW_ATTRIBUTE

2020-07-16 Thread Qinglang Miao
From: Chen Huang Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: Chen Huang --- arch/powerpc/kvm/book3s_xive_native.c | 12 +--- arch/powerpc/mm/ptdump/bats.c | 24 +++- arch/powerpc/mm/ptdump/hashpagetable.c | 12 +---

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

2020-07-16 Thread Leonardo Bras
On LoPAR "DMA Window Manipulation Calls", it's recommended to remove the default DMA window for the device, before attempting to configure a DDW, in order to make the maximum resources available for the next DDW to be created. This is a requirement for using DDW on devices in which hypervisor

[PATCH v4 2/7] powerpc/pseries/iommu: Update call to ibm, query-pe-dma-windows

2020-07-16 Thread Leonardo Bras
>From LoPAR level 2.8, "ibm,ddw-extensions" index 3 can make the number of outputs from "ibm,query-pe-dma-windows" go from 5 to 6. This change of output size is meant to expand the address size of largest_available_block PE TCE from 32-bit to 64-bit, which ends up shifting page_size and

Re: [RFC PATCH 4/7] x86: use exit_lazy_tlb rather than membarrier_mm_sync_core_before_usermode

2020-07-16 Thread Peter Zijlstra
On Wed, Jul 15, 2020 at 10:18:20PM -0700, Andy Lutomirski wrote: > > On Jul 15, 2020, at 9:15 PM, Nicholas Piggin wrote: > > CPU0 CPU1 > > 1. user stuff > > a. membarrier() 2. enter kernel > > b. read rq->curr 3. rq->curr switched to

RE: [RFC PATCH 00/35] Move all PCIBIOS* definitions into arch/x86

2020-07-16 Thread David Laight
From: Benjamin Herrenschmidt > Sent: 15 July 2020 23:49 > On Wed, 2020-07-15 at 17:12 -0500, Bjorn Helgaas wrote: > > > I've 'played' with PCIe error handling - without much success. > > > What might be useful is for a driver that has just read ~0u to > > > be able to ask 'has there been an error

[PATCH v4 7/7] powerpc/pseries/iommu: Rename "direct window" to "dma window"

2020-07-16 Thread Leonardo Bras
A previous change introduced the usage of DDW as a bigger indirect DMA mapping when the DDW available size does not map the whole partition. As most of the code that manipulates direct mappings was reused for indirect mappings, it's necessary to rename all names and debug/info messages to reflect

[PATCH v4 6/7] powerpc/pseries/iommu: Make use of DDW even if it does not map the partition

2020-07-16 Thread Leonardo Bras
As of today, if the biggest DDW that can be created can't map the whole partition, it's creation is skipped and the default DMA window "ibm,dma-window" is used instead. Usually this DDW is bigger than the default DMA window, and it performs better, so it would be nice to use it instead. The DDW

RE: [RFC PATCH 00/35] Move all PCIBIOS* definitions into arch/x86

2020-07-16 Thread David Laight
From: Bjorn Helgaas > Sent: 15 July 2020 23:02 > > On Wed, Jul 15, 2020 at 02:24:21PM +, David Laight wrote: > > From: Arnd Bergmann > > > Sent: 15 July 2020 07:47 > > > On Wed, Jul 15, 2020 at 1:46 AM Bjorn Helgaas wrote: > > > > > > So something like: > > > > > > > > void

Re: [PATCH v2 2/4] powerpc/sstep: support emulation for vsx vector paired storage access instructions

2020-07-16 Thread Ravi Bangoria
Hi Bala, @@ -709,6 +722,8 @@ void emulate_vsx_load(struct instruction_op *op, union vsx_reg *reg, reg->d[0] = reg->d[1] = 0; switch (op->element_size) { + case 32: + /* [p]lxvp[x] or [p]stxvp[x] */ This function does not emulate stvxp case

[PATCH v4 3/7] powerpc/pseries/iommu: Move window-removing part of remove_ddw into remove_dma_window

2020-07-16 Thread Leonardo Bras
Move the window-removing part of remove_ddw into a new function (remove_dma_window), so it can be used to remove other DMA windows. It's useful for removing DMA windows that don't create DIRECT64_PROPNAME property, like the default DMA window from the device, which uses "ibm,dma-window".

[PATCH] selftests/powerpc: Run per_event_excludes test on Power8 or later

2020-07-16 Thread Michael Ellerman
The per_event_excludes test wants to run on Power8 or later. But currently it checks that AT_BASE_PLATFORM *equals* power8, which means it only runs on Power8. Fix it to check for the ISA 2.07 feature, which will be set on Power8 and later CPUs. Signed-off-by: Michael Ellerman ---

Re: [PATCH v2 0/6] consolidate PowerPC instruction encoding macros

2020-07-16 Thread Michael Ellerman
On Wed, 24 Jun 2020 17:00:32 +0530, Balamuruhan S wrote: > ppc-opcode.h have base instruction encoding wrapped with stringify_in_c() > for raw encoding to have compatibility. But there are redundant macros for > base instruction encodings in bpf, instruction emulation test infrastructure > and

Re: [PATCH v2] powerpc: Drop CONFIG_MTD_M25P80 in 85xx-hw.config

2020-07-16 Thread Michael Ellerman
On Fri, 1 May 2020 21:44:54 -0700, Bin Meng wrote: > Drop CONFIG_MTD_M25P80 that was removed in > commit b35b9a10362d ("mtd: spi-nor: Move m25p80 code in spi-nor.c") Applied to powerpc/next. [1/1] powerpc: Drop CONFIG_MTD_M25P80 in 85xx-hw.config

Re: [PATCH v8 0/8] powerpc: switch VDSO to C implementation

2020-07-16 Thread Michael Ellerman
On Tue, 28 Apr 2020 13:16:46 + (UTC), Christophe Leroy wrote: > This is the seventh version of a series to switch powerpc VDSO to > generic C implementation. > > Main changes since v7 are: > - Added gettime64 on PPC32 > > This series applies on today's powerpc/merge branch. > > [...] Patch

Re: [PATCH] ocxl: Replace HTTP links with HTTPS ones

2020-07-16 Thread Michael Ellerman
On Mon, 13 Jul 2020 19:55:06 +0200, Alexander A. Klimov wrote: > Rationale: > Reduces attack surface on kernel devs opening the links for MITM > as HTTPS traffic is much harder to manipulate. > > Deterministic algorithm: > For each file: > If not .svg: > For each line: > If doesn't

Re: [PATCH v3] powerpc/pseries: detect secure and trusted boot state of the system.

2020-07-16 Thread Michael Ellerman
On Wed, 15 Jul 2020 07:52:01 -0400, Nayna Jain wrote: > The device-tree property to check secure and trusted boot state is > different for guests(pseries) compared to baremetal(powernv). > > This patch updates the existing is_ppc_secureboot_enabled() and > is_ppc_trustedboot_enabled() functions

[PATCH 0/5] Improvements to pkey tests

2020-07-16 Thread Sandipan Das
Based on recent bugs found in the pkey infrastructure, this improves the test for execute-disabled pkeys and adds a new test for detecting inconsistencies with the pkey reported by the signal information upon getting a fault. Sandipan Das (5): selftests/powerpc: Move pkey helpers to headers

[PATCH 5/5] selftests/powerpc: Add test for pkey siginfo verification

2020-07-16 Thread Sandipan Das
Commit c46241a370a61 ("powerpc/pkeys: Check vma before returning key fault error to the user") fixes a bug which causes the kernel to set the wrong pkey in siginfo when a pkey fault occurs after two competing threads that have allocated different pkeys, one fully permissive and the other

Re: [PATCH] powerpc/book3s64/pkeys: Fix pkey_access_permitted w.r.t execute disable pkey

2020-07-16 Thread Michael Ellerman
On Sun, 12 Jul 2020 18:50:47 +0530, Aneesh Kumar K.V wrote: > Even if the IAMR value deny the execute access, current kernel return true > w.r.t pkey_access_permitted() for execute permission check if the AMR > read pkey bit is cleared. > > This results in repeated page fault loop with a test

Re: [PATCH] powerpc: Add cputime_to_nsecs()

2020-07-16 Thread Michael Ellerman
On Mon, 13 Jul 2020 18:36:01 +1000, Anton Blanchard wrote: > Generic code has a wrapper to implement cputime_to_nsecs() on top of > cputime_to_usecs() but we can easily return the full nanosecond > resolution directly. Applied to powerpc/next. [1/1] powerpc: Add cputime_to_nsecs()

Re: [PATCH] pseries: Fix 64 bit logical memory block panic

2020-07-16 Thread Michael Ellerman
On Wed, 15 Jul 2020 10:08:20 +1000, Anton Blanchard wrote: > Booting with a 4GB LMB size causes us to panic: > > qemu-system-ppc64: OS terminated: OS panic: > Memory block size not suitable: 0x0 > > Fix pseries_memory_block_size() to handle 64 bit LMBs. Applied to powerpc/next. [1/1]

Re: [PATCH] selftests/powerpc: Purge extra count_pmc() calls of ebb selftests

2020-07-16 Thread Michael Ellerman
On Fri, 26 Jun 2020 13:47:37 -0300, Desnes A. Nunes do Rosario wrote: > An extra count on ebb_state.stats.pmc_count[PMC_INDEX(pmc)] is being per- > formed when count_pmc() is used to reset PMCs on a few selftests. This > extra pmc_count can occasionally invalidate results, such as the ones from >

Re: [PATCH] powerpc/Kconfig: Replace HTTP links with HTTPS ones

2020-07-16 Thread Michael Ellerman
On Mon, 13 Jul 2020 21:26:56 +0200, Alexander A. Klimov wrote: > Rationale: > Reduces attack surface on kernel devs opening the links for MITM > as HTTPS traffic is much harder to manipulate. > > Deterministic algorithm: > For each file: > If not .svg: > For each line: > If doesn't

Re: [PATCH v2] powerpc/64/signal: balance return predictor stack in signal trampoline

2020-07-16 Thread Michael Ellerman
On Mon, 11 May 2020 20:19:52 +1000, Nicholas Piggin wrote: > Returning from an interrupt or syscall to a signal handler currently > begins execution directly at the handler's entry point, with LR set to > the address of the sigreturn trampoline. When the signal handler > function returns, it runs

Re: [PATCH 1/3] powerpc/64s: restore_math remove TM test

2020-07-16 Thread Michael Ellerman
On Wed, 24 Jun 2020 09:41:37 +1000, Nicholas Piggin wrote: > The TM test in restore_math added by commit dc16b553c949e ("powerpc: > Always restore FPU/VEC/VSX if hardware transactional memory in use") is > no longer necessary after commit a8318c13e79ba ("powerpc/tm: Fix > restoring FP/VMX facility

Re: [RFC PATCH 4/7] x86: use exit_lazy_tlb rather than membarrier_mm_sync_core_before_usermode

2020-07-16 Thread peterz
On Thu, Jul 16, 2020 at 08:03:36PM +1000, Nicholas Piggin wrote: > Excerpts from Peter Zijlstra's message of July 16, 2020 6:50 pm: > > On Wed, Jul 15, 2020 at 10:18:20PM -0700, Andy Lutomirski wrote: > >> > On Jul 15, 2020, at 9:15 PM, Nicholas Piggin wrote: > >> But I’m wondering if all this

[PATCH 4/5] selftests/powerpc: Add helper to exit on failure

2020-07-16 Thread Sandipan Das
This adds a helper similar to FAIL_IF() which lets a program exit with code 1 (to indicate failure) when the given condition is true. Signed-off-by: Sandipan Das --- tools/testing/selftests/powerpc/include/utils.h | 9 + 1 file changed, 9 insertions(+) diff --git

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

2020-07-16 Thread Michael Ellerman
On Fri, 19 Jun 2020 12:31:13 +0530, Satheesh Rajendran wrote: > 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

Re: [PATCH] powerpc/vdso: Fix vdso cpu truncation

2020-07-16 Thread Michael Ellerman
On Thu, 16 Jul 2020 09:37:04 +1000, Anton Blanchard wrote: > The code in vdso_cpu_init that exposes the cpu and numa node to > userspace via SPRG_VDSO incorrctly masks the cpu to 12 bits. This means > that any kernel running on a box with more than 4096 threads (NR_CPUS > advertises a limit of of

Re: [PATCH 1/2] Revert "powerpc/kasan: Fix shadow pages allocation failure"

2020-07-16 Thread Michael Ellerman
On Thu, 2 Jul 2020 11:52:02 + (UTC), Christophe Leroy wrote: > This reverts commit d2a91cef9bbdeb87b7449fdab1a6be6000930210. > > This commit moved too much work in kasan_init(). The allocation > of shadow pages has to be moved for the reason explained in that > patch, but the allocation of

Re: [PATCH] powerpc/boot/dts: Fix dtc "pciex" warnings

2020-07-16 Thread Michael Ellerman
On Tue, 23 Jun 2020 23:03:20 +1000, Michael Ellerman wrote: > With CONFIG_OF_ALL_DTBS=y, as set by eg. allmodconfig, we see lots of > warnings about our dts files, such as: > > arch/powerpc/boot/dts/glacier.dts:492.26-532.5: > Warning (pci_bridge): /plb/pciex@d: node name is not "pci"

[PATCH 1/5] selftests/powerpc: Move pkey helpers to headers

2020-07-16 Thread Sandipan Das
This moves all the pkey-related helpers to a new header file and also a helper to print error messages in signal handlers to the existing utils header file. Signed-off-by: Sandipan Das --- .../testing/selftests/powerpc/include/pkeys.h | 108 ++

Re: [PATCH V2 1/2] powerpc/vas: Report proper error code for address translation failure

2020-07-16 Thread Michael Ellerman
On Fri, 10 Jul 2020 16:47:19 -0700, Haren Myneni wrote: > P9 DD2 NX workbook (Table 4-36) says DMA controller uses CC=5 > internally for translation fault handling. NX reserves CC=250 for > OS to notify user space when NX encounters address translation > failure on the request buffer. Not an issue

Re: [PATCH v7 0/7] Support new pmem flush and sync instructions for POWER

2020-07-16 Thread Michael Ellerman
On Wed, 1 Jul 2020 12:52:28 +0530, Aneesh Kumar K.V wrote: > 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

Re: [PATCH v3 0/3] Off-load TLB invalidations to host for !GTSE

2020-07-16 Thread Michael Ellerman
On Fri, 3 Jul 2020 11:06:05 +0530, Bharata B Rao wrote: > Hypervisor may choose not to enable Guest Translation Shootdown Enable > (GTSE) option for the guest. When GTSE isn't ON, the guest OS isn't > permitted to use instructions like tblie and tlbsync directly, but is > expected to make

Re: [PATCH] docs: powerpc: Clarify book3s/32 MMU families

2020-07-16 Thread Michael Ellerman
On Thu, 2 Jul 2020 14:09:21 + (UTC), Christophe Leroy wrote: > Documentation wrongly tells that book3s/32 CPU have hash MMU. > > 603 and e300 core only have software loaded TLB. > > 755, 7450 family and e600 core have both hash MMU and software loaded > TLB. This can be selected by setting a

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

2020-07-16 Thread Michael Ellerman
On Fri, 19 Jun 2020 16:04:39 +0200, Frederic Barrat wrote: > 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. Applied to

Re: [PATCH v2] powerpc/perf: Add kernel support for new MSR[HV PR] bits in trace-imc

2020-07-16 Thread Michael Ellerman
On Mon, 13 Jul 2020 20:16:23 +0530, Madhavan Srinivasan wrote: > IMC trace-mode record has MSR[HV PR] bits added in the third DW. > These bits can be used to set the cpumode for the instruction pointer > captured in each sample. > > Add support in kernel to use these bits to set the cpumode for >

[PATCH 2/5] selftests/powerpc: Add pkey helpers for rights

2020-07-16 Thread Sandipan Das
This adds some new pkey-related helper to print access rights of a pkey in the "rwx" format and to generate different valid combinations of pkey rights starting from a given combination. Signed-off-by: Sandipan Das --- .../testing/selftests/powerpc/include/pkeys.h | 28 +++

Re: [PATCH 00/18] remove extended cede offline mode and bogus topology update code

2020-07-16 Thread Michael Ellerman
On Fri, 12 Jun 2020 00:12:20 -0500, Nathan Lynch wrote: > Two major parts to this series: > > 1. Removal of the extended cede offline mode for CPUs as well as the >partition suspend code which accommodates it by temporarily >onlining all CPUs prior to suspending the LPAR. This solves some

Re: [PATCH v3 0/3] selftests: powerpc: Fixes and execute-disable test for pkeys

2020-07-16 Thread Michael Ellerman
On Thu, 4 Jun 2020 18:26:07 +0530, Sandipan Das wrote: > This fixes the way the Authority Mask Register (AMR) is updated > by the existing pkey tests and adds a new test to verify the > functionality of execute-disabled pkeys. > > Previous versions can be found at: > v2: >

Re: [PATCH 1/2] powerpc/powernv: Make pnv_pci_sriov_enable() and friends static

2020-07-16 Thread Michael Ellerman
On Sun, 5 Jul 2020 23:35:56 +1000, Oliver O'Halloran wrote: > The kernel test robot noticed these are non-static which causes Clang to > print some warnings. These are called via ppc_md function pointers so > there's no need for them to be non-static. Applied to powerpc/next. [1/2]

[PATCH 3/5] selftests/powerpc: Harden test for execute-disabled pkeys

2020-07-16 Thread Sandipan Das
Commit 192b6a7805989 ("powerpc/book3s64/pkeys: Fix pkey_access_permitted() for execute disable pkey") fixed a bug that caused repetitive faults for pkeys with no execute rights alongside some combination of read and write rights. This removes the last two cases of the test, which check the

Re: [PATCH] xmon: Reset RCU and soft lockup watchdogs

2020-07-16 Thread Michael Ellerman
On Tue, 30 Jun 2020 10:02:18 +1000, Anton Blanchard wrote: > I'm seeing RCU warnings when exiting xmon. xmon resets the NMI watchdog, > but does nothing with the RCU stall or soft lockup watchdogs. Add a > helper function that handles all three. Applied to powerpc/next. [1/1] powerpc/xmon: Reset

Re: [PATCH] powerpc/spufs: add CONFIG_COREDUMP dependency

2020-07-16 Thread Michael Ellerman
On Mon, 6 Jul 2020 15:22:46 +0200, Arnd Bergmann wrote: > The kernel test robot pointed out a slightly different error message > after recent commit 5456ffdee666 ("powerpc/spufs: simplify spufs core > dumping") to spufs for a configuration that never worked: > >powerpc64-linux-ld:

Re: [PATCH 1/2] powerpc/signal_32: Remove !FULL_REGS() special handling in PPC64 save_general_regs()

2020-07-16 Thread Michael Ellerman
On Tue, 7 Jul 2020 12:33:35 + (UTC), Christophe Leroy wrote: > Since commit ("1bd79336a426 powerpc: Fix various > syscall/signal/swapcontext bugs"), getting save_general_regs() called > without FULL_REGS() is very unlikely and generates a warning. > > The 32-bit version of save_general_regs()

Re: [PATCH] powerpc/signal64: Don't opencode page prefaulting

2020-07-16 Thread Michael Ellerman
On Tue, 7 Jul 2020 18:32:25 + (UTC), Christophe Leroy wrote: > Instead of doing a __get_user() from the first and last location > into a tmp var which won't be used, use fault_in_pages_readable() Applied to powerpc/next. [1/1] powerpc/signal64: Don't opencode page prefaulting

Re: [PATCH] cpuidle/powernv : Remove dead code block

2020-07-16 Thread Michael Ellerman
On Mon, 6 Jul 2020 00:32:58 -0500, Abhishek Goel wrote: > Commit 1961acad2f88559c2cdd2ef67c58c3627f1f6e54 removes usage of > function "validate_dt_prop_sizes". This patch removes this unused > function. Applied to powerpc/next. [1/1] cpuidle/powernv : Remove dead code block

Re: [PATCH v5 0/2] Add cpu hotplug support for powerpc/perf/hv-24x7

2020-07-16 Thread Michael Ellerman
On Thu, 9 Jul 2020 10:48:34 +0530, Kajol Jain wrote: > This patchset add cpu hotplug support for hv_24x7 driver by adding > online/offline cpu hotplug function. It also add sysfs file > "cpumask" to expose current online cpu that can be used for > hv_24x7 event count. > > Changelog: > v4 -> v5 >

Re: [PATCH] powerpc/boot: Use address-of operator on section symbols

2020-07-16 Thread Michael Ellerman
On Tue, 23 Jun 2020 20:59:20 -0700, Nathan Chancellor wrote: > Clang warns: > > arch/powerpc/boot/main.c:107:18: warning: array comparison always > evaluates to a constant [-Wtautological-compare] > if (_initrd_end > _initrd_start) { > ^ >

Re: [PATCH 0/7] powerpc: branch cache flush changes

2020-07-16 Thread Michael Ellerman
On Tue, 9 Jun 2020 17:06:03 +1000, Nicholas Piggin wrote: > This series allows the link stack to be flushed with the speical > bcctr 2,0,0 flush instruction that also flushes the count cache if > the processor supports it. > > Firmware does not support this at the moment, but I've tested it in >

Re: [PATCH 1/1] MAINTAINERS: Remove self

2020-07-16 Thread Michael Ellerman
On Tue, 30 Jun 2020 08:50:44 +1000, Sam Bobroff wrote: > I'm sorry to say I can no longer maintain this position. Applied to powerpc/next. [1/1] MAINTAINERS: Remove self from powerpc EEH https://git.kernel.org/powerpc/c/a984c1f2e49225b40f1d0d20d383ec27d4d0 cheers

Re: [PATCH v6] powerpc/fadump: fix race between pstore write and fadump crash trigger

2020-07-16 Thread Michael Ellerman
On Mon, 13 Jul 2020 10:54:35 +0530, Sourabh Jain wrote: > When we enter into fadump crash path via system reset we fail to update > the pstore. > > On the system reset path we first update the pstore then we go for fadump > crash. But the problem here is when all the CPUs try to get the pstore >

Re: [PATCH net-next] ibmvnic: Increase driver logging

2020-07-16 Thread Thomas Falcon
On 7/15/20 8:29 PM, David Miller wrote: From: Jakub Kicinski Date: Wed, 15 Jul 2020 17:06:32 -0700 On Wed, 15 Jul 2020 18:51:55 -0500 Thomas Falcon wrote: free_netdev(netdev); dev_set_drvdata(>dev, NULL); + netdev_info(netdev, "VNIC client device has been successfully

Re: [RFC PATCH 4/7] x86: use exit_lazy_tlb rather than membarrier_mm_sync_core_before_usermode

2020-07-16 Thread Mathieu Desnoyers
- On Jul 16, 2020, at 11:46 AM, Mathieu Desnoyers mathieu.desnoy...@efficios.com wrote: > - On Jul 16, 2020, at 12:42 AM, Nicholas Piggin npig...@gmail.com wrote: >> I should be more complete here, especially since I was complaining >> about unclear barrier comment :) >> >> >> CPU0

Re: [PATCH 0/3] Implement shared_cpu_list for powerpc

2020-07-16 Thread Michael Ellerman
On Mon, 29 Jun 2020 16:07:00 +0530, Srikar Dronamraju wrote: > shared_cpu_list sysfs file is missing in powerpc and shared_cpu_map gives an > extra newline character. > > Before this patchset > # ls /sys/devices/system/cpu0/cache/index1 > coherency_line_size number_of_sets size

Re: [RFC PATCH 4/7] x86: use exit_lazy_tlb rather than membarrier_mm_sync_core_before_usermode

2020-07-16 Thread Mathieu Desnoyers
- On Jul 16, 2020, at 7:00 AM, Peter Zijlstra pet...@infradead.org wrote: > On Thu, Jul 16, 2020 at 08:03:36PM +1000, Nicholas Piggin wrote: >> Excerpts from Peter Zijlstra's message of July 16, 2020 6:50 pm: >> > On Wed, Jul 15, 2020 at 10:18:20PM -0700, Andy Lutomirski wrote: >> >> > On Jul

  1   2   >