lkml.org 
[lkml]   [2022]   [Jan]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [PATCH 7/7] iommu: Add iommu_domain::domain_ops
    From
    Date
    On 1/24/22 5:58 PM, Tian, Kevin wrote:
    >> From: Lu Baolu <baolu.lu@linux.intel.com>
    >> Sent: Monday, January 24, 2022 3:11 PM
    >> +/**
    >> + * struct domain_ops - per-domain ops
    >> + * @attach_dev: attach an iommu domain to a device
    >> + * @detach_dev: detach an iommu domain from a device
    >
    > What is the criteria about whether an op should be iommu_ops or domain_ops
    > when it requires both domain and device pointers like above two (and future
    > PASID-based attach)?

    Generally ops belong to iommu_ops if they are only device oriented, and
    domain_ops if they are only domain oriented. But it's really hard to
    judge when both device and domain are involved. Good question. :-)

    Perhaps we should leave the attach/detach interfaces in iommu_ops since
    they are related to device capabilities. For example, some devices
    support attach_dev_pasid, while others not.

    >
    > Other examples include:
    > @apply_resv_region

    This will be deprecated.

    > @is_attach_deferred

    Should be at least device centric (domain doesn't play any role here).
    Further step is to save the is_attach_deferred at a flag in dev_iommu
    and remove the ops (as Robin suggested).

    >
    > Thanks
    > Kevin
    >

    Best regards,
    baolu

    \
     
     \ /
      Last update: 2022-01-25 06:22    [W:4.357 / U:0.008 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site