Re: [PATCH v2 1/4] mm: pagewalk: Fix walk for hugepage tables

2021-06-25 Thread Michael Ellerman
Christophe Leroy writes: > Le 25/06/2021 à 06:45, Michael Ellerman a écrit : >> Christophe Leroy writes: >>> Hi Michael, >>> >>> Le 19/04/2021 à 12:47, Christophe Leroy a écrit : Pagewalk ignores hugepd entries and walk down the tables as if it was traditionnal entries, leading to crazy

Re: [PATCH printk v3 3/6] printk: remove safe buffers

2021-06-25 Thread Petr Mladek
On Thu 2021-06-24 17:41:56, John Ogness wrote: > I would prefer a v4 with these fixes: > > - wrap @console_owner_lock with printk_safe usage > > - remove unnecessary printk_safe usage from printk_safe.c > > - update commit message to say that safe context tracking is left in > place for both t

Re: [PATCH printk v3 4/6] printk: remove NMI tracking

2021-06-25 Thread Petr Mladek
On Thu 2021-06-24 13:17:46, John Ogness wrote: > 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 > Reviewed-by: Petr Mladek

Re: [PATCH] perf vendor events power10: Adds 24x7 nest metric events for power10 platform

2021-06-25 Thread Nageswara Sastry
Test scenarios: 1. With 'perf list metric' and 'perf list metricgroup' - can see metrics 2. Run all the metrics with perf stat with -M option and --metric-only -M option The above test scenarios automated with avocado framework, pull request title: perf_metric.py: Add perf metric test case

[PATCH] powerpc/interrupt: Use names in check_return_regs_valid()

2021-06-25 Thread Christophe Leroy
trap->regs == 0x3000 is trap_is_scv() trap 0x500 is INTERRUPT_EXTERNAL Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/interrupt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/kernel/interrupt.c b/arch/powerpc/kernel/interrupt.c index 1b4a99ecb7e5

Re: [PATCH 1/2] powerpc/bug: Remove specific powerpc BUG_ON() and WARN_ON() on PPC32

2021-06-25 Thread Christophe Leroy
Hi Michael, What happened to this series ? It has been flagged 'under review' in Patchwork since mid April but I never saw it in next-test. Thanks Christophe Le 12/04/2021 à 18:26, Christophe Leroy a écrit : powerpc BUG_ON() and WARN_ON() are based on using twnei instruction. For catching s

[PATCH] powerpc/interrupt: Also use exit_must_hard_disable() on PPC32

2021-06-25 Thread Christophe Leroy
Reduce #ifdefs a bit by making exit_must_hard_disable() return true on PPC32. Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/interrupt.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/arch/powerpc/kernel/interrupt.c b/arch/powerpc/kernel/interrupt.c index ce

[PATCH] powerpc/stacktrace: Fix spurious "stale" traces in raise_backtrace_ipi()

2021-06-25 Thread Michael Ellerman
In raise_backtrace_ipi() we iterate through the cpumask of CPUs, sending each an IPI asking them to do a backtrace, but we don't wait for the backtrace to happen. We then iterate through the CPU mask again, and if any CPU hasn't done the backtrace and cleared itself from the mask, we print a trace

Re: [PATCH v16 2/4] kasan: allow architectures to provide an outline readiness check

2021-06-25 Thread Andrey Konovalov
On Thu, Jun 24, 2021 at 6:41 AM Daniel Axtens wrote: > > Allow architectures to define a kasan_arch_is_ready() hook that bails > out of any function that's about to touch the shadow unless the arch > says that it is ready for the memory to be accessed. This is fairly > uninvasive and should have a

Re: [PATCH v16 1/4] kasan: allow an architecture to disable inline instrumentation

2021-06-25 Thread Andrey Konovalov
On Thu, Jun 24, 2021 at 6:41 AM Daniel Axtens wrote: > > For annoying architectural reasons, it's very difficult to support inline > instrumentation on powerpc64.* > > Add a Kconfig flag to allow an arch to disable inline. (It's a bit > annoying to be 'backwards', but I'm not aware of any way to h

Re: [PATCH printk v3 4/6] printk: remove NMI tracking

2021-06-25 Thread Russell King (Oracle)
On Fri, Jun 25, 2021 at 02:36:23PM +0200, Petr Mladek wrote: > On Thu 2021-06-24 13:17:46, John Ogness wrote: > > 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() i

Re: [PATCH] perf vendor events power10: Adds 24x7 nest metric events for power10 platform

2021-06-25 Thread Paul A. Clarke
On Fri, Jun 25, 2021 at 05:29:48PM +0530, Kajol Jain wrote: > Patch adds 24x7 nest metric events for POWER10. > > Signed-off-by: Kajol Jain > --- > .../arch/powerpc/power10/nest_metrics.json| 491 ++ > 1 file changed, 491 insertions(+) > create mode 100644 > tools/perf/pmu-

[PATCH] ASoC: fsl_xcvr: remove an unneeded semicolon

2021-06-25 Thread 13145886936
From: gushengxian Remove an unneeded semicolon. Signed-off-by: gushengxian --- sound/soc/fsl/fsl_xcvr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/fsl/fsl_xcvr.c b/sound/soc/fsl/fsl_xcvr.c index e34d57ad66fb..75fa8f1b5576 100644 --- a/sound/soc/fsl/fsl_xcvr.c

Re: PowerPC guest getting "BUG: scheduling while atomic" on linux-next-20210623 during secondary CPUs bringup

2021-06-25 Thread Bharata B Rao
On Fri, Jun 25, 2021 at 12:16:52PM +0200, Peter Zijlstra wrote: > You mean: CONFIG_PREEMPTION=n, what about CONFIG_PREEMPT_COUNT? > > Because if both are =n, then I don't see how that warning could trigger. > in_atomic_preempt_off() would then result in prempt_count() == 0, and > per the print abo

Re: [PATCH v15 00/12] Restricted DMA

2021-06-25 Thread Will Deacon
On Thu, Jun 24, 2021 at 03:19:48PM -0400, Konrad Rzeszutek Wilk wrote: > On Thu, Jun 24, 2021 at 11:55:14PM +0800, Claire Chang wrote: > > This series implements mitigations for lack of DMA access control on > > systems without an IOMMU, which could result in the DMA accessing the > > system memory

[PATCH] ASoC: fsl_xcvr: remove unnecessary print function dev_err()

2021-06-25 Thread 13145886936
From: gushengxian The print function dev_err() is redundant because platform_get_irq() already prints an error. Signed-off-by: gushengxian --- sound/soc/fsl/fsl_xcvr.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sound/soc/fsl/fsl_xcvr.c b/sound/soc/fsl/fsl_xcvr.c ind

[PATCH] ASoC: fsl_spdif: remove unnecessary print function dev_err()

2021-06-25 Thread 13145886936
From: gushengxian The print function dev_err() is redundant because platform_get_irq() already prints an error. Signed-off-by: gushengxian --- sound/soc/fsl/fsl_spdif.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sound/soc/fsl/fsl_spdif.c b/sound/soc/fsl/fsl_spdif.c

[PATCH] perf vendor events power10: Adds 24x7 nest metric events for power10 platform

2021-06-25 Thread Kajol Jain
Patch adds 24x7 nest metric events for POWER10. Signed-off-by: Kajol Jain --- .../arch/powerpc/power10/nest_metrics.json| 491 ++ 1 file changed, 491 insertions(+) create mode 100644 tools/perf/pmu-events/arch/powerpc/power10/nest_metrics.json diff --git a/tools/perf/pmu-ev

[PATCH] ASoC: fsl: fsl_easrc: remove unnecessary print function dev_err()

2021-06-25 Thread 13145886936
From: gushengxian The print function dev_err() is redundant because platform_get_irq() already prints an error. Signed-off-by: gushengxian --- sound/soc/fsl/fsl_easrc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sound/soc/fsl/fsl_easrc.c b/sound/soc/fsl/fsl_easrc.c

[PATCH 2/2] powerpc/ptrace: Refactor regs_set_return_{msr/ip}

2021-06-25 Thread Christophe Leroy
regs_set_return_msr() and regs_set_return_ip() have a copy of the code of set_return_regs_changed(). Call the later instead. Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/ptrace.h | 10 ++ 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/arch/powerpc/include/

[PATCH 1/2] powerpc/ptrace: Move set_return_regs_changed() before regs_set_return_{msr/ip}

2021-06-25 Thread Christophe Leroy
regs_set_return_msr() and regs_set_return_ip() have a copy of the code of set_return_regs_changed(). Move up set_return_regs_changed() so it can be reused by regs_set_return_{msr/ip} Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/ptrace.h | 10 +- 1 file changed, 5 inserti

[PATCH] powerpc/syscalls: Simplify do_mmap2()

2021-06-25 Thread Christophe Leroy
When shift is nul, operations remain valid so no test needed. And 'ret' is unnecessary. And use IS_ALIGNED() to check alignment, that's more clear. Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/syscalls.c | 15 --- 1 file changed, 4 insertions(+), 11 deletions(-) diff --

[PATCH RFC 2/2] powerpc/signal: Retire signal trampoline on stack

2021-06-25 Thread Christophe Leroy
The signal trampoline is either: - As specified by the caller via SA_RESTORER - In VDSO if VDSO is properly mapped - Fallback on user stack However, nowadays user stack is mapped non executable by default so the fallback will generate an exec fault. All other architectures having VDSO except x86

[PATCH 1/2] powerpc/signal: Fix handling of SA_RESTORER sigaction flag

2021-06-25 Thread Christophe Leroy
powerpc advertises support of SA_RESTORER sigaction flag. Make it the truth. Cc: sta...@vger.kernel.org Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/signal_32.c | 8 ++-- arch/powerpc/kernel/signal_64.c | 4 +++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/arch

Re: [PATCH] powerpc: mark local variables around longjmp as volatile

2021-06-25 Thread Christophe Leroy
Le 29/04/2021 à 10:06, Arnd Bergmann a écrit : From: Arnd Bergmann gcc-11 points out that modifying local variables next to a longjmp/setjmp may cause undefined behavior: arch/powerpc/kexec/crash.c: In function 'crash_kexec_prepare_cpus.constprop': arch/powerpc/kexec/crash.c:108:22: error:

[powerpc:next-test] BUILD SUCCESS 06664e6c0f810035deb4b1d135d7a8f70795512f

2021-06-25 Thread kernel test robot
allnoconfig x86_64 randconfig-a002-20210625 x86_64 randconfig-a001-20210625 x86_64 randconfig-a005-20210625 x86_64 randconfig-a003-20210625 x86_64 randconfig-a004-20210625 x86_64 randconfig-a006-20210625

[powerpc:next] BUILD SUCCESS 0e8554b5d7801b0aebc6c348a0a9f7706aa17b3b

2021-06-25 Thread kernel test robot
defconfig mips allyesconfig mips allmodconfig powerpc allyesconfig powerpc allmodconfig powerpc allnoconfig x86_64 randconfig-a002-20210625 x86_64

Re: PowerPC guest getting "BUG: scheduling while atomic" on linux-next-20210623 during secondary CPUs bringup

2021-06-25 Thread Peter Zijlstra
On Fri, Jun 25, 2021 at 02:23:16PM +0530, Bharata B Rao wrote: > On Fri, Jun 25, 2021 at 09:28:09AM +0200, Peter Zijlstra wrote: > > On Fri, Jun 25, 2021 at 11:16:08AM +0530, Srikar Dronamraju wrote: > > > * Bharata B Rao [2021-06-24 21:25:09]: > > > > > > > A PowerPC KVM guest gets the following

Re: PowerPC guest getting "BUG: scheduling while atomic" on linux-next-20210623 during secondary CPUs bringup

2021-06-25 Thread Valentin Schneider
On 25/06/21 09:28, Peter Zijlstra wrote: > On Fri, Jun 25, 2021 at 11:16:08AM +0530, Srikar Dronamraju wrote: >> Bharata, >> >> I think the regression is due to Commit f1a0a376ca0c ("sched/core: >> Initialize the idle task with preemption disabled") > > So that extra preempt_disable() that got remo

Re: PowerPC guest getting "BUG: scheduling while atomic" on linux-next-20210623 during secondary CPUs bringup

2021-06-25 Thread Bharata B Rao
On Fri, Jun 25, 2021 at 09:28:09AM +0200, Peter Zijlstra wrote: > On Fri, Jun 25, 2021 at 11:16:08AM +0530, Srikar Dronamraju wrote: > > * Bharata B Rao [2021-06-24 21:25:09]: > > > > > A PowerPC KVM guest gets the following BUG message when booting > > > linux-next-20210623: > > > > > > smp: Br

Re: [PATCH v2 1/5] KVM: do not allow mapping valid but non-refcounted pages

2021-06-25 Thread Paolo Bonzini
On 25/06/21 09:58, Christian Borntraeger wrote: On 25.06.21 09:36, David Stevens wrote: From: Nicholas Piggin It's possible to create a region which maps valid but non-refcounted pages (e.g., tail pages of non-compound higher order allocations). These host pages can then be returned by gfn_t

Re: [PATCH v2 1/5] KVM: do not allow mapping valid but non-refcounted pages

2021-06-25 Thread Christian Borntraeger
On 25.06.21 09:36, David Stevens wrote: From: Nicholas Piggin It's possible to create a region which maps valid but non-refcounted pages (e.g., tail pages of non-compound higher order allocations). These host pages can then be returned by gfn_to_page, gfn_to_pfn, etc., family of APIs, which

Re: [PATCH 0/6] KVM: Remove uses of struct page from x86 and arm64 MMU

2021-06-25 Thread Christian Borntraeger
On 24.06.21 14:57, Nicholas Piggin wrote: Excerpts from Paolo Bonzini's message of June 24, 2021 10:41 pm: On 24/06/21 13:42, Nicholas Piggin wrote: Excerpts from Nicholas Piggin's message of June 24, 2021 8:34 pm: Excerpts from David Stevens's message of June 24, 2021 1:57 pm: KVM support

[PATCH v2 5/5] KVM: mmu: remove over-aggressive warnings

2021-06-25 Thread David Stevens
From: David Stevens Remove two warnings that require ref counts for pages to be non-zero, as mapped pfns from follow_pfn may not have an initialized ref count. Signed-off-by: David Stevens --- arch/x86/kvm/mmu/mmu.c | 7 --- virt/kvm/kvm_main.c| 2 +- 2 files changed, 1 insertion(+), 8

[PATCH v2 4/5] KVM: arm64/mmu: use gfn_to_pfn_page

2021-06-25 Thread David Stevens
From: David Stevens Covert usages of the deprecated gfn_to_pfn functions to the new gfn_to_pfn_page functions. Signed-off-by: David Stevens --- arch/arm64/kvm/mmu.c | 26 -- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/arch/arm64/kvm/mmu.c b/arch/arm6

[PATCH v2 3/5] KVM: x86/mmu: use gfn_to_pfn_page

2021-06-25 Thread David Stevens
From: David Stevens Covert usages of the deprecated gfn_to_pfn functions to the new gfn_to_pfn_page functions. Signed-off-by: David Stevens --- arch/x86/kvm/mmu/mmu.c | 43 - arch/x86/kvm/mmu/mmu_internal.h | 3 ++- arch/x86/kvm/mmu/paging_tmpl.h | 23

[PATCH v2 2/5] KVM: mmu: introduce new gfn_to_pfn_page functions

2021-06-25 Thread David Stevens
From: David Stevens Introduce new gfn_to_pfn_page functions that parallel existing gfn_to_pfn functions. The new functions are identical except they take an additional out parameter that is used to return the struct page if the hva was resolved by gup. This allows callers to differentiate the gup

[PATCH v2 1/5] KVM: do not allow mapping valid but non-refcounted pages

2021-06-25 Thread David Stevens
From: Nicholas Piggin It's possible to create a region which maps valid but non-refcounted pages (e.g., tail pages of non-compound higher order allocations). These host pages can then be returned by gfn_to_page, gfn_to_pfn, etc., family of APIs, which take a reference to the page, which takes it

[PATCH v2 0/5] Remove uses of struct page from x86 and arm64 MMU

2021-06-25 Thread David Stevens
KVM supports mapping VM_IO and VM_PFNMAP memory into the guest by using follow_pte in gfn_to_pfn. However, the resolved pfns may not have assoicated struct pages, so they should not be passed to pfn_to_page. This series removes such calls from the x86 and arm64 secondary MMU. To do this, this serie

Re: PowerPC guest getting "BUG: scheduling while atomic" on linux-next-20210623 during secondary CPUs bringup

2021-06-25 Thread Peter Zijlstra
On Fri, Jun 25, 2021 at 11:16:08AM +0530, Srikar Dronamraju wrote: > * Bharata B Rao [2021-06-24 21:25:09]: > > > A PowerPC KVM guest gets the following BUG message when booting > > linux-next-20210623: > > > > smp: Bringing up secondary CPUs ... > > BUG: scheduling while atomic: swapper/1/0/0x0