From patchwork Wed Sep 30 14:56:29 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bharat Bhushan X-Patchwork-Id: 7293971 Return-Path: X-Original-To: patchwork-kvm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id BD8D5BEEA4 for ; Wed, 30 Sep 2015 09:23:47 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DF0F02068F for ; Wed, 30 Sep 2015 09:23:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E938A20687 for ; Wed, 30 Sep 2015 09:23:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754644AbbI3JXm (ORCPT ); Wed, 30 Sep 2015 05:23:42 -0400 Received: from mail-bl2on0119.outbound.protection.outlook.com ([65.55.169.119]:1741 "EHLO na01-bl2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754537AbbI3JXj (ORCPT ); Wed, 30 Sep 2015 05:23:39 -0400 Received: from DM2PR03CA0001.namprd03.prod.outlook.com (10.141.96.11) by BY1PR0301MB1272.namprd03.prod.outlook.com (10.161.205.146) with Microsoft SMTP Server (TLS) id 15.1.280.20; Wed, 30 Sep 2015 09:23:37 +0000 Received: from BL2FFO11FD037.protection.gbl (2a01:111:f400:7c09::107) by DM2PR03CA0001.outlook.office365.com (2a01:111:e400:2428::11) with Microsoft SMTP Server (TLS) id 15.1.286.20 via Frontend Transport; Wed, 30 Sep 2015 09:23:36 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=freescale.com; freescale.mail.onmicrosoft.com; dkim=none (message not signed) header.d=none; freescale.mail.onmicrosoft.com; dmarc=none action=none header.from=freescale.com; Received-SPF: Fail (protection.outlook.com: domain of freescale.com does not designate 192.88.168.50 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.168.50; helo=tx30smr01.am.freescale.net; Received: from tx30smr01.am.freescale.net (192.88.168.50) by BL2FFO11FD037.mail.protection.outlook.com (10.173.161.133) with Microsoft SMTP Server (TLS) id 15.1.274.4 via Frontend Transport; Wed, 30 Sep 2015 09:23:35 +0000 Received: from localhost.ap.freescale.net ([10.232.132.243]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id t8U9NCDW000590; Wed, 30 Sep 2015 02:23:32 -0700 From: Bharat Bhushan To: , , CC: , , , , , Bharat Bhushan Subject: [RFC PATCH 6/6] arm-smmu: Allow to set iommu mapping for MSI Date: Wed, 30 Sep 2015 20:26:29 +0530 Message-ID: <1443624989-24346-6-git-send-email-Bharat.Bhushan@freescale.com> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1443624989-24346-1-git-send-email-Bharat.Bhushan@freescale.com> References: <1443624989-24346-1-git-send-email-Bharat.Bhushan@freescale.com> X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11FD037; 1:y4NR1RKrYdQ7tKsOsYgT8qfymMkTgBq4DrEjaW8bIxnAVoJJNZxj3pxJpM8mIRj66TrP5OnnyimnDo2uELMOfoJY+OdkzKLn9QIDaH4ms4hspe9m5XZw2EYP4fRSaQ5Bwi0eisPnGj2N4FYOZhWILyD8MzHSuTMdRxePmjODOlsV3XbOFKvrJzZ2Ko9J2XHuu5dsVhmGSfVXZFnUHoyk97edovDVwdYPRo8VEi1fHRwZ1ISK0Bpn5Bjpum7MOl2kgApAEr/r1OCVxfF+ESWdzJGOUe+JV2kktftLsDCxTCMYtfc7+XslygZOSV1KASrdE2+S3c0BuOnnuGWKYWXs2mMOwSYig2+5wKHriiaUjxDhxuGCMxbJRk/NtuUjt5nnmj5sRwRcIi03ClX1s89stDpqBUGR+vEauYPfA/18k3FqPBJ0Zcwy/FWjVmkiaacZ X-Forefront-Antispam-Report: CIP:192.88.168.50; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(2980300002)(1110001)(1109001)(3190300001)(339900001)(199003)(189002)(5007970100001)(92566002)(64706001)(50986999)(85426001)(50226001)(106466001)(104016004)(76506005)(76176999)(19580405001)(2201001)(48376002)(36756003)(5003940100001)(6806005)(50466002)(5001960100002)(19580395003)(229853001)(86362001)(107886002)(77096005)(47776003)(189998001)(97736004)(105606002)(46102003)(87936001)(5001770100001)(77156002)(5001860100001)(2950100001)(62966003)(2171001)(68736005)(5008740100001)(5001830100001)(4001540100001)(81156007)(4001430100001)(217873001)(2101003); DIR:OUT; SFP:1102; SCL:1; SRVR:BY1PR0301MB1272; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; MIME-Version: 1.0 X-Microsoft-Exchange-Diagnostics: 1; BY1PR0301MB1272; 2:Gs0BD8/DZlJqyZNqlq8kZsHJY6ehL3HYn7ubGYGAv3bQtkOfC3mNupbvIAYixZAFd8tB/rWBiNfs658u/uJ+BFAgcIjUmvbWD4RCeA7dzVG1OJFFAr0oFVkT606Oek02unu1Y9fFOM5udA4ajfqRNkDMDTJ5CfGxBqPgDClHU4s=; 3:a/6tc6VPrSUjBDV+MTBFcKMAVz8Ja7PROtKNall+lUzDelF1/oew9JtXwHF1qZ4BlXVW5v3cZZNnDfdjGa9BVFmZWDi+iDmWBbzQ379he59zHzzD/IpB0O5Xv+T8Uu9TSsTYSrrZsAkDgGN645UEisJJLAraQHtFxYxG2g75Y+dVLiXrl5g1dIp/DugJhxoVYO/RkUdRr9sOcshOD2h8gViYiMou1nlaXukvAK8U8NM=; 25:yAmV4EMGetIh0NkwFRHW0+w74K3b/7pb2JFznMhSOcKOzlnTC9uUBf6vkDz9v+Bpj2mp/Pk1u5tIaCEHvgmcMGLwTt/pM3RxDeXKVeZvyf+2uncS5GNqTgGYIRNBDfNreUpWyJLhzuWaq1rEgfGMzr+ohLcyMybjfSRMHlmlA/ViyLm6PBGqmz60UcE42A118rqkFdv5av55YT1cSkXbbHg/BvsOFOB0Z4lhmS+rkYpsVoNEq0EaWVF7jtlHBPwmMfqofdy4MQ+v9y8o44Uvhw== X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BY1PR0301MB1272; X-Microsoft-Exchange-Diagnostics: 1; BY1PR0301MB1272; 20:ZxhoCwYSxhxile8N9IgANBMT312n8CRQnzGdcz/E9nU/EOO528hY04nSn1jNdnXVt0XmhuB3irghnsgn3jwdEO3+0fVWWaUfitnIWNGBT644t0g5iQt16YsprtZqo0Kzi+NMIP3FwQwzdAiOUAxw/gh2SkmitubfePmRCo3d9PlSzoRCapWtG6mhV02+xz2v/IEhmc/KBcboOTANlA5OkvQ0rthVQW9cHspXgOLlfkBa2AX33jI4d/dNBks6YeZfml5UgnGtW0xLvabbTunWB6fi6Uv+AwMVpfZLt5vxvplyDS8ipECpa56gZdjI84hZASOH/LSIt6RQX4zqGQB73Qf7lnH9sJGAIkhuDV0Bq24=; 4:B2h1PDXsR9srSVpeACU+GD5OK88r/Qkmc3F/YrdryrX/t0h6Mat6aF0npZH30AG/jVVaGUUFg35IoBLYX0AmRlV4ztL1mftlZsyMLvkuGnPI4Z/2t3NQK1APIOiObw1wdmnwXfaKb5+iyKW7zIVj9CmOUuDUVv7+A6FFtSYUZjAATk4BCWKLXF9ubtQHLBW372Sy+eb7MFxGsM4aY72Lj4N3aL9Zhb5lFerz2bh9iUbx93JF1Lm79DyDa6AwI5exWIeYNpvbf87YtDPGpgWDsfzUSaPp+iDu2fGb+V4JLKjc8+94VxniRo//kPW+ZRnZVgM4f4IKvGbNYlOwXiD0L1djd5SSgA/BSSZccDmCJYw= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(520078)(5005006)(8121501046)(3002001); SRVR:BY1PR0301MB1272; BCL:0; PCL:0; RULEID:; SRVR:BY1PR0301MB1272; X-Forefront-PRVS: 071518EF63 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BY1PR0301MB1272; 23:mxH3ZY0eGQp6Cdm5gdu0t6IvFcHhlAGTgNxNPpl?= =?us-ascii?Q?/Z463XY8Ml1dh1GUnjSJ93aVlhuTsGwTtKnEk72vOmr+oUWiI5pX8xGuT6Cy?= =?us-ascii?Q?5/R/2Ag6zd8sFMa3kZ4gF7p5yI2m+9TaD273uZm1OjXZffFC594E4vkPhTNV?= =?us-ascii?Q?LK4ldSdmFhZ4flQ4n8wnDiGjkk4HhZ+/9Kt02K9Qbx3JeBLuMUVld540T05O?= =?us-ascii?Q?ebHWw82OrFlnUXraPmSohGO3bbOKKLsSJwy5MZGkRKet2LDelFyM+vOkggey?= =?us-ascii?Q?FJjkdlQQPc+h3itgYtP7lXNFr8EjSbOgTsrokPTWQZ29wZ2MD60Y+hMAAxl7?= =?us-ascii?Q?TzW9g4AAF1/r+eOBpzuECnwSjlZlwdNKmlwH8SLvzEMwijh+X+IAZrfIyGtc?= =?us-ascii?Q?VpSPczZw+Mhe3V2c+rcJqm5Qgb4b4p0lP6VV52N2EK6UQygFDFaVVr8jT4gR?= =?us-ascii?Q?NYJQ8tIXhAKyVOkeNop4jgukq07YzocK4XMardNucXZ5mQwkDcNGJXYk2P0K?= =?us-ascii?Q?m0SAmVRBOjrAZwNDOPD7asaSY68IU/si6Y2O7ltMx/dH7lxu2JHSxoQm5QZb?= =?us-ascii?Q?I25KzjC92G/KZnA+HX3BJPwPWAeO4L4jTXa+IPafPWBWSuuLlDyE7hD0xxLa?= =?us-ascii?Q?MwkW1oEEU1HwRreO6aTZBUq9DGbGYnKxUaALouk2RwNhr1BTYbDO6bexA/ML?= =?us-ascii?Q?+e2uuyEZQpz70McDYKFEkMvFnMULyeGB3dC+ZBdFvByDSthrZBou8DroM2U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:6hJCGt9IevrZxaPsYuAAJYoo2WrtVS1kYR07MJqBhsWXWNpgyUS9kZkZkLo3CamJX4ADa9D1WvUSDQw60JSdjA== X-OriginatorOrg: freescale.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Sep 2015 09:23:35.9327 (UTC) X-MS-Exchange-CrossTenant-Id: 710a03f5-10f6-4d38-9ff4-a80b81da590d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=710a03f5-10f6-4d38-9ff4-a80b81da590d; Ip=[192.88.168.50]; Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR0301MB1272 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Spam-Status: No, score=-3.9 required=5.0 tests=BAYES_00, DATE_IN_FUTURE_03_06, RCVD_IN_DNSWL_HI,T_RP_MATCHES_RCVD,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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;