[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kvm
Subject:    [RFC PATCH 6/6] arm-smmu: Allow to set iommu mapping for MSI
From:       Bharat Bhushan <Bharat.Bhushan () freescale ! com>
Date:       2015-09-30 9:23:45
Message-ID: 1443624989-24346-6-git-send-email-Bharat.Bhushan () freescale ! com
[Download RAW message or body]

Finally ARM SMMU declare that iommu-mapping for MSI-pages are not
set automatically and it should be set explicitly.

Signed-off-by: Bharat Bhushan <Bharat.Bhushan@freescale.com>
---
 drivers/iommu/arm-smmu.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/iommu/arm-smmu.c b/drivers/iommu/arm-smmu.c
index a3956fb..9d37e72 100644
--- a/drivers/iommu/arm-smmu.c
+++ b/drivers/iommu/arm-smmu.c
@@ -1401,13 +1401,18 @@ static int arm_smmu_domain_get_attr(struct iommu_domain *domain,
 				    enum iommu_attr attr, void *data)
 {
 	struct arm_smmu_domain *smmu_domain = to_smmu_domain(domain);
+	struct iommu_domain_msi_maps *msi_maps;
 
 	switch (attr) {
 	case DOMAIN_ATTR_NESTING:
 		*(int *)data = (smmu_domain->stage == ARM_SMMU_DOMAIN_NESTED);
 		return 0;
 	case DOMAIN_ATTR_MSI_MAPPING:
-		/* Dummy handling added */
+		msi_maps = data;
+
+		msi_maps->automap = false;
+		msi_maps->override_automap = true;
+
 		return 0;
 	default:
 		return -ENODEV;
-- 
1.9.3

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic