> -----Original Message----- > From: Andrew Cooper > Sent: 18 January 2019 17:41 > To: Paul Durrant <paul.durr...@citrix.com>; xen-devel@lists.xenproject.org > Cc: Chao Gao <chao....@intel.com>; Sander Eikelenboom > <li...@eikelenboom.it>; Jan Beulich <jbeul...@suse.com>; Wei Liu > <wei.l...@citrix.com>; Roger Pau Monne <roger....@citrix.com>; George > Dunlap <george.dun...@citrix.com>; Ian Jackson <ian.jack...@citrix.com>; > Julien Grall <julien.gr...@arm.com>; Konrad Rzeszutek Wilk > <konrad.w...@oracle.com>; Stefano Stabellini <sstabell...@kernel.org>; Tim > (Xen.org) <t...@xen.org>; Jun Nakajima <jun.nakaj...@intel.com>; Kevin Tian > <kevin.t...@intel.com> > Subject: Re: [PATCH] iommu: specify page_count rather than page_order to > iommu_map/unmap()... > > On 18/01/2019 16:03, Paul Durrant wrote: > > diff --git a/xen/include/xen/iommu.h b/xen/include/xen/iommu.h > > index cdc8021cbd..82fb86c7ff 100644 > > --- a/xen/include/xen/iommu.h > > +++ b/xen/include/xen/iommu.h > > @@ -111,17 +111,17 @@ enum > > #define IOMMU_FLUSHF_modified (1u << _IOMMU_FLUSHF_modified) > > > > int __must_check iommu_map(struct domain *d, dfn_t dfn, mfn_t mfn, > > - unsigned int page_order, unsigned int flags, > > + unsigned int page_count, unsigned int flags, > > unsigned int *flush_flags); > > I'd take the opportunity to make page_count an unsigned long, as we can > now sensibly issue a single call for an entire BAR, and some graphics > card BARs are getting to be a ludicrous size.
The 1G order is still vetoed by mmio_order (http://xenbits.xen.org/gitweb/?p=xen.git;a=blob;f=xen/arch/x86/mm/p2m.c#l2228) so the BAR limit for a single mapping operation is still going to 2M. So I think we're a way off needing a 64-bit count. > > Otherwise, LGTM and can also be fixed on commit. > Bear in mind that, if you want to move to a 64-bit count, then the flush operations should be adjusted accordingly; which is a non-trivial amount of code churn. Paul > ~Andrew _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel