From patchwork Mon Apr 4 08:30:10 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Auger Eric X-Patchwork-Id: 64966 Delivered-To: patches@linaro.org Received: by 10.112.199.169 with SMTP id jl9csp1057254lbc; Mon, 4 Apr 2016 01:30:44 -0700 (PDT) X-Received: by 10.25.138.5 with SMTP id m5mr6166220lfd.28.1459758632849; Mon, 04 Apr 2016 01:30:32 -0700 (PDT) Return-Path: Received: from mail-lf0-x234.google.com (mail-lf0-x234.google.com. [2a00:1450:4010:c07::234]) by mx.google.com with ESMTPS id q13si15263527lfq.237.2016.04.04.01.30.32 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 04 Apr 2016 01:30:32 -0700 (PDT) Received-SPF: pass (google.com: domain of eric.auger@linaro.org designates 2a00:1450:4010:c07::234 as permitted sender) client-ip=2a00:1450:4010:c07::234; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org; spf=pass (google.com: domain of eric.auger@linaro.org designates 2a00:1450:4010:c07::234 as permitted sender) smtp.mailfrom=eric.auger@linaro.org; dmarc=pass (p=NONE dis=NONE) header.from=linaro.org Received: by mail-lf0-x234.google.com with SMTP id g184so83825351lfb.3 for ; Mon, 04 Apr 2016 01:30:32 -0700 (PDT) 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=0TXWtQfsMaK3LS/pF5H98JebeiPocEJWsdgpaoOs7GQ=; b=WMwr2c0eS7HDBCeogXMe10taS41OffGqc5i6TqaRalFx8jTX6CQDUEydyyRkPqWtAI apoMRhY51x8nhwlVczIVvelYXkVYPtSwTa3hqCsPlBjxsz9wi4i40dRFOCRzqJqAvGgK NNDh3CGnET7iPOB7PUlf7IgquAr5np5DV1rhk= 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=0TXWtQfsMaK3LS/pF5H98JebeiPocEJWsdgpaoOs7GQ=; b=Eauo+ceBruGpqUB/bwWn0prHk2bN5RKcKEp0ThgiRS/jL0nVi0GtdsLzMshmaoLDQt hbdwp0xBN2pzQQ/BkuPvgTAK1Hvn/31oAd8q5S0fV+estnu6b8XnfwO+4fqKNRU4bavd Le4xAf8SvycscYLanMxoO2W8EjelKadccucpANyEN7W4MNoOL7hdqUqOQn6VgV5E7OKf dQESvXgNtzfovrhTYanuos1L6dV1ofHGqJVFJ2FIBlczS6cA4P9/0afQk5G4Ob7n1VVJ d4mdXVF2Kkjn6hONogL13XsOzSo1li7mC4aofUK6Pv6izJkNFJ628BV1V4nCM9dBeZ1o Ei9g== X-Gm-Message-State: AD7BkJIU3Ad5hAg3vAP3RDdKG0o+A0P8/jmbJHfKOpJYtu2YnN7Ye52GI1EWQG8oY6fcZD/wV08= X-Received: by 10.194.87.103 with SMTP id w7mr4786883wjz.13.1459758632478; Mon, 04 Apr 2016 01:30:32 -0700 (PDT) Return-Path: Received: from new-host-2.home (LMontsouris-657-1-37-90.w80-11.abo.wanadoo.fr. [80.11.198.90]) by smtp.gmail.com with ESMTPSA id j71sm1178257wmj.21.2016.04.04.01.30.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 04 Apr 2016 01:30:30 -0700 (PDT) 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 Cc: suravee.suthikulpanit@amd.com, patches@linaro.org, linux-kernel@vger.kernel.org, Manish.Jaggi@caviumnetworks.com, Bharat.Bhushan@freescale.com, pranav.sawargaonkar@gmail.com, p.fedin@samsung.com, iommu@lists.linux-foundation.org, Jean-Philippe.Brucker@arm.com, julien.grall@arm.com Subject: [PATCH v6 4/5] iommu/arm-smmu: do not advertise IOMMU_CAP_INTR_REMAP Date: Mon, 4 Apr 2016 08:30:10 +0000 Message-Id: <1459758611-2972-5-git-send-email-eric.auger@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1459758611-2972-1-git-send-email-eric.auger@linaro.org> References: <1459758611-2972-1-git-send-email-eric.auger@linaro.org> 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(-) -- 1.9.1 diff --git a/drivers/iommu/arm-smmu.c b/drivers/iommu/arm-smmu.c index 6562752..83d5200 100644 --- a/drivers/iommu/arm-smmu.c +++ b/drivers/iommu/arm-smmu.c @@ -1304,7 +1304,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: