From mboxrd@z Thu Jan 1 00:00:00 1970 From: Benjamin Herrenschmidt Date: Tue, 13 Mar 2012 20:09:43 +0000 Subject: Re: [PATCH] kvm/book3s: Make kernel emulated H_PUT_TCE available for "PR" KVM Message-Id: <1331669383.3105.106.camel@pasglop> List-Id: References: <1331606985.3105.93.camel@pasglop> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Alexander Graf Cc: kvm-ppc@vger.kernel.org, David Gibson , "kvm@vger.kernel.org list" On Tue, 2012-03-13 at 14:47 +0100, Alexander Graf wrote: > > +++ b/arch/powerpc/include/asm/kvm_host.h > > @@ -183,10 +183,14 @@ struct kvm_arch { > > unsigned long lpcr; > > unsigned long rmor; > > struct kvmppc_rma_info *rma; > > - struct list_head spapr_tce_tables; > > unsigned short last_vcpu[NR_CPUS]; > > struct kvmppc_vcore *vcores[KVM_MAX_VCORES]; > > + struct list_head spapr_tce_tables; > > #endif /* CONFIG_KVM_BOOK3S_64_HV */ > > + > > +#ifdef CONFIG_KVM_BOOK3S_64_PR > > + struct list_head spapr_tce_tables; > > +#endif /* CONFIG_KVM_BOOK3S_64_PR */ > > Please move the definition to an #ifdef on CONFIG_KVM_BOOK3S_64. That way we get rid of the duplication here. I did that initially but that doesn't work when it's a module, as CONFIG_KVM_BOOK3S_64 is "m" in Kconfig and thus not defined as such but CONFIG_KVM_BOOK3S_64_MODULE is) Maybe we should change the way our Kconfig is organized but I din't feel like doing so yesterday :-) > Could you please enable rename support in git format-patch? This way it's > really hard to see what you changed between the 2 files - if anything. I thought I had, I'll dbl check. There was no code change, just moves, the original file only had the one small function in it and I moved over the rest from book3s_hv.c > > -#ifdef CONFIG_KVM_BOOK3S_64_HV > > +#if defined(CONFIG_KVM_BOOK3S_64_PR) || defined(CONFIG_KVM_BOOK3S_64_HV) > > CONFIG_KVM_BOOK3S_64 Breaks modules. > Otherwise a nice patch - thanks a lot for tackling this :). Also, please always CC kvm@vger in > addition to kvm-ppc@vger, so Avi can't complain that he didn't see the patch earlier ;). Heh ok. Cheers, Ben. From mboxrd@z Thu Jan 1 00:00:00 1970 From: Benjamin Herrenschmidt Subject: Re: [PATCH] kvm/book3s: Make kernel emulated H_PUT_TCE available for "PR" KVM Date: Wed, 14 Mar 2012 07:09:43 +1100 Message-ID: <1331669383.3105.106.camel@pasglop> References: <1331606985.3105.93.camel@pasglop> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Cc: kvm-ppc@vger.kernel.org, David Gibson , "kvm@vger.kernel.org list" To: Alexander Graf Return-path: Received: from gate.crashing.org ([63.228.1.57]:56419 "EHLO gate.crashing.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752571Ab2CMUJ7 (ORCPT ); Tue, 13 Mar 2012 16:09:59 -0400 In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: On Tue, 2012-03-13 at 14:47 +0100, Alexander Graf wrote: > > +++ b/arch/powerpc/include/asm/kvm_host.h > > @@ -183,10 +183,14 @@ struct kvm_arch { > > unsigned long lpcr; > > unsigned long rmor; > > struct kvmppc_rma_info *rma; > > - struct list_head spapr_tce_tables; > > unsigned short last_vcpu[NR_CPUS]; > > struct kvmppc_vcore *vcores[KVM_MAX_VCORES]; > > + struct list_head spapr_tce_tables; > > #endif /* CONFIG_KVM_BOOK3S_64_HV */ > > + > > +#ifdef CONFIG_KVM_BOOK3S_64_PR > > + struct list_head spapr_tce_tables; > > +#endif /* CONFIG_KVM_BOOK3S_64_PR */ > > Please move the definition to an #ifdef on CONFIG_KVM_BOOK3S_64. That way we get rid of the duplication here. I did that initially but that doesn't work when it's a module, as CONFIG_KVM_BOOK3S_64 is "m" in Kconfig and thus not defined as such but CONFIG_KVM_BOOK3S_64_MODULE is) Maybe we should change the way our Kconfig is organized but I din't feel like doing so yesterday :-) > Could you please enable rename support in git format-patch? This way it's > really hard to see what you changed between the 2 files - if anything. I thought I had, I'll dbl check. There was no code change, just moves, the original file only had the one small function in it and I moved over the rest from book3s_hv.c > > -#ifdef CONFIG_KVM_BOOK3S_64_HV > > +#if defined(CONFIG_KVM_BOOK3S_64_PR) || defined(CONFIG_KVM_BOOK3S_64_HV) > > CONFIG_KVM_BOOK3S_64 Breaks modules. > Otherwise a nice patch - thanks a lot for tackling this :). Also, please always CC kvm@vger in > addition to kvm-ppc@vger, so Avi can't complain that he didn't see the patch earlier ;). Heh ok. Cheers, Ben.