From: Boris Ostrovsky Date: Mon, 6 Feb 2017 15:58:06 +0000 (-0500) Subject: xen/pvh: Use Xen's emergency_restart op for PVH guests X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=7a1c44ebc5ac2e2c28d95b0da6060728c334e7e4;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git xen/pvh: Use Xen's emergency_restart op for PVH guests Using native_machine_emergency_restart (called during reboot) will lead PVH guests to machine_real_restart() where we try to use real_mode_header which is not initialized. Signed-off-by: Boris Ostrovsky Reviewed-by: Juergen Gross --- diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c index 6d406f3465bc..ec1d5c46e58f 100644 --- a/arch/x86/xen/enlighten.c +++ b/arch/x86/xen/enlighten.c @@ -1924,6 +1924,9 @@ static void __init xen_hvm_guest_init(void) x86_init.irqs.intr_init = xen_init_IRQ; xen_hvm_init_time_ops(); xen_hvm_init_mmu_ops(); + + if (xen_pvh_domain()) + machine_ops.emergency_restart = xen_emergency_restart; #ifdef CONFIG_KEXEC_CORE machine_ops.shutdown = xen_hvm_shutdown; machine_ops.crash_shutdown = xen_hvm_crash_shutdown;