[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v6 09/14] mm / iommu: include need_iommu() test in iommu_use_hap_pt()



> -----Original Message-----
> From: Tian, Kevin [mailto:kevin.tian@xxxxxxxxx]
> Sent: 13 September 2018 07:24
> To: Jan Beulich <JBeulich@xxxxxxxx>; Paul Durrant
> <Paul.Durrant@xxxxxxxxxx>
> Cc: Suravee Suthikulpanit <suravee.suthikulpanit@xxxxxxx>; Julien Grall
> <julien.grall@xxxxxxx>; Andrew Cooper <Andrew.Cooper3@xxxxxxxxxx>;
> George Dunlap <George.Dunlap@xxxxxxxxxx>; Nakajima, Jun
> <jun.nakajima@xxxxxxxxx>; Stefano Stabellini <sstabellini@xxxxxxxxxx>; xen-
> devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
> Subject: RE: [PATCH v6 09/14] mm / iommu: include need_iommu() test in
> iommu_use_hap_pt()
> 
> > From: Jan Beulich [mailto:JBeulich@xxxxxxxx]
> > Sent: Tuesday, September 11, 2018 5:48 PM
> >
> > >>> On 11.09.18 at 11:39, <Paul.Durrant@xxxxxxxxxx> wrote:
> > >>  -----Original Message-----
> > >> From: Jan Beulich [mailto:JBeulich@xxxxxxxx]
> > >> Sent: 07 September 2018 12:20
> > >> To: Paul Durrant <Paul.Durrant@xxxxxxxxxx>
> > >> Cc: Julien Grall <julien.grall@xxxxxxx>; Andrew Cooper
> > >> <Andrew.Cooper3@xxxxxxxxxx>; George Dunlap
> > >> <George.Dunlap@xxxxxxxxxx>; Jun Nakajima
> <jun.nakajima@xxxxxxxxx>;
> > >> Stefano Stabellini <sstabellini@xxxxxxxxxx>; xen-devel <xen-
> > >> devel@xxxxxxxxxxxxxxxxxxxx>
> > >> Subject: Re: [PATCH v6 09/14] mm / iommu: include need_iommu() test
> > in
> > >> iommu_use_hap_pt()
> > >>
> > >> >>> On 23.08.18 at 11:47, <paul.durrant@xxxxxxxxxx> wrote:
> > >> > The name 'iommu_use_hap_pt' suggests that that P2M table is in use
> > as
> > >> the
> > >> > domain's IOMMU pagetable which, prior to this patch, is not strictly
> > true
> > >> > since the macro did not test whether the domain actually has IOMMU
> > >> > mappings.
> > >>
> > >> Hmm, I would never have implied "has IOMMU mappings" from this
> > >> variable name. To me it has always been "use HAP page tables for
> > >> IOMMU if an IOMMU is in use". The code change looks sane, but
> > >> I'm not sure it is a clear improvement. Hence I wonder whether you
> > >> have a need for this change in subsequent patches which goes
> > >> beyond what you say above.
> > >>
> > >
> > > I could take it out but it would mean a non-trivial rebase, and to me - if
> > > true - the name sill implies the IOMMU is in use for the domain so I'd 
> > > like
> > to
> > > keep the change.
> >
> > Let's broaden the Cc list a little - perhaps we can get further opinions 
> > this
> > way.
> >
> 
> the previous definition checks hap_enabled:
> 
> -#define iommu_use_hap_pt(d) (hap_enabled(d) &&
> iommu_hap_pt_share)
> 
> if following Jan's way it should be "use HAP page tables for IOMMU if an
> IOMMU is in use and HAP is enabled", then hap_enabled should be moved
> out too.
> 
> including iommu check in the macro looks more consistent.
> 

Thanks. I'll keep this patch.

  Paul

> Thanks
> Kevin

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.