Skip to content

Commit

Permalink
KVM: ia64: fix GVMM module including position-dependent objects
Browse files Browse the repository at this point in the history
The GVMM module is position independent since it is relocated to the guest
address space.

Commit ea696f9 ("ia64 kvm fixes for O=... builds") broke this by linking
GVMM with non-PIC objects.

Fix by creating two files: memset.S and memcpy.S which just include the files
under arch/ia64/lib/{memset.S, memcpy.S} respectively.

[akpm: don't delete files which we need]

Signed-off-by: Xiantao Zhang <xiantao.zhang@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Avi Kivity <avi@qumranet.com>
  • Loading branch information
Xiantao Zhang authored and Avi Kivity committed May 18, 2008
1 parent 021f4b6 commit 25c437b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
3 changes: 1 addition & 2 deletions arch/ia64/kvm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ offsets-file := asm-offsets.h
always := $(offsets-file)
targets := $(offsets-file)
targets += arch/ia64/kvm/asm-offsets.s
clean-files := $(addprefix $(objtree)/,$(targets) $(obj)/memcpy.S $(obj)/memset.S)

# Default sed regexp - multiline due to syntax constraints
define sed-y
Expand Down Expand Up @@ -54,5 +53,5 @@ 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 \
vtlb.o process.o
#Add link memcpy and memset to avoid possible structure assignment error
kvm-intel-objs += ../lib/memset.o ../lib/memcpy.o
kvm-intel-objs += memcpy.o memset.o
obj-$(CONFIG_KVM_INTEL) += kvm-intel.o
1 change: 1 addition & 0 deletions arch/ia64/kvm/memcpy.S
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#include "../lib/memcpy.S"
1 change: 1 addition & 0 deletions arch/ia64/kvm/memset.S
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#include "../lib/memset.S"

0 comments on commit 25c437b

Please sign in to comment.