[Kgdb-bugreport] [PATCH v5 2/5] irqchip/gic-v3: Enable support for SGIs to act as NMIs

2020-10-14 Thread Sumit Garg
Add support to handle SGIs as regular NMIs. As SGIs or IPIs defaults to a special flow handler: handle_percpu_devid_fasteoi_ipi(), so skip NMI handler update in case of SGIs. Also, enable NMI support prior to gic_smp_init() as allocation of SGIs as IRQs/NMIs happen as part of this routine. Signed

[Kgdb-bugreport] [PATCH v5 1/5] arm64: Add framework to turn IPI as NMI

2020-10-14 Thread Sumit Garg
Introduce framework to turn an IPI as NMI using pseudo NMIs. In case a particular platform doesn't support pseudo NMIs, then request IPI as a regular IRQ. The main motivation for this feature is to have an IPI that can be leveraged to invoke NMI functions on other CPUs. And current prospective use

[Kgdb-bugreport] [PATCH v5 0/5] arm64: Add framework to turn an IPI as NMI

2020-10-14 Thread Sumit Garg
With pseudo NMIs support available its possible to configure SGIs to be triggered as pseudo NMIs running in NMI context. And kernel features such as: - NMI backtrace can leverage IPI turned as NMI to get a backtrace of CPU stuck in hard lockup using magic SYSRQ. - kgdb relies on NMI support to ro

[Kgdb-bugreport] [PATCH v5 5/5] arm64: ipi_nmi: Add support for NMI backtrace

2020-10-14 Thread Sumit Garg
Enable NMI backtrace support on arm64 using IPI turned as an NMI leveraging pseudo NMIs support. It is now possible for users to get a backtrace of a CPU stuck in hard-lockup using magic SYSRQ. Signed-off-by: Sumit Garg --- arch/arm64/include/asm/irq.h | 6 ++ arch/arm64/kernel/ipi_nmi.c |

[Kgdb-bugreport] [PATCH v5 3/5] arm64: smp: Allocate and setup IPI as NMI

2020-10-14 Thread Sumit Garg
Allocate an unused IPI that can be turned as NMI using ipi_nmi framework. Also, invoke corresponding NMI setup/teardown APIs. Signed-off-by: Sumit Garg --- arch/arm64/kernel/smp.c | 8 1 file changed, 8 insertions(+) diff --git a/arch/arm64/kernel/smp.c b/arch/arm64/kernel/smp.c index

[Kgdb-bugreport] [PATCH v5 4/5] arm64: kgdb: Round up cpus using IPI as NMI

2020-10-14 Thread Sumit Garg
arm64 platforms with GICv3 or later supports pseudo NMIs which can be leveraged to round up CPUs which are stuck in hard lockup state with interrupts disabled that wouldn't be possible with a normal IPI. So instead switch to round up CPUs using IPI turned as NMI. And in case a particular arm64 pla

Re: [Kgdb-bugreport] [PATCH v5 1/5] arm64: Add framework to turn IPI as NMI

2020-10-14 Thread Masayoshi Mizuma
On Wed, Oct 14, 2020 at 04:42:07PM +0530, Sumit Garg wrote: > Introduce framework to turn an IPI as NMI using pseudo NMIs. In case a > particular platform doesn't support pseudo NMIs, then request IPI as a > regular IRQ. > > The main motivation for this feature is to have an IPI that can be > leve

Re: [Kgdb-bugreport] [PATCH v5 2/5] irqchip/gic-v3: Enable support for SGIs to act as NMIs

2020-10-14 Thread Masayoshi Mizuma
On Wed, Oct 14, 2020 at 04:42:08PM +0530, Sumit Garg wrote: > Add support to handle SGIs as regular NMIs. As SGIs or IPIs defaults to a > special flow handler: handle_percpu_devid_fasteoi_ipi(), so skip NMI > handler update in case of SGIs. > > Also, enable NMI support prior to gic_smp_init() as a

Re: [Kgdb-bugreport] [PATCH v5 3/5] arm64: smp: Allocate and setup IPI as NMI

2020-10-14 Thread Masayoshi Mizuma
On Wed, Oct 14, 2020 at 04:42:09PM +0530, Sumit Garg wrote: > Allocate an unused IPI that can be turned as NMI using ipi_nmi framework. > Also, invoke corresponding NMI setup/teardown APIs. > > Signed-off-by: Sumit Garg > --- > arch/arm64/kernel/smp.c | 8 > 1 file changed, 8 insertions

Re: [Kgdb-bugreport] [PATCH v5 5/5] arm64: ipi_nmi: Add support for NMI backtrace

2020-10-14 Thread Masayoshi Mizuma
On Wed, Oct 14, 2020 at 04:42:11PM +0530, Sumit Garg wrote: > Enable NMI backtrace support on arm64 using IPI turned as an NMI > leveraging pseudo NMIs support. It is now possible for users to get a > backtrace of a CPU stuck in hard-lockup using magic SYSRQ. > > Signed-off-by: Sumit Garg > --- >