From: Avi Kivity <[EMAIL PROTECTED]>

Signed-off-by: Avi Kivity <[EMAIL PROTECTED]>

diff --git a/kernel/external-module-compat.h b/kernel/external-module-compat.h
index 52b745c..20ef841 100644
--- a/kernel/external-module-compat.h
+++ b/kernel/external-module-compat.h
@@ -692,3 +692,13 @@ static inline struct page *__kvm_vm_fault(struct 
vm_area_struct *vma,
 #define fastcall
 #endif
 #endif
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,23)
+
+#define kvm_tsc_khz 2000000
+
+#else
+
+#define kvm_tsc_khz tsc_khz
+
+#endif
diff --git a/kernel/hack-module.awk b/kernel/hack-module.awk
index 126957a..ad7a7c5 100644
--- a/kernel/hack-module.awk
+++ b/kernel/hack-module.awk
@@ -51,6 +51,8 @@
 
 { sub(/linux\/mm_types\.h/, "linux/mm.h") }
 
+{ sub(/tsc_khz/, "kvm_tsc_khz") }
+
 /^\t\.name = "kvm"/ { $0 = "\tset_kset_name(\"kvm\")," }
 
 { print }

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
kvm-commits mailing list
kvm-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-commits

Reply via email to