Avi Kivity wrote: > Zhang, Xiantao wrote: >>> Can you provide more information on how this was only discovered >>> now? Was there a change in mainline that removed support for >>> EXTRA_CFLAGS?] >>> >> It should be an old issue we didn't sense before. To specify single >> object's compile option, only CFLAGS can work in this case. > > How did we not notice the issue? What is the effect of the missing > flags? > It seems like a critical problem that should prevent kvm from working > at all, so I don't understand how it was discovered so late. Once missing this flags, compiler can touch the fixed registers and leads to faults. But fortunately,current gcc didn't use them for optimizations, so we didn't find it before. But anyway it should be a potential issue. Updated one, remove kernel's default range. >From 451ce36037cb1075c572de42d9ad9c4c7ee863e4 Mon Sep 17 00:00:00 2001 From: Xiantao Zhang <xiantao.zhang@xxxxxxxxx> Date: Thu, 20 Nov 2008 19:49:00 +0800 Subject: [PATCH] KVM: ia64: Fix: Use CFLAGS_vcpu.o to compile vcpu.c EXTRA_CFLAGS doesn't work for this case.Without this flag, it may result in compiler touch fixed registers. Signed-off-by: Xiantao Zhang <xiantao.zhang@xxxxxxxxx> --- arch/ia64/kvm/Makefile | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/arch/ia64/kvm/Makefile b/arch/ia64/kvm/Makefile index 3ab4d6d..603e53c 100644 --- a/arch/ia64/kvm/Makefile +++ b/arch/ia64/kvm/Makefile @@ -58,7 +58,8 @@ endif kvm-objs := $(common-objs) kvm-ia64.o kvm_fw.o obj-$(CONFIG_KVM) += kvm.o -EXTRA_CFLAGS_vcpu.o += -mfixed-range=f2-f5,f12-f127 +CFLAGS_REMOVE_vcpu.o += -mfixed-range=f12-f15,f32-f127 +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 -- 1.6.0 Xiantao
Attachment:
0001-KVM-ia64-Fix-Use-CFLAGS_vcpu.o-to-compile-vcpu.c.patch
Description: 0001-KVM-ia64-Fix-Use-CFLAGS_vcpu.o-to-compile-vcpu.c.patch