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

Re: [RFC 1/1] xen/arm: set iommu property for IOMMU-protected devices



On Mon, 8 Nov 2021, Julien Grall wrote:
> Hi Roman,
> 
> On 04/10/2021 10:54, Roman Skakun wrote:
> > From: Roman Skakun <roman_skakun@xxxxxxxx>
> > 
> > Xen is not exposing any IOMMU properties to Dom0.
> > So Dom0 assumes that all it's devices are not protected by IOMMU.
> > 
> > To make Dom0 aware of IOMMU-protected devices, we need to mark
> > them somehow. With this approach Dom0 Linux kernel will be able
> > to selectively disable swiotlb-xen fops for them which will remove
> > unnecessary buffer bounces.
> > 
> > This patch adds mechanism to describe IOMMU-protected devices by
> > adding `xen,behind-iommu` property to relevant device nodes in
> > Dom0 device tree.
> 
> A few years ago, I attempted to disable the swiotlb when Xen configured the
> IOMMU for the device (see [1]). Did you have a chance to go through the
> thread? In particular, I think Ian Campbell suggestion about creating an IOMMU
> binding is quite interesting.
> 
> Stefano, what do you think?

Yes I think it is a good idea. In fact, thinking more about it, it is
really the best option. Regardless of the implementation (swiotlb or
whatever) the device tree description is likely to look similar to the
description of an IOMMU because it is the common pattern shared by all
controllers (reset, power, clocks, etc.) so it makes sense to re-use it.

- there is one controller node (the "IOMMU")
- there is one property under each device node that is protected,
  pointing to the controller with a phandle and optional parameters (in
  the case of IOMMUs it is called "iommus")



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.