Skip to content
  • Petr Tesarik's avatar
    x86/setup: Do not reserve a crash kernel region if booted on Xen PV · 3db3eb28
    Petr Tesarik authored
    
    
    Xen PV domains cannot shut down and start a crash kernel. Instead,
    the crashing kernel makes a SCHEDOP_shutdown hypercall with the
    reason code SHUTDOWN_crash, cf. xen_crash_shutdown() machine op in
    arch/x86/xen/enlighten_pv.c.
    
    A crash kernel reservation is merely a waste of RAM in this case. It
    may also confuse users of kexec_load(2) and/or kexec_file_load(2).
    When flags include KEXEC_ON_CRASH or KEXEC_FILE_ON_CRASH,
    respectively, these syscalls return success, which is technically
    correct, but the crash kexec image will never be actually used.
    
    Signed-off-by: default avatarPetr Tesarik <ptesarik@suse.com>
    Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
    Reviewed-by: default avatarJuergen Gross <jgross@suse.com>
    Cc: Tom Lendacky <thomas.lendacky@amd.com>
    Cc: Dou Liyang <douly.fnst@cn.fujitsu.com>
    Cc: Mikulas Patocka <mpatocka@redhat.com>
    Cc: Andy Lutomirski <luto@kernel.org>
    Cc: "H. Peter Anvin" <hpa@zytor.com>
    Cc: xen-devel@lists.xenproject.org
    Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
    Cc: Borislav Petkov <bp@suse.de>
    Cc: Jean Delvare <jdelvare@suse.de>
    Link: https://lkml.kernel.org/r/20180425120835.23cef60c@ezekiel.suse.cz
    3db3eb28