> -----Original Message-----
> From: Tian, Kevin [mailto:kevin.t...@intel.com]
> Sent: 07 August 2018 04:41
> To: Paul Durrant <paul.durr...@citrix.com>; xen-devel@lists.xenproject.org
> Cc: Stefano Stabellini <sstabell...@kernel.org>; Julien Grall
> <julien.gr...@arm.com>; Andrew Cooper <andrew.coop...@citrix.com>;
> George Dunlap <george.dun...@citrix.com>; Ian Jackson
> <ian.jack...@citrix.com>; Jan Beulich <jbeul...@suse.com>; Konrad
> Rzeszutek Wilk <konrad.w...@oracle.com>; Tim (Xen.org) <t...@xen.org>;
> Wei Liu <wei.l...@citrix.com>; Tamas K Lengyel <ta...@tklengyel.com>;
> George Dunlap <george.dun...@citrix.com>; Nakajima, Jun
> <jun.nakaj...@intel.com>; Razvan Cojocaru <rcojoc...@bitdefender.com>;
> Suravee Suthikulpanit <suravee.suthikulpa...@amd.com>; Brian Woods
> <brian.wo...@amd.com>
> Subject: RE: [PATCH v5 11/15] mm / iommu: split need_iommu() into
> has_iommu_pt() and sync_iommu_pt()
> 
> > From: Paul Durrant [mailto:paul.durr...@citrix.com]
> > Sent: Saturday, August 4, 2018 1:22 AM
> >
> > The name 'need_iommu' is a little confusing as it suggests a domain needs
> > to use the IOMMU but something might not be set up yet, when in fact it
> > doesn't become true until IOMMU mappings for the domain have been
> > created.
> >
> > Two different meanings are also inferred from it in various places in the
> > code:
> >
> > - Some callers want to test whether a domain has IOMMU mappings
> > - Some callers want to test whether they need to synchronize the domain's
> >   P2M and IOMMU mappings
> >
> > This patch therefore creates two new boolean flags, 'has_iommu_pt' and
> > 'sync_iommu_pt' to convey those meanings separately and creates the
> > corresponding macros. All callers of need_iommu() are then modified to
> > use the macro appropriate to what they are trying to test.
> 
> sync_iommu_pt sounds like an operation. what about need_sync_iommu?
> 
> and for has_iommu_pt, what about iommu_enabled where 'enabled'
> implies page table created?

I could do 'need_iommu_pt_sync', perhaps, but 'iommu_enabled' will clash with 
the global host flag which is why I went with 'has_iommu_pt'.

  Paul

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

Reply via email to