Merge tag 'for-linus-5.4-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip
Pull xen fixes from Juergen Gross: - correct panic handling when running as a Xen guest - cleanup the Xen grant driver to remove printing a pointer being always NULL - remove a soon to be wrong call of of_dma_configure() * tag 'for-linus-5.4-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: xen: Stop abusing DT of_dma_configure API xen/grant-table: remove unnecessary printing x86/xen: Return from panic notifier
This commit is contained in:
@@ -269,19 +269,41 @@ void xen_reboot(int reason)
|
||||
BUG();
|
||||
}
|
||||
|
||||
static int reboot_reason = SHUTDOWN_reboot;
|
||||
static bool xen_legacy_crash;
|
||||
void xen_emergency_restart(void)
|
||||
{
|
||||
xen_reboot(SHUTDOWN_reboot);
|
||||
xen_reboot(reboot_reason);
|
||||
}
|
||||
|
||||
static int
|
||||
xen_panic_event(struct notifier_block *this, unsigned long event, void *ptr)
|
||||
{
|
||||
if (!kexec_crash_loaded())
|
||||
xen_reboot(SHUTDOWN_crash);
|
||||
if (!kexec_crash_loaded()) {
|
||||
if (xen_legacy_crash)
|
||||
xen_reboot(SHUTDOWN_crash);
|
||||
|
||||
reboot_reason = SHUTDOWN_crash;
|
||||
|
||||
/*
|
||||
* If panic_timeout==0 then we are supposed to wait forever.
|
||||
* However, to preserve original dom0 behavior we have to drop
|
||||
* into hypervisor. (domU behavior is controlled by its
|
||||
* config file)
|
||||
*/
|
||||
if (panic_timeout == 0)
|
||||
panic_timeout = -1;
|
||||
}
|
||||
return NOTIFY_DONE;
|
||||
}
|
||||
|
||||
static int __init parse_xen_legacy_crash(char *arg)
|
||||
{
|
||||
xen_legacy_crash = true;
|
||||
return 0;
|
||||
}
|
||||
early_param("xen_legacy_crash", parse_xen_legacy_crash);
|
||||
|
||||
static struct notifier_block xen_panic_block = {
|
||||
.notifier_call = xen_panic_event,
|
||||
.priority = INT_MIN
|
||||
|
Reference in New Issue
Block a user