kvm-kmod: update to 2.6.38.6.
authorArne Fitzenreiter <arne_f@ipfire.org>
Sat, 21 May 2011 13:22:35 +0000 (15:22 +0200)
committerArne Fitzenreiter <arne_f@ipfire.org>
Sat, 21 May 2011 13:22:35 +0000 (15:22 +0200)
lfs/kvm-kmod
src/patches/kvm-kmod-2.6.38.6_remove_pvclock_scale_delta_redifinition.patch [new file with mode: 0644]

index e443b70..b6418ac 100644 (file)
@@ -34,7 +34,7 @@ else
 endif
 endif
 
-VER        = 2.6.34.1
+VER        = 2.6.38.6
 
 THISAPP    = kvm-kmod-$(VER)
 DL_FILE    = $(THISAPP).tar.bz2
@@ -50,7 +50,7 @@ objects = $(DL_FILE)
 
 $(DL_FILE) = $(DL_FROM)/$(DL_FILE)
 
-$(DL_FILE)_MD5 = c227b58ee33f6035f16abd258bcd92ec
+$(DL_FILE)_MD5 = b631ba6ba7b0d3c07de870c6104ffbd5
 
 install : $(TARGET)
 
@@ -83,6 +83,7 @@ $(subst %,%_MD5,$(objects)) :
 $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
        @$(PREBUILD)
        @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar jxf $(DIR_DL)/$(DL_FILE)
+       cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/$(THISAPP)_remove_pvclock_scale_delta_redifinition.patch
        cd $(DIR_APP) && ./configure --kerneldir=/usr/src/linux
        cd $(DIR_APP) && make $(MAKETUNING)
        cd $(DIR_APP) && install -m 644 x86/*.ko \
diff --git a/src/patches/kvm-kmod-2.6.38.6_remove_pvclock_scale_delta_redifinition.patch b/src/patches/kvm-kmod-2.6.38.6_remove_pvclock_scale_delta_redifinition.patch
new file mode 100644 (file)
index 0000000..331e8a1
--- /dev/null
@@ -0,0 +1,45 @@
+diff -Naur kvm-kmod-2.6.38.6.org/x86/external-module-compat.h kvm-kmod-2.6.38.6/x86/external-module-compat.h
+--- kvm-kmod-2.6.38.6.org/x86/external-module-compat.h 2011-05-15 09:34:48.000000000 +0200
++++ kvm-kmod-2.6.38.6/x86/external-module-compat.h     2011-05-21 13:30:50.529469540 +0200
+@@ -1064,41 +1064,6 @@
+ #endif /* >= 2.6.36 */
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,37)
+-static inline u64 pvclock_scale_delta(u64 delta, u32 mul_frac, int shift)
+-{
+-      u64 product;
+-#ifdef __i386__
+-      u32 tmp1, tmp2;
+-#endif
+-
+-      if (shift < 0)
+-              delta >>= -shift;
+-      else
+-              delta <<= shift;
+-
+-#ifdef __i386__
+-      __asm__ (
+-              "mul  %5       ; "
+-              "mov  %4,%%eax ; "
+-              "mov  %%edx,%4 ; "
+-              "mul  %5       ; "
+-              "xor  %5,%5    ; "
+-              "add  %4,%%eax ; "
+-              "adc  %5,%%edx ; "
+-              : "=A" (product), "=r" (tmp1), "=r" (tmp2)
+-              : "a" ((u32)delta), "1" ((u32)(delta >> 32)), "2" (mul_frac) );
+-#elif defined(__x86_64__)
+-      __asm__ (
+-              "mul %%rdx ; shrd $32,%%rdx,%%rax"
+-              : "=a" (product) : "0" (delta), "d" ((u64)mul_frac) );
+-#else
+-#error implement me!
+-#endif
+-
+-      return product;
+-}
+-#endif
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,34) && \
+     LINUX_VERSION_CODE != KERNEL_VERSION(2,6,32) && defined(CONFIG_X86_64)