Commit 25c437b0 authored by Xiantao Zhang's avatar Xiantao Zhang Committed by Avi Kivity

KVM: ia64: fix GVMM module including position-dependent objects

The GVMM module is position independent since it is relocated to the guest
address space.

Commit ea696f9c ("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: default avatarXiantao Zhang <xiantao.zhang@intel.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarAvi Kivity <avi@qumranet.com>
parent 021f4b6c
...@@ -7,7 +7,6 @@ offsets-file := asm-offsets.h ...@@ -7,7 +7,6 @@ offsets-file := asm-offsets.h
always := $(offsets-file) always := $(offsets-file)
targets := $(offsets-file) targets := $(offsets-file)
targets += arch/ia64/kvm/asm-offsets.s 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 # Default sed regexp - multiline due to syntax constraints
define sed-y define sed-y
...@@ -54,5 +53,5 @@ EXTRA_CFLAGS_vcpu.o += -mfixed-range=f2-f5,f12-f127 ...@@ -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 \ kvm-intel-objs = vmm.o vmm_ivt.o trampoline.o vcpu.o optvfault.o mmio.o \
vtlb.o process.o vtlb.o process.o
#Add link memcpy and memset to avoid possible structure assignment error #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 obj-$(CONFIG_KVM_INTEL) += kvm-intel.o
#include "../lib/memcpy.S"
#include "../lib/memset.S"
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment