Hi Baoquan, On 3/30/20 2:55 PM, Baoquan He wrote: > On 03/26/20 at 06:07pm, James Morse wrote: >> arm64 recently queued support for memory hotremove, which led to some >> new corner cases for kexec. >> >> If the kexec segments are loaded for a removable region, that region may >> be removed before kexec actually occurs. This causes the first kernel to >> lockup when applying the relocations. (I've triggered this on x86 too). >> >> The first patch adds a memory notifier for kexec so that it can refuse >> to allow in-use regions to be taken offline. > > I talked about this with Dave Young. Currently, we tend to use > kexec_file_load more in the future since most of its implementation is > in kernel, we can get information about kernel more easilier. For the > kexec kernel loaded into hotpluggable area, we can fix it in > kexec_file_load side, we know the MOVABLE zone's start and end. As for > the old kexec_load, we would like to keep it for back compatibility. At > least in our distros, we have switched to kexec_file_load, will > gradually obsolete kexec_load. > So for this one, I suggest avoiding those > MOVZBLE memory region when searching place for kexec kernel. How does today's user-space know? > Not sure if arm64 will still have difficulty. arm64 added support for kexec_load first, then kexec_file_load. (evidently a mistake). kexec_file_load support was only added in the last year or so, I'd hazard most people using this, are using the regular load kind. (and probably don't know or care). Thanks, James