aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZhang Xiantao <xiantao.zhang@intel.com>2008-08-27 09:23:17 +0800
committerAvi Kivity <avi@qumranet.com>2008-08-27 11:50:20 +0300
commit94ca033f46c83e244d581702d6b5799349acd84b (patch)
tree9398a03626d86217f87de147f4ea356dd22b75c1
parentdd94759c5d1a1aa84c1d5cb525e73d497c37ed84 (diff)
kvm: external module: moving source munging 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> Signed-off-by: Avi Kivity <avi@qumranet.com>
-rw-r--r--kvm/kernel/Makefile2
-rw-r--r--kvm/kernel/external-module-compat-comm.h1
-rw-r--r--kvm/kernel/external-module-compat.c (renamed from kvm/kernel/x86/external-module-compat.c)0
-rw-r--r--kvm/kernel/x86/Kbuild6
-rw-r--r--kvm/kernel/x86/external-module-compat.h2
-rw-r--r--kvm/kernel/x86/hack-module.awk (renamed from kvm/kernel/hack-module.awk)0
6 files changed, 6 insertions, 5 deletions
diff --git a/kvm/kernel/Makefile b/kvm/kernel/Makefile
index 6f8cc9d33..d2913a926 100644
--- a/kvm/kernel/Makefile
+++ b/kvm/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/kvm/kernel/external-module-compat-comm.h b/kvm/kernel/external-module-compat-comm.h
index 97e921bd8..2e87c5792 100644
--- a/kvm/kernel/external-module-compat-comm.h
+++ b/kvm/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/kvm/kernel/x86/external-module-compat.c b/kvm/kernel/external-module-compat.c
index 71429c7e0..71429c7e0 100644
--- a/kvm/kernel/x86/external-module-compat.c
+++ b/kvm/kernel/external-module-compat.c
diff --git a/kvm/kernel/x86/Kbuild b/kvm/kernel/x86/Kbuild
index ee81a1e68..8dc048373 100644
--- a/kvm/kernel/x86/Kbuild
+++ b/kvm/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/kvm/kernel/x86/external-module-compat.h b/kvm/kernel/x86/external-module-compat.h
index f6e3e34c4..c53e0d629 100644
--- a/kvm/kernel/x86/external-module-compat.h
+++ b/kvm/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/kvm/kernel/hack-module.awk b/kvm/kernel/x86/hack-module.awk
index 3f364f8d6..3f364f8d6 100644
--- a/kvm/kernel/hack-module.awk
+++ b/kvm/kernel/x86/hack-module.awk