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: [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

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 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 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 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:

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 -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 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,

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 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 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: [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:

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

[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

[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

[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 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 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

[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:

[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 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 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

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

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 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 v3 0/3] Off-load TLB invalidations to host for !GTSE

2020-07-16 Thread Nicholas Piggin
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 guest. When GTSE isn't ON, the guest OS isn't >> permitted to use

[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 kernel test robot
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: powerpc-allmodconfig (attached as .config)

[powerpc:next-test] BUILD SUCCESS 0fbd1eb4df96e1cbd039e0b95fdf62cf65a7faf9

2020-07-16 Thread kernel test robot
tree/branch: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next-test branch HEAD: 0fbd1eb4df96e1cbd039e0b95fdf62cf65a7faf9 papr/scm: Add bad memory ranges to nvdimm bad ranges elapsed time: 789m configs tested: 74 configs skipped: 1 The following configs have been built

[powerpc:merge] BUILD SUCCESS 3a60e5fbdc3520d429d7cd6affed5a8daf120c6b

2020-07-16 Thread kernel test robot
allyesconfig powerpc rhel-kconfig powerpc allmodconfig powerpc allnoconfig i386 randconfig-a016-20200716 i386 randconfig-a011-20200716 i386 randconfig-a015-20200716 i386

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

2020-07-16 Thread Stephen Hemminger
On Thu, 16 Jul 2020 13:22:00 -0700 Jakub Kicinski wrote: > On Thu, 16 Jul 2020 18:07:37 +0200 Michal Suchánek wrote: > > On Thu, Jul 16, 2020 at 10:59:58AM -0500, Thomas Falcon wrote: > > > On 7/15/20 8:29 PM, David Miller wrote: > > > > From: Jakub Kicinski > > > > Date: Wed, 15 Jul 2020

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 Mathieu Desnoyers's message of July 17, 2020 4:58 am: > - 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, 2020,

Re: [PATCH v8 5/8] powerpc/vdso: Prepare for switching VDSO to generic C implementation.

2020-07-16 Thread Tulio Magno Quites Machado Filho
Christophe Leroy writes: > Michael Ellerman a écrit : > >> Christophe Leroy writes: >>> Prepare for switching VDSO to generic C implementation in following >>> patch. Here, we: >>> - Modify __get_datapage() to take an offset >>> - Prepare the helpers to call the C VDSO functions >>> - Prepare

Re: [PATCH 1/1] ASoC: fsl: fsl-asoc-card: Trivial: Fix misspelling of 'exists'

2020-07-16 Thread Mark Brown
On Wed, 15 Jul 2020 10:44:47 +0100, Lee Jones wrote: > Applied to https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next Thanks! [1/1] ASoC: fsl: fsl-asoc-card: Trivial: Fix misspelling of 'exists' commit: 1b58214113481616b74ee4d196e5b1cb683758ee All being well

Re: [PATCH v2 1/1] ASoC: fsl: fsl-asoc-card: Trivial: Fix misspelling of 'exists'

2020-07-16 Thread Mark Brown
On Wed, 15 Jul 2020 16:00:09 +0100, Lee Jones wrote: > Applied to https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next Thanks! [1/1] ASoC: fsl: fsl-asoc-card: Trivial: Fix misspelling of 'exists' commit: 1b58214113481616b74ee4d196e5b1cb683758ee All being well

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 pet...@infradead.org's message of July 16, 2020 9:00 pm: > 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,

Question about NUMA distance calculation in powerpc/mm/numa.c

2020-07-16 Thread Daniel Henrique Barboza
Hello, I didn't find an explanation about the 'double the distance' logic in 'git log' or anywhere in the kernel docs: (arch/powerpc/mm/numa.c, __node_distance()): for (i = 0; i < distance_ref_points_depth; i++) { if (distance_lookup_table[a][i] == distance_lookup_table[b][i])

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

2020-07-16 Thread Stephen Rothwell
Hi all, On Thu, 16 Jul 2020 13:27:14 -0400 Qian Cai wrote: > > Reverting the whole series fixed random memory corruptions during boot on > POWER9 PowerNV systems below. I will revert those commits from linux-next today as well (they revert cleanly). -- Cheers, Stephen Rothwell

Re: [PATCH] powerpc/64: Fix an out of date comment about MMIO ordering

2020-07-16 Thread Benjamin Herrenschmidt
On Thu, 2020-07-16 at 12:38 -0700, Palmer Dabbelt wrote: > From: Palmer Dabbelt > > This primitive has been renamed, but because it was spelled incorrectly in the > first place it must have escaped the fixup patch. As far as I can tell this > logic is still correct: smp_mb__after_spinlock()

Re: [PATCH v2 1/3] module: Rename module_alloc() to text_alloc() and move to kernel proper

2020-07-16 Thread Christophe Leroy
Jarkko Sakkinen a écrit : Rename module_alloc() to text_alloc() and module_memfree() to text_memfree(), and move them to kernel/text.c, which is unconditionally compiled to the kernel proper. This allows kprobes, ftrace and bpf to allocate space for executable code without requiring to compile

Re: [PATCH v3 07/12] ppc64/kexec_file: add support to relocate purgatory

2020-07-16 Thread Thiago Jung Bauermann
Hari Bathini writes: > On 16/07/20 5:50 am, Thiago Jung Bauermann wrote: >> >> Hari Bathini writes: >> >>> So, add support to relocate purgatory in kexec_file_load system call >>> by setting up TOC pointer and applying RELA relocations as needed. >> >> If we do want to use a C purgatory,

Re: [PATCH v3 09/12] ppc64/kexec_file: setup backup region for kdump kernel

2020-07-16 Thread Thiago Jung Bauermann
Hari Bathini writes: > On 16/07/20 7:08 am, Thiago Jung Bauermann wrote: >> >> Hari Bathini writes: >> >>> @@ -968,7 +1040,7 @@ int setup_new_fdt_ppc64(const struct kimage *image, >>> void *fdt, >>> >>> /* >>> * Restrict memory usage for kdump kernel by setting up >>> -* usable

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

2020-07-16 Thread Thiago Jung Bauermann
Hari Bathini writes: > On 16/07/20 4:22 am, Thiago Jung Bauermann wrote: >> >> Hari Bathini writes: >> > > > >>> +/** >>> + * get_node_path - Get the full path of the given node. >>> + * @dn:Node. >>> + * @path: Updated with the full path of the node. >>> + * >>> + *

Re: [PATCH v3 05/12] powerpc/drmem: make lmb walk a bit more flexible

2020-07-16 Thread Thiago Jung Bauermann
Hari Bathini writes: > On 15/07/20 9:20 am, Thiago Jung Bauermann wrote: >> >> Hari Bathini writes: >> >>> @@ -534,7 +537,7 @@ static int __init >>> early_init_dt_scan_memory_ppc(unsigned long node, >>> #ifdef CONFIG_PPC_PSERIES >>> if (depth == 1 && >>> strcmp(uname,

Re: [PATCH v3 04/12] ppc64/kexec_file: avoid stomping memory used by special regions

2020-07-16 Thread Thiago Jung Bauermann
Hari Bathini writes: > On 15/07/20 8:09 am, Thiago Jung Bauermann wrote: >> >> Hari Bathini writes: >> > > > >>> +/** >>> + * __locate_mem_hole_top_down - Looks top down for a large enough memory >>> hole >>> + * in the memory regions between buf_min & >>>

Re: [PATCH v3 10/12] ppc64/kexec_file: prepare elfcore header for crashing kernel

2020-07-16 Thread Thiago Jung Bauermann
Hari Bathini writes: > On 16/07/20 7:52 am, Thiago Jung Bauermann wrote: >> >> Hari Bathini writes: >> >>> /** >>> + * get_crash_memory_ranges - Get crash memory ranges. This list includes >>> + * first/crashing kernel's memory regions that >>> + *

Re: [PATCH v3 07/12] ppc64/kexec_file: add support to relocate purgatory

2020-07-16 Thread Hari Bathini
On 16/07/20 5:50 am, Thiago Jung Bauermann wrote: > > Hari Bathini writes: > >> Right now purgatory implementation is only minimal. But if purgatory >> code is to be enhanced to copy memory to the backup region and verify > > Can't the memcpy be done in asm? We have

Re: [PATCH v3 09/12] ppc64/kexec_file: setup backup region for kdump kernel

2020-07-16 Thread Hari Bathini
On 16/07/20 7:08 am, Thiago Jung Bauermann wrote: > > Hari Bathini writes: > >> @@ -968,7 +1040,7 @@ int setup_new_fdt_ppc64(const struct kimage *image, >> void *fdt, >> >> /* >> * Restrict memory usage for kdump kernel by setting up >> - * usable memory ranges. >> + *

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

2020-07-16 Thread Hari Bathini
On 16/07/20 4:22 am, Thiago Jung Bauermann wrote: > > Hari Bathini writes: > >> +/** >> + * get_node_path - Get the full path of the given node. >> + * @dn:Node. >> + * @path: Updated with the full path of the node. >> + * >> + * Returns nothing. >> + */ >> +static

Re: [PATCH v3 05/12] powerpc/drmem: make lmb walk a bit more flexible

2020-07-16 Thread Hari Bathini
On 15/07/20 9:20 am, Thiago Jung Bauermann wrote: > > Hari Bathini writes: > >> @@ -534,7 +537,7 @@ static int __init early_init_dt_scan_memory_ppc(unsigned >> long node, >> #ifdef CONFIG_PPC_PSERIES >> if (depth == 1 && >> strcmp(uname, "ibm,dynamic-reconfiguration-memory")

Re: [PATCH v3 04/12] ppc64/kexec_file: avoid stomping memory used by special regions

2020-07-16 Thread Hari Bathini
On 15/07/20 8:09 am, Thiago Jung Bauermann wrote: > > Hari Bathini writes: > >> +/** >> + * __locate_mem_hole_top_down - Looks top down for a large enough memory >> hole >> + * in the memory regions between buf_min & >> buf_max >> + *

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: > > > >> +/** >> + * get_mem_rngs_size - Get the allocated size of mrngs based on >> + * max_nr_ranges and chunk size. >> + * @mrngs: Memory ranges. >> + * >> + * Returns the maximum no. of ranges. > > This

Re: [PATCH v3 10/12] ppc64/kexec_file: prepare elfcore header for crashing kernel

2020-07-16 Thread Hari Bathini
On 16/07/20 7:52 am, Thiago Jung Bauermann wrote: > > Hari Bathini writes: > >> /** >> + * get_crash_memory_ranges - Get crash memory ranges. This list includes >> + * first/crashing kernel's memory regions that >> + * would be exported

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

2020-07-16 Thread Jakub Kicinski
On Thu, 16 Jul 2020 18:07:37 +0200 Michal Suchánek wrote: > On Thu, Jul 16, 2020 at 10:59:58AM -0500, Thomas Falcon wrote: > > 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

[PATCH] powerpc/64: Fix an out of date comment about MMIO ordering

2020-07-16 Thread Palmer Dabbelt
From: Palmer Dabbelt This primitive has been renamed, but because it was spelled incorrectly in the first place it must have escaped the fixup patch. As far as I can tell this logic is still correct: smp_mb__after_spinlock() uses the default smp_mb() implementation, which is "sync" rather than

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 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, 2020, at 12:42 AM, Nicholas Piggin npig...@gmail.com wrote: >>> I should be more

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

2020-07-16 Thread Thiago Jung Bauermann
Hello Prakhar, Prakhar Srivastava writes: > On 6/19/20 5:19 PM, Thiago Jung Bauermann wrote: >> >> 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. >>>

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

2020-07-16 Thread Qian Cai
PAGE_SIZE=64K MMU=Radix SMP NR_CPUS=256 NUMA PowerNV [9.339098][ T925] Modules linked in: dm_mirror dm_region_hash dm_log dm_mod [9.339150][ T925] CPU: 92 PID: 925 Comm: (md-udevd) Not tainted 5.8.0-rc5-next-20200716 #3 [9.339186][ T925] NIP: LR: c021f2cc C

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 net-next] ibmvnic: Increase driver logging

2020-07-16 Thread Michal Suchánek
On Thu, Jul 16, 2020 at 10:59:58AM -0500, Thomas Falcon wrote: > > 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); > > > >

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 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 CPU1 > a. user stuff1. user stuff > b. membarrier() 2. enter

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

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

2020-07-16 Thread Steven Price
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 mapping 2. PROTNONE mapping 3. DEVMAP mapping 4. SOFTDIRTY

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

2020-07-16 Thread Aneesh Kumar K.V
On 7/16/20 7:00 AM, Paul Mackerras wrote: 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

Re: [PATCH v3 0/4] powerpc/mm/radix: Memory unplug fixes

2020-07-16 Thread Nathan Lynch
"Aneesh Kumar K.V" writes: > This is the next version of the fixes for memory unplug on radix. > The issues and the fix are described in the actual patches. I guess this isn't actually causing problems at runtime right now, but I notice calls to resize_hpt_for_hotplug() from arch_add_memory()

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: [PATCH -next] cpuidle/pseries: Make symbol 'pseries_idle_driver' static

2020-07-16 Thread Michael Ellerman
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' is not used outside of this file, so marks > it

Re: [PATCH -next] powerpc/xive: Remove unused inline function xive_kexec_teardown_cpu()

2020-07-16 Thread Michael Ellerman
On Wed, 15 Jul 2020 10:50:40 +0800, YueHaibing wrote: > commit e27e0a94651e ("powerpc/xive: Remove xive_kexec_teardown_cpu()") > left behind this, remove it. Applied to powerpc/next. [1/1] powerpc/xive: Remove unused inline function xive_kexec_teardown_cpu()

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 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 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: [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]

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

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 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 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 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] 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"

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 >

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 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] 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] 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] 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 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] 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] 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 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] 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 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 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 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 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] 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 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] 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] 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

  1   2   >