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

From: Jason Gunthorpe <[email-masked]>
Date: Mon, 25 Sep 2023 08:41:42 -0300

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<[email-masked]>
> > ---
> >   drivers/iommu/intel/iommu.c | 3 +--
> >   1 file changed, 1 insertion(+), 2 deletions(-)
> 
> Reviewed-by: Lu Baolu <[email-masked]>
> 
> 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