Linux IOMMU Development
 help / color / mirror / Atom feed
From: Yi Liu <yi.l.liu@intel.com>
To: Joao Martins <joao.m.martins@oracle.com>, <iommu@lists.linux.dev>
Cc: Jason Gunthorpe <jgg@nvidia.com>,
	Kevin Tian <kevin.tian@intel.com>,
	Shameerali Kolothum Thodi <shameerali.kolothum.thodi@huawei.com>,
	Lu Baolu <baolu.lu@linux.intel.com>,
	Yi Y Sun <yi.y.sun@intel.com>, Nicolin Chen <nicolinc@nvidia.com>,
	Joerg Roedel <joro@8bytes.org>,
	Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>,
	Will Deacon <will@kernel.org>,
	Robin Murphy <robin.murphy@arm.com>,
	Zhenzhong Duan <zhenzhong.duan@intel.com>,
	"Alex Williamson" <alex.williamson@redhat.com>,
	<kvm@vger.kernel.org>
Subject: Re: [PATCH v5 12/18] iommu/intel: Access/Dirty bit support for SL domains
Date: Tue, 24 Oct 2023 21:51:35 +0800	[thread overview]
Message-ID: <d24d7ca6-4ff3-492f-9492-e830c4180057@intel.com> (raw)
In-Reply-To: <61c0fbad-b441-4a8b-968e-c3c36f18e8bd@oracle.com>

On 2023/10/24 20:52, Joao Martins wrote:
> On 24/10/2023 13:42, Joao Martins wrote:
>> On 24/10/2023 13:34, Yi Liu wrote:
>>> On 2023/10/21 06:27, Joao Martins wrote:
>>>> ---
>>>>    drivers/iommu/intel/Kconfig |   1 +
>>>>    drivers/iommu/intel/iommu.c | 104 +++++++++++++++++++++++++++++++++-
>>>>    drivers/iommu/intel/iommu.h |  17 ++++++
>>>>    drivers/iommu/intel/pasid.c | 108 ++++++++++++++++++++++++++++++++++++
>>>>    drivers/iommu/intel/pasid.h |   4 ++
>>>>    5 files changed, 233 insertions(+), 1 deletion(-)
>>>
>>> normally, the subject of commits to intel iommu driver is started
>>> with 'iommu/vt-d'. So if there is a new version, please rename it.
>>> Also, SL is a bit eld naming, please use SS (second stage)
>>>
>>> s/iommu/intel: Access/Dirty bit support for SL domains/iommu/vt-d: Access/Dirty
>>> bit support for SS domains
>>>
>> OK
>>
> FYI, this is what I have staged in:

sure.

> Subject: iommu/vt-d: Access/Dirty bit support for SS domains
> 
> diff --git a/drivers/iommu/intel/iommu.c b/drivers/iommu/intel/iommu.c
> index 4e25faf573de..eb92a201cc0b 100644
> --- a/drivers/iommu/intel/iommu.c
> +++ b/drivers/iommu/intel/iommu.c
> @@ -4094,7 +4094,7 @@ intel_iommu_domain_alloc_user(struct device *dev, u32 flags)
>                  return ERR_PTR(-EOPNOTSUPP);
> 
>          dirty_tracking = (flags & IOMMU_HWPT_ALLOC_DIRTY_TRACKING);
> -       if (dirty_tracking && !slads_supported(iommu))
> +       if (dirty_tracking && !ssads_supported(iommu))
>                  return ERR_PTR(-EOPNOTSUPP);
> 
>          /*
> @@ -4137,7 +4137,7 @@ static int prepare_domain_attach_device(struct
> iommu_domain *domain,
>          if (dmar_domain->force_snooping && !ecap_sc_support(iommu->ecap))
>                  return -EINVAL;
> 
> -       if (domain->dirty_ops && !slads_supported(iommu))
> +       if (domain->dirty_ops && !ssads_supported(iommu))
>                  return -EINVAL;
> 
>          /* check if this iommu agaw is sufficient for max mapped address */
> @@ -4395,7 +4395,7 @@ static bool intel_iommu_capable(struct device *dev, enum
> iommu_cap cap)
>          case IOMMU_CAP_ENFORCE_CACHE_COHERENCY:
>                  return ecap_sc_support(info->iommu->ecap);
>          case IOMMU_CAP_DIRTY_TRACKING:
> -               return slads_supported(info->iommu);
> +               return ssads_supported(info->iommu);
>          default:
>                  return false;
>          }
> diff --git a/drivers/iommu/intel/iommu.h b/drivers/iommu/intel/iommu.h
> index 27bcfd3bacdd..3bb569146229 100644
> --- a/drivers/iommu/intel/iommu.h
> +++ b/drivers/iommu/intel/iommu.h
> @@ -542,10 +542,9 @@ enum {
>   #define sm_supported(iommu)    (intel_iommu_sm && ecap_smts((iommu)->ecap))
>   #define pasid_supported(iommu) (sm_supported(iommu) &&                 \
>                                   ecap_pasid((iommu)->ecap))
> -#define slads_supported(iommu) (sm_supported(iommu) &&                 \
> +#define ssads_supported(iommu) (sm_supported(iommu) &&                 \
>                                  ecap_slads((iommu)->ecap))
> 
> -
>   struct pasid_entry;
>   struct pasid_state_entry;
>   struct page_req_dsc;

-- 
Regards,
Yi Liu

  reply	other threads:[~2023-10-24 13:49 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-20 22:27 [PATCH v5 00/18] IOMMUFD Dirty Tracking Joao Martins
2023-10-20 22:27 ` [PATCH v5 01/18] vfio/iova_bitmap: Export more API symbols Joao Martins
2023-10-20 22:27 ` [PATCH v5 02/18] vfio: Move iova_bitmap into iommufd Joao Martins
2023-10-20 22:27 ` [PATCH v5 03/18] iommufd/iova_bitmap: Move symbols to IOMMUFD namespace Joao Martins
2023-10-20 22:27 ` [PATCH v5 04/18] iommu: Add iommu_domain ops for dirty tracking Joao Martins
2023-10-20 22:27 ` [PATCH v5 05/18] iommufd: Add a flag to enforce dirty tracking on attach Joao Martins
2023-10-20 22:27 ` [PATCH v5 06/18] iommufd: Add IOMMU_HWPT_SET_DIRTY_TRACKING Joao Martins
2023-10-20 22:27 ` [PATCH v5 07/18] iommufd: Add IOMMU_HWPT_GET_DIRTY_BITMAP Joao Martins
2023-10-23  9:09   ` Arnd Bergmann
2023-10-23  9:28     ` Joao Martins
2023-10-23 12:10       ` Jason Gunthorpe
2023-10-23 12:41         ` Arnd Bergmann
2023-10-23 15:56           ` Joao Martins
2023-10-23 16:16             ` Jason Gunthorpe
2023-10-23 16:31               ` Joao Martins
2023-10-23 16:34                 ` Jason Gunthorpe
2023-10-23 17:55                   ` Joao Martins
2023-10-23 18:08                     ` Jason Gunthorpe
2023-10-20 22:27 ` [PATCH v5 08/18] iommufd: Add capabilities to IOMMU_GET_HW_INFO Joao Martins
2023-10-20 22:27 ` [PATCH v5 09/18] iommufd: Add a flag to skip clearing of IOPTE dirty Joao Martins
2023-10-20 22:27 ` [PATCH v5 10/18] iommu/amd: Add domain_alloc_user based domain allocation Joao Martins
2023-10-20 22:27 ` [PATCH v5 11/18] iommu/amd: Access/Dirty bit support in IOPTEs Joao Martins
2023-10-20 22:27 ` [PATCH v5 12/18] iommu/intel: Access/Dirty bit support for SL domains Joao Martins
2023-10-24 12:34   ` Yi Liu
2023-10-24 12:42     ` Joao Martins
2023-10-24 12:52       ` Joao Martins
2023-10-24 13:51         ` Yi Liu [this message]
2023-10-20 22:27 ` [PATCH v5 13/18] iommufd/selftest: Expand mock_domain with dev_flags Joao Martins
2023-10-20 22:28 ` [PATCH v5 14/18] iommufd/selftest: Test IOMMU_HWPT_ALLOC_DIRTY_TRACKING Joao Martins
2023-10-20 22:28 ` [PATCH v5 15/18] iommufd/selftest: Test IOMMU_HWPT_SET_DIRTY_TRACKING Joao Martins
2023-10-20 22:28 ` [PATCH v5 16/18] iommufd/selftest: Test IOMMU_HWPT_GET_DIRTY_BITMAP Joao Martins
2023-10-23 20:08   ` Nicolin Chen
2023-10-23 20:15     ` Joao Martins
2023-10-23 20:37       ` Nicolin Chen
2023-10-23 20:50         ` Joao Martins
2023-10-23 21:46           ` Joao Martins
2023-10-23 21:56             ` Nicolin Chen
2023-10-20 22:28 ` [PATCH v5 17/18] iommufd/selftest: Test out_capabilities in IOMMU_GET_HW_INFO Joao Martins
2023-10-20 22:28 ` [PATCH v5 18/18] iommufd/selftest: Test IOMMU_HWPT_GET_DIRTY_BITMAP_NO_CLEAR flag Joao Martins
2023-10-21 16:23 ` [PATCH v5 00/18] IOMMUFD Dirty Tracking Jason Gunthorpe
2023-10-23  1:36   ` Nicolin Chen
2023-10-23  9:15     ` Joao Martins
2023-10-23 11:49       ` Joao Martins
2023-10-23 13:24         ` Jason Gunthorpe
2023-10-23 18:12         ` Nicolin Chen
2023-10-23 18:21           ` Joao Martins
2023-10-23 18:32             ` Nicolin Chen
2023-10-23 18:52               ` Joao Martins
2023-10-23 18:10       ` Nicolin Chen
2023-10-23 18:20         ` Joao Martins

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d24d7ca6-4ff3-492f-9492-e830c4180057@intel.com \
    --to=yi.l.liu@intel.com \
    --cc=alex.williamson@redhat.com \
    --cc=baolu.lu@linux.intel.com \
    --cc=iommu@lists.linux.dev \
    --cc=jgg@nvidia.com \
    --cc=joao.m.martins@oracle.com \
    --cc=joro@8bytes.org \
    --cc=kevin.tian@intel.com \
    --cc=kvm@vger.kernel.org \
    --cc=nicolinc@nvidia.com \
    --cc=robin.murphy@arm.com \
    --cc=shameerali.kolothum.thodi@huawei.com \
    --cc=suravee.suthikulpanit@amd.com \
    --cc=will@kernel.org \
    --cc=yi.y.sun@intel.com \
    --cc=zhenzhong.duan@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox