> -----Original Message-----
> From: kvm-ppc-ow...@vger.kernel.org 
> [mailto:kvm-ppc-ow...@vger.kernel.org] On Behalf Of Hollis Blanchard
> Sent: Tuesday, December 16, 2008 7:17 AM
> To: Liu Yu-B13201
> Cc: kvm-ppc@vger.kernel.org
> Subject: Re: [PATCH 07/11] "segment_map"
> 
> On Thu, 2008-12-11 at 17:11 +0800, Liu Yu wrote:
> > +/* Caller must ensure that the specified guest TLB entry is safe to
> > insert into
> > + * the shadow TLB. */
> > +/* XXX Map TLB1, for both one-one and one-to-many */
> > +static int segment_map(struct kvmppc_vcpu_e500 *vcpu_e500,
> > +               u64 gvaddr, gfn_t gfn, struct tlbe *gtlbe)
> > +{
> > +       unsigned int victim;
> > +
> > +       victim = vcpu_e500->guest_tlb_nv[1]++;
> > +
> > +       if (unlikely(vcpu_e500->guest_tlb_nv[1] >= 
> tlb1_max_shadow_size()))
> > +               vcpu_e500->guest_tlb_nv[1] = 0;
> > +
> > +       shadow_map(vcpu_e500, gvaddr, gfn, gtlbe, 1, victim);
> > +
> > +       return victim;
> > +}
> 
> Please rename this... "segment" has a very special meaning in ppc32
> MMUs, and this isn't it. :)
> 
> Also, even though this is static, it couldn't hurt to prefix it with
> "kvmppc_e500_" or something. I like doing that so people 
> unfamiliar with
> the code can tell at a glance what layer the function comes from
> (generic KVM, PowerPC KVM, regular PowerPC, BookE KVM, e500 KVM, etc).
> 
> Static functions also still show up in System.map.
> 
Fixed.
--
To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to