From 3f4a5d545624259be0583b63142a74a33fa01f47 Mon Sep 17 00:00:00 2001 From: Eduardo Habkost Date: Mon, 17 Nov 2008 19:03:23 -0200 Subject: [PATCH] --- yaml --- r: 125239 b: refs/heads/master c: 2340b62f77c782c305e6ae7748675a638436d1ef h: refs/heads/master i: 125237: 4732f8a4b03ce294624adad6b13fba46d689589c 125235: 7db2ad285865c1b08a036656cb8e63399a92f7f3 125231: 6adb81c55408534b410ea704ed68fb06953c0ea9 v: v3 --- [refs] | 2 +- trunk/arch/x86/kernel/crash.c | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index d61a528fc951..f3b924c8c87b 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 0f3e9eeba0ea212bbea88790729d054b700ab91e +refs/heads/master: 2340b62f77c782c305e6ae7748675a638436d1ef diff --git a/trunk/arch/x86/kernel/crash.c b/trunk/arch/x86/kernel/crash.c index d84a852e4cd7..c689d19e35ab 100644 --- a/trunk/arch/x86/kernel/crash.c +++ b/trunk/arch/x86/kernel/crash.c @@ -26,6 +26,7 @@ #include #include #include +#include #include @@ -49,6 +50,15 @@ static void kdump_nmi_callback(int cpu, struct die_args *args) #endif crash_save_cpu(regs, cpu); + /* Disable VMX or SVM if needed. + * + * We need to disable virtualization on all CPUs. + * Having VMX or SVM enabled on any CPU may break rebooting + * after the kdump kernel has finished its task. + */ + cpu_emergency_vmxoff(); + cpu_emergency_svm_disable(); + disable_local_APIC(); } @@ -80,6 +90,14 @@ void native_machine_crash_shutdown(struct pt_regs *regs) local_irq_disable(); kdump_nmi_shootdown_cpus(); + + /* Booting kdump kernel with VMX or SVM enabled won't work, + * because (among other limitations) we can't disable paging + * with the virt flags. + */ + cpu_emergency_vmxoff(); + cpu_emergency_svm_disable(); + lapic_shutdown(); #if defined(CONFIG_X86_IO_APIC) disable_IO_APIC();