linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: will.deacon@arm.com (Will Deacon)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 4/4] iommu/arm-smmu: Don't BUG() if we find aborting STEs with disable_bypass
Date: Thu, 18 Aug 2016 14:05:42 +0100	[thread overview]
Message-ID: <1471525542-14969-5-git-send-email-will.deacon@arm.com> (raw)
In-Reply-To: <1471525542-14969-1-git-send-email-will.deacon@arm.com>

The disable_bypass cmdline option changes the SMMUv3 driver to put down
faulting stream table entries by default, as opposed to bypassing
transactions from unconfigured devices.

In this mode of operation, it is entirely expected to see aborting
entries in the stream table if and when we come to installing a valid
translation, so don't trigger a BUG() as a result of misdiagnosing these
entries as stream table corruption.

Tested-by: Robin Murphy <robin.murphy@arm.com>
Reported-by: Robin Murphy <robin.murphy@arm.com>
Reviewed-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
---
 drivers/iommu/arm-smmu-v3.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/iommu/arm-smmu-v3.c b/drivers/iommu/arm-smmu-v3.c
index 330623f8e344..641e88761319 100644
--- a/drivers/iommu/arm-smmu-v3.c
+++ b/drivers/iommu/arm-smmu-v3.c
@@ -1034,6 +1034,9 @@ static void arm_smmu_write_strtab_ent(struct arm_smmu_device *smmu, u32 sid,
 		case STRTAB_STE_0_CFG_S2_TRANS:
 			ste_live = true;
 			break;
+		case STRTAB_STE_0_CFG_ABORT:
+			if (disable_bypass)
+				break;
 		default:
 			BUG(); /* STE corruption */
 		}
-- 
2.1.4

  parent reply	other threads:[~2016-08-18 13:05 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-18 13:05 [PATCH 0/4] iommu/arm-smmu: Fixes for 4.8 Will Deacon
2016-08-18 13:05 ` [PATCH 1/4] iommu/io-pgtable-arm-v7s: Fix attributes when splitting blocks Will Deacon
2016-08-18 13:05 ` [PATCH 2/4] iommu/arm-smmu: Fix CMDQ error handling Will Deacon
2016-08-18 13:05 ` [PATCH 3/4] iommu/arm-smmu: Disable stalling faults for all endpoints Will Deacon
2016-12-06 23:30   ` Rob Clark
2016-12-07  0:00     ` Jordan Crouse
2016-12-10 15:44       ` Sricharan
2016-12-16 11:54     ` Will Deacon
2016-12-19  9:03       ` Sricharan
2016-12-20 16:17         ` Will Deacon
2017-09-13 19:31       ` Rob Clark
2017-09-18 17:33         ` Will Deacon
2017-09-18 18:45           ` Rob Clark
2016-08-18 13:05 ` Will Deacon [this message]
2016-08-18 16:52 ` [PATCH 0/4] iommu/arm-smmu: Fixes for 4.8 Joerg Roedel

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=1471525542-14969-5-git-send-email-will.deacon@arm.com \
    --to=will.deacon@arm.com \
    --cc=linux-arm-kernel@lists.infradead.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).