Kvm-ia64 Development Archive on lore.kernel.org
 help / color / mirror / Atom feed
* RE: [ANNOUNCE] kvm-73 release
@ 2008-08-21  2:35 Zhang, Xiantao
  2008-08-21 13:18 ` Avi Kivity
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: Zhang, Xiantao @ 2008-08-21  2:35 UTC (permalink / raw)
  To: kvm-ia64

Hi, Avi 
   Since ia64 has supported userspace's build, could we include ia64
bits in next release?  
Thanks
Xiantao

Avi Kivity wrote:
> The big change is of course full swapping support, finally delivering
> the full range of Linux memory management operations to kvm.  You will
> need a 2.6.27 host to use this functionality, however.
> 
> Other noteworthy changes: speedups of both virtio-net and qcow2 with
> cache=off.  Two important works-in-progress: device assignment (not
> usable yet, as dma support is still missing) and the real-mode
> emulation framework.
> 
> Changes from kvm-72:
> - merge qemu-svn
>    - improve qcow2 performance with cache=off
>    - ide fixes
> - ia64 external module (Xiantao Zhang)
> - external module compatibility with 2.6.27 hosts
> - fix sysenter msrs save/restore (Alexander Graf)
> - fix 2.6.26 host support (Nikola Ciprich)
> - fix linux-user build (Philippe Gerum)
> - virtio-net speedup (Mark McLoughlin)
> - fix ./configure with multiple arguments
> - support Windows hibernation on non-FlexPriority hosts
> - fix makefile dependencies (Sheng Yang)
> - fix compiler warnings (Jan Kiszka)
> - work around dhclient checksum offload brokenness (Anthony Liguori)
> - full swapping support (Andrea Arcangeli)
>    - needs 2.6.27 hosts
> - internal irq ack notification api
>    (Marcelo Tosatti, Amit Shah, Ben-Ami Yassour, me)
> - fix pit timer interrupt injection logic (Marcelo Tosatti)
> - paravirt guest: query tsc frequency from host (Glauber Costa)
> - pci device assignment (Amit Shah, Ben-Ami Yassour, Weidong Han)
>    - still lacking dma
> - fix large page crash on z10 mainframes (Christian Borntraeger)
> - stack usage reduction (Dave Hansen, Sheng Yang)
> - code cleanup (Sheng Yang)
> - fix debug register corruption on Intel hosts (Marcelo Tosatti)
> - fix -no-kvm-irqchip
> - fix irq acking on pic reset (Marcelo Tosatti)
> - ignore spurious timer interrupt acks
> - limit device assignment to privileged user (Amit Shah)
> - big real mode emulation framework (Mohammed Gamal)
> - simpify irq injection (Amit Shah)
> - dummy irq ack notifier for ia64 (Xiantao Zhang)
> 
> 
> Notes:
>      If you use the modules bundled with kvm-73, you can use any
> version of Linux from 2.6.16 upwards.  You may also use kvm-73
> userspace with the kvm modules provided by Linux 2.6.22 or above. 
> Some features may only be available in newer releases.
> 
> http://kvm.qumranet.com
> 
> 
> --
> error compiling committee.c: too many arguments to function


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [ANNOUNCE] kvm-73 release
  2008-08-21  2:35 [ANNOUNCE] kvm-73 release Zhang, Xiantao
@ 2008-08-21 13:18 ` Avi Kivity
  2008-08-21 13:24 ` Avi Kivity
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Avi Kivity @ 2008-08-21 13:18 UTC (permalink / raw)
  To: kvm-ia64

Zhang, Xiantao wrote:
> Hi, Avi 
>    Since ia64 has supported userspace's build, could we include ia64
> bits in next release?  
>   

I updated my scripts.  I'll send you a test tarball via private mail to 
see I hadn't missed any files.

-- 
error compiling committee.c: too many arguments to function


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [ANNOUNCE] kvm-73 release
  2008-08-21  2:35 [ANNOUNCE] kvm-73 release Zhang, Xiantao
  2008-08-21 13:18 ` Avi Kivity
@ 2008-08-21 13:24 ` Avi Kivity
  2008-08-21 14:23 ` Zhang, Xiantao
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Avi Kivity @ 2008-08-21 13:24 UTC (permalink / raw)
  To: kvm-ia64

Avi Kivity wrote:
> Zhang, Xiantao wrote:
>> Hi, Avi    Since ia64 has supported userspace's build, could we 
>> include ia64
>> bits in next release?    
>
> I updated my scripts.  I'll send you a test tarball via private mail 
> to see I hadn't missed any files.
>

Better a link: http://userweb.kernel.org/~avi/test.tar.gz

-- 
error compiling committee.c: too many arguments to function


^ permalink raw reply	[flat|nested] 9+ messages in thread

* RE: [ANNOUNCE] kvm-73 release
  2008-08-21  2:35 [ANNOUNCE] kvm-73 release Zhang, Xiantao
  2008-08-21 13:18 ` Avi Kivity
  2008-08-21 13:24 ` Avi Kivity
@ 2008-08-21 14:23 ` Zhang, Xiantao
  2008-08-22  4:14 ` Zhang, Xiantao
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Zhang, Xiantao @ 2008-08-21 14:23 UTC (permalink / raw)
  To: kvm-ia64

Avi Kivity wrote:
> Zhang, Xiantao wrote:
>> Hi, Avi
>>    Since ia64 has supported userspace's build, could we include ia64
>> bits in next release? 
>> 
> 
> I updated my scripts.  I'll send you a test tarball via private mail
> to see I hadn't missed any files.

Great! I will guarantee it can work well on ia64 platforms. Thanks! 
Xiantao

^ permalink raw reply	[flat|nested] 9+ messages in thread

* RE: [ANNOUNCE] kvm-73 release
  2008-08-21  2:35 [ANNOUNCE] kvm-73 release Zhang, Xiantao
                   ` (2 preceding siblings ...)
  2008-08-21 14:23 ` Zhang, Xiantao
@ 2008-08-22  4:14 ` Zhang, Xiantao
  2008-08-26 11:44 ` Zhang, Xiantao
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Zhang, Xiantao @ 2008-08-22  4:14 UTC (permalink / raw)
  To: kvm-ia64

[-- Attachment #1: Type: text/plain, Size: 6585 bytes --]

Avi Kivity wrote:
> Avi Kivity wrote:
>> Zhang, Xiantao wrote:
>>> Hi, Avi    Since ia64 has supported userspace's build, could we
>>> include ia64 bits in next release?
>> 
>> I updated my scripts.  I'll send you a test tarball via private mail
>> to see I hadn't missed any files.
>> 
> 
> Better a link: http://userweb.kernel.org/~avi/test.tar.gz
Hi, Avi 
     You may need to apply this patch, and regenerate the package again
to keep kvm/ia64 compatible with Linux-2.6.26 and newer versions. :)
Thannks
Xiantao


From e552da3b1e7d2d30bcd09982d313ebf74c348be1 Mon Sep 17 00:00:00 2001
From: Xiantao Zhang <xiantao.zhang@intel.com>
Date: Fri, 22 Aug 2008 11:07:37 +0800
Subject: [PATCH] KVM: external module: keep kvm/ia64 compatible with
Linux-2.6.26 and newer version.

Add some compatibility hack for Linux-2.6.26 and newer versions for ia64
Signed-off-by: Xiantao Zhang <xiantao.zhang@intel.com>
---
 kernel/Makefile                      |    4 ++--
 kernel/external-module-compat-comm.h |   13 -------------
 kernel/ia64/Kbuild                   |    2 +-
 kernel/ia64/external-module-compat.h |   34
++++++++++++++++++++++++++++++++++
 kernel/ia64/hack-module.awk          |   14 ++++++++++++++
 kernel/x86/external-module-compat.h  |   14 ++++++++++++++
 kernel/{ => x86}/hack-module.awk     |    0 
 7 files changed, 65 insertions(+), 16 deletions(-)
 create mode 100644 kernel/ia64/hack-module.awk
 rename kernel/{ => x86}/hack-module.awk (100%)

diff --git a/kernel/Makefile b/kernel/Makefile
index 6f8cc9d..3f5f6da 100644
--- a/kernel/Makefile
+++ b/kernel/Makefile
@@ -19,7 +19,7 @@ LINUX = ../linux-2.6
 version = $(shell cd $(LINUX); git describe)
 
 _hack = mv $1 $1.orig && \
-	gawk -v version=$(version) -f hack-module.awk $1.orig \
+	gawk -v version=$(version) -f $(ARCH_DIR)/hack-module.awk
$1.orig \
 	    | sed '/\#include/! s/\blapic\b/l_apic/g' > $1 && rm $1.orig
 
 unifdef = mv $1 $1.orig && \
@@ -29,7 +29,7 @@ unifdef = mv $1 $1.orig && \
 hack = $(call _hack,$T/$(strip $1))
 
 hack-files-x86 = kvm_main.c mmu.c vmx.c svm.c x86.c irq.h lapic.c
i8254.c
-hack-files-ia64 =
+hack-files-ia64 = kvm_main.c kvm_fw.c
 
 hack-files = $(hack-files-$(ARCH_DIR))
 
diff --git a/kernel/external-module-compat-comm.h
b/kernel/external-module-compat-comm.h
index 97e921b..fcffb1f 100644
--- a/kernel/external-module-compat-comm.h
+++ b/kernel/external-module-compat-comm.h
@@ -17,7 +17,6 @@
 #include <asm/processor.h>
 #include <linux/hrtimer.h>
 #include <asm/bitops.h>
-#include <asm/msr.h>
 
 /*
  * 2.6.16 does not have GFP_NOWAIT
@@ -40,18 +39,6 @@
 #define prof_on       4321
 #endif
 
-/*
- * smp_call_function_single() is not exported below 2.6.20, and has
different
- * semantics below 2.6.23.  The 'nonatomic' argument was removed in
2.6.27.
- */
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27)
-
-int kvm_smp_call_function_single(int cpu, void (*func)(void *info),
-				 void *info, int wait);
-
-#define smp_call_function_single kvm_smp_call_function_single
-
-#endif
 
 /* on_each_cpu() lost an argument in 2.6.27. */
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27)
diff --git a/kernel/ia64/Kbuild b/kernel/ia64/Kbuild
index 764a493..50af491 100644
--- a/kernel/ia64/Kbuild
+++ b/kernel/ia64/Kbuild
@@ -1,6 +1,6 @@
 obj-m := kvm.o kvm-intel.o
 
-kvm-objs := kvm_main.o ioapic.o coalesced_mmio.o kvm-ia64.o kvm_fw.o
+kvm-objs := kvm_main.o ioapic.o coalesced_mmio.o kvm-ia64.o kvm_fw.o
../anon_inodes.o
 
 EXTRA_CFLAGS_vcpu.o += -mfixed-range=f2-f5,f12-f127
 kvm-intel-objs := vmm.o vmm_ivt.o trampoline.o vcpu.o optvfault.o
mmio.o \
diff --git a/kernel/ia64/external-module-compat.h
b/kernel/ia64/external-module-compat.h
index 3c4001c..1f8dc9b 100644
--- a/kernel/ia64/external-module-compat.h
+++ b/kernel/ia64/external-module-compat.h
@@ -2,8 +2,11 @@
  * Compatibility header for building as an external module.
  */
 
+#ifndef __ASSEMBLY__
 #include <linux/version.h>
 
+#include "../external-module-compat-comm.h"
+
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,26)
 #error "KVM/IA-64 Can't be compiled if kernel version < 2.6.26"
 #endif
@@ -13,3 +16,34 @@
   TODO: Implement it later! */
 #error "KVM/IA-64 depends on preempt notifiers in kernel."
 #endif
+
+/* on_each_cpu() lost an argument in 2.6.27. */
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27)
+
+#define kvm_smp_call_function(func, info, wait) smp_call_function(func,
info, 0, wait)
+
+#else
+
+#define kvm_smp_call_function(func, info, wait) smp_call_function(func,
info, wait)
+
+#endif
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27)
+
+/* The 'nonatomic' argument was removed in 2.6.27. */
+
+#undef smp_call_function_single
+
+#include <linux/smp.h>
+
+static inline int kvm_smp_call_function_single(int cpu, void
(*func)(void *info),
+				 void *info, int wait)
+{
+	return smp_call_function_single(cpu, func, info, 0, wait);
+}
+
+#define smp_call_function_single kvm_smp_call_function_single
+
+#endif
+
+#endif
diff --git a/kernel/ia64/hack-module.awk b/kernel/ia64/hack-module.awk
new file mode 100644
index 0000000..b9b24c0
--- /dev/null
+++ b/kernel/ia64/hack-module.awk
@@ -0,0 +1,14 @@
+BEGIN { split("INIT_WORK on_each_cpu smp_call_function" , compat_apis);
}
+
+/MODULE_AUTHOR/ {
+    printf("MODULE_INFO(version, \"%s\");\n", version)
+}
+
+{
+    for (i in compat_apis) {
+	ident = compat_apis[i]
+	sub("\\<" ident "\\>", "kvm_" ident)
+    }
+}
+
+{ print }
diff --git a/kernel/x86/external-module-compat.h
b/kernel/x86/external-module-compat.h
index f6e3e34..8ab8f26 100644
--- a/kernel/x86/external-module-compat.h
+++ b/kernel/x86/external-module-compat.h
@@ -5,9 +5,23 @@
 
 #include <linux/compiler.h>
 #include <linux/version.h>
+#include <asm/msr.h>
 
 #include "../external-module-compat-comm.h"
 
+/*
+ * smp_call_function_single() is not exported below 2.6.20, and has
different
+ * semantics below 2.6.23.  The 'nonatomic' argument was removed in
2.6.27.
+ */
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27)
+
+int kvm_smp_call_function_single(int cpu, void (*func)(void *info),
+				 void *info, int wait);
+
+#define smp_call_function_single kvm_smp_call_function_single
+
+#endif
+
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22)
 
 #ifndef _EFER_SCE
diff --git a/kernel/hack-module.awk b/kernel/x86/hack-module.awk
similarity index 100%
rename from kernel/hack-module.awk
rename to kernel/x86/hack-module.awk
-- 
1.5.1

[-- Attachment #2: 0002-KVM-external-module-keep.patch --]
[-- Type: application/octet-stream, Size: 5844 bytes --]

From e552da3b1e7d2d30bcd09982d313ebf74c348be1 Mon Sep 17 00:00:00 2001
From: Xiantao Zhang <xiantao.zhang@intel.com>
Date: Fri, 22 Aug 2008 11:07:37 +0800
Subject: [PATCH] KVM: external module: keep kvm/ia64 compatible with
Linux-2.6.26 and newer version.

Add some compatibility hack for Linux-2.6.26 and newer versions for ia64
Signed-off-by: Xiantao Zhang <xiantao.zhang@intel.com>
---
 kernel/Makefile                      |    4 ++--
 kernel/external-module-compat-comm.h |   13 -------------
 kernel/ia64/Kbuild                   |    2 +-
 kernel/ia64/external-module-compat.h |   34 ++++++++++++++++++++++++++++++++++
 kernel/ia64/hack-module.awk          |   14 ++++++++++++++
 kernel/x86/external-module-compat.h  |   14 ++++++++++++++
 kernel/{ => x86}/hack-module.awk     |    0 
 7 files changed, 65 insertions(+), 16 deletions(-)
 create mode 100644 kernel/ia64/hack-module.awk
 rename kernel/{ => x86}/hack-module.awk (100%)

diff --git a/kernel/Makefile b/kernel/Makefile
index 6f8cc9d..3f5f6da 100644
--- a/kernel/Makefile
+++ b/kernel/Makefile
@@ -19,7 +19,7 @@ LINUX = ../linux-2.6
 version = $(shell cd $(LINUX); git describe)
 
 _hack = mv $1 $1.orig && \
-	gawk -v version=$(version) -f hack-module.awk $1.orig \
+	gawk -v version=$(version) -f $(ARCH_DIR)/hack-module.awk $1.orig \
 	    | sed '/\#include/! s/\blapic\b/l_apic/g' > $1 && rm $1.orig
 
 unifdef = mv $1 $1.orig && \
@@ -29,7 +29,7 @@ unifdef = mv $1 $1.orig && \
 hack = $(call _hack,$T/$(strip $1))
 
 hack-files-x86 = kvm_main.c mmu.c vmx.c svm.c x86.c irq.h lapic.c i8254.c
-hack-files-ia64 =
+hack-files-ia64 = kvm_main.c kvm_fw.c
 
 hack-files = $(hack-files-$(ARCH_DIR))
 
diff --git a/kernel/external-module-compat-comm.h b/kernel/external-module-compat-comm.h
index 97e921b..fcffb1f 100644
--- a/kernel/external-module-compat-comm.h
+++ b/kernel/external-module-compat-comm.h
@@ -17,7 +17,6 @@
 #include <asm/processor.h>
 #include <linux/hrtimer.h>
 #include <asm/bitops.h>
-#include <asm/msr.h>
 
 /*
  * 2.6.16 does not have GFP_NOWAIT
@@ -40,18 +39,6 @@
 #define prof_on       4321
 #endif
 
-/*
- * smp_call_function_single() is not exported below 2.6.20, and has different
- * semantics below 2.6.23.  The 'nonatomic' argument was removed in 2.6.27.
- */
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27)
-
-int kvm_smp_call_function_single(int cpu, void (*func)(void *info),
-				 void *info, int wait);
-
-#define smp_call_function_single kvm_smp_call_function_single
-
-#endif
 
 /* on_each_cpu() lost an argument in 2.6.27. */
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27)
diff --git a/kernel/ia64/Kbuild b/kernel/ia64/Kbuild
index 764a493..50af491 100644
--- a/kernel/ia64/Kbuild
+++ b/kernel/ia64/Kbuild
@@ -1,6 +1,6 @@
 obj-m := kvm.o kvm-intel.o
 
-kvm-objs := kvm_main.o ioapic.o coalesced_mmio.o kvm-ia64.o kvm_fw.o
+kvm-objs := kvm_main.o ioapic.o coalesced_mmio.o kvm-ia64.o kvm_fw.o ../anon_inodes.o
 
 EXTRA_CFLAGS_vcpu.o += -mfixed-range=f2-f5,f12-f127
 kvm-intel-objs := vmm.o vmm_ivt.o trampoline.o vcpu.o optvfault.o mmio.o \
diff --git a/kernel/ia64/external-module-compat.h b/kernel/ia64/external-module-compat.h
index 3c4001c..1f8dc9b 100644
--- a/kernel/ia64/external-module-compat.h
+++ b/kernel/ia64/external-module-compat.h
@@ -2,8 +2,11 @@
  * Compatibility header for building as an external module.
  */
 
+#ifndef __ASSEMBLY__
 #include <linux/version.h>
 
+#include "../external-module-compat-comm.h"
+
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,26)
 #error "KVM/IA-64 Can't be compiled if kernel version < 2.6.26"
 #endif
@@ -13,3 +16,34 @@
   TODO: Implement it later! */
 #error "KVM/IA-64 depends on preempt notifiers in kernel."
 #endif
+
+/* on_each_cpu() lost an argument in 2.6.27. */
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27)
+
+#define kvm_smp_call_function(func, info, wait) smp_call_function(func, info, 0, wait)
+
+#else
+
+#define kvm_smp_call_function(func, info, wait) smp_call_function(func, info, wait)
+
+#endif
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27)
+
+/* The 'nonatomic' argument was removed in 2.6.27. */
+
+#undef smp_call_function_single
+
+#include <linux/smp.h>
+
+static inline int kvm_smp_call_function_single(int cpu, void (*func)(void *info),
+				 void *info, int wait)
+{
+	return smp_call_function_single(cpu, func, info, 0, wait);
+}
+
+#define smp_call_function_single kvm_smp_call_function_single
+
+#endif
+
+#endif
diff --git a/kernel/ia64/hack-module.awk b/kernel/ia64/hack-module.awk
new file mode 100644
index 0000000..b9b24c0
--- /dev/null
+++ b/kernel/ia64/hack-module.awk
@@ -0,0 +1,14 @@
+BEGIN { split("INIT_WORK on_each_cpu smp_call_function" , compat_apis); }
+
+/MODULE_AUTHOR/ {
+    printf("MODULE_INFO(version, \"%s\");\n", version)
+}
+
+{
+    for (i in compat_apis) {
+	ident = compat_apis[i]
+	sub("\\<" ident "\\>", "kvm_" ident)
+    }
+}
+
+{ print }
diff --git a/kernel/x86/external-module-compat.h b/kernel/x86/external-module-compat.h
index f6e3e34..8ab8f26 100644
--- a/kernel/x86/external-module-compat.h
+++ b/kernel/x86/external-module-compat.h
@@ -5,9 +5,23 @@
 
 #include <linux/compiler.h>
 #include <linux/version.h>
+#include <asm/msr.h>
 
 #include "../external-module-compat-comm.h"
 
+/*
+ * smp_call_function_single() is not exported below 2.6.20, and has different
+ * semantics below 2.6.23.  The 'nonatomic' argument was removed in 2.6.27.
+ */
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27)
+
+int kvm_smp_call_function_single(int cpu, void (*func)(void *info),
+				 void *info, int wait);
+
+#define smp_call_function_single kvm_smp_call_function_single
+
+#endif
+
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22)
 
 #ifndef _EFER_SCE
diff --git a/kernel/hack-module.awk b/kernel/x86/hack-module.awk
similarity index 100%
rename from kernel/hack-module.awk
rename to kernel/x86/hack-module.awk
-- 
1.5.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* RE: [ANNOUNCE] kvm-73 release
  2008-08-21  2:35 [ANNOUNCE] kvm-73 release Zhang, Xiantao
                   ` (3 preceding siblings ...)
  2008-08-22  4:14 ` Zhang, Xiantao
@ 2008-08-26 11:44 ` Zhang, Xiantao
  2008-08-26 15:26 ` Avi Kivity
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Zhang, Xiantao @ 2008-08-26 11:44 UTC (permalink / raw)
  To: kvm-ia64

[-- Attachment #1: Type: text/plain, Size: 6335 bytes --]

Hi, Avi 
   A updated version. Please review again. Thanks.
Xiantao
From 689bdb4c0506a1b6b24e9c481634593052ee2cc0 Mon Sep 17 00:00:00 2001
From: Xiantao Zhang <xiantao.zhang@intel.com>
Date: Tue, 26 Aug 2008 19:20:03 +0800
Subject: [PATCH] KVM: external module: keep kvm/ia64 compatible with
Linux-2.6.26 and newer version.

Add some compatibility hack for Linux-2.6.26 and newer versions for ia64
Signed-off-by: Xiantao Zhang <xiantao.zhang@intel.com>
---
 kernel/Makefile                           |    4 ++--
 kernel/external-module-compat-comm.h      |    1 -
 kernel/{x86 => }/external-module-compat.c |    0 
 kernel/ia64/Kbuild                        |    3 ++-
 kernel/ia64/external-module-compat.h      |   16 ++++++++++++++++
 kernel/ia64/hack-module.awk               |   14 ++++++++++++++
 kernel/x86/Kbuild                         |    6 +++---
 kernel/x86/external-module-compat.h       |    1 +
 kernel/{ => x86}/hack-module.awk          |    0 
 9 files changed, 38 insertions(+), 7 deletions(-)
 rename kernel/{x86 => }/external-module-compat.c (100%)
 create mode 100644 kernel/ia64/hack-module.awk
 rename kernel/{ => x86}/hack-module.awk (100%)

diff --git a/kernel/Makefile b/kernel/Makefile
index 6f8cc9d..3f5f6da 100644
--- a/kernel/Makefile
+++ b/kernel/Makefile
@@ -19,7 +19,7 @@ LINUX = ../linux-2.6
 version = $(shell cd $(LINUX); git describe)
 
 _hack = mv $1 $1.orig && \
-	gawk -v version=$(version) -f hack-module.awk $1.orig \
+	gawk -v version=$(version) -f $(ARCH_DIR)/hack-module.awk
$1.orig \
 	    | sed '/\#include/! s/\blapic\b/l_apic/g' > $1 && rm $1.orig
 
 unifdef = mv $1 $1.orig && \
@@ -29,7 +29,7 @@ unifdef = mv $1 $1.orig && \
 hack = $(call _hack,$T/$(strip $1))
 
 hack-files-x86 = kvm_main.c mmu.c vmx.c svm.c x86.c irq.h lapic.c
i8254.c
-hack-files-ia64 =
+hack-files-ia64 = kvm_main.c kvm_fw.c
 
 hack-files = $(hack-files-$(ARCH_DIR))
 
diff --git a/kernel/external-module-compat-comm.h
b/kernel/external-module-compat-comm.h
index 97e921b..2e87c57 100644
--- a/kernel/external-module-compat-comm.h
+++ b/kernel/external-module-compat-comm.h
@@ -17,7 +17,6 @@
 #include <asm/processor.h>
 #include <linux/hrtimer.h>
 #include <asm/bitops.h>
-#include <asm/msr.h>
 
 /*
  * 2.6.16 does not have GFP_NOWAIT
diff --git a/kernel/x86/external-module-compat.c
b/kernel/external-module-compat.c
similarity index 100%
rename from kernel/x86/external-module-compat.c
rename to kernel/external-module-compat.c
diff --git a/kernel/ia64/Kbuild b/kernel/ia64/Kbuild
index 764a493..8561476 100644
--- a/kernel/ia64/Kbuild
+++ b/kernel/ia64/Kbuild
@@ -1,6 +1,7 @@
 obj-m := kvm.o kvm-intel.o
 
-kvm-objs := kvm_main.o ioapic.o coalesced_mmio.o kvm-ia64.o kvm_fw.o
+kvm-objs := kvm_main.o ioapic.o coalesced_mmio.o kvm-ia64.o kvm_fw.o \
+	../anon_inodes.o ../external-module-compat.o
 
 EXTRA_CFLAGS_vcpu.o += -mfixed-range=f2-f5,f12-f127
 kvm-intel-objs := vmm.o vmm_ivt.o trampoline.o vcpu.o optvfault.o
mmio.o \
diff --git a/kernel/ia64/external-module-compat.h
b/kernel/ia64/external-module-compat.h
index 3c4001c..2a11d39 100644
--- a/kernel/ia64/external-module-compat.h
+++ b/kernel/ia64/external-module-compat.h
@@ -2,8 +2,11 @@
  * Compatibility header for building as an external module.
  */
 
+#ifndef __ASSEMBLY__
 #include <linux/version.h>
 
+#include "../external-module-compat-comm.h"
+
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,26)
 #error "KVM/IA-64 Can't be compiled if kernel version < 2.6.26"
 #endif
@@ -13,3 +16,16 @@
   TODO: Implement it later! */
 #error "KVM/IA-64 depends on preempt notifiers in kernel."
 #endif
+
+/* smp_call_function() lost an argument in 2.6.27. */
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27)
+
+#define kvm_smp_call_function(func, info, wait) smp_call_function(func,
info, 0, wait)
+
+#else
+
+#define kvm_smp_call_function(func, info, wait) smp_call_function(func,
info, wait)
+
+#endif
+
+#endif
diff --git a/kernel/ia64/hack-module.awk b/kernel/ia64/hack-module.awk
new file mode 100644
index 0000000..b9b24c0
--- /dev/null
+++ b/kernel/ia64/hack-module.awk
@@ -0,0 +1,14 @@
+BEGIN { split("INIT_WORK on_each_cpu smp_call_function" , compat_apis);
}
+
+/MODULE_AUTHOR/ {
+    printf("MODULE_INFO(version, \"%s\");\n", version)
+}
+
+{
+    for (i in compat_apis) {
+	ident = compat_apis[i]
+	sub("\\<" ident "\\>", "kvm_" ident)
+    }
+}
+
+{ print }
diff --git a/kernel/x86/Kbuild b/kernel/x86/Kbuild
index ee81a1e..8dc0483 100644
--- a/kernel/x86/Kbuild
+++ b/kernel/x86/Kbuild
@@ -1,11 +1,11 @@
 obj-m := kvm.o kvm-intel.o kvm-amd.o
 kvm-objs := kvm_main.o x86.o mmu.o x86_emulate.o ../anon_inodes.o irq.o
i8259.o \
 	 lapic.o ioapic.o preempt.o i8254.o coalesced_mmio.o \
-	 external-module-compat.o
+	 ../external-module-compat.o
 ifeq ($(CONFIG_KVM_TRACE),y)
 kvm-objs += kvm_trace.o
 endif
-kvm-intel-objs := vmx.o vmx-debug.o external-module-compat.o
-kvm-amd-objs := svm.o external-module-compat.o
+kvm-intel-objs := vmx.o vmx-debug.o ../external-module-compat.o
+kvm-amd-objs := svm.o ../external-module-compat.o
 
 CFLAGS_kvm_main.o = -DKVM_MAIN
diff --git a/kernel/x86/external-module-compat.h
b/kernel/x86/external-module-compat.h
index f6e3e34..0b70a53 100644
--- a/kernel/x86/external-module-compat.h
+++ b/kernel/x86/external-module-compat.h
@@ -5,6 +5,7 @@
 
 #include <linux/compiler.h>
 #include <linux/version.h>
+#include <asm/msr.h>
 
 #include "../external-module-compat-comm.h"
 
diff --git a/kernel/hack-module.awk b/kernel/x86/hack-module.awk
similarity index 100%
rename from kernel/hack-module.awk
rename to kernel/x86/hack-module.awk
-- 
1.5.1

Zhang, Xiantao wrote:
> Avi Kivity wrote:
>> Avi Kivity wrote:
>>> Zhang, Xiantao wrote:
>>>> Hi, Avi    Since ia64 has supported userspace's build, could we
>>>> include ia64 bits in next release?
>>> 
>>> I updated my scripts.  I'll send you a test tarball via private mail
>>> to see I hadn't missed any files.
>>> 
>> 
>> Better a link: http://userweb.kernel.org/~avi/test.tar.gz
> Hi, Avi
>      You may need to apply this patch, and regenerate the package
> again to keep kvm/ia64 compatible with Linux-2.6.26 and newer
> versions. :) Thannks
> Xiantao
> 

[-- Attachment #2: 0001-KVM-external-module-keep-kvm-ia64-compatible-with.patch --]
[-- Type: application/octet-stream, Size: 5508 bytes --]

From 689bdb4c0506a1b6b24e9c481634593052ee2cc0 Mon Sep 17 00:00:00 2001
From: Xiantao Zhang <xiantao.zhang@intel.com>
Date: Tue, 26 Aug 2008 19:20:03 +0800
Subject: [PATCH] KVM: external module: keep kvm/ia64 compatible with
Linux-2.6.26 and newer version.

Add some compatibility hack for Linux-2.6.26 and newer versions for ia64
Signed-off-by: Xiantao Zhang <xiantao.zhang@intel.com>
---
 kernel/Makefile                           |    4 ++--
 kernel/external-module-compat-comm.h      |    1 -
 kernel/{x86 => }/external-module-compat.c |    0 
 kernel/ia64/Kbuild                        |    3 ++-
 kernel/ia64/external-module-compat.h      |   16 ++++++++++++++++
 kernel/ia64/hack-module.awk               |   14 ++++++++++++++
 kernel/x86/Kbuild                         |    6 +++---
 kernel/x86/external-module-compat.h       |    1 +
 kernel/{ => x86}/hack-module.awk          |    0 
 9 files changed, 38 insertions(+), 7 deletions(-)
 rename kernel/{x86 => }/external-module-compat.c (100%)
 create mode 100644 kernel/ia64/hack-module.awk
 rename kernel/{ => x86}/hack-module.awk (100%)

diff --git a/kernel/Makefile b/kernel/Makefile
index 6f8cc9d..3f5f6da 100644
--- a/kernel/Makefile
+++ b/kernel/Makefile
@@ -19,7 +19,7 @@ LINUX = ../linux-2.6
 version = $(shell cd $(LINUX); git describe)
 
 _hack = mv $1 $1.orig && \
-	gawk -v version=$(version) -f hack-module.awk $1.orig \
+	gawk -v version=$(version) -f $(ARCH_DIR)/hack-module.awk $1.orig \
 	    | sed '/\#include/! s/\blapic\b/l_apic/g' > $1 && rm $1.orig
 
 unifdef = mv $1 $1.orig && \
@@ -29,7 +29,7 @@ unifdef = mv $1 $1.orig && \
 hack = $(call _hack,$T/$(strip $1))
 
 hack-files-x86 = kvm_main.c mmu.c vmx.c svm.c x86.c irq.h lapic.c i8254.c
-hack-files-ia64 =
+hack-files-ia64 = kvm_main.c kvm_fw.c
 
 hack-files = $(hack-files-$(ARCH_DIR))
 
diff --git a/kernel/external-module-compat-comm.h b/kernel/external-module-compat-comm.h
index 97e921b..2e87c57 100644
--- a/kernel/external-module-compat-comm.h
+++ b/kernel/external-module-compat-comm.h
@@ -17,7 +17,6 @@
 #include <asm/processor.h>
 #include <linux/hrtimer.h>
 #include <asm/bitops.h>
-#include <asm/msr.h>
 
 /*
  * 2.6.16 does not have GFP_NOWAIT
diff --git a/kernel/x86/external-module-compat.c b/kernel/external-module-compat.c
similarity index 100%
rename from kernel/x86/external-module-compat.c
rename to kernel/external-module-compat.c
diff --git a/kernel/ia64/Kbuild b/kernel/ia64/Kbuild
index 764a493..8561476 100644
--- a/kernel/ia64/Kbuild
+++ b/kernel/ia64/Kbuild
@@ -1,6 +1,7 @@
 obj-m := kvm.o kvm-intel.o
 
-kvm-objs := kvm_main.o ioapic.o coalesced_mmio.o kvm-ia64.o kvm_fw.o
+kvm-objs := kvm_main.o ioapic.o coalesced_mmio.o kvm-ia64.o kvm_fw.o \
+	../anon_inodes.o ../external-module-compat.o
 
 EXTRA_CFLAGS_vcpu.o += -mfixed-range=f2-f5,f12-f127
 kvm-intel-objs := vmm.o vmm_ivt.o trampoline.o vcpu.o optvfault.o mmio.o \
diff --git a/kernel/ia64/external-module-compat.h b/kernel/ia64/external-module-compat.h
index 3c4001c..2a11d39 100644
--- a/kernel/ia64/external-module-compat.h
+++ b/kernel/ia64/external-module-compat.h
@@ -2,8 +2,11 @@
  * Compatibility header for building as an external module.
  */
 
+#ifndef __ASSEMBLY__
 #include <linux/version.h>
 
+#include "../external-module-compat-comm.h"
+
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,26)
 #error "KVM/IA-64 Can't be compiled if kernel version < 2.6.26"
 #endif
@@ -13,3 +16,16 @@
   TODO: Implement it later! */
 #error "KVM/IA-64 depends on preempt notifiers in kernel."
 #endif
+
+/* smp_call_function() lost an argument in 2.6.27. */
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27)
+
+#define kvm_smp_call_function(func, info, wait) smp_call_function(func, info, 0, wait)
+
+#else
+
+#define kvm_smp_call_function(func, info, wait) smp_call_function(func, info, wait)
+
+#endif
+
+#endif
diff --git a/kernel/ia64/hack-module.awk b/kernel/ia64/hack-module.awk
new file mode 100644
index 0000000..b9b24c0
--- /dev/null
+++ b/kernel/ia64/hack-module.awk
@@ -0,0 +1,14 @@
+BEGIN { split("INIT_WORK on_each_cpu smp_call_function" , compat_apis); }
+
+/MODULE_AUTHOR/ {
+    printf("MODULE_INFO(version, \"%s\");\n", version)
+}
+
+{
+    for (i in compat_apis) {
+	ident = compat_apis[i]
+	sub("\\<" ident "\\>", "kvm_" ident)
+    }
+}
+
+{ print }
diff --git a/kernel/x86/Kbuild b/kernel/x86/Kbuild
index ee81a1e..8dc0483 100644
--- a/kernel/x86/Kbuild
+++ b/kernel/x86/Kbuild
@@ -1,11 +1,11 @@
 obj-m := kvm.o kvm-intel.o kvm-amd.o
 kvm-objs := kvm_main.o x86.o mmu.o x86_emulate.o ../anon_inodes.o irq.o i8259.o \
 	 lapic.o ioapic.o preempt.o i8254.o coalesced_mmio.o \
-	 external-module-compat.o
+	 ../external-module-compat.o
 ifeq ($(CONFIG_KVM_TRACE),y)
 kvm-objs += kvm_trace.o
 endif
-kvm-intel-objs := vmx.o vmx-debug.o external-module-compat.o
-kvm-amd-objs := svm.o external-module-compat.o
+kvm-intel-objs := vmx.o vmx-debug.o ../external-module-compat.o
+kvm-amd-objs := svm.o ../external-module-compat.o
 
 CFLAGS_kvm_main.o = -DKVM_MAIN
diff --git a/kernel/x86/external-module-compat.h b/kernel/x86/external-module-compat.h
index f6e3e34..0b70a53 100644
--- a/kernel/x86/external-module-compat.h
+++ b/kernel/x86/external-module-compat.h
@@ -5,6 +5,7 @@
 
 #include <linux/compiler.h>
 #include <linux/version.h>
+#include <asm/msr.h>
 
 #include "../external-module-compat-comm.h"
 
diff --git a/kernel/hack-module.awk b/kernel/x86/hack-module.awk
similarity index 100%
rename from kernel/hack-module.awk
rename to kernel/x86/hack-module.awk
-- 
1.5.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [ANNOUNCE] kvm-73 release
  2008-08-21  2:35 [ANNOUNCE] kvm-73 release Zhang, Xiantao
                   ` (4 preceding siblings ...)
  2008-08-26 11:44 ` Zhang, Xiantao
@ 2008-08-26 15:26 ` Avi Kivity
  2008-08-27  1:53 ` Zhang, Xiantao
  2008-08-27  8:54 ` Avi Kivity
  7 siblings, 0 replies; 9+ messages in thread
From: Avi Kivity @ 2008-08-26 15:26 UTC (permalink / raw)
  To: kvm-ia64

Zhang, Xiantao wrote:
> Hi, Avi 
>    A updated version. Please review again. Thanks.
> Xiantao
> From 689bdb4c0506a1b6b24e9c481634593052ee2cc0 Mon Sep 17 00:00:00 2001
> From: Xiantao Zhang <xiantao.zhang@intel.com>
> Date: Tue, 26 Aug 2008 19:20:03 +0800
> Subject: [PATCH] KVM: external module: keep kvm/ia64 compatible with
> Linux-2.6.26 and newer version.
>
> Add some compatibility hack for Linux-2.6.26 and newer versions for ia64
>   


Unfortunately it breaks x86 build (2.6.25 host).  Please test that.

Also, please separate the x86 file movement from the ia64 additions.

-- 
error compiling committee.c: too many arguments to function


^ permalink raw reply	[flat|nested] 9+ messages in thread

* RE: [ANNOUNCE] kvm-73 release
  2008-08-21  2:35 [ANNOUNCE] kvm-73 release Zhang, Xiantao
                   ` (5 preceding siblings ...)
  2008-08-26 15:26 ` Avi Kivity
@ 2008-08-27  1:53 ` Zhang, Xiantao
  2008-08-27  8:54 ` Avi Kivity
  7 siblings, 0 replies; 9+ messages in thread
From: Zhang, Xiantao @ 2008-08-27  1:53 UTC (permalink / raw)
  To: kvm-ia64

[-- Attachment #1: Type: text/plain, Size: 890 bytes --]

Avi Kivity wrote:
> Zhang, Xiantao wrote:
>> Hi, Avi
>>    A updated version. Please review again. Thanks.
>> Xiantao
>> From 689bdb4c0506a1b6b24e9c481634593052ee2cc0 Mon Sep 17 00:00:00
>> 2001 From: Xiantao Zhang <xiantao.zhang@intel.com>
>> Date: Tue, 26 Aug 2008 19:20:03 +0800
>> Subject: [PATCH] KVM: external module: keep kvm/ia64 compatible with
>> Linux-2.6.26 and newer version.
>> 
>> Add some compatibility hack for Linux-2.6.26 and newer versions for
>> ia64 
>> 
> 
> 
> Unfortunately it breaks x86 build (2.6.25 host).  Please test that.
Oops, my mistake!  I should put asm/msr.h after
external-module-compat-comm.h due to dependcies issue. 

> Also, please separate the x86 file movement from the ia64 additions.

Attached!  First is for x86 file movement, and the other targets for
hacking ia64 source for back-ward compatibility. 
Thanks
Xiantao

[-- Attachment #2: 0001-KVM-External-Module-Moving-two-files-for-cross-arc.patch --]
[-- Type: application/octet-stream, Size: 3131 bytes --]

From 0583db6c105df8870084ba866ca08bfb681eaf2d Mon Sep 17 00:00:00 2001
From: Zhang Xiantao <xiantao.zhang@intel.com>
Date: Wed, 27 Aug 2008 09:23:17 +0800
Subject: [PATCH] KVM: External Module: Moving two files for cross-arch support.

x86/external-module-compat.c -> external-module-compat.c.
hack-module.awk -> x86/hack-module.awk.

Signed-off-by: Zhang Xiantao <xiantao.zhang@intel.com>
---
 kernel/Makefile                           |    2 +-
 kernel/external-module-compat-comm.h      |    1 -
 kernel/{x86 => }/external-module-compat.c |    0 
 kernel/x86/Kbuild                         |    6 +++---
 kernel/x86/external-module-compat.h       |    2 ++
 kernel/{ => x86}/hack-module.awk          |    0 
 6 files changed, 6 insertions(+), 5 deletions(-)
 rename kernel/{x86 => }/external-module-compat.c (100%)
 rename kernel/{ => x86}/hack-module.awk (100%)

diff --git a/kernel/Makefile b/kernel/Makefile
index 6f8cc9d..d2913a9 100644
--- a/kernel/Makefile
+++ b/kernel/Makefile
@@ -19,7 +19,7 @@ LINUX = ../linux-2.6
 version = $(shell cd $(LINUX); git describe)
 
 _hack = mv $1 $1.orig && \
-	gawk -v version=$(version) -f hack-module.awk $1.orig \
+	gawk -v version=$(version) -f $(ARCH_DIR)/hack-module.awk $1.orig \
 	    | sed '/\#include/! s/\blapic\b/l_apic/g' > $1 && rm $1.orig
 
 unifdef = mv $1 $1.orig && \
diff --git a/kernel/external-module-compat-comm.h b/kernel/external-module-compat-comm.h
index 97e921b..2e87c57 100644
--- a/kernel/external-module-compat-comm.h
+++ b/kernel/external-module-compat-comm.h
@@ -17,7 +17,6 @@
 #include <asm/processor.h>
 #include <linux/hrtimer.h>
 #include <asm/bitops.h>
-#include <asm/msr.h>
 
 /*
  * 2.6.16 does not have GFP_NOWAIT
diff --git a/kernel/x86/external-module-compat.c b/kernel/external-module-compat.c
similarity index 100%
rename from kernel/x86/external-module-compat.c
rename to kernel/external-module-compat.c
diff --git a/kernel/x86/Kbuild b/kernel/x86/Kbuild
index ee81a1e..8dc0483 100644
--- a/kernel/x86/Kbuild
+++ b/kernel/x86/Kbuild
@@ -1,11 +1,11 @@
 obj-m := kvm.o kvm-intel.o kvm-amd.o
 kvm-objs := kvm_main.o x86.o mmu.o x86_emulate.o ../anon_inodes.o irq.o i8259.o \
 	 lapic.o ioapic.o preempt.o i8254.o coalesced_mmio.o \
-	 external-module-compat.o
+	 ../external-module-compat.o
 ifeq ($(CONFIG_KVM_TRACE),y)
 kvm-objs += kvm_trace.o
 endif
-kvm-intel-objs := vmx.o vmx-debug.o external-module-compat.o
-kvm-amd-objs := svm.o external-module-compat.o
+kvm-intel-objs := vmx.o vmx-debug.o ../external-module-compat.o
+kvm-amd-objs := svm.o ../external-module-compat.o
 
 CFLAGS_kvm_main.o = -DKVM_MAIN
diff --git a/kernel/x86/external-module-compat.h b/kernel/x86/external-module-compat.h
index f6e3e34..c53e0d6 100644
--- a/kernel/x86/external-module-compat.h
+++ b/kernel/x86/external-module-compat.h
@@ -8,6 +8,8 @@
 
 #include "../external-module-compat-comm.h"
 
+#include <asm/msr.h>
+
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22)
 
 #ifndef _EFER_SCE
diff --git a/kernel/hack-module.awk b/kernel/x86/hack-module.awk
similarity index 100%
rename from kernel/hack-module.awk
rename to kernel/x86/hack-module.awk
-- 
1.5.6.2


[-- Attachment #3: 0002-kvm-ia64-External-module-Some-hacks-for-the-compab.patch --]
[-- Type: application/octet-stream, Size: 2970 bytes --]

From d7c633f32c16606a06a1c2df97cb36e76c439757 Mon Sep 17 00:00:00 2001
From: Zhang Xiantao <xiantao.zhang@intel.com>
Date: Wed, 27 Aug 2008 09:33:45 +0800
Subject: [PATCH] kvm/ia64: External module: Some hacks for the compability with 2.6.26.

Add one hack-module.awk scripts to hack ia64 source.
Signed-off-by: Zhang Xiantao <xiantao.zhang@intel.com>
---
 kernel/Makefile                      |    2 +-
 kernel/ia64/Kbuild                   |    3 ++-
 kernel/ia64/external-module-compat.h |   16 ++++++++++++++++
 kernel/ia64/hack-module.awk          |   14 ++++++++++++++
 4 files changed, 33 insertions(+), 2 deletions(-)
 create mode 100644 kernel/ia64/hack-module.awk

diff --git a/kernel/Makefile b/kernel/Makefile
index d2913a9..3f5f6da 100644
--- a/kernel/Makefile
+++ b/kernel/Makefile
@@ -29,7 +29,7 @@ unifdef = mv $1 $1.orig && \
 hack = $(call _hack,$T/$(strip $1))
 
 hack-files-x86 = kvm_main.c mmu.c vmx.c svm.c x86.c irq.h lapic.c i8254.c
-hack-files-ia64 =
+hack-files-ia64 = kvm_main.c kvm_fw.c
 
 hack-files = $(hack-files-$(ARCH_DIR))
 
diff --git a/kernel/ia64/Kbuild b/kernel/ia64/Kbuild
index 764a493..8561476 100644
--- a/kernel/ia64/Kbuild
+++ b/kernel/ia64/Kbuild
@@ -1,6 +1,7 @@
 obj-m := kvm.o kvm-intel.o
 
-kvm-objs := kvm_main.o ioapic.o coalesced_mmio.o kvm-ia64.o kvm_fw.o
+kvm-objs := kvm_main.o ioapic.o coalesced_mmio.o kvm-ia64.o kvm_fw.o \
+	../anon_inodes.o ../external-module-compat.o
 
 EXTRA_CFLAGS_vcpu.o += -mfixed-range=f2-f5,f12-f127
 kvm-intel-objs := vmm.o vmm_ivt.o trampoline.o vcpu.o optvfault.o mmio.o \
diff --git a/kernel/ia64/external-module-compat.h b/kernel/ia64/external-module-compat.h
index 3c4001c..d6b67fe 100644
--- a/kernel/ia64/external-module-compat.h
+++ b/kernel/ia64/external-module-compat.h
@@ -2,8 +2,11 @@
  * Compatibility header for building as an external module.
  */
 
+#ifndef __ASSEMBLY__
 #include <linux/version.h>
 
+#include "../external-module-compat-comm.h"
+
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,26)
 #error "KVM/IA-64 Can't be compiled if kernel version < 2.6.26"
 #endif
@@ -13,3 +16,16 @@
   TODO: Implement it later! */
 #error "KVM/IA-64 depends on preempt notifiers in kernel."
 #endif
+
+/* smp_call_function() lost an argument in 2.6.27. */
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27)
+
+#define kvm_smp_call_function(func, info, wait) smp_call_function(func, info, 0, wait)
+
+#else
+
+#define kvm_smp_call_function(func, info, wait) smp_call_function(func, info, wait)
+
+#endif
+
+#endif
diff --git a/kernel/ia64/hack-module.awk b/kernel/ia64/hack-module.awk
new file mode 100644
index 0000000..b9b24c0
--- /dev/null
+++ b/kernel/ia64/hack-module.awk
@@ -0,0 +1,14 @@
+BEGIN { split("INIT_WORK on_each_cpu smp_call_function" , compat_apis); }
+
+/MODULE_AUTHOR/ {
+    printf("MODULE_INFO(version, \"%s\");\n", version)
+}
+
+{
+    for (i in compat_apis) {
+	ident = compat_apis[i]
+	sub("\\<" ident "\\>", "kvm_" ident)
+    }
+}
+
+{ print }
-- 
1.5.6.2


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [ANNOUNCE] kvm-73 release
  2008-08-21  2:35 [ANNOUNCE] kvm-73 release Zhang, Xiantao
                   ` (6 preceding siblings ...)
  2008-08-27  1:53 ` Zhang, Xiantao
@ 2008-08-27  8:54 ` Avi Kivity
  7 siblings, 0 replies; 9+ messages in thread
From: Avi Kivity @ 2008-08-27  8:54 UTC (permalink / raw)
  To: kvm-ia64

Zhang, Xiantao wrote:
> Attached!  First is for x86 file movement, and the other targets for
> hacking ia64 source for back-ward compatibility. 
>   

Both applied, thanks.

-- 
error compiling committee.c: too many arguments to function


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2008-08-27  8:54 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-21  2:35 [ANNOUNCE] kvm-73 release Zhang, Xiantao
2008-08-21 13:18 ` Avi Kivity
2008-08-21 13:24 ` Avi Kivity
2008-08-21 14:23 ` Zhang, Xiantao
2008-08-22  4:14 ` Zhang, Xiantao
2008-08-26 11:44 ` Zhang, Xiantao
2008-08-26 15:26 ` Avi Kivity
2008-08-27  1:53 ` Zhang, Xiantao
2008-08-27  8:54 ` Avi Kivity

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox