From patchwork Tue Mar 1 18:27:56 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Auger X-Patchwork-Id: 8468881 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 023219F38C for ; Tue, 1 Mar 2016 18:37:34 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6339820107 for ; Tue, 1 Mar 2016 18:37:33 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8BDCF200C1 for ; Tue, 1 Mar 2016 18:37:32 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1aap9I-000364-0k; Tue, 01 Mar 2016 18:35:56 +0000 Received: from mail-wm0-x231.google.com ([2a00:1450:400c:c09::231]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1aap2x-0001vD-1d for linux-arm-kernel@lists.infradead.org; Tue, 01 Mar 2016 18:29:27 +0000 Received: by mail-wm0-x231.google.com with SMTP id l68so50636856wml.0 for ; Tue, 01 Mar 2016 10:29:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=cujWFhUKexOiqR05DUZK+//zwamIkHJwZPLCxHcbnGY=; b=P4zx8Rku7KXVUMAI0I3wgTD6oJ+ROU6TgyxaJToyL9peAvdXuRizYaWLsPq3c3D2Nh SKNi8EGAcj0FwJoNUADdjScHwEhs0+noyA/azfFlYx6owKDcm9/zCQrPzClLMDhZmpHH +heeTrRbloFZIaSnYlqI/d32p2v/77w4JU5Yc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=cujWFhUKexOiqR05DUZK+//zwamIkHJwZPLCxHcbnGY=; b=kWccs1RVvRf39LAjlWT2GsL1RUtnqpG1FrIwKkzsp+0F2DneHJqWlMwUti5cdF7bdC 8H1zdh1nMEUORcJQY1gtEJiInuuTY9mhXgD6IFrheRtRBveVTuBtJ1N7dX3W3gExgz2g FMoc0Yj0y6GaSVTtqSJNdbz4Nuuq/GEkNtBuvWPd8FFuX7C8Ix5W9Lrid7BdbyJqMAV4 tAjJ9uyTHCT+pXaccmYwBW+XPergZfZy9UrL23DW4EzhaAM9gC2IQY2FQAH6E0je1wEE ahZ+DN8LVP+GRwsm1W1fkQHt6vOALATCvk6Ge5cFmHWVkUOkTNRVgIedWxwYBxvPsZIR ZRSA== X-Gm-Message-State: AD7BkJLq+BgjvctKlzTKfAf4CJA6xOA3EHUa2StKc6XIhL2YqOyJRGM89z6hR1ncAvhAlK6M X-Received: by 10.28.104.87 with SMTP id d84mr507287wmc.56.1456856942674; Tue, 01 Mar 2016 10:29:02 -0800 (PST) Received: from new-host-8.home (LMontsouris-657-1-37-90.w80-11.abo.wanadoo.fr. [80.11.198.90]) by smtp.gmail.com with ESMTPSA id k8sm32176385wjr.38.2016.03.01.10.29.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 01 Mar 2016 10:29:01 -0800 (PST) From: Eric Auger To: eric.auger@st.com, eric.auger@linaro.org, robin.murphy@arm.com, alex.williamson@redhat.com, will.deacon@arm.com, joro@8bytes.org, tglx@linutronix.de, jason@lakedaemon.net, marc.zyngier@arm.com, christoffer.dall@linaro.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org Subject: [RFC v5 16/17] iommu/arm-smmu: do not advertise IOMMU_CAP_INTR_REMAP Date: Tue, 1 Mar 2016 18:27:56 +0000 Message-Id: <1456856877-4817-17-git-send-email-eric.auger@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1456856877-4817-1-git-send-email-eric.auger@linaro.org> References: <1456856877-4817-1-git-send-email-eric.auger@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160301_102923_480748_08CC37B9 X-CRM114-Status: GOOD ( 11.65 ) X-Spam-Score: -2.7 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: patches@linaro.org, Manish.Jaggi@caviumnetworks.com, p.fedin@samsung.com, linux-kernel@vger.kernel.org, Bharat.Bhushan@freescale.com, iommu@lists.linux-foundation.org, pranav.sawargaonkar@gmail.com, suravee.suthikulpanit@amd.com MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,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 Do not advertise IOMMU_CAP_INTR_REMAP for arm-smmu. Indeed the irq_remapping capability is abstracted on irqchip side for ARM as opposed to Intel IOMMU featuring IRQ remapping HW. So to check IRQ remapping capability, the msi domain needs to be checked instead. This commit needs to be applied after "vfio/type1: also check IRQ remapping capability at msi domain" else the legacy interrupt assignment gets broken with arm-smmu. Signed-off-by: Eric Auger --- 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 c8b7e71..ce988fb 100644 --- a/drivers/iommu/arm-smmu.c +++ b/drivers/iommu/arm-smmu.c @@ -1284,7 +1284,7 @@ static bool arm_smmu_capable(enum iommu_cap cap) */ return true; case IOMMU_CAP_INTR_REMAP: - return true; /* MSIs are just memory writes */ + return false; /* interrupt translation handled at MSI controller level */ case IOMMU_CAP_NOEXEC: return true; default: