From patchwork Thu Apr 28 08:22:03 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Auger Eric X-Patchwork-Id: 66867 Delivered-To: patches@linaro.org Received: by 10.140.93.198 with SMTP id d64csp78096qge; Thu, 28 Apr 2016 01:22:35 -0700 (PDT) X-Received: by 10.194.9.201 with SMTP id c9mr13698622wjb.7.1461831755421; Thu, 28 Apr 2016 01:22:35 -0700 (PDT) Return-Path: Received: from mail-wm0-x22c.google.com (mail-wm0-x22c.google.com. [2a00:1450:400c:c09::22c]) by mx.google.com with ESMTPS id rz7si9333992wjb.177.2016.04.28.01.22.35 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 28 Apr 2016 01:22:35 -0700 (PDT) Received-SPF: pass (google.com: domain of eric.auger@linaro.org designates 2a00:1450:400c:c09::22c as permitted sender) client-ip=2a00:1450:400c:c09::22c; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org; spf=pass (google.com: domain of eric.auger@linaro.org designates 2a00:1450:400c:c09::22c as permitted sender) smtp.mailfrom=eric.auger@linaro.org; dmarc=pass (p=NONE dis=NONE) header.from=linaro.org Received: by mail-wm0-x22c.google.com with SMTP id g17so28002710wme.1 for ; Thu, 28 Apr 2016 01:22:35 -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=+UdZMEJYjTYjk3eT/FOf6lNV1QTL6DVbdnW7Mleb8Mk=; b=Msd+5vFuJka3Sofm+aSbDG0bPFTfubnGiXCEFe+sgaJso/LFQ6caQ3riLkJmVAnY09 bQn7CHz+wjkKGHOh0WtC0Z+UIwKqhV+6C70WCnHwO/jACoAR++DLMM6qSCVF3EJZaXlp 7ZL3utwgsO+csPoZrWtC8rawonnMtwwq3RRp0= 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=+UdZMEJYjTYjk3eT/FOf6lNV1QTL6DVbdnW7Mleb8Mk=; b=hSA635AKhYGrdcX2lNuEPCB58kCdTu/zS0VFCjN6RHeRgcwglG/3YIPmtpFuvhA6rc dPwdoSYc3ZOJ0oGLorlEvVpmR3gEKl2xO7PtJpsYPUANj1J3/pA1xsP1cpNwx560u1LL m7Aih9zyFQEVRNz5GFpcyM3VG1DcEXp9I17DgYW6QXNkZECYdMhvSg5JVG++jAuelQts NszcmfguDYfiZiOGuRN+OG5bmjLrAcyptzKYawW5D6WsptDzSR0T6rHHVYjafm9ATQEY G1b1zEGrcJ7gO1eLYgaO+or8cwGMguLRLuHuVJW3w4IKFfX+gQdtZPkaQiQe3Q+CaRHK X4lA== X-Gm-Message-State: AOPr4FUqd2IMorH0mRpP2VlQk5tf+2k0KjI292QFsmRE3xjfS6Aon2LXcxX+U4roqUIgkz9gsDI= X-Received: by 10.194.116.103 with SMTP id jv7mr14802069wjb.22.1461831755155; Thu, 28 Apr 2016 01:22:35 -0700 (PDT) Return-Path: Received: from new-host-46.home (LMontsouris-657-1-37-90.w80-11.abo.wanadoo.fr. [80.11.198.90]) by smtp.gmail.com with ESMTPSA id b124sm3568725wmb.1.2016.04.28.01.22.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 28 Apr 2016 01:22:33 -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 Cc: patches@linaro.org, linux-kernel@vger.kernel.org, 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 v8 1/8] genirq/msi: Add a new MSI_FLAG_IRQ_REMAPPING flag Date: Thu, 28 Apr 2016 08:22:03 +0000 Message-Id: <1461831730-5575-2-git-send-email-eric.auger@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1461831730-5575-1-git-send-email-eric.auger@linaro.org> References: <1461831730-5575-1-git-send-email-eric.auger@linaro.org> Let's introduce a new msi_domain_info flag value, MSI_FLAG_IRQ_REMAPPING meant to tell the domain supports IRQ REMAPPING, also known as Interrupt Translation Service. On Intel HW this IRQ remapping capability is abstracted on IOMMU side while on ARM it is abstracted on MSI controller side. This flag will be used to know whether the MSI passthrough is safe. Signed-off-by: Eric Auger --- v4 -> v5: - seperate flag introduction from first user addition (ITS) --- include/linux/msi.h | 2 ++ 1 file changed, 2 insertions(+) -- 1.9.1 diff --git a/include/linux/msi.h b/include/linux/msi.h index 8b425c6..08441b1 100644 --- a/include/linux/msi.h +++ b/include/linux/msi.h @@ -270,6 +270,8 @@ enum { MSI_FLAG_MULTI_PCI_MSI = (1 << 3), /* Support PCI MSIX interrupts */ MSI_FLAG_PCI_MSIX = (1 << 4), + /* Support MSI IRQ remapping service */ + MSI_FLAG_IRQ_REMAPPING = (1 << 5), }; int msi_domain_set_affinity(struct irq_data *data, const struct cpumask *mask,