From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nathan Lynch Subject: Re: [kvm-ppc-devel] [RFC PATCH] KVM for PowerPC: simpler TLB handling, better page management Date: Fri, 1 Feb 2008 13:07:55 -0600 Message-ID: <20080201190754.GZ14201@localdomain> References: <1201223312.21851.21.camel@basalt> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm-ppc-devel , kvm-devel To: Hollis Blanchard Return-path: Content-Disposition: inline In-Reply-To: <1201223312.21851.21.camel@basalt> 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 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. ------------------------------------------------------------------------- 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/