[PATCH 3/8] iommu/vt-d: Use ops->blocked_domain

Jason Gunthorpe jgg at nvidia.com
Mon Sep 25 04:41:42 PDT 2023


On Mon, Sep 25, 2023 at 10:29:52AM +0800, Baolu Lu wrote:
> On 9/23/23 1:07 AM, Jason Gunthorpe wrote:
> > Trivially migrate to the ops->blocked_domain for the existing global
> > static.
> > 
> > Signed-off-by: Jason Gunthorpe<jgg at nvidia.com>
> > ---
> >   drivers/iommu/intel/iommu.c | 3 +--
> >   1 file changed, 1 insertion(+), 2 deletions(-)
> 
> Reviewed-by: Lu Baolu <baolu.lu at linux.intel.com>
> 
> P.S. We can further do the same thing to the identity domain. I will
> clean it up after all patches are landed.

I looked at that, and it is not trivial..

Both the Intel and virtio-iommu drivers create an "identity" domain
out of a paging domain and pass that off as a true "identity"
domain. So neither can set the global static since the determination
is at runtime..

What I was thinking about doing is consolidating that code so that the
core logic is the thing turning a paging domain into an identity
domain.

Jason



More information about the linux-arm-kernel mailing list