> -----Original Message----- > From: Tian, Kevin [mailto:kevin.t...@intel.com] > Sent: 13 September 2018 07:24 > To: Jan Beulich <jbeul...@suse.com>; Paul Durrant > <paul.durr...@citrix.com> > Cc: Suravee Suthikulpanit <suravee.suthikulpa...@amd.com>; Julien Grall > <julien.gr...@arm.com>; Andrew Cooper <andrew.coop...@citrix.com>; > George Dunlap <george.dun...@citrix.com>; Nakajima, Jun > <jun.nakaj...@intel.com>; Stefano Stabellini <sstabell...@kernel.org>; xen- > devel <xen-devel@lists.xenproject.org> > Subject: RE: [PATCH v6 09/14] mm / iommu: include need_iommu() test in > iommu_use_hap_pt() > > > From: Jan Beulich [mailto:jbeul...@suse.com] > > Sent: Tuesday, September 11, 2018 5:48 PM > > > > >>> On 11.09.18 at 11:39, <paul.durr...@citrix.com> wrote: > > >> -----Original Message----- > > >> From: Jan Beulich [mailto:jbeul...@suse.com] > > >> Sent: 07 September 2018 12:20 > > >> To: Paul Durrant <paul.durr...@citrix.com> > > >> Cc: Julien Grall <julien.gr...@arm.com>; Andrew Cooper > > >> <andrew.coop...@citrix.com>; George Dunlap > > >> <george.dun...@citrix.com>; Jun Nakajima > <jun.nakaj...@intel.com>; > > >> Stefano Stabellini <sstabell...@kernel.org>; xen-devel <xen- > > >> de...@lists.xenproject.org> > > >> 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.durr...@citrix.com> 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@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel