From: Joao Martins <joao.m.martins@oracle.com>
To: Yi Liu <yi.l.liu@intel.com>
Cc: alex.williamson@redhat.com, robin.murphy@arm.com,
eric.auger@redhat.com, nicolinc@nvidia.com, kvm@vger.kernel.org,
chao.p.peng@linux.intel.com, yi.y.sun@linux.intel.com,
iommu@lists.linux.dev, linux-kernel@vger.kernel.org,
linux-kselftest@vger.kernel.org, zhenzhong.duan@intel.com,
jgg@nvidia.com, joro@8bytes.org, kevin.tian@intel.com,
baolu.lu@linux.intel.com
Subject: Re: [PATCH] iommu/vt-d: Set SSADE when attaching to a parent with dirty tracking
Date: Thu, 8 Feb 2024 10:31:36 +0000 [thread overview]
Message-ID: <a945cd6c-7737-4d66-a319-613e1dbc3798@oracle.com> (raw)
In-Reply-To: <20240208091414.28133-1-yi.l.liu@intel.com>
On 08/02/2024 09:14, Yi Liu wrote:
> Should set the SSADE (Second Stage Access/Dirty bit Enable) bit of the
> pasid entry when attaching a device to a nested domain if its parent
> has already enabled dirty tracking.
>
> Fixes: 111bf85c68f6 ("iommu/vt-d: Add helper to setup pasid nested translation")
> Signed-off-by: Yi Liu <yi.l.liu@intel.com>
Reviewed-by: Joao Martins <joao.m.martins@oracle.com>
> ---
> base commit: 547ab8fc4cb04a1a6b34377dd8fad34cd2c8a8e3
> ---
> drivers/iommu/intel/pasid.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/iommu/intel/pasid.c b/drivers/iommu/intel/pasid.c
> index 3239cefa4c33..9be24bb762cf 100644
> --- a/drivers/iommu/intel/pasid.c
> +++ b/drivers/iommu/intel/pasid.c
> @@ -658,6 +658,8 @@ int intel_pasid_setup_nested(struct intel_iommu *iommu, struct device *dev,
> pasid_set_domain_id(pte, did);
> pasid_set_address_width(pte, s2_domain->agaw);
> pasid_set_page_snoop(pte, !!ecap_smpwc(iommu->ecap));
> + if (s2_domain->dirty_tracking)
> + pasid_set_ssade(pte);
> pasid_set_translation_type(pte, PASID_ENTRY_PGTT_NESTED);
> pasid_set_present(pte);
> spin_unlock(&iommu->lock);
next prev parent reply other threads:[~2024-02-08 10:32 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-08 9:14 Yi Liu
2024-02-08 10:31 ` Joao Martins [this message]
2024-02-09 10:36 ` Joao Martins
2024-02-19 0:40 ` Tian, Kevin
2024-02-09 2:40 ` Baolu Lu
2024-02-09 9:05 ` 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=a945cd6c-7737-4d66-a319-613e1dbc3798@oracle.com \
--to=joao.m.martins@oracle.com \
--cc=alex.williamson@redhat.com \
--cc=baolu.lu@linux.intel.com \
--cc=chao.p.peng@linux.intel.com \
--cc=eric.auger@redhat.com \
--cc=iommu@lists.linux.dev \
--cc=jgg@nvidia.com \
--cc=joro@8bytes.org \
--cc=kevin.tian@intel.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=nicolinc@nvidia.com \
--cc=robin.murphy@arm.com \
--cc=yi.l.liu@intel.com \
--cc=yi.y.sun@linux.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
all inboxes | Powered by JetHome®