From: Avi Kivity <[email protected]>

Signed-off-by: Avi Kivity <[email protected]>

diff --git a/sync b/sync
index c4c4078..b12fb8a 100755
--- a/sync
+++ b/sync
@@ -37,6 +37,7 @@ def __hack(data):
         'on_each_cpu relay_open request_irq free_irq '
         'init_srcu_struct cleanup_srcu_struct srcu_read_lock '
         'srcu_read_unlock synchronize_srcu srcu_batches_completed '
+        'do_machine_check '
         )
     anon_inodes = anon_inodes_exit = False
     result = []
diff --git a/x86/external-module-compat.h b/x86/external-module-compat.h
index 0e26743..273bfee 100644
--- a/x86/external-module-compat.h
+++ b/x86/external-module-compat.h
@@ -553,3 +553,19 @@ struct mtrr_state_type {
 #define MCI_STATUS_OVER  (1ULL<<62)
 #define MCI_STATUS_UC    (1ULL<<61)
 #endif
+
+/* do_machine_check() exported in 2.6.31 */
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,31)
+
+static inline void kvm_do_machine_check(struct pt_regs *regs, long error_code)
+{
+       panic("kvm machine check!\n");
+}
+
+#else
+
+#define kvm_do_machine_check do_machine_check
+
+#endif
+
--
To unsubscribe from this list: send the line "unsubscribe kvm-commits" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to