]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit - drivers/iommu/arm-smmu.c
iommu/arm-smmu: Restrict domain attributes to UNMANAGED domains
authorWill Deacon <will.deacon@arm.com>
Fri, 6 Jan 2017 16:28:17 +0000 (16:28 +0000)
committerStefan Bader <stefan.bader@canonical.com>
Tue, 20 Jun 2017 08:50:01 +0000 (10:50 +0200)
commita07cee71a1a675ff302bb51d62b99d00fb7a0194
tree96dce6755dcedd77c6b78b35a18159287d59fd9c
parent79a07390fa896e12c18b99ecfde89c5175e64bdc
iommu/arm-smmu: Restrict domain attributes to UNMANAGED domains

The ARM SMMU drivers provide a DOMAIN_ATTR_NESTING domain attribute,
which allows callers of the IOMMU API to request that the page table
for a domain is installed at stage-2, if supported by the hardware.

Since setting this attribute only makes sense for UNMANAGED domains,
this patch returns -ENODEV if the domain_{get,set}_attr operations are
called on other domain types.

BugLink: http://bugs.launchpad.net/bugs/1688158
Signed-off-by: Will Deacon <will.deacon@arm.com>
(cherry picked from commit 0834cc28fa56c65887c614b6c045be2ba06fdcb0)
Signed-off-by: Manoj Iyer <manoj.iyer@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Acked-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
drivers/iommu/arm-smmu-v3.c
drivers/iommu/arm-smmu.c