From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hollis Blanchard Subject: Re: [kvm-ppc-devel] [RFC PATCH] KVM for PowerPC: simpler TLB handling, better page management Date: Fri, 01 Feb 2008 13:17:19 -0600 Message-ID: <1201893439.5538.10.camel@basalt> References: <1201223312.21851.21.camel@basalt> <20080201190754.GZ14201@localdomain> Reply-To: Hollis Blanchard Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm-ppc-devel , kvm-devel To: Nathan Lynch Return-path: In-Reply-To: <20080201190754.GZ14201@localdomain> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Errors-To: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: kvm.vger.kernel.org On Fri, 2008-02-01 at 13:07 -0600, Nathan Lynch wrote: > Hollis Blanchard wrote: > > --- a/arch/powerpc/kernel/asm-offsets.c > > +++ b/arch/powerpc/kernel/asm-offsets.c > > @@ -22,6 +22,7 @@ > > #include > > #include > > #include > > +#include > > #ifdef CONFIG_PPC64 > > #include > > #include > > @@ -328,5 +329,31 @@ int main(void) > > > > DEFINE(PGD_TABLE_SIZE, PGD_TABLE_SIZE); > > > > +#ifdef CONFIG_KVM > > + DEFINE(TLBE_BYTES, sizeof(struct tlbe)); > > + > > + DEFINE(VCPU_HOST_STACK, offsetof(struct kvm_vcpu, arch.host_stack)); > > + DEFINE(VCPU_HOST_PID, offsetof(struct kvm_vcpu, arch.host_pid)); > > + DEFINE(VCPU_HOST_TLB, offsetof(struct kvm_vcpu, arch.host_tlb)); > > + DEFINE(VCPU_SHADOW_TLB, offsetof(struct kvm_vcpu, arch.shadow_tlb)); > > I found that if CONFIG_KVM=m these definitions don't get picked up > when generating asm-offsets.h, which causes the build to break: > > AS arch/powerpc/kvm/booke_interrupts.o > arch/powerpc/kvm/booke_interrupts.S: Assembler messages: > arch/powerpc/kvm/booke_interrupts.S:347: Error: unsupported relocation > against VCPU_HOST_TLB > arch/powerpc/kvm/booke_interrupts.S:348: Error: unsupported relocation > against VCPU_SHADOW_TLB > make[1]: *** [arch/powerpc/kvm/booke_interrupts.o] Error 1 > > Changing it to ifdef CONFIG_KVM_POWERPC (which is a bool) seems to do > the right thing. Hmm... building as a module is something we've struggled with in the past, so I just left KVM_POWERPC as a bool because I didn't want to mess with it. With PowerPC's asm-offsets dependency, is it really possible to build a standalone module if the kernel didn't have KVM=y? -- Hollis Blanchard IBM Linux Technology Center ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/