[PATCH] vfio: enabled and supported on power (v7)
Alex Williamson
alex.williamson at redhat.com
Fri Sep 14 08:55:26 EST 2012
On Thu, 2012-09-13 at 17:41 -0500, Scott Wood wrote:
> On Thu, Sep 13, 2012 at 04:34:59PM -0600, Alex Williamson wrote:
> > Do you only want VFIO drivers to work on POWER if they're written by
> > POWER people? Ideally there are a few simple concepts: a) devices have
> > an I/O virtual address space. On x86 we call this the iova and it's
> > effectively a zero-based, 64bit (not really, but close enough) address
> > space. You seem to have two smaller windows, one in 32bit space,
> > another in 64bit space (maybe we could name these more consistently).
> > b) Userspace has a buffer that they want to map and unmap to an iova,
> > potentially with some access flags. That's all you need to know to use
> > the x86 _type1 VFIO IOMMU API. Why do I need to know about H_PUT_TCE to
> > use this interface? Let's assume there might be some VFIO drivers some
> > day that aren't written by POWER people. Thanks,
>
> I'm not familiar with the POWER IOMMU, but certainly with our chips it
> would help allow generic drivers to work if there were a type of mapping
> operation where the IOMMU driver decides the IOVA and returns it, instead
> of the driver trying to choose the IOVA with no knowledge of the IOMMU's
> constraints.
That sounds reasonable to me. If we had IOMMU API support for that in
the kernel on x86, it would only take an ALLOC_IOVA flag in the MAP
ioctl, returning the iova in the mapping structure, and the addition of
a capability to let userspace know it's there. Thanks,
Alex
More information about the Linuxppc-dev
mailing list