• Jean-Philippe Brucker's avatar
    iommu/arm-smmu-v3: Link domains and devices · 2a7e62f5
    Jean-Philippe Brucker authored
    When removing a mapping from a domain, we need to send an invalidation to
    all devices that might have stored it in their Address Translation Cache
    (ATC). In addition when updating the context descriptor of a live domain,
    we'll need to send invalidations for all devices attached to it.
    
    Maintain a list of devices in each domain, protected by a spinlock. It is
    updated every time we attach or detach devices to and from domains.
    
    It needs to be a spinlock because we'll invalidate ATC entries from
    within hardirq-safe contexts, but it may be possible to relax the read
    side with RCU later.
    Signed-off-by: default avatarJean-Philippe Brucker <jean-philippe.brucker@arm.com>
    Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
    2a7e62f5
arm-smmu-v3.c 76 KB