Re: [PATCH v4 11/46] KVM: PPC: Book3S HV: Ensure MSR[HV] is always clear in guest MSR

2021-03-30 Thread Paul Mackerras
On Tue, Mar 23, 2021 at 11:02:30AM +1000, Nicholas Piggin wrote: > Rather than clear the HV bit from the MSR at guest entry, make it clear > that the hypervisor does not allow the guest to set the bit. > > The HV clear is kept in guest entry for now, but a future patch will > warn if it's not pres

Re: [PATCH v4 10/46] KVM: PPC: Book3S HV: Ensure MSR[ME] is always set in guest MSR

2021-03-30 Thread Paul Mackerras
On Tue, Mar 23, 2021 at 11:02:29AM +1000, Nicholas Piggin wrote: > Rather than add the ME bit to the MSR at guest entry, make it clear > that the hypervisor does not allow the guest to clear the bit. > > The ME set is kept in guest entry for now, but a future patch will > warn if it's not present.

Re: [PATCH v4 09/46] powerpc/64s: remove KVM SKIP test from instruction breakpoint handler

2021-03-30 Thread Paul Mackerras
On Tue, Mar 23, 2021 at 11:02:28AM +1000, Nicholas Piggin wrote: > The code being executed in KVM_GUEST_MODE_SKIP is hypervisor code with > MSR[IR]=0, so the faults of concern are the d-side ones caused by access > to guest context by the hypervisor. > > Instruction breakpoint interrupts are not a

Re: [PATCH v4 08/46] powerpc/64s: Remove KVM handler support from CBE_RAS interrupts

2021-03-30 Thread Paul Mackerras
On Tue, Mar 23, 2021 at 11:02:27AM +1000, Nicholas Piggin wrote: > Cell does not support KVM. > > Reviewed-by: Fabiano Rosas > Signed-off-by: Nicholas Piggin Acked-by: Paul Mackerras

Re: [PATCH v4 07/46] KVM: PPC: Book3S HV: Fix CONFIG_SPAPR_TCE_IOMMU=n default hcalls

2021-03-30 Thread Paul Mackerras
On Tue, Mar 23, 2021 at 11:02:26AM +1000, Nicholas Piggin wrote: > This config option causes the warning in init_default_hcalls to fire > because the TCE handlers are in the default hcall list but not > implemented. > > Reviewed-by: Daniel Axtens > Signed-off-by: Nicholas Piggin Acked-by: Paul

Re: [PATCH v4 05/46] KVM: PPC: Book3S HV: Remove redundant mtspr PSPB

2021-03-30 Thread Paul Mackerras
On Tue, Mar 23, 2021 at 11:02:24AM +1000, Nicholas Piggin wrote: > This SPR is set to 0 twice when exiting the guest. > > Suggested-by: Fabiano Rosas > Reviewed-by: Daniel Axtens > Signed-off-by: Nicholas Piggin Acked-by: Paul Mackerras

Re: [PATCH v4 06/46] KVM: PPC: Book3S HV: remove unused kvmppc_h_protect argument

2021-03-30 Thread Paul Mackerras
On Tue, Mar 23, 2021 at 11:02:25AM +1000, Nicholas Piggin wrote: > The va argument is not used in the function or set by its asm caller, > so remove it to be safe. > > Reviewed-by: Daniel Axtens > Signed-off-by: Nicholas Piggin Acked-by: Paul Mackerras

Re: [PATCH] powerpc/pseries: Only register vio drivers if vio bus exists

2021-03-30 Thread Michael Ellerman
Paul Menzel writes: > Am 16.03.21 um 02:09 schrieb Michael Ellerman: >> The vio bus is a fake bus, which we use on pseries LPARs (guests) to >> discover devices provided by the hypervisor. There's no need or sense >> in creating the vio bus on bare metal systems. >> >> Which is why commit 4336b93

Re: [PATCH v4 04/46] KVM: PPC: Book3S HV: Prevent radix guests from setting LPCR[TC]

2021-03-30 Thread Paul Mackerras
On Tue, Mar 23, 2021 at 11:02:23AM +1000, Nicholas Piggin wrote: > This bit only applies to hash partitions. > > Signed-off-by: Nicholas Piggin > --- > arch/powerpc/kvm/book3s_hv.c| 6 ++ > arch/powerpc/kvm/book3s_hv_nested.c | 3 +-- > 2 files changed, 7 insertions(+), 2 deletions(-

Re: [PATCH v4 03/46] KVM: PPC: Book3S HV: Disallow LPCR[AIL] to be set to 1 or 2

2021-03-30 Thread Paul Mackerras
On Tue, Mar 23, 2021 at 11:02:22AM +1000, Nicholas Piggin wrote: > These are already disallowed by H_SET_MODE from the guest, also disallow > these by updating LPCR directly. > > AIL modes can affect the host interrupt behaviour while the guest LPCR > value is set, so filter it here too. > > Sugg

Re: [PATCH v4 02/46] KVM: PPC: Book3S HV: Add a function to filter guest LPCR bits

2021-03-30 Thread Paul Mackerras
On Tue, Mar 23, 2021 at 11:02:21AM +1000, Nicholas Piggin wrote: > Guest LPCR depends on hardware type, and future changes will add > restrictions based on errata and guest MMU mode. Move this logic > to a common function and use it for the cases where the guest > wants to update its LPCR (or the L

Re: [PATCH v4 01/46] KVM: PPC: Book3S HV: Nested move LPCR sanitising to sanitise_hv_regs

2021-03-30 Thread Paul Mackerras
On Tue, Mar 23, 2021 at 11:02:20AM +1000, Nicholas Piggin wrote: > This will get a bit more complicated in future patches. Move it > into the helper function. This does change L1-visible behaviour, because now the L1 hypervisor can see the LPCR bits that L0 is using, whereas previously it couldn't

Re: [PATCH] cxl: Fix couple of spellings

2021-03-30 Thread Michael Ellerman
On Mon, 22 Mar 2021 08:03:07 +0530, Bhaskar Chowdhury wrote: > s/filesytem/filesystem/ > s/symantics/semantics/ Applied to powerpc/next. [1/1] cxl: Fix couple of spellings https://git.kernel.org/powerpc/c/e23ecdf9fd87c547a3ac55bcebaf7df28df2fab0 cheers

Re: [PATCH] powerpc/xive: use true and false for bool variable

2021-03-30 Thread Michael Ellerman
On Mon, 15 Mar 2021 15:24:56 +0800, Yang Li wrote: > fixed the following coccicheck: > ./arch/powerpc/sysdev/xive/spapr.c:552:8-9: WARNING: return of 0/1 in > function 'xive_spapr_match' with return type bool Applied to powerpc/next. [1/1] powerpc/xive: use true and false for bool variable

Re: [PATCH] powerpc: mm: book3s64: Fix a typo in the file mmu_context.c

2021-03-30 Thread Michael Ellerman
On Fri, 12 Mar 2021 16:55:37 +0530, Bhaskar Chowdhury wrote: > s/detalis/details/ Applied to powerpc/next. [1/1] powerpc: mm: book3s64: Fix a typo in the file mmu_context.c https://git.kernel.org/powerpc/c/7a7d744ffe87ae10ab98004d1a6ca1f691af58e1 cheers

Re: [PATCH] powerpc: kernel: Trivial typo fix in the file kgdb.c

2021-03-30 Thread Michael Ellerman
On Wed, 17 Mar 2021 14:34:13 +0530, Bhaskar Chowdhury wrote: > s/procesing/processing/ Applied to powerpc/next. [1/1] powerpc: kernel: Trivial typo fix in the file kgdb.c https://git.kernel.org/powerpc/c/89f7d2927ae16ea470d29234447763826e40c6cf cheers

Re: [PATCH] powerpc: kernel: Trivial spelling fixes throughout the file head_fsl_booke.S

2021-03-30 Thread Michael Ellerman
On Mon, 15 Mar 2021 03:34:36 +0530, Bhaskar Chowdhury wrote: > Trivial spelling fixes throughout the file. Applied to powerpc/next. [1/1] powerpc: kernel: Trivial spelling fixes throughout the file head_fsl_booke.S https://git.kernel.org/powerpc/c/f239873fcd953557ba9a9781d10ca95c0594e2b3

Re: [PATCH] arch: powerpc: kernel: Change droping to dropping in the file traps.c

2021-03-30 Thread Michael Ellerman
On Wed, 24 Feb 2021 13:25:47 +0530, Bhaskar Chowdhury wrote: > s/droping/dropping/ Applied to powerpc/next. [1/1] arch: powerpc: kernel: Change droping to dropping in the file traps.c https://git.kernel.org/powerpc/c/5c4a4802b9ac8c1acdf2250fad3f8f2d6254f9c7 cheers

Re: [PATCH v5] powerpc/uprobes: Validation for prefixed instruction

2021-03-30 Thread Michael Ellerman
On Thu, 11 Mar 2021 14:45:38 +0530, Ravi Bangoria wrote: > As per ISA 3.1, prefixed instruction should not cross 64-byte > boundary. So don't allow Uprobe on such prefixed instruction. > > There are two ways probed instruction is changed in mapped pages. > First, when Uprobe is activated, it searc

Re: [PATCH] powerpc/64s: Fix hash fault to use TRAP accessor

2021-03-30 Thread Michael Ellerman
On Tue, 16 Mar 2021 20:52:05 +1000, Nicholas Piggin wrote: > Hash faults use the trap vector to decide whether this is an > instruction or data fault. This should use the TRAP accessor > rather than open access regs->trap. > > This won't cause a problem at the moment because 64s only uses > trap f

Re: [PATCH] powerpc/prom: Mark identical_pvr_fixup as __init

2021-03-30 Thread Michael Ellerman
On Tue, 2 Mar 2021 13:08:29 -0700, Nathan Chancellor wrote: > If identical_pvr_fixup() is not inlined, there are two modpost warnings: > > WARNING: modpost: vmlinux.o(.text+0x54e8): Section mismatch in reference > from the function identical_pvr_fixup() to the function > .init.text:of_get_flat_dt_

Re: [PATCH] selftests: powerpc: unmark non-kernel-doc comments

2021-03-30 Thread Michael Ellerman
On Thu, 25 Mar 2021 13:08:20 -0700, Randy Dunlap wrote: > Drop the 'beginning of kernel-doc' notation markers (/**) > in places that are not in kernel-doc format. Applied to powerpc/next. [1/1] selftests: powerpc: unmark non-kernel-doc comments https://git.kernel.org/powerpc/c/dfc4ae3372182

Re: [PATCH v2] selftests/powerpc: Fix L1D flushing tests for Power10

2021-03-30 Thread Michael Ellerman
On Tue, 23 Feb 2021 17:02:27 +1000, Russell Currey wrote: > The rfi_flush and entry_flush selftests work by using the PM_LD_MISS_L1 > perf event to count L1D misses. The value of this event has changed > over time: > > - Power7 uses 0x400f0 > - Power8 and Power9 use both 0x400f0 and 0x3e054 > - P

Re: [PATCH v7] powerpc/irq: Inline call_do_irq() and call_do_softirq()

2021-03-30 Thread Michael Ellerman
On Sat, 20 Mar 2021 23:22:27 +1100, Michael Ellerman wrote: > call_do_irq() and call_do_softirq() are simple enough to be > worth inlining. > > Inlining them avoids an mflr/mtlr pair plus a save/reload on stack. It > also allows GCC to keep the saved ksp_limit in an nonvolatile reg. > > This is i

Re: [PATCH] powerpc/fsl-pci: Fix section mismatch warning

2021-03-30 Thread Michael Ellerman
On Sun, 14 Mar 2021 20:33:41 +1100, Michael Ellerman wrote: > Section mismatch in reference from the function .fsl_add_bridge() to > the function .init.text:.setup_pci_cmd() > > fsl_add_bridge() is not __init, and can't be, and is the only caller > of setup_pci_cmd(). Fix it by making setup_pci_cm

Re: [PATCH] powerpc/fadump: Mark fadump_calculate_reserve_size as __init

2021-03-30 Thread Michael Ellerman
On Tue, 2 Mar 2021 12:50:14 -0700, Nathan Chancellor wrote: > If fadump_calculate_reserve_size() is not inlined, there is a modpost > warning: > > WARNING: modpost: vmlinux.o(.text+0x5196c): Section mismatch in > reference from the function fadump_calculate_reserve_size() to the > function .init.t

Re: [PATCH] powerpc/eeh: Fix build failure with CONFIG_PROC_FS=n

2021-03-30 Thread Michael Ellerman
On Sun, 14 Mar 2021 20:33:00 +1100, Michael Ellerman wrote: > The build fails with CONFIG_PROC_FS=n: > > arch/powerpc/kernel/eeh.c:1571:12: error: ‘proc_eeh_show’ defined but not > used >1571 | static int proc_eeh_show(struct seq_file *m, void *v) > > Wrap proc_eeh_show() in an ifdef to av

Re: [PATCH] powerpc: Fix section mismatch warning in smp_setup_pacas()

2021-03-30 Thread Michael Ellerman
On Sun, 14 Mar 2021 20:33:33 +1100, Michael Ellerman wrote: > Section mismatch in reference from the function .smp_setup_pacas() to > the function .init.text:.allocate_paca() > > The only caller of smp_setup_pacas() is setup_arch() which is __init, > so mark smp_setup_pacas() __init. Applied to p

Re: [PATCH] powerpc/64s: Fold update_current_thread_[i]amr() into their only callers

2021-03-30 Thread Michael Ellerman
On Sun, 14 Mar 2021 20:33:20 +1100, Michael Ellerman wrote: > lkp reported warnings in some configuration due to > update_current_thread_amr() being unused: > > arch/powerpc/mm/book3s64/pkeys.c:284:20: error: unused function > 'update_current_thread_amr' > static inline void update_current_th

Re: [PATCH] arch/powerpc/include:fix misspellings in tlbflush.h

2021-03-30 Thread Michael Ellerman
On Wed, 3 Mar 2021 19:13:18 -0800, menglong8.d...@gmail.com wrote: > Some typos are found out.The information at the end of the file > does not match the beginning. Applied to powerpc/next. [1/1] arch/powerpc/include:fix misspellings in tlbflush.h https://git.kernel.org/powerpc/c/1a029e0edb

Re: [PATCH] powerpc/iommu/debug: fix ifnullfree.cocci warnings

2021-03-30 Thread Michael Ellerman
On Fri, 19 Mar 2021 07:44:41 +0800, kernel test robot wrote: > arch/powerpc/kernel/iommu.c:76:2-16: WARNING: NULL check before some freeing > functions is not needed. > > NULL check before some freeing functions is not needed. > > Based on checkpatch warning > "kfree(NULL) is safe this check

Re: [RESEND 1/1] powerpc: asm: hvconsole: Move 'hvc_vio_init_early's prototype to shared location

2021-03-30 Thread Michael Ellerman
On Wed, 3 Mar 2021 12:46:03 +, Lee Jones wrote: > Fixes the following W=1 kernel build warning(s): > > drivers/tty/hvc/hvc_vio.c:385:13: warning: no previous prototype for > ‘hvc_vio_init_early’ [-Wmissing-prototypes] > 385 | void __init hvc_vio_init_early(void) > | ^~ App

Re: [PATCH v2] powerpc/pseries: export LPAR security flavor in lparcfg

2021-03-30 Thread Michael Ellerman
On Fri, 5 Mar 2021 13:55:54 +0100, Laurent Dufour wrote: > This is helpful to read the security flavor from inside the LPAR. > > In /sys/kernel/debug/powerpc/security_features it can be seen if > mitigations are on or off but the level set through the ASMI menu. > Furthermore, reporting it through

Re: [PATCH] cxl: don't manipulate the mm.mm_users field directly

2021-03-30 Thread Michael Ellerman
On Wed, 10 Mar 2021 18:44:05 +0100, Laurent Dufour wrote: > It is better to rely on the API provided by the MM layer instead of > directly manipulating the mm_users field. Applied to powerpc/next. [1/1] cxl: don't manipulate the mm.mm_users field directly https://git.kernel.org/powerpc/c/2d

Re: [PATCH] powerpc: remove unneeded semicolon

2021-03-30 Thread Michael Ellerman
On Wed, 24 Feb 2021 15:29:21 +0800, Jiapeng Chong wrote: > Fix the following coccicheck warnings: > > ./arch/powerpc/kernel/prom_init.c:2986:2-3: Unneeded semicolon. Applied to powerpc/next. [1/1] powerpc: remove unneeded semicolon https://git.kernel.org/powerpc/c/4f46d57cab3b3410411b395a6

Re: [PATCH] powerpc/pci: fix warning comparing pointer to 0

2021-03-30 Thread Michael Ellerman
On Mon, 15 Mar 2021 15:35:24 +0800, Jiapeng Chong wrote: > Fix the following coccicheck warning: > > ./arch/powerpc/platforms/maple/pci.c:37:16-17: WARNING comparing pointer > to 0. Applied to powerpc/next. [1/1] powerpc/pci: fix warning comparing pointer to 0 https://git.kernel.org/powerp

Re: [PATCH] powerpc: arch/powerpc/kernel/setup_64.c - cleanup warnings

2021-03-30 Thread Michael Ellerman
On Tue, 16 Mar 2021 00:11:48 -0400, He Ying wrote: > warning: symbol 'rfi_flush' was not declared. > warning: symbol 'entry_flush' was not declared. > warning: symbol 'uaccess_flush' was not declared. > We found warnings above in arch/powerpc/kernel/setup_64.c by using > sparse tool. > > Define 'e

Re: [PATCH] powerpc/ptrace: Remove duplicate check from pt_regs_check()

2021-03-30 Thread Michael Ellerman
On Fri, 5 Mar 2021 14:28:07 +0300, Denis Efremov wrote: > "offsetof(struct pt_regs, msr) == offsetof(struct user_pt_regs, msr)" > checked in pt_regs_check() twice in a row. Remove the second check. Applied to powerpc/next. [1/1] powerpc/ptrace: Remove duplicate check from pt_regs_check() ht

Re: [PATCH] powerpc/chrp: Make hydra_init() static

2021-03-30 Thread Michael Ellerman
On Tue, 23 Feb 2021 10:53:45 +0100, Geert Uytterhoeven wrote: > Commit 407d418f2fd4c20a ("powerpc/chrp: Move PHB discovery") moved the > sole call to hydra_init() to the source file where it is defined, so it > can be made static. Applied to powerpc/next. [1/1] powerpc/chrp: Make hydra_init() sta

Re: [PATCH] powerpc: powernv: Remove unneeded variable: "rc"

2021-03-30 Thread Michael Ellerman
On Fri, 26 Mar 2021 19:53:56 +0800, dingsen...@163.com wrote: > Remove unneeded variable: "rc". Applied to powerpc/next. [1/1] powerpc: powernv: Remove unneeded variable: "rc" https://git.kernel.org/powerpc/c/69931cc387cca289e0415c79ce5389119670066d cheers

Re: [PATCH 0/3] powerpc/qspinlock: Some tuning updates

2021-03-30 Thread Michael Ellerman
On Mon, 8 Mar 2021 17:59:47 -0800, Davidlohr Bueso wrote: > A few updates while going through the powerpc port of the qspinlock. > > Patches 1 and 2 are straightforward, while patch 3 can be considered > more of an rfc as I've only tested on a single machine, and there > could be an alternative wa

Re: [PATCH v2 0/1] show 'last online CPU' error in dlpar_cpu_offline()

2021-03-30 Thread Michael Ellerman
On Tue, 23 Mar 2021 17:50:55 -0300, Daniel Henrique Barboza wrote: > changes in v2 after Michael Ellerman review: > - moved the verification code from dlpar_cpu_remove() to > dlpar_cpu_offline(), while holding cpu_add_remove_lock > - reworded the commit message and code comment > v1 link: > https

Re: [PATCH v7 00/10] Improve signal performance on PPC64 with KUAP

2021-03-30 Thread Michael Ellerman
On Fri, 26 Feb 2021 19:12:49 -0600, Christopher M. Riedl wrote: > As reported by Anton, there is a large penalty to signal handling > performance on radix systems using KUAP. The signal handling code > performs many user access operations, each of which needs to switch the > KUAP permissions bit to

Re: [PATCH v3 00/41] powerpc/32: Switch to interrupt entry/exit in C

2021-03-30 Thread Michael Ellerman
On Fri, 12 Mar 2021 12:50:09 + (UTC), Christophe Leroy wrote: > This series aims at porting interrupt entry/exit in C on PPC32, using > the work already merged for PPC64. > > First patch is an optimisation around unrecoverable_exception() function. > > Six following patches do minimal changes

Re: [PATCH v2 1/4] powerpc: Enable KFENCE for PPC32

2021-03-30 Thread Michael Ellerman
On Thu, 4 Mar 2021 14:35:09 + (UTC), Christophe Leroy wrote: > Add architecture specific implementation details for KFENCE and enable > KFENCE for the ppc32 architecture. In particular, this implements the > required interface in . > > KFENCE requires that attributes for pages from its memory

Re: [PATCH v1 1/4] powerpc: Activate HAVE_RELIABLE_STACKTRACE for all

2021-03-30 Thread Michael Ellerman
On Tue, 16 Mar 2021 07:57:13 + (UTC), Christophe Leroy wrote: > CONFIG_HAVE_RELIABLE_STACKTRACE is applicable to all, no > reason to limit it to book3s/64le Applied to powerpc/next. [1/4] powerpc: Activate HAVE_RELIABLE_STACKTRACE for all https://git.kernel.org/powerpc/c/accdd093f260bc8

Re: [PATCH v1 0/8] Miscellaneous user access improvement

2021-03-30 Thread Michael Ellerman
On Wed, 10 Mar 2021 17:56:59 + (UTC), Christophe Leroy wrote: > Patches 1-3 are cleaning parts of uaccess.h not related > to put_user/get_user > Patch 4 removes some usage of consecutives __get_user > Patches 5 rewrite __patch_instruction to not use uaccess.h internals. > Patches 6-8 switch som

Re: [PATCH] powerpc/mm: Remove unneeded #ifdef CONFIG_PPC_MEM_KEYS

2021-03-30 Thread Michael Ellerman
On Mon, 15 Mar 2021 14:52:51 + (UTC), Christophe Leroy wrote: > In fault.c, #ifdef CONFIG_PPC_MEM_KEYS is not needed because all > functions are always defined, and arch_vma_access_permitted() > always returns true when CONFIG_PPC_MEM_KEYS is not defined so > access_pkey_error() will return fal

Re: [PATCH] powerpc/Makefile: Remove workaround for gcc versions below 4.9

2021-03-30 Thread Michael Ellerman
On Wed, 10 Mar 2021 12:43:12 + (UTC), Christophe Leroy wrote: > Commit 6ec4476ac825 ("Raise gcc version requirement to 4.9") > made it impossible to build with gcc 4.8 and under. > > Remove related workaround. Applied to powerpc/next. [1/1] powerpc/Makefile: Remove workaround for gcc version

Re: [PATCH] powerpc/math: Fix missing __user qualifier for get_user() and other sparse warnings

2021-03-30 Thread Michael Ellerman
On Mon, 15 Mar 2021 12:00:09 + (UTC), Christophe Leroy wrote: > Sparse reports the following problems: > > arch/powerpc/math-emu/math.c:228:21: warning: Using plain integer as NULL > pointer > arch/powerpc/math-emu/math.c:228:31: warning: Using plain integer as NULL > pointer > arch/powerpc/

Re: [PATCH] powerpc/embedded6xx: Remove CONFIG_MV64X60

2021-03-30 Thread Michael Ellerman
On Thu, 18 Mar 2021 17:25:07 + (UTC), Christophe Leroy wrote: > Commit 92c8c16f3457 ("powerpc/embedded6xx: Remove C2K board support") > moved the last selector of CONFIG_MV64X60. > > As it is not a user selectable config, it can be removed. Applied to powerpc/next. [1/1] powerpc/embedded6xx:

Re: [PATCH] powerpc/asm-offsets: GPR14 is not needed either

2021-03-30 Thread Michael Ellerman
On Mon, 15 Mar 2021 11:01:26 + (UTC), Christophe Leroy wrote: > Commit aac6a91fea93 ("powerpc/asm: Remove unused symbols in > asm-offsets.c") removed GPR15 to GPR31 but kept GPR14, > probably because it pops up in a couple of comments when doing > a grep. > > However, it was never used either,

Re: [PATCH v2] powerpc: Fix HAVE_HARDLOCKUP_DETECTOR_ARCH build configuration

2021-03-30 Thread Michael Ellerman
On Mon, 29 Mar 2021 10:27:00 +0800, Chen Huang wrote: > When compiling the powerpc with the SMP disabled, it shows the issue: > > arch/powerpc/kernel/watchdog.c: In function ‘watchdog_smp_panic’: > arch/powerpc/kernel/watchdog.c:177:4: error: implicit declaration of function > ‘smp_send_nmi_ipi’;

Re: [PATCH] powerpc: Fix HAVE_HARDLOCKUP_DETECTOR_ARCH build configuration

2021-03-30 Thread Michael Ellerman
On Sat, 27 Mar 2021 09:49:00 +, Chen Huang wrote: > When compiling the powerpc with the SMP disabled, it shows the issue: > > arch/powerpc/kernel/watchdog.c: In function ‘watchdog_smp_panic’: > arch/powerpc/kernel/watchdog.c:177:4: error: implicit declaration of function > ‘smp_send_nmi_ipi’;

Re: [PATCH] powerpc/mm: Move the linear_mapping_mutex to the ifdef where it is used

2021-03-30 Thread Michael Ellerman
On Fri, 19 Feb 2021 17:56:48 +0100, Sebastian Andrzej Siewior wrote: > The mutex linear_mapping_mutex is defined at the of the file while its > only two user are within the CONFIG_MEMORY_HOTPLUG block. > A compile without CONFIG_MEMORY_HOTPLUG set fails on PREEMPT_RT because > its mutex implementat

Re: [PATCH] powerpc/book3s64/kuap: Move Kconfig varriables to BOOK3S_64

2021-03-30 Thread Michael Ellerman
On Thu, 18 Mar 2021 09:18:29 +0530, Aneesh Kumar K.V wrote: > With below two commits: > commit c91435d95c49 ("powerpc/book3s64/hash/kuep: Enable KUEP on hash") > commit b2ff33a10c8b ("powerpc/book3s64/hash/kuap: Enable kuap on hash") > the kernel now supports kuap/kuep with hash translation. Hence

[PATCH v2 2/6] powerpc/pseries: Add key to flags in pSeries_lpar_hpte_updateboltedpp()

2021-03-30 Thread Michael Ellerman
The flags argument to plpar_pte_protect() (aka. H_PROTECT), includes the key in bits 9-13, but currently we always set those bits to zero. In the past that hasn't been a problem because we always used key 0 for the kernel, and updateboltedpp() is only used for kernel mappings. However since commi

[PATCH v2 1/6] powerpc/mm/64s: Add _PAGE_KERNEL_ROX

2021-03-30 Thread Michael Ellerman
In the past we had a fallback definition for _PAGE_KERNEL_ROX, but we removed that in commit d82fd29c5a8c ("powerpc/mm: Distribute platform specific PAGE and PMD flags and definitions") and added definitions for each MMU family. However we missed adding a definition for 64s, which was not really a

[PATCH v2 4/6] powerpc/mm/64s/hash: Factor out change_memory_range()

2021-03-30 Thread Michael Ellerman
Pull the loop calling hpte_updateboltedpp() out of hash__change_memory_range() into a helper function. We need it to be a separate function for the next patch. Signed-off-by: Michael Ellerman --- arch/powerpc/mm/book3s64/hash_pgtable.c | 23 +++ 1 file changed, 15 insertions(

[PATCH v2 6/6] powerpc/mm/64s: Allow STRICT_KERNEL_RWX again

2021-03-30 Thread Michael Ellerman
We have now fixed the known bugs in STRICT_KERNEL_RWX for Book3S 64-bit Hash and Radix MMUs, see preceding commits, so allow the option to be selected again. Signed-off-by: Michael Ellerman --- arch/powerpc/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) v2: Unchanged. diff --git

[PATCH v2 5/6] powerpc/mm/64s/hash: Add real-mode change_memory_range() for hash LPAR

2021-03-30 Thread Michael Ellerman
When we enabled STRICT_KERNEL_RWX we received some reports of boot failures when using the Hash MMU and running under phyp. The crashes are intermittent, and often exhibit as a completely unresponsive system, or possibly an oops. One example, which was caught in xmon: [ 14.068327][T1] dev

[PATCH v2 3/6] powerpc/64s: Use htab_convert_pte_flags() in hash__mark_rodata_ro()

2021-03-30 Thread Michael Ellerman
In hash__mark_rodata_ro() we pass the raw PP_RXXX value to hash__change_memory_range(). That has the effect of setting the key to zero, because PP_RXXX contains no key value. Fix it by using htab_convert_pte_flags(), which knows how to convert a pgprot into a pp value, including the key. Fixes: d

Re: [PATCH v2 3/7] powerpc: convert config files to generic cmdline

2021-03-30 Thread Daniel Walker
On Tue, Mar 30, 2021 at 03:13:04PM -0500, Rob Herring wrote: > On Tue, Mar 30, 2021 at 12:33 PM Daniel Walker wrote: > > > > On Thu, Mar 25, 2021 at 05:29:44PM -0600, Rob Herring wrote: > > > On Thu, Mar 25, 2021 at 2:00 PM Daniel Walker wrote: > > > > > > > > On Thu, Mar 25, 2021 at 01:03:55PM +

Re: [PATCH 2/8] CMDLINE: drivers: of: ifdef out cmdline section

2021-03-30 Thread Daniel Walker
On Tue, Mar 30, 2021 at 02:49:13PM -0500, Rob Herring wrote: > On Tue, Mar 30, 2021 at 12:57 PM Daniel Walker wrote: > > > > It looks like there's some seepage of cmdline stuff into > > the generic device tree code. This conflicts with the > > generic cmdline implementation so I remove it in the c

[PATCH] MAINTAINERS: Update entry for ibmvmc driver

2021-03-30 Thread Brad Warrum
Steve Royer has moved on to a different project and has asked that Ritu and I take over maintainership of the IBM Power Virtual Management Channel Driver. Signed-off-by: Brad Warrum --- MAINTAINERS | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS in

Re: [PATCH 24/30] Kconfig: Change Synopsys to Synopsis

2021-03-30 Thread Bhaskar Chowdhury
On 12:43 Tue 30 Mar 2021, Robin Murphy wrote: On 2021-03-29 00:53, Bhaskar Chowdhury wrote: s/Synopsys/Synopsis/ .two different places. Erm, that is definitely not a typo... :/ ..and for some unknown reason it introduce a empty line deleted and added back. Presumably your editor is

Re: [PATCH 14/30] Revert "s3c24xx-dma.c: Fix a typo"

2021-03-30 Thread Bhaskar Chowdhury
On 22:59 Tue 30 Mar 2021, Vinod Koul wrote: On 29-03-21, 05:23, Bhaskar Chowdhury wrote: s/transferred/transfered/ This reverts commit a2ddb8aea8106bd5552f8516ad7a8a26b9282a8f. This is not upstream, why not squash in. Also would make sense to write sensible changelog and not phrases and use t

Re: [PATCH v2 3/7] powerpc: convert config files to generic cmdline

2021-03-30 Thread Rob Herring
On Tue, Mar 30, 2021 at 12:33 PM Daniel Walker wrote: > > On Thu, Mar 25, 2021 at 05:29:44PM -0600, Rob Herring wrote: > > On Thu, Mar 25, 2021 at 2:00 PM Daniel Walker wrote: > > > > > > On Thu, Mar 25, 2021 at 01:03:55PM +0100, Christophe Leroy wrote: > > > > > > > > Ok, so you agree we don't n

Re: [PATCH] powerpc/pseries: Only register vio drivers if vio bus exists

2021-03-30 Thread Tyrel Datwyler
On 3/15/21 6:09 PM, Michael Ellerman wrote: > The vio bus is a fake bus, which we use on pseries LPARs (guests) to > discover devices provided by the hypervisor. There's no need or sense > in creating the vio bus on bare metal systems. > > Which is why commit 4336b9337824 ("powerpc/pseries: Make v

Re: [PATCH 2/8] CMDLINE: drivers: of: ifdef out cmdline section

2021-03-30 Thread Rob Herring
On Tue, Mar 30, 2021 at 12:57 PM Daniel Walker wrote: > > It looks like there's some seepage of cmdline stuff into > the generic device tree code. This conflicts with the > generic cmdline implementation so I remove it in the case > when that's enabled. > > Cc: xe-linux-exter...@cisco.com > Signed

Re: [PATCH v3 01/17] cmdline: Add generic function to build command line.

2021-03-30 Thread Daniel Walker
On Tue, Mar 30, 2021 at 08:07:30PM +0200, H. Nikolaus Schaller wrote: > > > Am 30.03.2021 um 19:27 schrieb Daniel Walker : > > > > On Fri, Mar 26, 2021 at 01:44:48PM +, Christophe Leroy wrote: > >> This code provides architectures with a way to build command line > >> based on what is built i

Re: [PATCH v3 01/17] cmdline: Add generic function to build command line.

2021-03-30 Thread H. Nikolaus Schaller
> Am 30.03.2021 um 19:27 schrieb Daniel Walker : > > On Fri, Mar 26, 2021 at 01:44:48PM +, Christophe Leroy wrote: >> This code provides architectures with a way to build command line >> based on what is built in the kernel and what is handed over by the >> bootloader, based on selected comp

[PATCH 8/8] CMDLINE: arm64: convert to generic builtin command line

2021-03-30 Thread Daniel Walker
This updates the arm64 code to use the CONFIG_GENERIC_CMDLINE option. Cc: xe-linux-exter...@cisco.com Signed-off-by: Daniel Walker --- arch/arm64/Kconfig | 33 +- arch/arm64/kernel/idreg-override.c | 8 +--- arch/arm64/kernel/setup.c | 4

[PATCH 7/8] CMDLINE: x86: convert to generic builtin command line

2021-03-30 Thread Daniel Walker
This updates the x86 code to use the CONFIG_GENERIC_CMDLINE option. Cc: xe-linux-exter...@cisco.com Signed-off-by: Ruslan Ruslichenko Signed-off-by: Ruslan Bilovol Signed-off-by: Daniel Walker --- arch/x86/Kconfig| 44 + arch/x86/kernel/setup.c |

[PATCH 6/8] drivers: firmware: efi: libstub: enable generic commandline

2021-03-30 Thread Daniel Walker
This adds code to handle the generic command line changes. The efi code appears that it doesn't benefit as much from this design as it could. For example, if you had a prepend command line with "nokaslr" then you might be helpful to re-enable it in the boot loader or dts, but there appears to be n

[PATCH 4/8] CMDLINE: powerpc: convert to generic builtin command line

2021-03-30 Thread Daniel Walker
This updates the powerpc code to use the CONFIG_GENERIC_CMDLINE option. This includes a scripted mass convert of the config files to use the new generic cmdline. There is a bit of a trim effect here. It would seems that some of the config haven't been trimmed in a while. The bash script used to c

[PATCH 5/8] CMDLINE: mips: convert to generic builtin command line

2021-03-30 Thread Daniel Walker
This updates the mips code to use the CONFIG_GENERIC_CMDLINE option. This deletes the option for MIPS_CMDLINE_BUILTIN_EXTEND and replaces the functionality with generic code. This includes a scripted mass convert of the config files to use the new generic cmdline. There is a bit of a trim effect

[PATCH 2/8] CMDLINE: drivers: of: ifdef out cmdline section

2021-03-30 Thread Daniel Walker
It looks like there's some seepage of cmdline stuff into the generic device tree code. This conflicts with the generic cmdline implementation so I remove it in the case when that's enabled. Cc: xe-linux-exter...@cisco.com Signed-off-by: Ruslan Ruslichenko Signed-off-by: Daniel Walker --- driver

[PATCH 3/8] powerpc: convert strcpy to strlcpy in prom_init

2021-03-30 Thread Daniel Walker
There's only two users of strcpy and one is the command line handling. The generic command line handling uses strlcpy and it makes sense to convert this one other user to strlcpy to keep prom_init size consistent. Cc: xe-linux-exter...@cisco.com Signed-off-by: Daniel Walker --- arch/powerpc/kern

[PATCH 1/8] CMDLINE: add generic builtin command line

2021-03-30 Thread Daniel Walker
This code allows architectures to use a generic builtin command line. The state of the builtin command line options across architecture is diverse. MIPS and X86 once has similar systems, then mips added some options to allow extending the command line. Powerpc did something simiar in adding the abi

Re: [PATCH v2 3/7] powerpc: convert config files to generic cmdline

2021-03-30 Thread Daniel Walker
On Mon, Mar 29, 2021 at 11:07:51AM +0100, Will Deacon wrote: > On Thu, Mar 25, 2021 at 12:59:56PM -0700, Daniel Walker wrote: > > On Thu, Mar 25, 2021 at 01:03:55PM +0100, Christophe Leroy wrote: > > > > > > Ok, so you agree we don't need to provide two CMDLINE, one to be appended > > > and one t

Re: [PATCH v2 3/7] powerpc: convert config files to generic cmdline

2021-03-30 Thread Daniel Walker
On Thu, Mar 25, 2021 at 05:29:44PM -0600, Rob Herring wrote: > On Thu, Mar 25, 2021 at 2:00 PM Daniel Walker wrote: > > > > On Thu, Mar 25, 2021 at 01:03:55PM +0100, Christophe Leroy wrote: > > > > > > Ok, so you agree we don't need to provide two CMDLINE, one to be appended > > > and one to be p

Re: [PATCH 14/30] Revert "s3c24xx-dma.c: Fix a typo"

2021-03-30 Thread Vinod Koul
On 29-03-21, 05:23, Bhaskar Chowdhury wrote: > s/transferred/transfered/ > > This reverts commit a2ddb8aea8106bd5552f8516ad7a8a26b9282a8f. This is not upstream, why not squash in. Also would make sense to write sensible changelog and not phrases and use the right subsystem conventions! Droped th

Re: [PATCH v3 01/17] cmdline: Add generic function to build command line.

2021-03-30 Thread Daniel Walker
On Fri, Mar 26, 2021 at 01:44:48PM +, Christophe Leroy wrote: > This code provides architectures with a way to build command line > based on what is built in the kernel and what is handed over by the > bootloader, based on selected compile-time options. > > Signed-off-by: Christophe Leroy > -

Re: [PATCH 16/18] iommu: remove DOMAIN_ATTR_DMA_USE_FLUSH_QUEUE

2021-03-30 Thread Robin Murphy
On 2021-03-30 14:58, Will Deacon wrote: On Tue, Mar 30, 2021 at 02:19:38PM +0100, Robin Murphy wrote: On 2021-03-30 14:11, Will Deacon wrote: On Tue, Mar 16, 2021 at 04:38:22PM +0100, Christoph Hellwig wrote: From: Robin Murphy Instead make the global iommu_dma_strict paramete in iommu.c can

Re: [PATCH v2 8/8] powerpc/xive: Map one IPI interrupt per node

2021-03-30 Thread Cédric Le Goater
On 3/3/21 6:48 PM, Cédric Le Goater wrote: > ipistorm [*] can be used to benchmark the raw interrupt rate of an > interrupt controller by measuring the number of IPIs a system can > sustain. When applied to the XIVE interrupt controller of POWER9 and > POWER10 systems, a significant drop of the int

[PATCH printk v2 0/5] printk: remove safe buffers

2021-03-30 Thread John Ogness
Hi, Here is v2 of a series to remove the safe buffers. v1 can be found here [0]. The safe buffers are no longer needed because messages can be stored directly into the log buffer from any context. However, the safe buffers also provided a form of recursion protection. For that reason, explicit re

[PATCH printk v2 2/5] printk: remove safe buffers

2021-03-30 Thread John Ogness
With @logbuf_lock removed, the high level printk functions for storing messages are lockless. Messages can be stored from any context, so there is no need for the NMI and safe buffers anymore. Remove the NMI and safe buffers. Although the safe buffers are removed, the NMI and safe context tracking

[PATCH printk v2 3/5] printk: remove NMI tracking

2021-03-30 Thread John Ogness
All NMI contexts are handled the same as the safe context: store the message and defer printing. There is no need to have special NMI context tracking for this. Using in_nmi() is enough. Signed-off-by: John Ogness --- arch/arm/kernel/smp.c | 2 -- arch/powerpc/kexec/crash.c | 3 --- inc

[PATCH v2] powerpc/traps: Enhance readability for trap types

2021-03-30 Thread Xiongwei Song
From: Xiongwei Song Create a new header named traps.h, define macros to list ppc exception types in traps.h, replace the reference of the real trap values with these macros. Signed-off-by: Xiongwei Song --- arch/powerpc/include/asm/interrupt.h | 7 --- arch/powerpc/include/asm/ptrace.h

Re: [PATCH 16/18] iommu: remove DOMAIN_ATTR_DMA_USE_FLUSH_QUEUE

2021-03-30 Thread Will Deacon
On Tue, Mar 30, 2021 at 02:19:38PM +0100, Robin Murphy wrote: > On 2021-03-30 14:11, Will Deacon wrote: > > On Tue, Mar 16, 2021 at 04:38:22PM +0100, Christoph Hellwig wrote: > > > From: Robin Murphy > > > > > > Instead make the global iommu_dma_strict paramete in iommu.c canonical by > > > expor

Re: [PATCH v3 5/9] powerpc/mm/book3s64: Update tlb flush routines to take a page walk cache flush argument

2021-03-30 Thread kernel test robot
Hi "Aneesh, I love your patch! Yet something to improve: [auto build test ERROR on powerpc/next] [also build test ERROR on kselftest/next v5.12-rc5 next-20210330] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '

Re: [PATCH 16/18] iommu: remove DOMAIN_ATTR_DMA_USE_FLUSH_QUEUE

2021-03-30 Thread Robin Murphy
On 2021-03-30 14:11, Will Deacon wrote: On Tue, Mar 16, 2021 at 04:38:22PM +0100, Christoph Hellwig wrote: From: Robin Murphy Instead make the global iommu_dma_strict paramete in iommu.c canonical by exporting helpers to get and set it and use those directly in the drivers. This make sure tha

Re: [PATCH 18/18] iommu: remove iommu_domain_{get,set}_attr

2021-03-30 Thread Will Deacon
On Tue, Mar 16, 2021 at 04:38:24PM +0100, Christoph Hellwig wrote: > Remove the now unused iommu attr infrastructure. > > Signed-off-by: Christoph Hellwig > --- > drivers/iommu/iommu.c | 26 -- > include/linux/iommu.h | 36 > 2 files c

Re: [PATCH 17/18] iommu: remove DOMAIN_ATTR_IO_PGTABLE_CFG

2021-03-30 Thread Will Deacon
On Tue, Mar 16, 2021 at 04:38:23PM +0100, Christoph Hellwig wrote: > Use an explicit set_pgtable_quirks method instead that just passes > the actual quirk bitmask instead. > > Signed-off-by: Christoph Hellwig > Acked-by: Li Yang > --- > drivers/gpu/drm/msm/adreno/adreno_gpu.c | 5 +- > drivers

Re: [PATCH 16/18] iommu: remove DOMAIN_ATTR_DMA_USE_FLUSH_QUEUE

2021-03-30 Thread Will Deacon
On Tue, Mar 16, 2021 at 04:38:22PM +0100, Christoph Hellwig wrote: > From: Robin Murphy > > Instead make the global iommu_dma_strict paramete in iommu.c canonical by > exporting helpers to get and set it and use those directly in the drivers. > > This make sure that the iommu.strict parameter al

Re: [PATCH v2] mm: Move mem_init_print_info() into mm_init()

2021-03-30 Thread Kefeng Wang
Hi Andrew, kindly ping On 2021/3/17 9:52, Kefeng Wang wrote: mem_init_print_info() is called in mem_init() on each architecture, and pass NULL argument, so using void argument and move it into mm_init(). Acked-by: Dave Hansen Signed-off-by: Kefeng Wang --- v2: - Cleanup 'str' line suggested b

Re: [PATCH 15/18] iommu: remove iommu_set_cmd_line_dma_api and iommu_cmd_line_dma_api

2021-03-30 Thread Will Deacon
On Tue, Mar 16, 2021 at 04:38:21PM +0100, Christoph Hellwig wrote: > Don't obsfucate the trivial bit flag check. > > Signed-off-by: Christoph Hellwig > --- > drivers/iommu/iommu.c | 23 +-- > 1 file changed, 5 insertions(+), 18 deletions(-) Acked-by: Will Deacon Will

Re: [PATCH 14/18] iommu: remove DOMAIN_ATTR_NESTING

2021-03-30 Thread Will Deacon
On Tue, Mar 16, 2021 at 04:38:20PM +0100, Christoph Hellwig wrote: > Use an explicit enable_nesting method instead. > > Signed-off-by: Christoph Hellwig > Acked-by: Li Yang > --- > drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 43 - > drivers/iommu/arm/arm-smmu/arm-smmu.c

Re: [PATCH 13/18] iommu: remove DOMAIN_ATTR_GEOMETRY

2021-03-30 Thread Will Deacon
On Tue, Mar 16, 2021 at 04:38:19PM +0100, Christoph Hellwig wrote: > The geometry information can be trivially queried from the iommu_domain > struture. > > Signed-off-by: Christoph Hellwig > Acked-by: Li Yang > --- > drivers/iommu/iommu.c | 20 +++- > drivers/vfio/vfi

  1   2   >