From: Avi Kivity <[EMAIL PROTECTED]> This reverts commit 14795bc960af5ef7286dd7207023abf28fbc118f. Needed again as 202761268a29d4cd3a3fec35e6d6f2f239374635 was reverted in kvm.git.
Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> diff --git a/kernel/external-module-compat.h b/kernel/external-module-compat.h index e164eec..98ed13f 100644 --- a/kernel/external-module-compat.h +++ b/kernel/external-module-compat.h @@ -534,6 +534,20 @@ static inline void blahblah(void) (void)empty_zero_page[0]; } +/* __mmdrop() is not exported before 2.6.25 */ +#include <linux/sched.h> + +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,25) + +#define mmdrop(x) do { (void)(x); } while (0) +#define mmget(x) do { (void)(x); } while (0) + +#else + +#define mmget(x) do { atomic_inc(x); } while (0) + +#endif + /* X86_FEATURE_NX is missing in some x86_64 kernels */ #include <asm/cpufeature.h> diff --git a/kernel/hack-module.awk b/kernel/hack-module.awk index dd9a2f4..455e662 100644 --- a/kernel/hack-module.awk +++ b/kernel/hack-module.awk @@ -33,6 +33,8 @@ vmx_load_host_state = 0 } +/atomic_inc\(&kvm->mm->mm_count\);/ { $0 = "mmget(&kvm->mm->mm_count);" } + /^\t\.fault = / { fcn = gensub(/,/, "", "g", $3) $0 = "\t.VMA_OPS_FAULT(fault) = VMA_OPS_FAULT_FUNC(" fcn ")," ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace _______________________________________________ kvm-commits mailing list kvm-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-commits