lkml.org 
[lkml]   [2022]   [May]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 2/5] iommu: Add blocking_domain_ops field in iommu_ops
From
Hi Robin,

On 2022/5/16 19:22, Robin Murphy wrote:
> On 2022-05-16 02:57, Lu Baolu wrote:
>> Each IOMMU driver must provide a blocking domain ops. If the hardware
>> supports detaching domain from device, setting blocking domain equals
>> detaching the existing domain from the deivce. Otherwise, an UNMANAGED
>> domain without any mapping will be used instead.
>
> Unfortunately that's backwards - most of the implementations of
> .detach_dev are disabling translation entirely, meaning the device ends
> up effectively in passthrough rather than blocked. Conversely, at least
> arm-smmu and arm-smmu-v3 could implement IOMMU_DOMAIN_BLOCKED properly
> with fault-type S2CRs and STEs respectively, it just needs a bit of
> wiring up.

Thank you for letting me know this.

This means that we need to add an additional UNMANAGED domain for each
iommu group, although it is not used most of the time. If most IOMMU
drivers could implement real dumb blocking domains, this burden may be
reduced.

Best regards,
baolu

\
 
 \ /
  Last update: 2022-05-16 15:44    [W:0.447 / U:0.216 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site