From: Baoquan He <bhe@redhat.com>
To: Sourabh Jain <sourabhjain@linux.ibm.com>
Cc: kexec@lists.infradead.org, Aditya Gupta <adityag@linux.ibm.com>,
Coiby Xu <coxu@redhat.com>, Hari Bathini <hbathini@linux.ibm.com>,
Mahesh Salgaonkar <mahesh@linux.ibm.com>,
Simon Horman <horms@kernel.org>
Subject: Re: [PATCH v3 1/3] kexec_load: Use new kexec flag for hotplug support
Date: Mon, 8 Jul 2024 18:27:56 +0800 [thread overview]
Message-ID: <Zou/LO4+HguiyGZh@MiWiFi-R3L-srv> (raw)
In-Reply-To: <102546c9-ccb9-49cd-8c58-ff4a218812bd@linux.ibm.com>
On 07/08/24 at 01:25pm, Sourabh Jain wrote:
> Hello Baoquan,
>
> On 08/07/24 07:09, Baoquan He wrote:
> > Hi Sourabh,
> >
> > On 07/07/24 at 08:54pm, 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 kexec flags for hotplug allow architectures to
> > > exclude all the required kexec segments from SHA calculation so that
> > > the kernel can update them on hotplug events. This was not possible
> > > earlier with the KEXEC_UPDATE_ELFCOREHDR kexec flags since it was added
> > > only for the elfcorehdr segment.
> > >
> > > To enable architectures to control the list of kexec segments to exclude
> > > when hotplug support is enabled, add a new architecture-specific
> > > function named arch_do_exclude_segment. During the SHA calculation, this
> > > function gets called to let the architecture decide whether a specific
> > > kexec segment should be considered for SHA calculation or not.
> > >
> > > Note: To avoid breaking backward compatibility, the new kexec flag
> > > KEXEC_CRASH_HOTPLUG_SUPPORT is not used for x86 for now.
> > For x86, both KEXEC_UPDATE_ELFCOREHDR and KEXEC_CRASH_HOTPLUG_SUPPORT
> > should be OK for kexec_file_load.
>
> Do we even need these flags for kexec_file_load at all?
> My understanding is that these flags are only needed for the kexec_load
> system call.
Oh, sorry, my bad, I must have mixed this with KEXEC_FILE_DEBUG I
earlier added when I checked this patchset. I think everything is
like what you said.
>
>
> > Your change will make a difference
> > between kexec_load and kexec_file_load.
>
> I am confused by the above statement.
>
> Given that we don't even send any of the above flags for kexec_file_load, I
> am not
> sure how these changes make a difference between the two system calls.
>
> > But I agree with you on the
> > backward cmpatibility with KEXEC_CRASH_HOTPLUG_SUPPORT flag.
> >
> > Anyway, if it's in a hurry to catch up with Simon's new release, this is
> > fine, we can change it later.
>
> It would be great if we could consider this patch series for the next
> release, but not at
> the cost of breaking any backward compatibility for x86. If you think these
> changes are
> breaking anything for any kernel version, I would prefer to update my patch
> series.
>
> > Otherwise, we may be better to remove the
> > difference, namely, not making x86 only be able to accept
> > KEXEC_UPDATE_ELFCOREHDR flag on kexec_load. My personal opinion
>
> On x86, passing the KEXEC_CRASH_HOTPLUG_SUPPORT kexec bit to kernel versions
> 6.5 to 6.9
> with the kexec_load system call will fail with -EINVAL. However, from kernel
> 6.10 onward,
> both KEXEC_UPDATE_ELFCOREHDR and KEXEC_CRASH_HOTPLUG_SUPPORT kexec bits are
> acceptable for x86.
>
> My proposal is to use KEXEC_UPDATE_ELFCOREHDR on x86 for some time (maybe a
> couple of kernel releases),
> and eventually switch to KEXEC_CRASH_HOTPLUG_SUPPORT for x86 as well.
>
> This proposal of shifting to the KEXEC_CRASH_HOTPLUG_SUPPORT kexec bit for
> x86 is also mentioned in the
> comment for the get_hotplug_kexec_flag function.
>
> Please let me know your opinion.
It sounds like a good plan, thanks for the effort.
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
next prev parent reply other threads:[~2024-07-08 10:28 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-07 15:24 [PATCH v3 0/3] Enable crash hotplug support on powerpc Sourabh Jain
2024-07-07 15:24 ` [PATCH v3 1/3] kexec_load: Use new kexec flag for hotplug support Sourabh Jain
2024-07-08 1:39 ` Baoquan He
2024-07-08 7:55 ` Sourabh Jain
2024-07-08 10:27 ` Baoquan He [this message]
2024-07-08 10:30 ` Baoquan He
2024-07-08 13:22 ` Sourabh Jain
2024-07-07 15:24 ` [PATCH v3 2/3] powerpc/kexec_load: add " Sourabh Jain
2024-07-07 15:24 ` [PATCH v3 3/3] doc/hotplug: update man and --help Sourabh Jain
2024-07-09 7:29 ` [PATCH v3 0/3] Enable crash hotplug support on powerpc Simon Horman
-- strict thread matches above, loose matches on Subject: below --
2024-07-02 4:30 [PATCH v3 1/3] kexec_load: Use new kexec flag for hotplug support Sourabh Jain
2024-07-03 4:31 ` Baoquan He
2024-07-03 18:07 ` Sourabh Jain
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Zou/LO4+HguiyGZh@MiWiFi-R3L-srv \
--to=bhe@redhat.com \
--cc=adityag@linux.ibm.com \
--cc=coxu@redhat.com \
--cc=hbathini@linux.ibm.com \
--cc=horms@kernel.org \
--cc=kexec@lists.infradead.org \
--cc=mahesh@linux.ibm.com \
--cc=sourabhjain@linux.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox