]> www.infradead.org Git - users/dwmw2/linux.git/commit
x86/kexec: Export e820_table_kexec[] to sysfs
authorDave Young <dyoung@redhat.com>
Tue, 28 Jan 2025 13:32:31 +0000 (21:32 +0800)
committerIngo Molnar <mingo@kernel.org>
Sat, 22 Feb 2025 11:44:45 +0000 (12:44 +0100)
commita2498e5c453b3d8d054d77751487cd593332f8c2
tree6bad026f4c097ebd1e17db42786869db9bb4ce7f
parent5bebe2e4fe27bf68b4993d62be2f8bae9e6229d6
x86/kexec: Export e820_table_kexec[] to sysfs

Previously the e820_table_kexec[] was exported to sysfs since kexec-tools uses
the memmap entries to prepare the e820 table for the new kernel.

The following commit, ~8 years ago, introduced e820_table_firmware[] and changed
the behavior to export the firmware table instead:

  12df216c61c8 ("x86/boot/e820: Introduce the bootloader provided e820_table_firmware[] table")

Originally the kexec_file_load and kexec_load syscalls both used e820_table_kexec[].
Since the sysfs exported entries are from e820_table_firmware[] people
now need to tune both tables for kexec.

Restore the old behavior so the kexec_load and kexec_file_load syscalls work with
only one table update.  The e820_table_firmware[] is used by hibernation kernel
code and it works without the sysfs exporting. Also remove the SEV
e820_table_firmware[] updating code.

Also update the code comments here and drop the comments about setup_data
reservation since it is not needed any more after this change was made
a year ago:

  fc7f27cda843 ("x86/kexec: Do not update E820 kexec table for setup_data")

[ mingo: Tidy up the changelog and comments. ]

Signed-off-by: Dave Young <dyoung@redhat.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: Ashish Kalra <ashish.kalra@amd.com>
Cc: Sean Christopherson <seanjc@google.com>
Cc: Joerg Roedel <jroedel@suse.de>
Cc: Baoquan He <bhe@redhat.com>
Cc: Vivek Goyal <vgoyal@redhat.com>
Cc: Eric Biederman <ebiederm@xmission.com>
Link: https://lore.kernel.org/r/Z5jcb1GKhLvH8kDc@darkstar.users.ipa.redhat.com
arch/x86/kernel/e820.c
arch/x86/virt/svm/sev.c