xen/panic: use xen_reboot and fix smp_send_stop
authorIan Campbell <ian.campbell@citrix.com>
Tue, 3 Aug 2010 21:55:14 +0000 (14:55 -0700)
committerJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Wed, 4 Aug 2010 21:47:31 +0000 (14:47 -0700)
Offline vcpu when using stop_self.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>

arch/x86/xen/enlighten.c
arch/x86/xen/smp.c

index d99522e..3c4da8b 100644 (file)
@@ -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;
 }
 
index a29693f..25f232b 100644 (file)
@@ -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();
 }