summaryrefslogtreecommitdiff
path: root/arch/x86/kernel
diff options
context:
space:
mode:
authorAndi Kleen <andi@firstfloor.org>2009-07-01 16:18:45 +0200
committerGreg Kroah-Hartman <gregkh@suse.de>2009-07-02 16:49:32 -0700
commitc45181c66af214e4187664e46460e87d3aefa97a (patch)
tree3d26df450f7552e1e0c99a55db48869bc95b0836 /arch/x86/kernel
parent376c10a25a8b73b90e67d2fa870bfda288fa067d (diff)
KVM: Add VT-x machine check support v4
(replaces commit a0861c02a981c943573478ea13b29b1fb958ee5b upstream in a cleaner way for the 2.6.30 kernel tree) VT-x needs an explicit MC vector intercept to handle machine checks in the hypervisor. It also has a special option to catch machine checks that happen during VT entry. Do these interceptions and forward them to the Linux machine check handler. Make it always look like user space is interrupted because the machine check handler treats kernel/user space differently. Thanks to Huang Ying and Jiang Yunhong for help and testing. Cc: ying.huang@intel.com v2: Handle machine checks still in interrupt off context to avoid problems on preemptible kernels. v3: Handle old style 32bit and make fully standalone Signed-off-by: Andi Kleen <ak@linux.intel.com> Cc: Huang Ying <ying.huang@intel.com> Acked-by: Avi Kivity <avi@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'arch/x86/kernel')
-rw-r--r--arch/x86/kernel/cpu/mcheck/mce_32.c1
-rw-r--r--arch/x86/kernel/cpu/mcheck/mce_64.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/arch/x86/kernel/cpu/mcheck/mce_32.c b/arch/x86/kernel/cpu/mcheck/mce_32.c
index 3552119b091..07b523c5288 100644
--- a/arch/x86/kernel/cpu/mcheck/mce_32.c
+++ b/arch/x86/kernel/cpu/mcheck/mce_32.c
@@ -29,6 +29,7 @@ static void unexpected_machine_check(struct pt_regs *regs, long error_code)
/* Call the installed machine check handler for this CPU setup. */
void (*machine_check_vector)(struct pt_regs *, long error_code) = unexpected_machine_check;
+EXPORT_SYMBOL_GPL(machine_check_vector);
/* This has to be run for each processor */
void mcheck_init(struct cpuinfo_x86 *c)
diff --git a/arch/x86/kernel/cpu/mcheck/mce_64.c b/arch/x86/kernel/cpu/mcheck/mce_64.c
index 09dd1d414fc..289cc481502 100644
--- a/arch/x86/kernel/cpu/mcheck/mce_64.c
+++ b/arch/x86/kernel/cpu/mcheck/mce_64.c
@@ -420,6 +420,7 @@ void do_machine_check(struct pt_regs * regs, long error_code)
out2:
atomic_dec(&mce_entry);
}
+EXPORT_SYMBOL_GPL(do_machine_check);
#ifdef CONFIG_X86_MCE_INTEL
/***