From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bharata B Rao Date: Tue, 14 Jul 2020 05:43:22 +0000 Subject: Re: [RFC PATCH v0 2/2] KVM: PPC: Book3S HV: Use H_RPT_INVALIDATE in nested KVM Message-Id: <20200714053122.GI7902@in.ibm.com> List-Id: References: <20200703104420.21349-1-bharata@linux.ibm.com> <20200703104420.21349-3-bharata@linux.ibm.com> <20200709051803.GC2822576@thinks.paulus.ozlabs.org> <20200709090851.GD7902@in.ibm.com> <20200709100711.GA2961345@thinks.paulus.ozlabs.org> In-Reply-To: <20200709100711.GA2961345@thinks.paulus.ozlabs.org> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Paul Mackerras Cc: aneesh.kumar@linux.ibm.com, linuxppc-dev@lists.ozlabs.org, npiggin@gmail.com, kvm-ppc@vger.kernel.org On Thu, Jul 09, 2020 at 08:07:11PM +1000, Paul Mackerras wrote: > On Thu, Jul 09, 2020 at 02:38:51PM +0530, Bharata B Rao wrote: > > On Thu, Jul 09, 2020 at 03:18:03PM +1000, Paul Mackerras wrote: > > > On Fri, Jul 03, 2020 at 04:14:20PM +0530, Bharata B Rao wrote: > > > > In the nested KVM case, replace H_TLB_INVALIDATE by the new hcall > > > > H_RPT_INVALIDATE if available. The availability of this hcall > > > > is determined from "hcall-rpt-invalidate" string in ibm,hypertas-functions > > > > DT property. > > > > > > What are we going to use when nested KVM supports HPT guests at L2? > > > L1 will need to do partition-scoped tlbies with R=0 via a hypercall, > > > but H_RPT_INVALIDATE says in its name that it only handles radix > > > page tables (i.e. R=1). > > > > For L2 HPT guests, the old hcall is expected to work after it adds > > support for R=0 case? > > That was the plan. > > > The new hcall should be advertised via ibm,hypertas-functions only > > for radix guests I suppose. > > Well, the L1 hypervisor is a radix guest of L0, so it would have > H_RPT_INVALIDATE available to it? > > I guess the question is whether H_RPT_INVALIDATE is supposed to do > everything, that is, radix process-scoped invalidations, radix > partition-scoped invalidations, and HPT partition-scoped > invalidations. If that is the plan then we should call it something > different. Guess we are bit late now to rename it and include HPT in the scope. > > This patchset seems to imply that H_RPT_INVALIDATE is at least going > to be used for radix partition-scoped invalidations as well as radix > process-scoped invalidations. If you are thinking that in future when > we need HPT partition-scoped invalidations for a radix L1 hypervisor > running a HPT L2 guest, we are going to define a new hypercall for > that, I suppose that is OK, though it doesn't really seem necessary. Guess a new hcall would be the way forward to cover the HPT L2 guest requirements. Thanks for pointing this out. Regards, Bharata.