Re: [PATCH v5 19/25] powerpc/pseries: Make caller pass buffer to plpks_read_var()

2023-02-06 Thread Andrew Donnellan
On Tue, 2023-01-31 at 11:38 -0500, Stefan Berger wrote: > > > On 1/31/23 01:39, Andrew Donnellan wrote: > > Currently, plpks_read_var() allocates a buffer to pass to the > > H_PKS_READ_OBJECT hcall, then allocates another buffer, of the > > caller's > > > -> buffer of the (no comma) I'll just

Re: [PATCH] tests/bpf: Fix the bpf test to check for libtraceevent support

2023-02-06 Thread Athira Rajeev
> On 06-Feb-2023, at 8:10 PM, Arnaldo Carvalho de Melo wrote: > > Em Mon, Feb 06, 2023 at 09:27:13AM +0530, Athira Rajeev escreveu: >>> On 02-Feb-2023, at 6:27 AM, Arnaldo Carvalho de Melo >>> wrote: >>> >>> Em Tue, Jan 31, 2023 at 07:20:01PM +0530, Athira Rajeev escreveu: "bpf" tests

[PATCH 2/3] powerpc/64: Convert patch_instruction() to patch_u32()

2023-02-06 Thread Benjamin Gray
This use of patch_instruction() is working on 32 bit data, and can fail if the data looks like a prefixed instruction and the extra write crosses a page boundary. Use patch_u32() to fix the write size. Signed-off-by: Benjamin Gray --- patch_u64() should be more efficient, but judging from the

[PATCH 3/3] powerpc/32: Convert patch_instruction() to patch_uint()

2023-02-06 Thread Benjamin Gray
These changes are for patch_instruction() uses on data. Unlike ppc64 these should not be incorrect as-is, but using the patch_uint() alias better reflects what kind of data being patched and allows for benchmarking the effect of different patch_* implementations (e.g., skipping instruction

[PATCH 1/3] powerpc/code-patching: Add generic memory patching

2023-02-06 Thread Benjamin Gray
patch_instruction() is designed for patching instructions in otherwise readonly memory. Other consumers also sometimes need to patch readonly memory, so have abused patch_instruction() for arbitrary data patches. This is a problem on ppc64 as patch_instruction() decides on the patch width using

[PATCH 0/3] Add generic data patching functions

2023-02-06 Thread Benjamin Gray
There are issues on ppc64 with using patch_instruction() for arbitrary data. Add dedicated functions for patching data. More details in the first patch. Just to explain a couple of quirks: * ppc32 patch_instruction() is noinline to prevent a mis-optimisation where patch_memory() is inlined

[powerpc:next-test] BUILD SUCCESS e870dcd0076521fc3f082b248314c376574ac709

2023-02-06 Thread kernel test robot
tree/branch: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next-test branch HEAD: e870dcd0076521fc3f082b248314c376574ac709 powerpc/pci: Add option for using pci_to_OF_bus_map elapsed time: 728m configs tested: 2 configs skipped: 111 The following configs have been built

[powerpc:merge] BUILD SUCCESS 0bfb97203f5f300777624a2ad6f8f84aea3e8658

2023-02-06 Thread kernel test robot
x86_64_defconfig powerpc allnoconfig s390defconfig s390 allmodconfig i386 randconfig-a011-20230206 x86_64 rhel-8.3-bpf i386 randconfig-a014-20230206 i386

[powerpc:fixes-test] BUILD SUCCESS 97e45d469eb180a7bd2809e4e079331552c73e42

2023-02-06 Thread kernel test robot
tree/branch: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git fixes-test branch HEAD: 97e45d469eb180a7bd2809e4e079331552c73e42 powerpc/kexec_file: fix implicit decl error elapsed time: 721m configs tested: 16 configs skipped: 111 The following configs have been built

Re: [PATCH mm-unstable v1 04/26] arm/mm: support __HAVE_ARCH_PTE_SWP_EXCLUSIVE

2023-02-06 Thread Mark Brown
ere will be some memory pressure, especially during boot. The exact point things fall over seems to vary a little. A sample failing job with the full log is here: https://lava.sirena.org.uk/scheduler/job/262719 Full bisect log: git bisect start # bad: [129af770823407ee115a56c69a04b440fd2fbe61]

Re: [PATCH 6/7] KVM: arm64: Change return type of kvm_vm_ioctl_mte_copy_tags() to "int"

2023-02-06 Thread Gavin Shan
Hi Thomas, On 2/3/23 8:42 PM, Thomas Huth wrote: This function only returns normal integer values, so there is no need to declare its return value as "long". Signed-off-by: Thomas Huth --- arch/arm64/include/asm/kvm_host.h | 4 ++-- arch/arm64/kvm/guest.c| 4 ++-- 2 files

Re: [PATCH] tests/bpf: Fix the bpf test to check for libtraceevent support

2023-02-06 Thread Disha Goel
On 1/31/23 7:20 PM, Athira Rajeev wrote: "bpf" tests fails in environment with missing libtraceevent support as below: # ./perf test 36 36: BPF filter : 36.1: Basic BPF filtering : FAILED!

Re: [PATCH] tools/perf/tests: Add system wide check for perf bench workload in all metric test

2023-02-06 Thread Disha Goel
On 2/2/23 10:14 PM, Kajol Jain wrote: Testcase stat_all_metrics.sh fails in powerpc: 92: perf all metrics test : FAILED! Logs with verbose: [command]# ./perf test 92 -vv 92: perf all metrics test : --- start --- test child forked, pid 13262

Re: [PATCH v3] powerpc/pci: Add option for using pci_to_OF_bus_map

2023-02-06 Thread Pali Rohár
On Monday 06 February 2023 22:39:02 Michael Ellerman wrote: > From: Pali Rohár > > The "pci-OF-bus-map" property was declared deprecated in 2006 [1] and to > the best of everyone's knowledge is not used by anything anymore [2]. > > The creation of the property was disabled on powermac

Re: [PATCH 11/22] mips/cpu: Mark play_dead() __noreturn

2023-02-06 Thread Florian Fainelli
On 2/3/23 14:05, Josh Poimboeuf wrote: play_dead() doesn't return. Annotate it as such. By extension this also makes arch_cpu_idle_dead() noreturn. Signed-off-by: Josh Poimboeuf Acked-by: Florian Fainelli -- Florian

Re: [PATCH 10/22] mips/cpu: Make sure play_dead() doesn't return

2023-02-06 Thread Florian Fainelli
On 2/3/23 14:05, Josh Poimboeuf wrote: play_dead() doesn't return. Make that more explicit with a BUG(). BUG() is preferable to unreachable() because BUG() is a more explicit failure mode and avoids undefined behavior like falling off the edge of the function into whatever code happens to be

Re: [PATCH 09/22] mips/cpu: Expose play_dead()'s prototype definition

2023-02-06 Thread Florian Fainelli
On 2/3/23 14:05, Josh Poimboeuf wrote: Include to make sure play_dead() matches its prototype going forward. Signed-off-by: Josh Poimboeuf Acked-by: Florian Fainelli -- Florian

Re: [PATCH 12/22] powerpc/cpu: Mark start_secondary_resume() __noreturn

2023-02-06 Thread Josh Poimboeuf
On Mon, Feb 06, 2023 at 10:10:22PM +1100, Michael Ellerman wrote: > Josh Poimboeuf writes: > > start_secondary_resume() doesn't return. Annotate it as such. By > > extension this also makes arch_cpu_idle_dead() noreturn. > > Can we also mark arch_cpu_idle_dead() (the C function) __noreturn ? >

[PATCH v2 19/19] powerpc/rtas: arch-wide function token lookup conversions

2023-02-06 Thread Nathan Lynch via B4 Submission Endpoint
From: Nathan Lynch With the tokens for all implemented RTAS functions now available via rtas_function_token(), which is optimal and safe for arbitrary contexts, there is no need to use rtas_token() or cache its result. Most conversions are trivial, but a few are worth describing in more detail:

[PATCH v2 17/19] powerpc/pseries/lpar: convert to papr_sysparm API

2023-02-06 Thread Nathan Lynch via B4 Submission Endpoint
From: Nathan Lynch Convert the TLB block invalidate characteristics discovery to the new papr_sysparm API. This occurs too early in boot to use papr_sysparm_buf_alloc(), so use a static buffer. Signed-off-by: Nathan Lynch --- arch/powerpc/platforms/pseries/lpar.c | 37

[PATCH v2 13/19] powerpc/pseries: PAPR system parameter API

2023-02-06 Thread Nathan Lynch via B4 Submission Endpoint
From: Nathan Lynch Introduce a set of APIs for retrieving and updating PAPR system parameters. This encapsulates the toil of temporary RTAS work area management, RTAS function call retries, and translation of RTAS call statuses to conventional error values. There are several places in the

[PATCH v2 15/19] powerpc/pseries/lparcfg: convert to papr_sysparm API

2023-02-06 Thread Nathan Lynch via B4 Submission Endpoint
From: Nathan Lynch /proc/powerpc/lparcfg derives the LPAR name and SPLPAR characteristics it reports using bare calls to the RTAS ibm,get-system-parameter function. Convert these to the higher-level papr_sysparm API, which handles the tedious details. While the SPLPAR string parsing code could

[PATCH v2 11/19] powerpc/rtas: add work area allocator

2023-02-06 Thread Nathan Lynch via B4 Submission Endpoint
From: Nathan Lynch Most callers of RTAS functions that take a temporary "work area" parameter use the statically allocated rtas_data_buf buffer as the argument. This buffer is protected by a global spinlock. So users of rtas_data_buf cannot perform sleeping operations while accessing the buffer.

[PATCH v2 06/19] powerpc/pseries: drop RTAS-based timebase synchronization

2023-02-06 Thread Nathan Lynch via B4 Submission Endpoint
From: Nathan Lynch The pseries platform has been LPAR-only for several generations, and the PAPR spec: * Guarantees that timebase synchronization is performed by the platform ("The timebase registers are synchronized by the platform before CPUs are given to the OS" - 7.3.8 SMP Support). *

[PATCH v2 14/19] powerpc/pseries: convert CMO probe to papr_sysparm API

2023-02-06 Thread Nathan Lynch via B4 Submission Endpoint
From: Nathan Lynch Convert the direct invocation of the ibm,get-system-parameter RTAS function to papr_sysparm_get(). Signed-off-by: Nathan Lynch --- arch/powerpc/platforms/pseries/setup.c | 23 ++- 1 file changed, 6 insertions(+), 17 deletions(-) diff --git

[PATCH v2 18/19] powerpc/rtas: introduce rtas_function_token() API

2023-02-06 Thread Nathan Lynch via B4 Submission Endpoint
From: Nathan Lynch Users of rtas_token() supply a string argument that can't be validated at build time. A typo or misspelling has to be caught by inspection or by observing wrong behavior at runtime. Since the core RTAS code now has consolidated the names of all possible RTAS functions and

[PATCH v2 10/19] powerpc/rtas: add tracepoints around RTAS entry

2023-02-06 Thread Nathan Lynch via B4 Submission Endpoint
From: Nathan Lynch Decompose the RTAS entry C code into tracing and non-tracing variants, calling the just-added tracepoints in the tracing-enabled path. Skip tracing in contexts known to be unsafe (real mode, CPU offline). Signed-off-by: Nathan Lynch --- arch/powerpc/kernel/rtas.c | 59

[PATCH v2 09/19] powerpc/tracing: tracepoints for RTAS entry and exit

2023-02-06 Thread Nathan Lynch via B4 Submission Endpoint
From: Nathan Lynch Add two sets of tracepoints to be used around RTAS entry: * rtas_input/rtas_output, which emit the function name, its inputs, the returned status, and any other outputs. These produce an API-level record of OS<->RTAS activity. * rtas_ll_entry/rtas_ll_exit, which are

[PATCH v2 00/19] RTAS maintenance

2023-02-06 Thread Nathan Lynch via B4 Submission Endpoint
Proposed changes for the RTAS subsystem and client code. Fixes that are subject to backporting are at the front of the queue. The rest of the queue is roughly ordered with respect to maturity: i.e. patches that have already garnered some review and discussion precede newer, more experimental

[PATCH v2 01/19] powerpc/rtas: handle extended delays safely in early boot

2023-02-06 Thread Nathan Lynch via B4 Submission Endpoint
From: Nathan Lynch Some code that runs early in boot calls RTAS functions that can return -2 or 990x statuses, which mean the caller should retry. An example is pSeries_cmo_feature_init(), which invokes ibm,get-system-parameter but treats these benign statuses as errors instead of retrying.

[PATCH v2 03/19] powerpc/pseries/lpar: add missing RTAS retry status handling

2023-02-06 Thread Nathan Lynch via B4 Submission Endpoint
From: Nathan Lynch The ibm,get-system-parameter RTAS function may return -2 or 990x, which indicate that the caller should try again. pseries_lpar_read_hblkrm_characteristics() ignores this, making it possible to incorrectly detect TLB block invalidation characteristics at boot. Move the RTAS

[PATCH v2 05/19] powerpc/pseries/setup: add missing RTAS retry status handling

2023-02-06 Thread Nathan Lynch via B4 Submission Endpoint
From: Nathan Lynch The ibm,get-system-parameter RTAS function may return -2 or 990x, which indicate that the caller should try again. pSeries_cmo_feature_init() ignores this, making it possible to fail to detect cooperative memory overcommit capabilities during boot. Move the RTAS call into a

[PATCH v2 12/19] powerpc/pseries/dlpar: use RTAS work area API

2023-02-06 Thread Nathan Lynch via B4 Submission Endpoint
From: Nathan Lynch Hold a work area object for the duration of the RTAS ibm,configure-connector sequence, eliminating locking and copying around each RTAS call. Signed-off-by: Nathan Lynch --- arch/powerpc/platforms/pseries/dlpar.c | 27 +-- 1 file changed, 9

[PATCH v2 08/19] powerpc/rtas: strengthen do_enter_rtas() type safety, drop inline

2023-02-06 Thread Nathan Lynch via B4 Submission Endpoint
From: Nathan Lynch Make do_enter_rtas() take a pointer to struct rtas_args and do the __pa() conversion in one place instead of leaving it to callers. This also makes it possible to introduce enter/exit tracepoints that access the rtas_args struct fields. There's no apparent reason to force

[PATCH v2 07/19] powerpc/rtas: improve function information lookups

2023-02-06 Thread Nathan Lynch via B4 Submission Endpoint
From: Nathan Lynch The core RTAS support code and its clients perform two types of lookup for RTAS firmware function information. First, mapping a known function name to a token. The typical use case invokes rtas_token() to retrieve the token value to pass to rtas_call(). rtas_token() relies on

[PATCH v2 04/19] powerpc/pseries/lparcfg: add missing RTAS retry status handling

2023-02-06 Thread Nathan Lynch via B4 Submission Endpoint
From: Nathan Lynch The ibm,get-system-parameter RTAS function may return -2 or 990x, which indicate that the caller should try again. lparcfg's parse_system_parameter_string() ignores this, making it possible to intermittently report incorrect SPLPAR characteristics. Move the RTAS call into a

[PATCH v2 16/19] powerpc/pseries/hv-24x7: convert to papr_sysparm API

2023-02-06 Thread Nathan Lynch via B4 Submission Endpoint
From: Nathan Lynch The new papr_sysparm API handles the details of system parameter retrieval. Use that instead of open-coding the RTAS call, work area management, and retries. Signed-off-by: Nathan Lynch --- arch/powerpc/perf/hv-24x7.c | 37 +++-- 1 file

[PATCH v2 02/19] powerpc/perf/hv-24x7: add missing RTAS retry status handling

2023-02-06 Thread Nathan Lynch via B4 Submission Endpoint
From: Nathan Lynch The ibm,get-system-parameter RTAS function may return -2 or 990x, which indicate that the caller should try again. read_24x7_sys_info() ignores this, allowing transient failures in reporting processor module information. Move the RTAS call into a coventional

Re: [PATCH 2/2] perf test bpf: Skip test if kernel-debuginfo is not present

2023-02-06 Thread Arnaldo Carvalho de Melo
Em Mon, Feb 06, 2023 at 07:28:49PM +0530, Athira Rajeev escreveu: > > > > On 05-Jan-2023, at 6:24 PM, Arnaldo Carvalho de Melo > > wrote: > > > > Em Thu, Jan 05, 2023 at 05:47:42PM +0530, Athira Rajeev escreveu: > >> Perf BPF filter test fails in environment where "kernel-debuginfo" > >> is

Re: [PATCH] tests/bpf: Fix the bpf test to check for libtraceevent support

2023-02-06 Thread Arnaldo Carvalho de Melo
Em Mon, Feb 06, 2023 at 09:27:13AM +0530, Athira Rajeev escreveu: > > On 02-Feb-2023, at 6:27 AM, Arnaldo Carvalho de Melo > > wrote: > > > > Em Tue, Jan 31, 2023 at 07:20:01PM +0530, Athira Rajeev escreveu: > >> "bpf" tests fails in environment with missing libtraceevent > >> support as below:

Re: [PATCH 2/2] perf test bpf: Skip test if kernel-debuginfo is not present

2023-02-06 Thread Athira Rajeev
> On 05-Jan-2023, at 6:24 PM, Arnaldo Carvalho de Melo wrote: > > Em Thu, Jan 05, 2023 at 05:47:42PM +0530, Athira Rajeev escreveu: >> Perf BPF filter test fails in environment where "kernel-debuginfo" >> is not installed. > > I'll apply this to perf/core, for the next merge window, as its

Re: Build regressions/improvements in v6.2-rc7

2023-02-06 Thread Geert Uytterhoeven
On Mon, 6 Feb 2023, Geert Uytterhoeven wrote: JFYI, when comparing v6.2-rc7[1] to v6.2-rc6[3], the summaries are: - build errors: +1/-1 + /kisskb/src/arch/powerpc/kexec/file_load_64.c: error: implicit declaration of function 'memory_hotplug_max' [-Werror=implicit-function-declaration]: =>

[PATCH v3] powerpc/pci: Add option for using pci_to_OF_bus_map

2023-02-06 Thread Michael Ellerman
From: Pali Rohár The "pci-OF-bus-map" property was declared deprecated in 2006 [1] and to the best of everyone's knowledge is not used by anything anymore [2]. The creation of the property was disabled on powermac (arch/powerpc) in 2005 by commit 35499c0195e4 ("powerpc: Merge in 64-bit powermac

Re: [PATCH 12/22] powerpc/cpu: Mark start_secondary_resume() __noreturn

2023-02-06 Thread Michael Ellerman
Josh Poimboeuf writes: > start_secondary_resume() doesn't return. Annotate it as such. By > extension this also makes arch_cpu_idle_dead() noreturn. Can we also mark arch_cpu_idle_dead() (the C function) __noreturn ? Seems like it would be good documentation, even if it's not required once

Re: [PATCH v3 5/5] powerpc: kcsan: Add KCSAN Support

2023-02-06 Thread Christophe Leroy
Le 06/02/2023 à 03:18, Rohan McLure a écrit : > Enable HAVE_ARCH_KCSAN on all powerpc platforms, permitting use of the > kernel concurrency sanitiser through the CONFIG_KCSAN_* kconfig options. > KCSAN requires compiler builtins __atomic_* 64-bit values, and so only > report support on PPC64. >

Re: [PATCH v3 0/5] powerpc: Add KCSAN support

2023-02-06 Thread Christophe Leroy
Le 06/02/2023 à 03:17, Rohan McLure a écrit : > Add Kernel Concurrency Sanitiser support for PPC64. Doing so involves > exclusion of a number of compilation units from instrumentation, as was > done with KASAN. > > KCSAN uses watchpoints on memory accesses to enforce the semantics of > the