aboutsummaryrefslogtreecommitdiffstats
path: root/xen/arch/x86/crash.c
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2010-07-29 10:31:21 +0100
committerKeir Fraser <keir.fraser@citrix.com>2010-07-29 10:31:21 +0100
commit877ca1b20fecf14b364efe9ea0886f0be110a43f (patch)
tree3283c322156af9a2184772018e3de65fbac83460 /xen/arch/x86/crash.c
parentb99b79d46b8b7c8b3d26600445e86db9db23c744 (diff)
downloadxen-877ca1b20fecf14b364efe9ea0886f0be110a43f.tar.gz
xen-877ca1b20fecf14b364efe9ea0886f0be110a43f.tar.bz2
xen-877ca1b20fecf14b364efe9ea0886f0be110a43f.zip
kexec: Clean up shutdown logic. Reinstate ACPI DMAR during kexec.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Diffstat (limited to 'xen/arch/x86/crash.c')
-rw-r--r--xen/arch/x86/crash.c24
1 files changed, 10 insertions, 14 deletions
diff --git a/xen/arch/x86/crash.c b/xen/arch/x86/crash.c
index a95154771e..1564a01b12 100644
--- a/xen/arch/x86/crash.c
+++ b/xen/arch/x86/crash.c
@@ -25,7 +25,6 @@
#include <public/xen.h>
#include <asm/shared.h>
#include <asm/hvm/support.h>
-#include <asm/hpet.h>
#include <asm/apic.h>
#include <asm/io_apic.h>
@@ -43,9 +42,10 @@ static int crash_nmi_callback(struct cpu_user_regs *regs, int cpu)
local_irq_disable();
kexec_crash_save_cpu();
- disable_local_APIC();
+
+ __stop_this_cpu();
+
atomic_dec(&waiting_for_crash_ipi);
- hvm_cpu_down();
for ( ; ; )
halt();
@@ -57,7 +57,10 @@ static void nmi_shootdown_cpus(void)
{
unsigned long msecs;
+ local_irq_disable();
+
crashing_cpu = smp_processor_id();
+ local_irq_count(crashing_cpu) = 0;
atomic_set(&waiting_for_crash_ipi, num_online_cpus() - 1);
/* Would it be better to replace the trap vector here? */
@@ -74,25 +77,18 @@ static void nmi_shootdown_cpus(void)
msecs--;
}
- /* Leave the nmi callback set */
- disable_local_APIC();
+ __stop_this_cpu();
+ disable_IO_APIC();
+
+ local_irq_enable();
}
void machine_crash_shutdown(void)
{
crash_xen_info_t *info;
- local_irq_disable();
-
nmi_shootdown_cpus();
- if ( hpet_broadcast_is_available() )
- hpet_disable_legacy_broadcast();
-
- disable_IO_APIC();
-
- hvm_cpu_down();
-
info = kexec_crash_save_info();
info->xen_phys_start = xen_phys_start;
info->dom0_pfn_to_mfn_frame_list_list =