From: Avi Kivity <[email protected]>

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

diff --git a/sync b/sync
index a23c881..b78dd28 100755
--- a/sync
+++ b/sync
@@ -110,6 +110,7 @@ def __hack(data):
         if mce and match(r'\.flags'):
             line = sub(r'flags', r'kvm_pt_regs_flags', line)
             mce = False
+        line = sub(r'boot_cpu_data.x86_phys_bits', 'kvm_x86_phys_bits', line)
         w(line)
         if match(r'\tkvm_init_debug'):
             w('\thrtimer_kallsyms_resolve();')
diff --git a/x86/external-module-compat.h b/x86/external-module-compat.h
index 8436e43..365c7b5 100644
--- a/x86/external-module-compat.h
+++ b/x86/external-module-compat.h
@@ -592,3 +592,15 @@ static inline void kvm_do_machine_check(struct pt_regs 
*regs, long error_code)
 #define kvm_pt_regs_flags flags
 
 #endif
+
+/* boot_cpu_data.x86_phys_bits only appeared for i386 in 2.6.30 */
+
+#if !defined(CONFIG_X86_64) && (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30))
+
+#define kvm_x86_phys_bits 40
+
+#else
+
+#define kvm_x86_phys_bits (boot_cpu_data.x86_phys_bits)
+
+#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