Skip to content

Commit

Permalink
xen/panic: use xen_reboot and fix smp_send_stop
Browse files Browse the repository at this point in the history
Offline vcpu when using stop_self.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
  • Loading branch information
Ian Campbell authored and Jeremy Fitzhardinge committed Aug 4, 2010
1 parent f09f6d1 commit 086748e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 1 addition & 4 deletions arch/x86/xen/enlighten.c
Original file line number Diff line number Diff line change
Expand Up @@ -1043,10 +1043,7 @@ static void xen_crash_shutdown(struct pt_regs *regs)
static int
xen_panic_event(struct notifier_block *this, unsigned long event, void *ptr)
{
struct sched_shutdown r = { .reason = SHUTDOWN_crash};

if (HYPERVISOR_sched_op(SCHEDOP_shutdown, &r))
BUG();
xen_reboot(SHUTDOWN_crash);
return NOTIFY_DONE;
}

Expand Down
2 changes: 2 additions & 0 deletions arch/x86/xen/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,8 @@ static void stop_self(void *v)
load_cr3(swapper_pg_dir);
/* should set up a minimal gdt */

set_cpu_online(cpu, false);

HYPERVISOR_vcpu_op(VCPUOP_down, cpu, NULL);
BUG();
}
Expand Down

0 comments on commit 086748e

Please sign in to comment.