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

Re: [Xen-devel] [PATCH 4/7] vtd: add lookup_page method to iommu_ops



> -----Original Message-----
> From: Jan Beulich [mailto:JBeulich@xxxxxxxx]
> Sent: 16 March 2018 10:29
> To: Paul Durrant <Paul.Durrant@xxxxxxxxxx>
> Cc: Kevin Tian <kevin.tian@xxxxxxxxx>; xen-devel@xxxxxxxxxxxxxxxxxxxx
> Subject: RE: [PATCH 4/7] vtd: add lookup_page method to iommu_ops
> 
> >>> On 16.03.18 at 11:19, <Paul.Durrant@xxxxxxxxxx> wrote:
> >> From: Jan Beulich [mailto:JBeulich@xxxxxxxx]
> >> Sent: 15 March 2018 16:54
> >>
> >> >>> On 12.02.18 at 11:47, <paul.durrant@xxxxxxxxxx> wrote:
> >> > This patch adds a new method to the VT-d IOMMU implementation to
> find
> >> the
> >> > MFN currently mapped by the specified BFN. This functionality will be
> used
> >> > by a subsequent patch.
> >>
> >> How come this is VT-d only? The same is going to be needed at least
> >> for the AMD IOMMU. And if you don't do it for ARM, then the hook
> >> should be x86-specific for the time being.
> >
> > I only have VT-d h/w to test on so it seemed prudent to keep it limited to
> > that. I did look at doing a speculative implementation for AMD but it was
> not
> > sufficiently obvious to give me confidence.
> > I don't see any particular reason to keep the hook arch specific though...
> > it would just create code churn later, assuming someone wants to do PV-
> IOMMU
> > for ARM.
> 
> Well, the primary concern - as you're certainly aware - is the
> dangling NULL pointer resulting from the lack of those other
> implementations.
> 

Sure. One of the changes I was going to make was to the definitions of 
iommu_map_page() and iommu_unmap_page() (in passthrough/iommu.c). I'll try to 
make them more useful by removing the in-built domain_crash() (pushing that out 
to the callers in the p2m and grant code as appropriate) and then add an 
iommu_lookup_page() that checks the op's existence before attempting to call it.

  Paul

> Jan


_______________________________________________
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®.