From patchwork Tue Mar 1 18:27:48 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Auger Eric X-Patchwork-Id: 63331 Delivered-To: patches@linaro.org Received: by 10.112.199.169 with SMTP id jl9csp1981596lbc; Tue, 1 Mar 2016 10:28:42 -0800 (PST) X-Received: by 10.28.49.3 with SMTP id x3mr486598wmx.4.1456856919380; Tue, 01 Mar 2016 10:28:39 -0800 (PST) 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 y133si431622wme.72.2016.03.01.10.28.39 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 01 Mar 2016 10:28:39 -0800 (PST) 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; 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; dkim=pass header.i=@linaro.org Received: by mail-wm0-x22c.google.com with SMTP id p65so45942525wmp.0 for ; Tue, 01 Mar 2016 10:28:39 -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=mA+3qBDSTvM1BgPScA4kHmu5Lv2T5MTQHN+hvr/7s7Y=; b=P6HBcX33QPRJwnYDdFlUsbNQaTakyE54M7lf6kQwY3nes8L2uWg98FpeU/xbCzkGTP OFowfyhMyA0Cq4LKwV8JF/e2Em0IjmHgghW+1MIQgOI1tFyQw/j9nUf98wyAkhwmwxhq OoSbPDXdlY8hbUOl5rNfmsgq2xeEB0nebU2N0= 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=mA+3qBDSTvM1BgPScA4kHmu5Lv2T5MTQHN+hvr/7s7Y=; b=PxygJQsYd+l+dfBemKfLOVgxVpn0g9WAKTC6oNIL+nKZ8Q7t1m1pfUngFJWT4kHE95 Kke4orhXNdQSOHrQNA18mcIv7aM+gEI3IUiyCdWD0PQ2p/uGWGfeujRvPUXkKMmNuwhn cupk5LhNHvtw9M29lYK/j3JcemZYJhjj66Yxmz0k4805HIimHxQmhRcBzjtDILqqPuQd Z0ba0PTR3Zb9WPXeU6HZ1nGkcycsJh841ubez9Rze/6agcfUxiGhmbWXZGggtC9fqVQ7 3Yz/z1Pz2zvWVy85Cj+2tSUJE2Dt/o3Gr1HunQQ0hnK7LKEiyESkbkTHnidf/2Ys4RdA Heyw== X-Gm-Message-State: AD7BkJL4wyfvmmWBjpg3P6zVR3OEndDWCNOida9g3l8HRuMN0ce0/ZPF8cDtoC8UuRJSuiwaR4A= X-Received: by 10.194.58.12 with SMTP id m12mr24767001wjq.22.1456856919181; Tue, 01 Mar 2016 10:28:39 -0800 (PST) Return-Path: 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.28.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 01 Mar 2016 10:28:35 -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 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 Subject: [RFC v5 08/17] msi: Add a new MSI_FLAG_IRQ_REMAPPING flag Date: Tue, 1 Mar 2016 18:27:48 +0000 Message-Id: <1456856877-4817-9-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> 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 a2a0068..03eda72 100644 --- a/include/linux/msi.h +++ b/include/linux/msi.h @@ -261,6 +261,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,