From: Avi Kivity <[email protected]>
Signed-off-by: Avi Kivity <[email protected]>
diff --git a/sync b/sync
index 6bde43f..7da1035 100755
--- a/sync
+++ b/sync
@@ -107,6 +107,8 @@ def __hack(data):
line = sub(r'\blapic\n', 'l_apic', line)
if match(r'struct pt_regs regs'):
mce = True
+ if mce and match(r'\.cs'):
+ line = sub(r'cs', r'kvm_pt_regs_cs', line)
if mce and match(r'\.flags'):
line = sub(r'flags', r'kvm_pt_regs_flags', line)
mce = False
diff --git a/x86/external-module-compat.h b/x86/external-module-compat.h
index 7d00b21..a3ec56c 100644
--- a/x86/external-module-compat.h
+++ b/x86/external-module-compat.h
@@ -595,9 +595,16 @@ static inline void kvm_do_machine_check(struct pt_regs
*regs, long error_code)
#define kvm_pt_regs_flags eflags
+# ifdef CONFIG_X86_64
+# define kvm_pt_regs_cs cs
+# else
+# define kvm_pt_regs_cs xcs
+# endif
+
#else
#define kvm_pt_regs_flags flags
+#define kvm_pt_regs_cs cs
#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