Re: [PATCH 1/3] kexec_load: Use new kexec flag for hotplug support

2024-05-29 Thread Sourabh Jain
Hello Aditya, On 28/05/24 17:03, Aditya Gupta wrote: Hello sourabh, On Wed, May 22, 2024 at 06:43:51PM GMT, Sourabh Jain wrote: Kernel commit 79365026f869 (crash: add a new kexec flag for hotplug support) has introduced a new kexec flag to generalize hotplug support. The newly introduced

[PATCH 3/3] doc/hotplug: update man and --help

2024-05-22 Thread Sourabh Jain
Update the man page and --help option to make the description of the --hotplug option easier to understand. Cc: Aditya Gupta Cc: Baoquan He Cc: Coiby Xu Cc: Hari Bathini Cc: Mahesh Salgaonkar Signed-off-by: Sourabh Jain --- kexec/kexec.8 | 8 kexec/kexec.c | 3 ++- 2 files changed

[PATCH 2/3] powerpc/kexec_load: add hotplug support

2024-05-22 Thread Sourabh Jain
upta Cc: Baoquan He Cc: Coiby Xu Cc: Hari Bathini Cc: Mahesh Salgaonkar Signed-off-by: Sourabh Jain --- kexec/arch/ppc64/crashdump-ppc64.c | 16 ++- kexec/arch/ppc64/fdt.c | 200 +++- kexec/arch/ppc64/include/arch/fdt.h | 2 +- kexec/arch/ppc64/kexe

[PATCH 1/3] kexec_load: Use new kexec flag for hotplug support

2024-05-22 Thread Sourabh Jain
with the KEXEC_LIVE_UPDATE update flag, it is removed. Cc: Aditya Gupta Cc: Baoquan He Cc: Coiby Xu Cc: Hari Bathini Cc: Mahesh Salgaonkar Signed-off-by: Sourabh Jain --- kexec/arch/arm/kexec-arm.c | 5 + kexec/arch/arm64/kexec-arm64.c | 4 kexec/arch/cris/kexec-cris.c

[PATCH v19 1/6] crash: forward memory_notify arg to arch crash hotplug handler

2024-04-26 Thread Sourabh Jain
()` and `arch_crash_handle_hotplug_event()` to accept the `memory_notify` object as an argument from crash memory hotplug notifier. Since no such object is available in the case of CPU hotplug event, the crash CPU hotplug notifier `crash_cpuhp_online()` passes NULL to the crash hotplug handler. Signed-off-by: Sourabh Jain Acked

[PATCH v19 0/6]powerpc/crash: Kernel handling of CPU and memory hotplug

2024-04-26 Thread Sourabh Jain
Zohar Cc: Naveen N Rao Cc: Oscar Salvador Cc: Stephen Rothwell Cc: Thomas Gleixner Cc: Valentin Schneider Cc: Vivek Goyal Cc: kexec@lists.infradead.org Cc: x...@kernel.org Sourabh Jain (6): crash: forward memory_notify arg to arch crash hotplug handler crash: add a new kexec flag for hotplug

[PATCH v19 6/6] powerpc/crash: add crash memory hotplug support

2024-04-26 Thread Sourabh Jain
odate additional memory ranges and the elfcorehdr segment is not considered for SHA calculation, making it safe to update. The changes related to this feature are kept under the CRASH_HOTPLUG config, and it is enabled by default. Signed-off-by: Sourabh Jain Acked-by: Hari Bathini Cc: Akhil Raj C

[PATCH v19 5/6] powerpc/crash: add crash CPU hotplug support

2024-04-26 Thread Sourabh Jain
nabled by default. Signed-off-by: Sourabh Jain Acked-by: Hari Bathini Cc: Akhil Raj Cc: Andrew Morton Cc: Aneesh Kumar K.V Cc: Baoquan He Cc: Borislav Petkov (AMD) Cc: Boris Ostrovsky Cc: Christophe Leroy Cc: Dave Hansen Cc: Dave Young Cc: David Hildenbrand Cc: Greg Kroah-Hartman Cc: Laurent

[PATCH v19 2/6] crash: add a new kexec flag for hotplug support

2024-04-26 Thread Sourabh Jain
ng the x86 crash hotplug support in line with the above points, the following changes have been made: - Introduce the arch_crash_hotplug_support function to process kexec flags and determine crash hotplug support - Remove the arch_crash_hotplug_[cpu|memory]_support functions Signed-off-by: So

[PATCH v19 4/6] PowerPC/kexec: make the update_cpus_node() function public

2024-04-26 Thread Sourabh Jain
lls. No functional changes are intended. Signed-off-by: Sourabh Jain Acked-by: Hari Bathini Cc: Akhil Raj Cc: Andrew Morton Cc: Aneesh Kumar K.V Cc: Baoquan He Cc: Borislav Petkov (AMD) Cc: Boris Ostrovsky Cc: Christophe Leroy Cc: Dave Hansen Cc: Dave Young Cc: David Hildenbrand Cc: G

[PATCH v19 3/6] powerpc/kexec: move *_memory_ranges functions to ranges.c

2024-04-26 Thread Sourabh Jain
red to be public. Mark them as static and removed them from kexec_ranges.h header file. Finally, remove the CONFIG_KEXEC_FILE build dependency for range.c because it is required for other config, such as CONFIG_CRASH_DUMP. No functional changes are intended. Signed-off-by: Sourabh Jain Acked-by: H

[PATCH v18 6/6] powerpc/crash: add crash memory hotplug support

2024-03-25 Thread Sourabh Jain
odate additional memory ranges and the elfcorehdr segment is not considered for SHA calculation, making it safe to update. The changes related to this feature are kept under the CRASH_HOTPLUG config, and it is enabled by default. Signed-off-by: Sourabh Jain Acked-by: Hari Bathini Cc: Akhil Raj C

[PATCH v18 2/6] crash: add a new kexec flag for hotplug support

2024-03-25 Thread Sourabh Jain
ng the x86 crash hotplug support in line with the above points, the following changes have been made: - Introduce the arch_crash_hotplug_support function to process kexec flags and determine crash hotplug support - Remove the arch_crash_hotplug_[cpu|memory]_support functions Signed-off-by: So

[PATCH v18 3/6] powerpc/kexec: move *_memory_ranges functions to ranges.c

2024-03-25 Thread Sourabh Jain
red to be public. Mark them as static and removed them from kexec_ranges.h header file. Finally, remove the CONFIG_KEXEC_FILE build dependency for range.c because it is required for other config, such as CONFIG_CRASH_DUMP. No functional changes are intended. Signed-off-by: Sourabh Jain Acked-by: H

[PATCH v18 1/6] crash: forward memory_notify arg to arch crash hotplug handler

2024-03-25 Thread Sourabh Jain
()` and `arch_crash_handle_hotplug_event()` to accept the `memory_notify` object as an argument from crash memory hotplug notifier. Since no such object is available in the case of CPU hotplug event, the crash CPU hotplug notifier `crash_cpuhp_online()` passes NULL to the crash hotplug handler. Signed-off-by: Sourabh Jain Acked

[PATCH v18 0/6] powerpc/crash: Kernel handling of CPU and memory hotplug

2024-03-25 Thread Sourabh Jain
thini Cc: Laurent Dufour Cc: Mahesh Salgaonkar Cc: Michael Ellerman Cc: Mimi Zohar Cc: Naveen N Rao Cc: Oscar Salvador Cc: Thomas Gleixner Cc: Valentin Schneider Cc: Vivek Goyal Cc: kexec@lists.infradead.org Cc: x...@kernel.org Sourabh Jain (6): crash: forward memory_notify arg to arch cra

[PATCH v18 5/6] powerpc/crash: add crash CPU hotplug support

2024-03-25 Thread Sourabh Jain
nabled by default. Signed-off-by: Sourabh Jain Acked-by: Hari Bathini Cc: Akhil Raj Cc: Andrew Morton Cc: Aneesh Kumar K.V Cc: Baoquan He Cc: Borislav Petkov (AMD) Cc: Boris Ostrovsky Cc: Christophe Leroy Cc: Dave Hansen Cc: Dave Young Cc: David Hildenbrand Cc: Greg Kroah-Hartman Cc: Laurent

[PATCH v18 4/6] PowerPC/kexec: make the update_cpus_node() function public

2024-03-25 Thread Sourabh Jain
lls. No functional changes are intended. Signed-off-by: Sourabh Jain Acked-by: Hari Bathini Cc: Akhil Raj Cc: Andrew Morton Cc: Aneesh Kumar K.V Cc: Baoquan He Cc: Borislav Petkov (AMD) Cc: Boris Ostrovsky Cc: Christophe Leroy Cc: Dave Hansen Cc: Dave Young Cc: David Hildenbrand Cc: G

Re: [PATCH v17 6/6] powerpc/crash: add crash memory hotplug support

2024-03-04 Thread Sourabh Jain
On 02/03/24 18:49, Hari Bathini wrote: On 26/02/24 2:11 pm, Sourabh Jain wrote: Extend the arch crash hotplug handler, as introduced by the patch title ("powerpc: add crash CPU hotplug support"), to also support memory add/remove events. Elfcorehdr describes the memory of the cr

Re: [PATCH v17 2/6] crash: add a new kexec flag for hotplug support

2024-03-03 Thread Sourabh Jain
Hello Hari, On 02/03/24 18:47, Hari Bathini wrote: On 26/02/24 2:11 pm, Sourabh Jain wrote: Commit a72bbec70da2 ("crash: hotplug support for kexec_load()") introduced a new kexec flag, `KEXEC_UPDATE_ELFCOREHDR`. Kexec tool uses this flag to indicate to the kernel that it is safe

Re: [PATCH v17 0/6] powerpc/crash: Kernel handling of CPU and memory hotplug

2024-02-29 Thread Sourabh Jain
Hello Baoquan, On 29/02/24 19:21, Baoquan He wrote: Hi Sourabh, On 02/26/24 at 02:11pm, Sourabh Jain wrote: Commit 247262756121 ("crash: add generic infrastructure for crash hotplug support") added a generic infrastructure that allows architectures to selectively update the k

Re: [PATCH v17 2/6] crash: add a new kexec flag for hotplug support

2024-02-29 Thread Sourabh Jain
Hello On 29/02/24 12:58, Baoquan He wrote: On 02/26/24 at 02:11pm, Sourabh Jain wrote: ..snip... diff --git a/kernel/crash_core.c b/kernel/crash_core.c index 70fa8111a9d6..630c4fd7ea39 100644 --- a/kernel/crash_core.c +++ b/kernel/crash_core.c @@ -496,7 +496,7 @@ static DEFINE_MUTEX

Re: [PATCH v17 3/6] powerpc/kexec: move *_memory_ranges functions to ranges.c

2024-02-29 Thread Sourabh Jain
On 29/02/24 13:41, Baoquan He wrote: On 02/26/24 at 02:11pm, Sourabh Jain wrote: Move the following functions form kexec/{file_load_64.c => ranges.c} and make them public so that components other KEXEC_FILE can also

Re: [PATCH v17 2/6] crash: add a new kexec flag for hotplug support

2024-02-29 Thread Sourabh Jain
Hello Baoquan, On 29/02/24 12:58, Baoquan He wrote: On 02/26/24 at 02:11pm, Sourabh Jain wrote: ..snip... diff --git a/kernel/crash_core.c b/kernel/crash_core.c index 70fa8111a9d6..630c4fd7ea39 100644 --- a/kernel/crash_core.c +++ b/kernel/crash_core.c @@ -496,7 +496,7 @@ static

Re: [PATCH v17 2/6] crash: add a new kexec flag for hotplug support

2024-02-29 Thread Sourabh Jain
On 29/02/24 11:26, Baoquan He wrote: On 02/29/24 at 10:35am, Sourabh Jain wrote: Hello Baoquan, Do you have any comments or suggestions for this patch series, especially for this patch? Have applied this series and reviewing, will ack or add comment if any concern. Thanks. Thanks

Re: [PATCH v17 2/6] crash: add a new kexec flag for hotplug support

2024-02-28 Thread Sourabh Jain
Hello Baoquan, Do you have any comments or suggestions for this patch series, especially for this patch? Thanks, Sourabh On 26/02/24 14:11, Sourabh Jain wrote: Commit a72bbec70da2 ("crash: hotplug support for kexec_load()") introduced a new kexec flag, `KEXEC_UPDATE_ELFCOREHDR`.

[PATCH v17 6/6] powerpc/crash: add crash memory hotplug support

2024-02-26 Thread Sourabh Jain
odate additional memory ranges and the elfcorehdr segment is not considered for SHA calculation, making it safe to update. The changes related to this feature are kept under the CRASH_HOTPLUG config, and it is enabled by default. Signed-off-by: Sourabh Jain Cc: Akhil Raj Cc: Andrew Morton Cc:

[PATCH v17 5/6] powerpc/crash: add crash CPU hotplug support

2024-02-26 Thread Sourabh Jain
nabled by default. Signed-off-by: Sourabh Jain Cc: Akhil Raj Cc: Andrew Morton Cc: Aneesh Kumar K.V Cc: Baoquan He Cc: Borislav Petkov (AMD) Cc: Boris Ostrovsky Cc: Christophe Leroy Cc: Dave Hansen Cc: Dave Young Cc: David Hildenbrand Cc: Greg Kroah-Hartman Cc: Hari Bathini Cc: Laurent Duf

[PATCH v17 3/6] powerpc/kexec: move *_memory_ranges functions to ranges.c

2024-02-26 Thread Sourabh Jain
red to be public. Mark them as static and removed them from kexec_ranges.h header file. Finally, remove the CONFIG_KEXEC_FILE build dependency for range.c because it is required for other config, such as CONFIG_CRASH_DUMP. No functional changes are intended. Signed-off-by: Sourabh Jain Cc: Akhil Raj

[PATCH v17 4/6] PowerPC/kexec: make the update_cpus_node() function public

2024-02-26 Thread Sourabh Jain
lls. No functional changes are intended. Signed-off-by: Sourabh Jain Cc: Akhil Raj Cc: Andrew Morton Cc: Aneesh Kumar K.V Cc: Baoquan He Cc: Borislav Petkov (AMD) Cc: Boris Ostrovsky Cc: Christophe Leroy Cc: Dave Hansen Cc: Dave Young Cc: David Hildenbrand Cc: Greg Kroah-Hartman Cc: H

[PATCH v17 2/6] crash: add a new kexec flag for hotplug support

2024-02-26 Thread Sourabh Jain
_file_load system calls. This simplifies kernel checks to identify hotplug support for the currently loaded kdump image by just examining the value of @hotplug_support. Signed-off-by: Sourabh Jain Cc: Akhil Raj Cc: Andrew Morton Cc: Aneesh Kumar K.V Cc: Baoquan He Cc: Borislav Petkov (AMD)

[PATCH v17 0/6] powerpc/crash: Kernel handling of CPU and memory hotplug

2024-02-26 Thread Sourabh Jain
MD) Cc: Boris Ostrovsky Cc: Christophe Leroy Cc: Dave Hansen Cc: Dave Young Cc: David Hildenbrand Cc: Greg Kroah-Hartman Cc: Hari Bathini Cc: Laurent Dufour Cc: Mahesh Salgaonkar Cc: Michael Ellerman Cc: Mimi Zohar Cc: Naveen N Rao Cc: Oscar Salvador Cc: Thomas Gleixner Cc: Valentin Schn

[PATCH v17 1/6] crash: forward memory_notify arg to arch crash hotplug handler

2024-02-26 Thread Sourabh Jain
()` and `arch_crash_handle_hotplug_event()` to accept the `memory_notify` object as an argument from crash memory hotplug notifier. Since no such object is available in the case of CPU hotplug event, the crash CPU hotplug notifier `crash_cpuhp_online()` passes NULL to the crash hotplug handler. Signed-off-by: Sourabh Jain Acked

Re: [PATCH linux-next 3/3] powerpc/kdump: Split KEXEC_CORE and CRASH_DUMP dependency

2024-02-22 Thread Sourabh Jain
Hello Hari, Build failure detected. On 13/02/24 17:01, Hari Bathini wrote: Remove CONFIG_CRASH_DUMP dependency on CONFIG_KEXEC. CONFIG_KEXEC_CORE was used at places where CONFIG_CRASH_DUMP or CONFIG_CRASH_RESERVE was appropriate. Replace with appropriate #ifdefs to support CONFIG_KEXEC and

Re: [PATCH v16 2/5] crash: add a new kexec flag for hotplug support

2024-02-21 Thread Sourabh Jain
On 22/02/24 09:28, Baoquan He wrote: On 02/22/24 at 09:01am, Sourabh Jain wrote: Hello Baoquan, There are a lot of code movements introduced by your patch series, 'Split crash out from kexec and clean up related config items.' https://lore.kernel.org/all

Re: [PATCH v16 2/5] crash: add a new kexec flag for hotplug support

2024-02-21 Thread Sourabh Jain
of the above patch series? Thanks, Sourabh Jain On 17/02/24 13:44, Sourabh Jain wrote: Commit a72bbec70da2 ("crash: hotplug support for kexec_load()") introduced a new kexec flag, `KEXEC_UPDATE_ELFCOREHDR`. Kexec tool uses this flag to indicate to the kernel that it is safe to modify the

Re: [PATCH v2 02/14] crash: split vmcoreinfo exporting code out from crash_core.c

2024-02-21 Thread Sourabh Jain
Hello Baoquan, On 19/01/24 20:22, Baoquan He wrote: Now move the relevant codes into separate files: kernel/crash_reserve.c, include/linux/crash_reserve.h. And add config item CRASH_RESERVE to control its enabling. Feels like this patch is more about vmcore_info.[c|h] and CONFIG_VMCORE_INFO

Re: [PATCH v2 01/14] kexec: split crashkernel reservation code out from crash_core.c

2024-02-21 Thread Sourabh Jain
Hello Baoquan, Thank you for reorganizing the kexec and kdump code with a well-defined configuration structure. While reviewing the patch series, I noticed a few typos. On 19/01/24 20:22, Baoquan He wrote: Both kdump and fa_dump of ppc rely on crashkernel reservation. Move the relevant codes

[PATCH v16 5/5] powerpc: add crash memory hotplug support

2024-02-17 Thread Sourabh Jain
odate additional memory ranges and the elfcorehdr segment is not considered for SHA calculation, making it safe to update. The changes related to this feature are kept under the CRASH_HOTPLUG config, and it is enabled by default. Signed-off-by: Sourabh Jain Cc: Akhil Raj Cc: Andrew Morton Cc:

[PATCH v16 4/5] powerpc: add crash CPU hotplug support

2024-02-17 Thread Sourabh Jain
nabled by default. Signed-off-by: Sourabh Jain Cc: Akhil Raj Cc: Andrew Morton Cc: Aneesh Kumar K.V Cc: Baoquan He Cc: Borislav Petkov (AMD) Cc: Boris Ostrovsky Cc: Christophe Leroy Cc: Dave Hansen Cc: Dave Young Cc: David Hildenbrand Cc: Greg Kroah-Hartman Cc: Hari Bathini Cc: Laurent Duf

[PATCH v16 3/5] powerpc/kexec: turn some static helper functions public

2024-02-17 Thread Sourabh Jain
, these functions are utilized for in-kernel updates to kdump image during CPU/Memory hotplug or online/offline events for both kexec_load and kexec_file_load syscalls. There is no intended functional change. Signed-off-by: Sourabh Jain Reviewed-by: Laurent Dufour Cc: Akhil Raj Cc: Andrew Morton Cc

[PATCH v16 2/5] crash: add a new kexec flag for hotplug support

2024-02-17 Thread Sourabh Jain
_file_load system calls. This simplifies kernel checks to identify hotplug support for the currently loaded kdump image by just examining the value of @hotplug_support. Signed-off-by: Sourabh Jain Cc: Akhil Raj Cc: Andrew Morton Cc: Aneesh Kumar K.V Cc: Baoquan He Cc: Borislav Petkov (AMD)

[PATCH v16 0/5] powerpc/crash: Kernel handling of CPU and memory hotplug

2024-02-17 Thread Sourabh Jain
ichael Ellerman Cc: Mimi Zohar Cc: Naveen N Rao Cc: Oscar Salvador Cc: Thomas Gleixner Cc: Valentin Schneider Cc: Vivek Goyal Cc: kexec@lists.infradead.org Cc: x...@kernel.org Sourabh Jain (5): crash: forward memory_notify arg to arch crash hotplug handler crash: add a new kexec flag fo

[PATCH v16 1/5] crash: forward memory_notify arg to arch crash hotplug handler

2024-02-17 Thread Sourabh Jain
()` and `arch_crash_handle_hotplug_event()` to accept the `memory_notify` object as an argument from crash memory hotplug notifier. Since no such object is available in the case of CPU hotplug event, the crash CPU hotplug notifier `crash_cpuhp_online()` passes NULL to the crash hotplug handler. Signed-off-by: Sourabh Jain Acked

Re: [PATCH v15 2/5] crash: add a new kexec flag for hotplug support

2024-02-14 Thread Sourabh Jain
On 13/02/24 08:51, Baoquan He wrote: On 02/12/24 at 07:27pm, Sourabh Jain wrote: Hello Baoquan, On 05/02/24 08:40, Baoquan He wrote: Hi Sourabh, .. diff --git a/include/linux/kexec.h b/include/linux/kexec.h index 802052d9c64b..7880d74dc5c4 100644 --- a/include/linux/kexec.h +++ b

Re: [PATCH v15 2/5] crash: add a new kexec flag for hotplug support

2024-02-12 Thread Sourabh Jain
Hello Baoquan, On 05/02/24 08:40, Baoquan He wrote: Hi Sourabh, Thanks for the great work. There are some concerns, please see inline comments. Thank you :) On 01/11/24 at 04:21pm, Sourabh Jain wrote: .. Now, if the kexec tool sends KEXEC_CRASH_HOTPLUG_SUPPORT kexec flag

Re: [PATCH v15 1/5] crash: forward memory_notify arg to arch crash hotplug handler

2024-02-12 Thread Sourabh Jain
On 05/02/24 08:41, Baoquan He wrote: On 01/11/24 at 04:21pm, Sourabh Jain wrote: In the event of memory hotplug or online/offline events, the crash memory hotplug notifier `crash_memhp_notifier()` receives a `memory_notify` object but doesn't forward that object to the generic

Re: [PATCH v15 5/5] powerpc: add crash memory hotplug support

2024-01-28 Thread Sourabh Jain
On 23/01/24 15:52, Hari Bathini wrote: On 11/01/24 4:21 pm, Sourabh Jain wrote: Extend the arch crash hotplug handler, as introduced by the patch title ("powerpc: add crash CPU hotplug support"), to also support memory add/remove events. Elfcorehdr describes the memory of the cr

[PATCH v15 1/5] crash: forward memory_notify arg to arch crash hotplug handler

2024-01-11 Thread Sourabh Jain
()` and `arch_crash_handle_hotplug_event()` to accept the `memory_notify` object as an argument from crash memory hotplug notifier. Since no such object is available in the case of CPU hotplug event, the crash CPU hotplug notifier `crash_cpuhp_online()` passes NULL to the crash hotplug handler. Signed-off-by: Sourabh Jain Cc: Akhil

[PATCH v15 0/5] powerpc/crash: Kernel handling of CPU and memory hotplug

2024-01-11 Thread Sourabh Jain
Thomas Gleixner Cc: Valentin Schneider Cc: Vivek Goyal Cc: kexec@lists.infradead.org Cc: x...@kernel.org Sourabh Jain (5): crash: forward memory_notify arg to arch crash hotplug handler crash: add a new kexec flag for hotplug support powerpc/kexec: turn some static helper functions public

[PATCH v15 5/5] powerpc: add crash memory hotplug support

2024-01-11 Thread Sourabh Jain
odate additional memory ranges and the elfcorehdr segment is not considered for SHA calculation, making it safe to update. The changes related to this feature are kept under the CRASH_HOTPLUG config, and it is enabled by default. Signed-off-by: Sourabh Jain Cc: Akhil Raj Cc: Andrew Morton Cc:

[PATCH v15 3/5] powerpc/kexec: turn some static helper functions public

2024-01-11 Thread Sourabh Jain
, these functions are utilized for in-kernel updates to kdump image during CPU/Memory hotplug or online/offline events for both kexec_load and kexec_file_load syscalls. There is no intended functional change. Signed-off-by: Sourabh Jain Reviewed-by: Laurent Dufour Cc: Akhil Raj Cc: Andrew Morton Cc

[PATCH v15 4/5] powerpc: add crash CPU hotplug support

2024-01-11 Thread Sourabh Jain
nabled by default. Signed-off-by: Sourabh Jain Cc: Akhil Raj Cc: Andrew Morton Cc: Aneesh Kumar K.V Cc: Baoquan He Cc: Borislav Petkov (AMD) Cc: Boris Ostrovsky Cc: Christophe Leroy Cc: Dave Hansen Cc: Dave Young Cc: David Hildenbrand Cc: Greg Kroah-Hartman Cc: Hari Bathini Cc: Laurent Duf

[PATCH v15 2/5] crash: add a new kexec flag for hotplug support

2024-01-11 Thread Sourabh Jain
_file_load system calls. This simplifies kernel checks to identify hotplug support for the currently loaded kdump image by just examining the value of @hotplug_support. Signed-off-by: Sourabh Jain Cc: Akhil Raj Cc: Andrew Morton Cc: Aneesh Kumar K.V Cc: Baoquan He Cc: Borislav Petkov (AMD)

Re: [PATCH v14 3/6] crash: add a new kexec flag for FDT update

2023-12-20 Thread Sourabh Jain
Hello Baoquan, While replying to this email earlier, I mistakenly pressed "Reply to List" instead of "Reply to All." Consequently, my response was sent only to powerpc mailing list. On 17/12/23 06:29, Baoquan He wrote: On 12/17/23 at 12:27am, Sourabh Jain wrote: On 16/

Re: [PATCH v14 3/6] crash: add a new kexec flag for FDT update

2023-12-16 Thread Sourabh Jain
On 16/12/23 15:11, Baoquan He wrote: On 12/15/23 at 12:17pm, Sourabh Jain wrote: .. diff --git a/include/linux/kexec.h b/include/linux/kexec.h index 0f6ea35879ee..bcedb7625b1f 100644 --- a/include/linux/kexec.h +++ b/include/linux/kexec.h @@ -319,6 +319,7 @@ struct kimage { #ifdef

Re: [PATCH v14 3/6] crash: add a new kexec flag for FDT update

2023-12-14 Thread Sourabh Jain
Hello Baoquan, On 15/12/23 07:58, Baoquan He wrote: On 12/11/23 at 02:00pm, Sourabh Jain wrote: The commit a72bbec70da2 ("crash: hotplug support for kexec_load()") introduced a new kexec flag, `KEXEC_UPDATE_ELFCOREHDR`. Kexec tool uses this flag to indicate kernel that it is safe

Re: [PATCH v14 6/6] powerpc: add crash memory hotplug support

2023-12-14 Thread Sourabh Jain
On 15/12/23 06:53, Baoquan He wrote: On 12/11/23 at 02:00pm, Sourabh Jain wrote: .. diff --git a/arch/powerpc/include/asm/kexec_ranges.h b/arch/powerpc/include/asm/kexec_ranges.h index f83866a19e87..802abf580cf0 100644 --- a/arch/powerpc/include/asm/kexec_ranges.h +++ b/arch/powerpc

Re: [PATCH v14 2/6] crash: make CPU and Memory hotplug support reporting flexible

2023-12-14 Thread Sourabh Jain
Hello Baoquan, On 14/12/23 19:43, Baoquan He wrote: On 12/11/23 at 02:00pm, Sourabh Jain wrote: Architectures' specific functions `arch_crash_hotplug_cpu_support()` and `arch_crash_hotplug_memory_support()` advertise the kernel's capability to update the kdump image on CPU and Memory hotplug

[PATCH v14 6/6] powerpc: add crash memory hotplug support

2023-12-11 Thread Sourabh Jain
nabled by default. Signed-off-by: Sourabh Jain Cc: Akhil Raj Cc: Andrew Morton Cc: Aneesh Kumar K.V Cc: Baoquan He Cc: Borislav Petkov (AMD) Cc: Boris Ostrovsky Cc: Christophe Leroy Cc: Dave Hansen Cc: Dave Young Cc: David Hildenbrand Cc: Eric DeVolder Cc: Greg Kroah-Hartman Cc: Hari B

[PATCH v14 5/6] powerpc: add crash CPU hotplug support

2023-12-11 Thread Sourabh Jain
s related to this feature are kept under the CRASH_HOTPLUG config, and it is enabled by default. Signed-off-by: Sourabh Jain Cc: Akhil Raj Cc: Andrew Morton Cc: Aneesh Kumar K.V Cc: Baoquan He Cc: Borislav Petkov (AMD) Cc: Boris Ostrovsky Cc: Christophe Leroy Cc: Dave Hansen Cc: Dave Young Cc: David

[PATCH v14 3/6] crash: add a new kexec flag for FDT update

2023-12-11 Thread Sourabh Jain
Signed-off-by: Sourabh Jain Cc: Akhil Raj Cc: Andrew Morton Cc: Aneesh Kumar K.V Cc: Baoquan He Cc: Borislav Petkov (AMD) Cc: Boris Ostrovsky Cc: Christophe Leroy Cc: Dave Hansen Cc: Dave Young Cc: David Hildenbrand Cc: Eric DeVolder Cc: Greg Kroah-Hartman Cc: Hari Bathini Cc: Laurent Dufour

[PATCH v14 1/6] crash: forward memory_notify arg to arch crash hotplug handler

2023-12-11 Thread Sourabh Jain
()` and `arch_crash_handle_hotplug_event()` to accept the `memory_notify` object as an argument from crash memory hotplug notifier. Since no such object is available in the case of CPU hotplug event, the crash CPU hotplug notifier `crash_cpuhp_online()` passes NULL to the crash hotplug handler. Signed-off-by: Sourabh Jain Cc: Akhil

[PATCH v14 0/6] powerpc/crash: Kernel handling of CPU and memory hotplug

2023-12-11 Thread Sourabh Jain
Dufour Cc: Mahesh Salgaonkar Cc: Michael Ellerman Cc: Mimi Zohar Cc: Naveen N Rao Cc: Oscar Salvador Cc: Thomas Gleixner Cc: Valentin Schneider Cc: Vivek Goyal Cc: kexec@lists.infradead.org Cc: x...@kernel.org Sourabh Jain (6): crash: forward memory_notify arg to arch crash hotplug

[PATCH v14 4/6] powerpc/kexec: turn some static helper functions public

2023-12-11 Thread Sourabh Jain
, these functions are utilized for in-kernel updates to kdump image during CPU/Memory hotplug or online/offline events for both kexec_load and kexec_file_load syscalls. There is no intended functional change. Signed-off-by: Sourabh Jain Reviewed-by: Laurent Dufour Cc: Akhil Raj Cc: Andrew Morton Cc

[PATCH v14 2/6] crash: make CPU and Memory hotplug support reporting flexible

2023-12-11 Thread Sourabh Jain
. Signed-off-by: Sourabh Jain Cc: Akhil Raj Cc: Andrew Morton Cc: Aneesh Kumar K.V Cc: Baoquan He Cc: Borislav Petkov (AMD) Cc: Boris Ostrovsky Cc: Christophe Leroy Cc: Dave Hansen Cc: Dave Young Cc: David Hildenbrand Cc: Eric DeVolder Cc: Greg Kroah-Hartman Cc: Hari Bathini Cc: Laurent

[PATCH v13 4/6] powerpc/kexec: turn some static helper functions public

2023-12-03 Thread Sourabh Jain
, these functions are utilized for in-kernel updates to kdump image during CPU/Memory hotplug or online/offline events for both kexec_load and kexec_file_load syscalls. There is no intended functional change. Signed-off-by: Sourabh Jain Reviewed-by: Laurent Dufour Cc: Akhil Raj Cc: Andrew Morton Cc

[PATCH v13 2/6] crash: make CPU and Memory hotplug support reporting flexible

2023-12-03 Thread Sourabh Jain
. Signed-off-by: Sourabh Jain Cc: Akhil Raj Cc: Andrew Morton Cc: Baoquan He Cc: Borislav Petkov (AMD) Cc: Boris Ostrovsky Cc: Christophe Leroy Cc: Dave Hansen Cc: Dave Young Cc: David Hildenbrand Cc: Eric DeVolder Cc: Greg Kroah-Hartman Cc: Hari Bathini Cc: Laurent Dufour Cc: Mahesh

[PATCH v13 6/6] powerpc: add crash memory hotplug support

2023-12-03 Thread Sourabh Jain
nabled by default. Signed-off-by: Sourabh Jain Cc: Akhil Raj Cc: Andrew Morton Cc: Baoquan He Cc: Borislav Petkov (AMD) Cc: Boris Ostrovsky Cc: Christophe Leroy Cc: Dave Hansen Cc: Dave Young Cc: David Hildenbrand Cc: Eric DeVolder Cc: Greg Kroah-Hartman Cc: Hari Bathini Cc: Laurent Duf

[PATCH v13 5/6] powerpc: add crash CPU hotplug support

2023-12-03 Thread Sourabh Jain
s related to this feature are kept under the CRASH_HOTPLUG config, and it is enabled by default. Signed-off-by: Sourabh Jain Cc: Akhil Raj Cc: Andrew Morton Cc: Baoquan He Cc: Borislav Petkov (AMD) Cc: Boris Ostrovsky Cc: Christophe Leroy Cc: Dave Hansen Cc: Dave Young Cc: David Hildenbrand Cc: E

[PATCH v13 1/6] crash: forward memory_notify arg to arch crash hotplug handler

2023-12-03 Thread Sourabh Jain
()` and `arch_crash_handle_hotplug_event()` to accept the `memory_notify` object as an argument from crash memory hotplug notifier. Since no such object is available in the case of CPU hotplug event, the crash CPU hotplug notifier `crash_cpuhp_online()` passes NULL to the crash hotplug handler. Signed-off-by: Sourabh Jain Cc: Akhil

[PATCH v13 0/6] powerpc/crash: Kernel handling of CPU and memory hotplug

2023-12-03 Thread Sourabh Jain
Cc: Valentin Schneider Cc: Vivek Goyal Cc: kexec@lists.infradead.org Cc: x...@kernel.org Sourabh Jain (6): crash: forward memory_notify arg to arch crash hotplug handler crash: make CPU and Memory hotplug support reporting flexible crash: add a new kexec flag for FDT update powerpc/kexec: t

[PATCH v13 3/6] crash: add a new kexec flag for FDT update

2023-12-03 Thread Sourabh Jain
Signed-off-by: Sourabh Jain Cc: Akhil Raj Cc: Andrew Morton Cc: Baoquan He Cc: Borislav Petkov (AMD) Cc: Boris Ostrovsky Cc: Christophe Leroy Cc: Dave Hansen Cc: Dave Young Cc: David Hildenbrand Cc: Eric DeVolder Cc: Greg Kroah-Hartman Cc: Hari Bathini Cc: Laurent Dufour Cc: Mahesh Salgaonkar C

Re: [PATCH v12 6/6] powerpc: add crash memory hotplug support

2023-10-30 Thread Sourabh Jain
] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch#_base_tree_information] url: https://github.com/intel-lab-lkp/linux/commits/Sourabh-Jain/crash-forward-memory_notify

[PATCH v12 5/6] powerpc: add crash CPU hotplug support

2023-10-29 Thread Sourabh Jain
s related to this feature are kept under the CRASH_HOTPLUG config, and it is enabled by default. Signed-off-by: Sourabh Jain Cc: Akhil Raj Cc: Andrew Morton Cc: Baoquan He Cc: Borislav Petkov (AMD) Cc: Boris Ostrovsky Cc: Christophe Leroy Cc: Dave Hansen Cc: Dave Young Cc: David Hildenbrand Cc: E

[PATCH v12 3/6] crash: add a new kexec flag for FDT update

2023-10-29 Thread Sourabh Jain
Signed-off-by: Sourabh Jain Cc: Akhil Raj Cc: Andrew Morton Cc: Baoquan He Cc: Borislav Petkov (AMD) Cc: Boris Ostrovsky Cc: Christophe Leroy Cc: Dave Hansen Cc: Dave Young Cc: David Hildenbrand Cc: Eric DeVolder Cc: Greg Kroah-Hartman Cc: Hari Bathini Cc: Laurent Dufour Cc: Mahesh Salgaonkar C

[PATCH v12 4/6] powerpc/kexec: turn some static helper functions public

2023-10-29 Thread Sourabh Jain
events for both kexec_load and kexec_file_load syscalls. There is no intended functional change. Signed-off-by: Sourabh Jain Reviewed-by: Laurent Dufour Cc: Akhil Raj Cc: Andrew Morton Cc: Baoquan He Cc: Borislav Petkov (AMD) Cc: Boris Ostrovsky Cc: Christophe Leroy Cc: Dave Hansen Cc

[PATCH v12 2/6] crash: make CPU and Memory hotplug support reporting flexible

2023-10-29 Thread Sourabh Jain
. Signed-off-by: Sourabh Jain Cc: Akhil Raj Cc: Andrew Morton Cc: Baoquan He Cc: Borislav Petkov (AMD) Cc: Boris Ostrovsky Cc: Christophe Leroy Cc: Dave Hansen Cc: Dave Young Cc: David Hildenbrand Cc: Eric DeVolder Cc: Greg Kroah-Hartman Cc: Hari Bathini Cc: Laurent Dufour Cc: Mahesh

[PATCH v12 0/6] powerpc/crash: Kernel handling of CPU and memory hotplug

2023-10-29 Thread Sourabh Jain
ng Cc: David Hildenbrand Cc: Eric DeVolder Cc: Greg Kroah-Hartman Cc: Hari Bathini Cc: Laurent Dufour Cc: Mahesh Salgaonkar Cc: Michael Ellerman Cc: Mimi Zohar Cc: Oscar Salvador Cc: Thomas Gleixner Cc: Valentin Schneider Cc: Vivek Goyal Cc: kexec@lists.infradead.org Cc: x...@kernel.org

[PATCH v12 1/6] crash: forward memory_notify arg to arch crash hotplug handler

2023-10-29 Thread Sourabh Jain
()` and `arch_crash_handle_hotplug_event()` to accept the `memory_notify` object as an argument from crash memory hotplug notifier. Since no such object is available in the case of CPU hotplug event, the crash CPU hotplug notifier `crash_cpuhp_online()` passes NULL to the crash hotplug handler. Signed-off-by: Sourabh Jain Cc: Akhil

[PATCH v12 6/6] powerpc: add crash memory hotplug support

2023-10-29 Thread Sourabh Jain
nabled by default. Signed-off-by: Sourabh Jain Cc: Akhil Raj Cc: Andrew Morton Cc: Baoquan He Cc: Borislav Petkov (AMD) Cc: Boris Ostrovsky Cc: Christophe Leroy Cc: Dave Hansen Cc: Dave Young Cc: David Hildenbrand Cc: Eric DeVolder Cc: Greg Kroah-Hartman Cc: Hari Bathini Cc: Laurent Duf

Re: [PATCHv9 2/2] powerpc/setup: Loosen the mapping between cpu logical id and its seq in dt

2023-10-21 Thread Sourabh Jain
With this patch series applied first and kdump kernel boots fine with nr_cpus=1 on both PowerNV and PowerVM platforms. For both patches: Tested-by: Sourabh Jain - Sourabh Jain On 17/10/23 07:58, Pingfan Liu wrote: *** Idea *** For kexec -p, the boot cpu can be not the cpu0, this causes

Re: [PATCHv8 1/5] powerpc/setup : Enable boot_cpu_hwid for PPC32

2023-10-16 Thread Sourabh Jain
:  1,3-7 Model name:  POWER10 kdump:/# kdump:/# cat /proc/meminfo | grep Percpu Percpu: 7168 kB Thanks, Sourabh Jain ___ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec

Re: [PATCH v11 1/4] powerpc/kexec: turn some static helper functions public

2023-10-13 Thread Sourabh Jain
Hello Christophe, On 13/10/23 18:59, Christophe Leroy wrote: Le 19/06/2023 à 04:49, Sourabh Jain a écrit : Move update_cpus_node and get_crash_memory_ranges functions from kexec/file_load_64.c to kexec/core_64.c to make these functions usable by other kexec components. Later in the series

Re: [PATCHv8 1/5] powerpc/setup : Enable boot_cpu_hwid for PPC32

2023-10-11 Thread Sourabh Jain
Hello Pingfan, With this patch series applied, the kdump kernel fails to boot on powerpc with nr_cpus=1. Console logs: --- [root]# echo c > /proc/sysrq-trigger [   74.783235] sysrq: Trigger a crash [   74.783244] Kernel panic - not syncing: sysrq triggered crash [   74.783252]

Re: [PATCHv8 1/5] powerpc/setup : Enable boot_cpu_hwid for PPC32

2023-10-10 Thread Sourabh Jain
rv[bt_thread]);     ... } Hope it helps. Thanks, Sourabh Jain ___ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec

Re: [PATCHv8 1/5] powerpc/setup : Enable boot_cpu_hwid for PPC32

2023-10-10 Thread Sourabh Jain
Hello Pingfan, With this patch series applied, the kdump kernel fails to boot on powerpc with nr_cpus=1. Console logs: --- [root]# echo c > /proc/sysrq-trigger [   74.783235] sysrq: Trigger a crash [   74.783244] Kernel panic - not syncing: sysrq triggered crash [  

Re: [PATCHv8 1/5] powerpc/setup : Enable boot_cpu_hwid for PPC32

2023-10-09 Thread Sourabh Jain
7e99a378 4b3c [    0.00] ---[ end trace ]--- [    0.00] [    0.00] Kernel panic - not syncing: Fatal exception [    0.00] Rebooting in 180 seconds.. However, the kdump kernel boots fine if the kernel crashes on CPU 0. Thanks, Sourabh Jain On 09/10/23 17:00, Pi

Re: [ANNOUNCE] kexec-tools v2.0.27 preparation

2023-08-13 Thread Sourabh Jain
Hello Coiby, On 14/08/23 08:49, Coiby Xu wrote: Hi Sourabh, On Mon, Aug 14, 2023 at 08:17:34AM +0530, Sourabh Jain wrote: Hello Simon, Can we include below fix? https://lists.fedoraproject.org/archives/list/ke...@lists.fedoraproject.org/thread/O3W4SLVVFT6J25U5YSXNZ3URZ4QY6SRU/ I'll

Re: [ANNOUNCE] kexec-tools v2.0.27 preparation

2023-08-13 Thread Sourabh Jain
Hello Simon, Can we include below fix? https://lists.fedoraproject.org/archives/list/ke...@lists.fedoraproject.org/thread/O3W4SLVVFT6J25U5YSXNZ3URZ4QY6SRU/ Thanks, Sourabh On 11/08/23 13:00, Simon Horman wrote: Hi all, I am planning to release kexec-tools v2.0.27 in the next two weeks to

Re: [PATCH v27 2/8] crash: add generic infrastructure for crash hotplug support

2023-08-12 Thread Sourabh Jain
Reviewed-by: Sourabh Jain Acked-by: Hari Bathini Acked-by: Baoquan He --- include/linux/crash_core.h | 9 +++ include/linux/kexec.h | 11 +++ kernel/Kconfig.kexec | 31 kernel/crash_core.c| 142 + kernel/kexec_core.c

[PATCH v11 2/4] powerpc/crash: add crash CPU hotplug support

2023-06-18 Thread Sourabh Jain
kernel kexec segments on CPU/Memory hotplug and online/offline events are kept under CRASH_HOTPLUG config and it is enabled by default on PowerPC platform. Signed-off-by: Sourabh Jain --- arch/powerpc/Kconfig | 3 ++ arch/powerpc/include/asm/kexec.h | 10 + arch/powerpc/kexec

[PATCH v11 3/4] crash: forward memory_notify args to arch crash hotplug handler

2023-06-18 Thread Sourabh Jain
) and the number of pages in the hot removed memory. By utilizing this information, the base address and size of the hot removed memory is calculated and used to avoid adding the hot removed memory region to the elfcorehdr. Signed-off-by: Sourabh Jain --- arch/powerpc/include/asm/kexec.h | 2 +- arch/powerpc

[PATCH v11 1/4] powerpc/kexec: turn some static helper functions public

2023-06-18 Thread Sourabh Jain
/offline events for both kexec_load and kexec_file_load syscalls. No functional change intended. Signed-off-by: Sourabh Jain Reviewed-by: Laurent Dufour --- arch/powerpc/include/asm/kexec.h | 6 ++ arch/powerpc/kexec/core_64.c | 166 ++ arch/powerpc/kexec

[PATCH v11 0/4] PowerPC: In-kernel handling of CPU/Memory hotplug/online/offline events for kdump kernel

2023-06-18 Thread Sourabh Jain
l/20220303162725.49640-1-eric.devol...@oracle.com/ - Fixed warning reported by checpatch script v2: - Use generic hotplug handler introduced by https://lore.kernel.org/lkml/20220209195706.51522-1-eric.devol...@oracle.com/ a significant change from v1. Sourabh Jain (4): powerpc/kexe

[PATCH v11 4/4] powerpc/crash: add crash memory hotplug support

2023-06-18 Thread Sourabh Jain
space. The changes done here will also work for the kexec_load system call given that the kexec tool builds the elfcoredhr with additional space to accommodate future memory regions as it is done for kexec_file_load system call in the kernel. Signed-off-by: Sourabh Jain --- arch/powerpc/include

Re: [PATCH v22 6/8] crash: hotplug support for kexec_load()

2023-05-09 Thread Sourabh Jain
gned int sz; sz = 2 + CONFIG_NR_CPUS_DEFAULT; if (IS_ENABLED(CONFIG_MEMORY_HOTPLUG))     sz += CRASH_MAX_MEMORY_RANGES Thanks, Sourabh Jain + sz *= sizeof(Elf64_Phdr); + return sz; +} + /** * arch_crash_handle_hotplug_event() - Handle hotplug elfcorehdr changes * @image: the activ

Re: [PATCH v22 6/8] crash: hotplug support for kexec_load()

2023-05-09 Thread Sourabh Jain
On 04/05/23 04:11, Eric DeVolder wrote: The hotplug support for kexec_load() requires coordination with userspace, and therefore a little extra help from the kernel to facilitate the coordination. In the absence of the solution contained within this particular patch, if a kdump capture kernel

Re: [PATCH v10 2/5] powerpc/crash: introduce a new config option CRASH_HOTPLUG

2023-04-24 Thread Sourabh Jain
On 24/04/23 15:27, Laurent Dufour wrote: On 23/04/2023 12:52:10, Sourabh Jain wrote: Due to CPU/Memory hot plug/unplug or online/offline events the system resources changes. A similar change should reflect in the loaded kdump kernel kexec segments that describes the state of the CPU

Re: [PATCH v10 0/5] PowerPC: In-kernel handling of CPU/Memory hotplug/online/offline events for kdump kernel

2023-04-24 Thread Sourabh Jain
On 24/04/23 19:35, Eric DeVolder wrote: On 4/23/23 05:52, Sourabh Jain wrote: The Problem: Post CPU/Memory hot plug/unplug and online/offline events the kernel holds stale information about the system. Dump collection with stale kdump kernel might end up in dump capture failure

  1   2   3   >