Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1540538

[PATCH V7 7/8] iommu/arm-smmu: Set privileged attribute to 'default' instead of 'unprivileged'

From Sricharan R <sricharan@codeaurora.org>
Newsgroups linux.kernel
Subject [PATCH V7 7/8] iommu/arm-smmu: Set privileged attribute to 'default' instead of 'unprivileged'
Date 2016-12-12 19:50 +0100
Message-ID <sNDPH-7Pk-9@gated-at.bofh.it> (permalink)
References <sNDG1-7LQ-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Currently the driver sets all the device transactions privileges
to UNPRIVILEGED, but there are cases where the iommu masters wants
to isolate privileged supervisor and unprivileged user.
So don't override the privileged setting to unprivileged, instead
set it to default as incoming and let it be controlled by the pagetable
settings.

Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Sricharan R <sricharan@codeaurora.org>
---
 drivers/iommu/arm-smmu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/iommu/arm-smmu.c b/drivers/iommu/arm-smmu.c
index eaa8f44..8bb0eea 100644
--- a/drivers/iommu/arm-smmu.c
+++ b/drivers/iommu/arm-smmu.c
@@ -1213,7 +1213,7 @@ static int arm_smmu_domain_add_master(struct arm_smmu_domain *smmu_domain,
 			continue;
 
 		s2cr[idx].type = type;
-		s2cr[idx].privcfg = S2CR_PRIVCFG_UNPRIV;
+		s2cr[idx].privcfg = S2CR_PRIVCFG_DEFAULT;
 		s2cr[idx].cbndx = cbndx;
 		arm_smmu_write_s2cr(smmu, idx);
 	}
-- 
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH V7 0/8] Add support for privileged mappings Sricharan R <sricharan@codeaurora.org> - 2016-12-12 19:40 +0100
  [PATCH V7 4/8] common: DMA-mapping: add DMA_ATTR_PRIVILEGED attribute Sricharan R <sricharan@codeaurora.org> - 2016-12-12 19:40 +0100
    Re: [PATCH V7 4/8] common: DMA-mapping: add DMA_ATTR_PRIVILEGED  attribute Robin Murphy <robin.murphy@arm.com> - 2016-12-13 15:00 +0100
  [PATCH V7 8/8] iommu/arm-smmu: Revert "iommu/arm-smmu: Set PRIVCFG in stage 1 STEs" Sricharan R <sricharan@codeaurora.org> - 2016-12-12 19:50 +0100
  [PATCH V7 7/8] iommu/arm-smmu: Set privileged attribute to 'default' instead of 'unprivileged' Sricharan R <sricharan@codeaurora.org> - 2016-12-12 19:50 +0100
    Re: [PATCH V7 7/8] iommu/arm-smmu: Set privileged attribute to  'default' instead of 'unprivileged' Robin Murphy <robin.murphy@arm.com> - 2016-12-13 13:30 +0100
  [PATCH V7 3/8] iommu/io-pgtable-arm-v7s: Add support for the IOMMU_PRIV flag Sricharan R <sricharan@codeaurora.org> - 2016-12-12 19:50 +0100

csiph-web