提交 086748e5 编写于 作者: I Ian Campbell 提交者: Jeremy Fitzhardinge

xen/panic: use xen_reboot and fix smp_send_stop

Offline vcpu when using stop_self.
Signed-off-by: NIan Campbell <ian.campbell@citrix.com>
Signed-off-by: NJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
上级 f09f6d19
...@@ -1043,10 +1043,7 @@ static void xen_crash_shutdown(struct pt_regs *regs) ...@@ -1043,10 +1043,7 @@ static void xen_crash_shutdown(struct pt_regs *regs)
static int static int
xen_panic_event(struct notifier_block *this, unsigned long event, void *ptr) xen_panic_event(struct notifier_block *this, unsigned long event, void *ptr)
{ {
struct sched_shutdown r = { .reason = SHUTDOWN_crash}; xen_reboot(SHUTDOWN_crash);
if (HYPERVISOR_sched_op(SCHEDOP_shutdown, &r))
BUG();
return NOTIFY_DONE; return NOTIFY_DONE;
} }
......
...@@ -394,6 +394,8 @@ static void stop_self(void *v) ...@@ -394,6 +394,8 @@ static void stop_self(void *v)
load_cr3(swapper_pg_dir); load_cr3(swapper_pg_dir);
/* should set up a minimal gdt */ /* should set up a minimal gdt */
set_cpu_online(cpu, false);
HYPERVISOR_vcpu_op(VCPUOP_down, cpu, NULL); HYPERVISOR_vcpu_op(VCPUOP_down, cpu, NULL);
BUG(); BUG();
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册