Hi Coiby,
Thanks for the patches,  ccing Hari about the fadump part..

On Fri, 19 Nov 2021 at 11:23, Coiby Xu <coxu@redhat.com> wrote:
The crashkernel=auto implementation in kernel space has been rejected
upstream [1]. The current user space implementation [2] [3] ships a
crashkernel.default but hasn't supported the swiotlb memory requirement,
custom crashkernel value from user and fadump.

The crashkernel.default implementation seems to be overly
         - the default crashkernel value rarely changes. This is no need to ship
                  the same crashkernel.default default for every kernel package of a
                - when deciding the value of crashkernel for a new kernel, the
                  crashkernel.default of existing kernel is took into consideration

We can simply let the kexec-tools maintain the default crashkernel
values and provide an API for kdump-anacon-addon to query it. And for
a newly installed kernel, we can simply call "kdumpctl reset-crashkernel
KERNELPATH" to set its crashkernel value.

For the unfulfilled requirements,
                                - crashkernel is introduced to /etc/kdump.conf for the user can set
                                  custom crashkernel value to tell kexec-tools to manage crashkernel
                                                value automatically.
                                - "kdumpctl reset-crashkernel" has been written for the above
                                - "kdumpctl fadump on/off" is added for supporting fadump.

[1] https://lore.kernel.org/linux-mm/20210507010432.IN24PudKT%25akpm@linux-foundation.org/
[2] https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1171
[3] https://lists.fedoraproject.org/archives/list/kexec@lists.fedoraproject.org/thread/PDLFXHJSOOOOKVXBNIX7FUM4DIBFP3S7/#J6DPR6AIHICADPGXD2B75EFJX6AHPUNS

Coiby Xu (11):
  update default crashkernel value
  factor out kdump_get_arch_recommend_crashkernel
  provide get_default_crashkernel for kdump_anaconda_addon
  introduce crashkernel option to kdump.conf
  add a helper function to write a config value to kdump.conf
  add a helper function to read kernel cmdline parameter from grubby
  rewrite reset_crashkernel to provide more features for the user and to
    be called by kernel installation hook
  allow to add extra memory to crashkernel string
  Reserve extra memory when SME or SEV is active
  provide kdumpctl fadump on/off
  use "kdumpctl reset-crashkernel KERNELIMAGE" in kernel installation

 92-crashkernel.install | 135 +----------------------------
 kdump-lib-initramfs.sh |   9 ++
 kdump-lib.sh           |  95 +++++++++++++++------
 kdump.conf             |   6 ++
 kdump.conf.5           |   7 ++
 kdumpctl               | 188 ++++++++++++++++++++++++++++++++++++-----
 kdumpctl.8             |  16 ++--
 7 files changed, 271 insertions(+), 185 deletions(-)

kexec mailing list -- kexec@lists.fedoraproject.org
To unsubscribe send an email to kexec-leave@lists.fedoraproject.org
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/kexec@lists.fedoraproject.org
Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure