All of lore.kernel.org
 help / color / mirror / Atom feed
From: Shameerali Kolothum Thodi <shameerali.kolothum.thodi@huawei.com>
To: Jean-Philippe Brucker <jean-philippe@linaro.org>
Cc: "iommu@lists.linux-foundation.org"
	<iommu@lists.linux-foundation.org>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>,
	"fenghua.yu@intel.com" <fenghua.yu@intel.com>,
	"catalin.marinas@arm.com" <catalin.marinas@arm.com>,
	Suzuki K Poulose <suzuki.poulose@arm.com>,
	"robin.murphy@arm.com" <robin.murphy@arm.com>,
	"zhangfei.gao@linaro.org" <zhangfei.gao@linaro.org>,
	"will@kernel.org" <will@kernel.org>
Subject: RE: [PATCH v10 10/13] iommu/arm-smmu-v3: Check for SVA features
Date: Thu, 24 Sep 2020 11:13:23 +0000	[thread overview]
Message-ID: <47b244b99f284790b82b2c0a968ba830@huawei.com> (raw)
In-Reply-To: <20200924101340.GC170808@myrica>



> -----Original Message-----
> From: Jean-Philippe Brucker [mailto:jean-philippe@linaro.org]
> Sent: 24 September 2020 11:14
> To: Shameerali Kolothum Thodi <shameerali.kolothum.thodi@huawei.com>
> Cc: iommu@lists.linux-foundation.org; linux-arm-kernel@lists.infradead.org;
> linux-mm@kvack.org; fenghua.yu@intel.com; catalin.marinas@arm.com;
> Suzuki K Poulose <suzuki.poulose@arm.com>; robin.murphy@arm.com;
> zhangfei.gao@linaro.org; will@kernel.org
> Subject: Re: [PATCH v10 10/13] iommu/arm-smmu-v3: Check for SVA features
> 
> Hi Shameer,
> 
> On Mon, Sep 21, 2020 at 08:59:39AM +0000, Shameerali Kolothum Thodi
> wrote:
> > > +bool arm_smmu_sva_supported(struct arm_smmu_device *smmu)
> > > +{
> > > +	unsigned long reg, fld;
> > > +	unsigned long oas;
> > > +	unsigned long asid_bits;
> > > +	u32 feat_mask = ARM_SMMU_FEAT_BTM |
> > > ARM_SMMU_FEAT_COHERENCY;
> >
> > Why is BTM mandated for SVA? I couldn't find this requirement in SMMU spec
> > (Sorry if I missed it or this got discussed earlier). But if performance is the
> only concern here,
> > is it better just to allow it with a warning rather than limiting SMMUs without
> BTM?
> 
> It's a performance concern and requires to support multiple
> configurations, but the spec allows it. Are there SMMUs without BTM that
> need it?

Ok. Thanks for clarifying. May be better to add a comment here. Our platforms
do support BTM, but I had a strange case where the UEFI didn't enable DVM
but SMMU reported BTM and was causing random failures due to lack of
explicit tlbi on mm invalidation. Anyway that doesn't count here :)

Thanks,
Shameer

> Thanks,
> Jean


WARNING: multiple messages have this Message-ID (diff)
From: Shameerali Kolothum Thodi <shameerali.kolothum.thodi@huawei.com>
To: Jean-Philippe Brucker <jean-philippe@linaro.org>
Cc: "fenghua.yu@intel.com" <fenghua.yu@intel.com>,
	"will@kernel.org" <will@kernel.org>,
	Suzuki K Poulose <suzuki.poulose@arm.com>,
	"catalin.marinas@arm.com" <catalin.marinas@arm.com>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>,
	"iommu@lists.linux-foundation.org"
	<iommu@lists.linux-foundation.org>,
	"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 10/13] iommu/arm-smmu-v3: Check for SVA features
Date: Thu, 24 Sep 2020 11:13:23 +0000	[thread overview]
Message-ID: <47b244b99f284790b82b2c0a968ba830@huawei.com> (raw)
In-Reply-To: <20200924101340.GC170808@myrica>



> -----Original Message-----
> From: Jean-Philippe Brucker [mailto:jean-philippe@linaro.org]
> Sent: 24 September 2020 11:14
> To: Shameerali Kolothum Thodi <shameerali.kolothum.thodi@huawei.com>
> Cc: iommu@lists.linux-foundation.org; linux-arm-kernel@lists.infradead.org;
> linux-mm@kvack.org; fenghua.yu@intel.com; catalin.marinas@arm.com;
> Suzuki K Poulose <suzuki.poulose@arm.com>; robin.murphy@arm.com;
> zhangfei.gao@linaro.org; will@kernel.org
> Subject: Re: [PATCH v10 10/13] iommu/arm-smmu-v3: Check for SVA features
> 
> Hi Shameer,
> 
> On Mon, Sep 21, 2020 at 08:59:39AM +0000, Shameerali Kolothum Thodi
> wrote:
> > > +bool arm_smmu_sva_supported(struct arm_smmu_device *smmu)
> > > +{
> > > +	unsigned long reg, fld;
> > > +	unsigned long oas;
> > > +	unsigned long asid_bits;
> > > +	u32 feat_mask = ARM_SMMU_FEAT_BTM |
> > > ARM_SMMU_FEAT_COHERENCY;
> >
> > Why is BTM mandated for SVA? I couldn't find this requirement in SMMU spec
> > (Sorry if I missed it or this got discussed earlier). But if performance is the
> only concern here,
> > is it better just to allow it with a warning rather than limiting SMMUs without
> BTM?
> 
> It's a performance concern and requires to support multiple
> configurations, but the spec allows it. Are there SMMUs without BTM that
> need it?

Ok. Thanks for clarifying. May be better to add a comment here. Our platforms
do support BTM, but I had a strange case where the UEFI didn't enable DVM
but SMMU reported BTM and was causing random failures due to lack of
explicit tlbi on mm invalidation. Anyway that doesn't count here :)

Thanks,
Shameer

> Thanks,
> Jean
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

WARNING: multiple messages have this Message-ID (diff)
From: Shameerali Kolothum Thodi <shameerali.kolothum.thodi@huawei.com>
To: Jean-Philippe Brucker <jean-philippe@linaro.org>
Cc: "fenghua.yu@intel.com" <fenghua.yu@intel.com>,
	"will@kernel.org" <will@kernel.org>,
	Suzuki K Poulose <suzuki.poulose@arm.com>,
	"catalin.marinas@arm.com" <catalin.marinas@arm.com>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>,
	"iommu@lists.linux-foundation.org"
	<iommu@lists.linux-foundation.org>,
	"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 10/13] iommu/arm-smmu-v3: Check for SVA features
Date: Thu, 24 Sep 2020 11:13:23 +0000	[thread overview]
Message-ID: <47b244b99f284790b82b2c0a968ba830@huawei.com> (raw)
In-Reply-To: <20200924101340.GC170808@myrica>



> -----Original Message-----
> From: Jean-Philippe Brucker [mailto:jean-philippe@linaro.org]
> Sent: 24 September 2020 11:14
> To: Shameerali Kolothum Thodi <shameerali.kolothum.thodi@huawei.com>
> Cc: iommu@lists.linux-foundation.org; linux-arm-kernel@lists.infradead.org;
> linux-mm@kvack.org; fenghua.yu@intel.com; catalin.marinas@arm.com;
> Suzuki K Poulose <suzuki.poulose@arm.com>; robin.murphy@arm.com;
> zhangfei.gao@linaro.org; will@kernel.org
> Subject: Re: [PATCH v10 10/13] iommu/arm-smmu-v3: Check for SVA features
> 
> Hi Shameer,
> 
> On Mon, Sep 21, 2020 at 08:59:39AM +0000, Shameerali Kolothum Thodi
> wrote:
> > > +bool arm_smmu_sva_supported(struct arm_smmu_device *smmu)
> > > +{
> > > +	unsigned long reg, fld;
> > > +	unsigned long oas;
> > > +	unsigned long asid_bits;
> > > +	u32 feat_mask = ARM_SMMU_FEAT_BTM |
> > > ARM_SMMU_FEAT_COHERENCY;
> >
> > Why is BTM mandated for SVA? I couldn't find this requirement in SMMU spec
> > (Sorry if I missed it or this got discussed earlier). But if performance is the
> only concern here,
> > is it better just to allow it with a warning rather than limiting SMMUs without
> BTM?
> 
> It's a performance concern and requires to support multiple
> configurations, but the spec allows it. Are there SMMUs without BTM that
> need it?

Ok. Thanks for clarifying. May be better to add a comment here. Our platforms
do support BTM, but I had a strange case where the UEFI didn't enable DVM
but SMMU reported BTM and was causing random failures due to lack of
explicit tlbi on mm invalidation. Anyway that doesn't count here :)

Thanks,
Shameer

> Thanks,
> Jean

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2020-09-24 11:13 UTC|newest]

Thread overview: 111+ 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 ` Jean-Philippe Brucker
2020-09-18 10:18 ` Jean-Philippe Brucker
2020-09-18 10:18 ` [PATCH v10 01/13] mm: Define pasid in mm Jean-Philippe Brucker
2020-09-18 10:18   ` Jean-Philippe Brucker
2020-09-18 10:18   ` Jean-Philippe Brucker
2020-09-28 22:22   ` Will Deacon
2020-09-28 22:22     ` Will Deacon
2020-09-28 22:22     ` Will Deacon
2020-09-28 22:43     ` Fenghua Yu
2020-09-28 22:43       ` Fenghua Yu
2020-09-28 22:43       ` Fenghua Yu
2020-09-30  9:13       ` Jean-Philippe Brucker
2020-09-30  9:13         ` Jean-Philippe Brucker
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   ` Jean-Philippe Brucker
2020-09-18 10:18   ` 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   ` Jean-Philippe Brucker
2020-09-18 10:18   ` 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   ` Jean-Philippe Brucker
2020-09-18 10:18   ` 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   ` Jean-Philippe Brucker
2020-09-18 10:18   ` 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   ` Jean-Philippe Brucker
2020-09-18 10:18   ` 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   ` Jean-Philippe Brucker
2020-09-18 10:18   ` 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   ` Jean-Philippe Brucker
2020-09-18 10:18   ` 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 10:18   ` Jean-Philippe Brucker
2020-09-18 10:18   ` Jean-Philippe Brucker
2020-09-18 13:07   ` Jonathan Cameron
2020-09-18 13:07     ` Jonathan Cameron
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-18 10:18   ` Jean-Philippe Brucker
2020-09-18 10:18   ` Jean-Philippe Brucker
2020-09-21  8:59   ` Shameerali Kolothum Thodi
2020-09-21  8:59     ` Shameerali Kolothum Thodi
2020-09-21  8:59     ` Shameerali Kolothum Thodi
2020-09-24 10:13     ` Jean-Philippe Brucker
2020-09-24 10:13       ` Jean-Philippe Brucker
2020-09-24 10:13       ` Jean-Philippe Brucker
2020-09-24 11:13       ` Shameerali Kolothum Thodi [this message]
2020-09-24 11:13         ` Shameerali Kolothum Thodi
2020-09-24 11:13         ` Shameerali Kolothum Thodi
2020-12-09 19:49         ` Krishna Reddy
2020-12-09 19:49           ` Krishna Reddy
2020-12-09 19:49           ` Krishna Reddy
2020-12-09 20:07           ` Will Deacon
2020-12-09 20:07             ` Will Deacon
2020-12-09 20:07             ` Will Deacon
2020-12-09 20:38             ` Krishna Reddy
2020-12-09 20:38               ` Krishna Reddy
2020-12-09 20:38               ` Krishna Reddy
2020-12-14  9:32           ` Jean-Philippe Brucker
2020-12-14  9:32             ` Jean-Philippe Brucker
2020-12-14  9:32             ` Jean-Philippe Brucker
2020-12-14 23:23             ` Krishna Reddy
2020-12-14 23:23               ` Krishna Reddy
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-09-18 10:18   ` Jean-Philippe Brucker
2020-09-18 10:18   ` Jean-Philippe Brucker
2020-12-15  1:09   ` Krishna Reddy
2020-12-15  1:09     ` Krishna Reddy
2020-12-15  1:09     ` Krishna Reddy
2021-01-06 10:09     ` Jean-Philippe Brucker
2021-01-06 10:09       ` Jean-Philippe Brucker
2021-01-06 10:09       ` Jean-Philippe Brucker
2021-01-06 17:23       ` Krishna Reddy
2021-01-06 17:23         ` Krishna Reddy
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-09-18 10:18   ` Jean-Philippe Brucker
2020-09-18 10:18   ` Jean-Philippe Brucker
2020-11-24 23:58   ` Jason Gunthorpe
2020-11-24 23:58     ` Jason Gunthorpe
2020-11-24 23:58     ` Jason Gunthorpe
2020-11-25  9:27     ` Jean-Philippe Brucker
2020-11-25  9:27       ` Jean-Philippe Brucker
2020-11-25  9:27       ` Jean-Philippe Brucker
2020-11-26  0:37       ` Jason Gunthorpe
2020-11-26  0:37         ` Jason Gunthorpe
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 10:18   ` Jean-Philippe Brucker
2020-09-18 10:18   ` 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-18 13:15   ` Jonathan Cameron
2020-09-18 13:15   ` Jonathan Cameron
2020-09-28 16:47 ` Jean-Philippe Brucker
2020-09-28 16:47   ` Jean-Philippe Brucker
2020-09-28 16:47   ` Jean-Philippe Brucker
2020-09-28 17:23   ` Will Deacon
2020-09-28 17:23     ` Will Deacon
2020-09-28 17:23     ` Will Deacon
2020-09-28 22:39     ` Will Deacon
2020-09-28 22:39       ` Will Deacon
2020-09-28 22:39       ` Will Deacon
2020-09-30  9:12       ` Jean-Philippe Brucker
2020-09-30  9:12         ` Jean-Philippe Brucker
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=47b244b99f284790b82b2c0a968ba830@huawei.com \
    --to=shameerali.kolothum.thodi@huawei.com \
    --cc=catalin.marinas@arm.com \
    --cc=fenghua.yu@intel.com \
    --cc=iommu@lists.linux-foundation.org \
    --cc=jean-philippe@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-mm@kvack.org \
    --cc=robin.murphy@arm.com \
    --cc=suzuki.poulose@arm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.