From: Jean-Philippe Brucker <jean-philippe@linaro.org>
To: Krishna Reddy <vdumpa@nvidia.com>
Cc: Sachin Nikam <Snikam@nvidia.com>,
"fenghua.yu@intel.com" <fenghua.yu@intel.com>,
Terje Bergstrom <tbergstrom@nvidia.com>,
Nate Watterson <nwatterson@nvidia.com>,
"will@kernel.org" <will@kernel.org>,
"catalin.marinas@arm.com" <catalin.marinas@arm.com>,
Alistair Popple <apopple@nvidia.com>,
Yu-Huan Hsu <YHsu@nvidia.com>,
Pritesh Raithatha <praithatha@nvidia.com>,
Vikram Sethi <vsethi@nvidia.com>,
"linux-mm@kvack.org" <linux-mm@kvack.org>,
"iommu@lists.linux-foundation.org"
<iommu@lists.linux-foundation.org>,
Nicolin Chen <nicolinc@nvidia.com>,
Jason Gunthorpe <jgg@nvidia.com>,
"zhangfei.gao@linaro.org" <zhangfei.gao@linaro.org>,
"robin.murphy@arm.com" <robin.murphy@arm.com>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH v10 11/13] iommu/arm-smmu-v3: Add SVA device feature
Date: Wed, 6 Jan 2021 11:09:42 +0100 [thread overview]
Message-ID: <X/WMZgVFs0F2H0vy@myrica> (raw)
In-Reply-To: <BY5PR12MB3764F5D07E8EC48327E39C86B3C60@BY5PR12MB3764.namprd12.prod.outlook.com>
Hi,
On Tue, Dec 15, 2020 at 01:09:29AM +0000, Krishna Reddy wrote:
> Hi Jean,
>
> > +bool arm_smmu_master_sva_supported(struct arm_smmu_master *master) {
> > + if (!(master->smmu->features & ARM_SMMU_FEAT_SVA))
> > + return false;
> +
> > + /* SSID and IOPF support are mandatory for the moment */
> > + return master->ssid_bits && arm_smmu_iopf_supported(master); }
> > +
>
> Tegra Next Gen SOC has arm-smmu-v3 and It doesn't have support for PRI interface.
> However, PCIe client device has capability to handle the page faults on its own when the ATS translation fails.
> The PCIe device needs SVA feature enable without PRI interface supported at arm-smmu-v3.
> At present, the SVA feature enable is allowed only if the smmu/client device has PRI support.
> There seem to be no functional reason to make pri_supported as a pre-requisite for SVA enable.
The pri_supported check allows drivers to query whether the SMMU is
compatible with their capability. It's pointless, for example, to enable
SVA for a PRI-capable device if the SMMU doesn't support PRI.
I agree that we should let a device driver enable SVA if it supports some
form of IOPF. Perhaps we could extract the IOPF capability from
IOMMU_DEV_FEAT_SVA, into a new IOMMU_DEV_FEAT_IOPF feature. Device drivers
that rely on PRI or stall can first check FEAT_IOPF, then FEAT_SVA, and
enable both separately. Enabling FEAT_SVA would require FEAT_IOPF enabled
if supported. Let me try to write this up.
Thanks,
Jean
> Can SVA enable be supported for pri_supported not set case as well?
> Also, It is noticed that SVA enable on Intel doesn't need pri_supported set.
>
> -KR
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
next prev parent reply other threads:[~2021-01-06 10:10 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-18 10:18 [PATCH v10 00/13] iommu: Shared Virtual Addressing for SMMUv3 (PT sharing part) Jean-Philippe Brucker
2020-09-18 10:18 ` [PATCH v10 01/13] mm: Define pasid in mm Jean-Philippe Brucker
2020-09-28 22:22 ` Will Deacon
2020-09-28 22:43 ` Fenghua Yu
2020-09-30 9:13 ` Jean-Philippe Brucker
2020-09-18 10:18 ` [PATCH v10 02/13] iommu/ioasid: Add ioasid references Jean-Philippe Brucker
2020-09-18 10:18 ` [PATCH v10 03/13] iommu/sva: Add PASID helpers Jean-Philippe Brucker
2020-09-18 10:18 ` [PATCH v10 04/13] arm64: mm: Pin down ASIDs for sharing mm with devices Jean-Philippe Brucker
2020-09-18 10:18 ` [PATCH v10 05/13] iommu/io-pgtable-arm: Move some definitions to a header Jean-Philippe Brucker
2020-09-18 10:18 ` [PATCH v10 06/13] arm64: cpufeature: Export symbol read_sanitised_ftr_reg() Jean-Philippe Brucker
2020-09-18 10:18 ` [PATCH v10 07/13] iommu/arm-smmu-v3: Move definitions to a header Jean-Philippe Brucker
2020-09-18 10:18 ` [PATCH v10 08/13] iommu/arm-smmu-v3: Share process page tables Jean-Philippe Brucker
2020-09-18 10:18 ` [PATCH v10 09/13] iommu/arm-smmu-v3: Seize private ASID Jean-Philippe Brucker
2020-09-18 13:07 ` Jonathan Cameron
2020-09-18 10:18 ` [PATCH v10 10/13] iommu/arm-smmu-v3: Check for SVA features Jean-Philippe Brucker
2020-09-21 8:59 ` Shameerali Kolothum Thodi
2020-09-24 10:13 ` Jean-Philippe Brucker
2020-09-24 11:13 ` Shameerali Kolothum Thodi
2020-12-09 19:49 ` Krishna Reddy
2020-12-09 20:07 ` Will Deacon
2020-12-09 20:38 ` Krishna Reddy
2020-12-14 9:32 ` Jean-Philippe Brucker
2020-12-14 23:23 ` Krishna Reddy
2020-09-18 10:18 ` [PATCH v10 11/13] iommu/arm-smmu-v3: Add SVA device feature Jean-Philippe Brucker
2020-12-15 1:09 ` Krishna Reddy
2021-01-06 10:09 ` Jean-Philippe Brucker [this message]
2021-01-06 17:23 ` Krishna Reddy
2020-09-18 10:18 ` [PATCH v10 12/13] iommu/arm-smmu-v3: Implement iommu_sva_bind/unbind() Jean-Philippe Brucker
2020-11-24 23:58 ` Jason Gunthorpe
2020-11-25 9:27 ` Jean-Philippe Brucker
2020-11-26 0:37 ` Jason Gunthorpe
2020-09-18 10:18 ` [PATCH v10 13/13] iommu/arm-smmu-v3: Hook up ATC invalidation to mm ops Jean-Philippe Brucker
2020-09-18 13:15 ` [PATCH v10 00/13] iommu: Shared Virtual Addressing for SMMUv3 (PT sharing part) Jonathan Cameron
2020-09-28 16:47 ` Jean-Philippe Brucker
2020-09-28 17:23 ` Will Deacon
2020-09-28 22:39 ` Will Deacon
2020-09-30 9:12 ` Jean-Philippe Brucker
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=X/WMZgVFs0F2H0vy@myrica \
--to=jean-philippe@linaro.org \
--cc=Snikam@nvidia.com \
--cc=YHsu@nvidia.com \
--cc=apopple@nvidia.com \
--cc=catalin.marinas@arm.com \
--cc=fenghua.yu@intel.com \
--cc=iommu@lists.linux-foundation.org \
--cc=jgg@nvidia.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-mm@kvack.org \
--cc=nicolinc@nvidia.com \
--cc=nwatterson@nvidia.com \
--cc=praithatha@nvidia.com \
--cc=robin.murphy@arm.com \
--cc=tbergstrom@nvidia.com \
--cc=vdumpa@nvidia.com \
--cc=vsethi@nvidia.com \
--cc=will@kernel.org \
--cc=zhangfei.gao@linaro.org \
/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;
as well as URLs for NNTP newsgroup(s).