Re: [6.1.0-rc3-next-20221104] Boot failure - kernel BUG at mm/memblock.c:519

2022-11-07 Thread Mike Rapoport
Hi Yajun, On Tue, Nov 08, 2022 at 02:27:53AM +, Yajun Deng wrote: > Hi Sachin, > I didn't have a powerpc architecture machine. I don't know why this happened. > > Hi Mike, > Do you have any suggestions? You can try reproducing the bug qemu or work with Sachin to debug the issue. > I tested

Re: [PATCH 00/44] KVM: Rework kvm_init() and hardware enabling

2022-11-07 Thread Isaku Yamahata
On Tue, Nov 08, 2022 at 01:09:27AM +, "Huang, Kai" wrote: > On Mon, 2022-11-07 at 13:46 -0800, Isaku Yamahata wrote: > > > On Fri, Nov 04, 2022, Isaku Yamahata wrote: > > > > Thanks for the patch series. I the rebased TDX KVM patch series and it > > > > worked. > > > > Since cpu offline

Re: [PATCH] ibmvfc: Avoid path failures during live migration

2022-11-07 Thread Martin K. Petersen
On Wed, 26 Oct 2022 13:13:56 -0500, Brian King wrote: > This patch fixes an issue reported when performing a live > migration when multipath is configured with a short fast > fail timeout of 5 seconds and also to have no_path_retry > set to fail. In this scenario, all paths would go into the >

Re: [PATCH v9 6/7] powerpc/code-patching: Use temporary mm for Radix MMU

2022-11-07 Thread Benjamin Gray
On Thu, 2022-11-03 at 14:10 +1100, Benjamin Gray wrote: > On Wed, 2022-11-02 at 10:11 +, Christophe Leroy wrote: > > Le 25/10/2022 à 06:44, Benjamin Gray a écrit : > > > +   /* > > > +    * PTE allocation uses GFP_KERNEL which means we need to > > > +    * pre-allocate the PTE here

[PATCH] soc: fsl: qe: request pins non-exclusively

2022-11-07 Thread Dmitry Torokhov
Commit 84582f9ed090 ("soc: fsl: qe: Avoid using gpio_to_desc()") changed qe_pin_request() to request and hold GPIO corresponding to a given pin. Unfortunately this does not work, as fhci-hcd requests these GPIOs first, befor calling qe_pin_request() (see

Re: [PATCH 00/44] KVM: Rework kvm_init() and hardware enabling

2022-11-07 Thread Isaku Yamahata
On Fri, Nov 04, 2022 at 08:27:14PM +, Sean Christopherson wrote: > On Fri, Nov 04, 2022, Isaku Yamahata wrote: > > Thanks for the patch series. I the rebased TDX KVM patch series and it > > worked. > > Since cpu offline needs to be rejected in some cases(To keep at least one > > cpu > > on

Re: [PATCH 30/44] KVM: Drop kvm_arch_check_processor_compat() hook

2022-11-07 Thread Eric Farman
On Wed, 2022-11-02 at 23:18 +, Sean Christopherson wrote: > Drop kvm_arch_check_processor_compat() and its support code now that > all > architecture implementations are nops. > > Signed-off-by: Sean Christopherson > --- >  arch/arm64/kvm/arm.c   |  7 +-- >  arch/mips/kvm/mips.c  

Re: [PATCH 27/44] KVM: Drop kvm_arch_{init,exit}() hooks

2022-11-07 Thread Eric Farman
On Wed, 2022-11-02 at 23:18 +, Sean Christopherson wrote: > Drop kvm_arch_init() and kvm_arch_exit() now that all implementations > are nops. > > No functional change intended. > > Signed-off-by: Sean Christopherson > --- >  arch/arm64/kvm/arm.c    | 11 --- >  

Re: [PATCH 25/44] KVM: s390: Do s390 specific init without bouncing through kvm_init()

2022-11-07 Thread Eric Farman
On Wed, 2022-11-02 at 23:18 +, Sean Christopherson wrote: > Move the guts of kvm_arch_init() into a new helper, > __kvm_s390_init(), > and invoke the new helper directly from kvm_s390_init() instead of > bouncing through kvm_init().  Invoking kvm_arch_init() is the very > first action

Re: [PATCH 26/44] KVM: s390: Mark __kvm_s390_init() and its descendants as __init

2022-11-07 Thread Eric Farman
On Wed, 2022-11-02 at 23:18 +, Sean Christopherson wrote: > Tag __kvm_s390_init() and its unique helpers as __init.  These > functions > are only ever called during module_init(), but could not be tagged > accordingly while they were invoked from the common kvm_arch_init(), > which is not

Re: [PATCH 09/44] KVM: Drop arch hardware (un)setup hooks

2022-11-07 Thread Eric Farman
On Wed, 2022-11-02 at 23:18 +, Sean Christopherson wrote: > Drop kvm_arch_hardware_setup() and kvm_arch_hardware_unsetup() now > that > all implementations are nops. > > No functional change intended. > > Signed-off-by: Sean Christopherson > --- >  arch/arm64/include/asm/kvm_host.h   |  1 -

Re: [PATCH 06/44] KVM: s390: Move hardware setup/unsetup to init/exit

2022-11-07 Thread Eric Farman
On Wed, 2022-11-02 at 23:18 +, Sean Christopherson wrote: > Now that kvm_arch_hardware_setup() is called immediately after > kvm_arch_init(), fold the guts of kvm_arch_hardware_(un)setup() into > kvm_arch_{init,exit}() as a step towards dropping one of the hooks. > > No functional change

Re: [PATCH 05/44] KVM: s390: Unwind kvm_arch_init() piece-by-piece() if a step fails

2022-11-07 Thread Eric Farman
On Wed, 2022-11-02 at 23:18 +, Sean Christopherson wrote: > In preparation for folding kvm_arch_hardware_setup() into > kvm_arch_init(), > unwind initialization one step at a time instead of simply calling > kvm_arch_exit().  Using kvm_arch_exit() regardless of which > initialization > step

Re: [PATCH 04/44] KVM: Teardown VFIO ops earlier in kvm_exit()

2022-11-07 Thread Eric Farman
On Wed, 2022-11-02 at 23:18 +, Sean Christopherson wrote: > Move the call to kvm_vfio_ops_exit() further up kvm_exit() to try and > bring some amount of symmetry to the setup order in kvm_init(), and > more > importantly so that the arch hooks are invoked dead last by > kvm_exit(). > This will

Re: [PATCH v2 1/4] powerpc/64: Add INTERRUPT_SANITIZE_REGISTERS Kconfig

2022-11-07 Thread Segher Boessenkool
Hi! On Mon, Nov 07, 2022 at 02:31:59PM +1100, Rohan McLure wrote: > Add Kconfig option for enabling clearing of registers on arrival in an > interrupt handler. This reduces the speculation influence of registers > on kernel internals. Assuming you are talking about existing PowerPC CPUs from the

Re: [PATCH 1/2] powerpc: export the CPU node count

2022-11-07 Thread Laurent Dufour
On 07/11/2022 13:11:17, Nicholas Piggin wrote: > On Sat Oct 29, 2022 at 2:00 AM AEST, Laurent Dufour wrote: >> At boot time, the FDT is parsed to compute the number of CPUs. >> In addition count the number of CPU nodes and export it. >> >> This is useful when building the FDT for a kexeced kernel

Re: [PATCH v2 1/4] powerpc/64: Add INTERRUPT_SANITIZE_REGISTERS Kconfig

2022-11-07 Thread Christophe Leroy
Le 07/11/2022 à 04:31, Rohan McLure a écrit : > Add Kconfig option for enabling clearing of registers on arrival in an > interrupt handler. This reduces the speculation influence of registers > on kernel internals. The option will be consumed by 64-bit systems that > feature speculation and wish

[PATCH printk v3 00/40] reduce console_lock scope

2022-11-07 Thread John Ogness
This is v3 of a series to prepare for threaded/atomic printing. v2 is here [0]. This series focuses on reducing the scope of the BKL console_lock. It achieves this by switching to SRCU and a dedicated mutex for console list iteration and modification, respectively. The console_lock will no longer

[PATCH printk v3 26/40] tty: hvc: use console_is_registered()

2022-11-07 Thread John Ogness
It is not reliable to check for CON_ENABLED in order to identify if a console is registered. Use console_is_registered() instead. Signed-off-by: John Ogness --- drivers/tty/hvc/hvc_console.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/tty/hvc/hvc_console.c

Re: [RFC PATCH 05/19] powerpc/32: Use load and store multiple in GPR save/restore macros

2022-11-07 Thread Christophe Leroy
Le 07/11/2022 à 13:45, Nicholas Piggin a écrit : > On Thu Nov 3, 2022 at 6:26 PM AEST, Christophe Leroy wrote: >> It contradicts commit a85c728cb5e1 ("powerpc/32: Don't use lmw/stmw for >> saving/restoring non volatile regs") > > Hmm okay. Do you want to keep the #ifdef case in ppc_save_regs

Re: [RFC PATCH 05/19] powerpc/32: Use load and store multiple in GPR save/restore macros

2022-11-07 Thread Nicholas Piggin
On Thu Nov 3, 2022 at 6:26 PM AEST, Christophe Leroy wrote: > It contradicts commit a85c728cb5e1 ("powerpc/32: Don't use lmw/stmw for > saving/restoring non volatile regs") Hmm okay. Do you want to keep the #ifdef case in ppc_save_regs for ppc32 to save ~124 bytes of text? I don't mind either

Re: [RFC PATCH 2/6] powerpc/64s: Helpers to switch between linear and vmapped stack pointers

2022-11-07 Thread Nicholas Piggin
On Sat Nov 5, 2022 at 6:00 PM AEST, Christophe Leroy wrote: > > > Le 04/11/2022 à 18:27, Andrew Donnellan a écrit : > > powerpc unfortunately has too many places where we run stuff in real mode. > > > > With CONFIG_VMAP_STACK enabled, this means we need to be able to swap the > > stack pointer to

Re: [RFC PATCH 14/19] powerpc: split validate_sp into two functions

2022-11-07 Thread Nicholas Piggin
On Mon Nov 7, 2022 at 10:58 AM AEST, Russell Currey wrote: > On Mon, 2022-10-31 at 15:54 +1000, Nicholas Piggin wrote: > > Most callers just want to validate an arbitrary kernel stack pointer, > > some need a particular size. Make the size case the exceptional one > > with an extra function. > >

Re: [PATCH v9 5/7] powerpc/tlb: Add local flush for page given mm_struct and psize

2022-11-07 Thread Nicholas Piggin
On Mon Nov 7, 2022 at 4:58 PM AEST, Benjamin Gray wrote: > On Thu, 2022-11-03 at 11:39 +1100, Benjamin Gray wrote: > > On Wed, 2022-11-02 at 09:56 +, Christophe Leroy wrote: > > > By the way, 'extern' keyword is pointless and deprecated for > > > functions > > > prototypes, please don't add

Re: [PATCH v5 2/2] powerpc/64: Add module check for ELF ABI version

2022-11-07 Thread Nicholas Piggin
On Thu Nov 3, 2022 at 6:35 PM AEST, Christophe Leroy wrote: > > > Le 31/10/2022 à 13:07, Nicholas Piggin a écrit : > > Override the generic module ELF check to provide a check for the ELF ABI > > version. This becomes important if we allow big-endian ELF ABI V2 builds > > but it doesn't hurt to

Re: [PATCH 1/2] powerpc: export the CPU node count

2022-11-07 Thread Nicholas Piggin
On Sat Oct 29, 2022 at 2:00 AM AEST, Laurent Dufour wrote: > At boot time, the FDT is parsed to compute the number of CPUs. > In addition count the number of CPU nodes and export it. > > This is useful when building the FDT for a kexeced kernel since we need to > take in account the CPU node added

Re: [PATCH] powerpc: Interrupt handler stack randomisation

2022-11-07 Thread Nicholas Piggin
On Tue Oct 25, 2022 at 1:38 PM AEST, Rohan McLure wrote: > Stack frames used by syscall handlers support random offsets as of > commit f4a0318f278d (powerpc: add support for syscall stack randomization). > Implement the same for general interrupt handlers, by applying the > random stack offset and

Re: [PATCH 1/2] tools/perf: Fix printing os->prefix in CSV metrics output

2022-11-07 Thread kajoljain
On 11/4/22 13:07, Disha Goel wrote: > On 11/4/22 12: 59 PM, Athira Rajeev wrote: On 03-Nov-2022, at 9: 45 PM, > Ian Rogers wrote: On Wed, Nov 2, 2022 at 1: 36 AM > Athira Rajeev ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ > ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍

Re: [PATCH 0/5] powerpc/kprobes: preempt related changes and cleanups

2022-11-07 Thread Nicholas Piggin
+linux-arch FYI most preempt_enable_no_resched() calls outside of core scheduler code come from kprobes copy-and-paste, and can possibly be fixed in similar ways as this series. It's a bit of a footgun API that should be banished from outside kernel/sched/, at least without an explicit comment

Re: [PATCH 4/5] powerpc/kprobes: Setup consistent pt_regs across kprobes, optprobes and KPROBES_ON_FTRACE

2022-11-07 Thread Nicholas Piggin
On Fri Oct 21, 2022 at 3:29 AM AEST, Naveen N. Rao wrote: > Ensure a more consistent pt_regs across kprobes, optprobes and > KPROBES_ON_FTRACE: > - Drop setting trap to 0x700 under optprobes. This is not accurate and > is unnecessary. Instead, zero it out for both optprobes and >

Re: [PATCH 1/4] powerpc: mm: Replace p{u,m,4}d_is_leaf with p{u,m,4}_leaf

2022-11-07 Thread Christophe Leroy
Le 06/11/2022 à 23:49, Rohan McLure a écrit : > Replace occurrences of p{u,m,4}d_is_leaf with p{u,m,4}_leaf, as the > latter is the name given to checking that a higher-level entry in > multi-level paging contains a page translation entry (pte). This commit > allows for p{u,m,4}d_leaf to be used

Re: [PATCH 3/5] powerpc/kprobes: Use preempt_enable() rather than the no_resched variant

2022-11-07 Thread Nicholas Piggin
On Fri Oct 21, 2022 at 3:28 AM AEST, Naveen N. Rao wrote: > preempt_enable_no_resched() is just the same as preempt_enable() when we > are in a irqs disabled context. kprobe_handler() and the post/fault > handlers are all called with irqs disabled. As such, convert those to > just use

Re: [PATCH 2/5] powerpc/kprobes: Have optimized_callback() use preempt_enable()

2022-11-07 Thread Nicholas Piggin
On Fri Oct 21, 2022 at 3:28 AM AEST, Naveen N. Rao wrote: > Similar to x86 commit 2e62024c265aa6 ("kprobes/x86: Use preempt_enable() > in optimized_callback()"), change powerpc optprobes to use > preempt_enable() rather than preempt_enable_no_resched() since powerpc > also removed irq disabling

Re: [PATCH 1/5] powerpc/kprobes: Remove preempt disable around call to get_kprobe() in arch_prepare_kprobe()

2022-11-07 Thread Nicholas Piggin
On Fri Oct 21, 2022 at 3:28 AM AEST, Naveen N. Rao wrote: > arch_prepare_kprobe() is called from register_kprobe() via > prepare_kprobe(), or through register_aggr_kprobe(), both with the > kprobe_mutex held. Per the comment for get_kprobe(): > /* >* This routine is called either: >* -