[PATCH] kexec: do syscore_shutdown() in kernel_kexec

Baoquan He bhe at redhat.com
Mon Dec 18 20:22:22 PST 2023


Add Andrew to CC as Andrew helps to pick kexec/kdump patches.

On 12/13/23 at 08:40am, James Gowans wrote:
......
> This has been tested by doing a kexec on x86_64 and aarch64.

Hi James,

Thanks for this great patch. My colleagues have opened bug in rhel to
track this and try to veryfy this patch. However, they can't reproduce
the issue this patch is fixing. Could you tell more about where and how
to reproduce so that we can be aware of it better? Thanks in advance.

Thanks
Baoquan

> 
> Fixes: 6735150b6997 ("KVM: Use syscore_ops instead of reboot_notifier to hook restart/shutdown")
> 
> Signed-off-by: James Gowans <jgowans at amazon.com>
> Cc: Eric Biederman <ebiederm at xmission.com>
> Cc: Paolo Bonzini <pbonzini at redhat.com>
> Cc: Sean Christopherson <seanjc at google.com>
> Cc: Marc Zyngier <maz at kernel.org>
> Cc: Arnd Bergmann <arnd at arndb.de>
> Cc: Tony Luck <tony.luck at intel.com>
> Cc: Borislav Petkov <bp at alien8.de>
> Cc: Thomas Gleixner <tglx at linutronix.de>
> Cc: Ingo Molnar <mingo at redhat.com>
> Cc: Chen-Yu Tsai <wens at csie.org>
> Cc: Jernej Skrabec <jernej.skrabec at gmail.com>
> Cc: Samuel Holland <samuel at sholland.org>
> Cc: Pavel Machek <pavel at ucw.cz>
> Cc: Sebastian Reichel <sre at kernel.org>
> Cc: Orson Zhai <orsonzhai at gmail.com>
> Cc: Alexander Graf <graf at amazon.de>
> Cc: Jan H. Schoenherr <jschoenh at amazon.de>
> ---
>  kernel/kexec_core.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/kernel/kexec_core.c b/kernel/kexec_core.c
> index be5642a4ec49..b926c4db8a91 100644
> --- a/kernel/kexec_core.c
> +++ b/kernel/kexec_core.c
> @@ -1254,6 +1254,7 @@ int kernel_kexec(void)
>  		kexec_in_progress = true;
>  		kernel_restart_prepare("kexec reboot");
>  		migrate_to_reboot_cpu();
> +		syscore_shutdown();
>  
>  		/*
>  		 * migrate_to_reboot_cpu() disables CPU hotplug assuming that
> -- 
> 2.34.1
> 
> 
> _______________________________________________
> kexec mailing list
> kexec at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/kexec
> 




More information about the kexec mailing list