From patchwork Mon Apr 4 08:19:29 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Auger Eric X-Patchwork-Id: 64958 Delivered-To: patches@linaro.org Received: by 10.112.199.169 with SMTP id jl9csp1053091lbc; Mon, 4 Apr 2016 01:19:44 -0700 (PDT) X-Received: by 10.25.142.130 with SMTP id q124mr2246548lfd.128.1459757984170; Mon, 04 Apr 2016 01:19:44 -0700 (PDT) Return-Path: Received: from mail-lf0-x22f.google.com (mail-lf0-x22f.google.com. [2a00:1450:4010:c07::22f]) by mx.google.com with ESMTPS id p75si15267422lfd.148.2016.04.04.01.19.44 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 04 Apr 2016 01:19:44 -0700 (PDT) Received-SPF: pass (google.com: domain of eric.auger@linaro.org designates 2a00:1450:4010:c07::22f as permitted sender) client-ip=2a00:1450:4010:c07::22f; 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::22f as permitted sender) smtp.mailfrom=eric.auger@linaro.org; dmarc=pass (p=NONE dis=NONE) header.from=linaro.org Received: by mail-lf0-x22f.google.com with SMTP id c62so157748296lfc.1 for ; Mon, 04 Apr 2016 01:19:44 -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=RIEDOpzOhQPMh+403m2ytU+5lbI857/oSzCXLQGU8xRTmW9SfG9/iA3wnMqZJvpOg0 Xk2KEQJL6Ayc8jnfqxxksvYZV/4zbZg+CuRH/ej2/09HhVU9n2P+kAsH/VOaUEmmQrJ3 DMkT2akO/ZVImceTfcnv8mcQ+EK3Do0HYsXJE= 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=Sdc7GLq0KRi34dUkagVeQcbplCAziF5Hx0CirnGSxI/TlXhVvP8/V3Ol0U4p6XKQRZ VQ20mfTjS5w1vg7tpyJocO8zd/wzLXrCFNJ4vBDK76fStjqWXO1GTsFtyT67lOJpVG1r 1KDx1EF8BxkHqfjL1jh1c2mMwggN1ugB+PQx4joo/aAOQ1GHdU5jVQ8mbaO1Io/mJqJM bLEQZBeioPSS4kMXLfuPobnQLI4gFsJ2bdVWVwOHeyRzS0r9CJpep9c9yh2D8wLNW3La a977xEW/ULPNkBexhwGES5RWyeFKJu7wWQ8xyedfbmXqAkVUfCgA4DfzjjmDpVp8qtzC hrVA== X-Gm-Message-State: AD7BkJK98WOnnbIAkvXF0Q6uLqF49UGsQ1U4Q+uEsPLP7ohn3k6xScRAL6upaPG9yspM0Os6CEQ= X-Received: by 10.194.90.3 with SMTP id bs3mr13885196wjb.105.1459757983945; Mon, 04 Apr 2016 01:19:43 -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 w8sm27717203wjf.19.2016.04.04.01.19.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 04 Apr 2016 01:19:42 -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 1/4] msi: Add a new MSI_FLAG_IRQ_REMAPPING flag Date: Mon, 4 Apr 2016 08:19:29 +0000 Message-Id: <1459757972-2814-2-git-send-email-eric.auger@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1459757972-2814-1-git-send-email-eric.auger@linaro.org> References: <1459757972-2814-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,