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

Baolu Lu baolu.lu at linux.intel.com
Tue Sep 26 13:28:58 AEST 2023


On 9/25/23 7:41 PM, Jason Gunthorpe wrote:
> 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..

Emm, yes. The early hardware requires a real 1:1 mapped page table. The
recent implementations are no longer needed.

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

Yes. It's not trivial. Needs a separated series with some refactoring
efforts.

Best regards,
baolu


More information about the Linuxppc-dev mailing list