From patchwork Wed May 4 15:18:07 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Auger X-Patchwork-Id: 9015911 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 26506BF29F for ; Wed, 4 May 2016 15:20:34 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5EF5020397 for ; Wed, 4 May 2016 15:20: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 958FE20395 for ; Wed, 4 May 2016 15:20: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 1axyZp-0000Fp-ST; Wed, 04 May 2016 15:19:01 +0000 Received: from mail-wm0-x22c.google.com ([2a00:1450:400c:c09::22c]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1axyZc-00009t-OE for linux-arm-kernel@lists.infradead.org; Wed, 04 May 2016 15:18:49 +0000 Received: by mail-wm0-x22c.google.com with SMTP id a17so100406385wme.0 for ; Wed, 04 May 2016 08:18:26 -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=XPdu7fXp21THAjjTELweh8I/MuJT3N7EFwaBM9K4uR1K598bnROX9aa8EuqQok3PBJ FAdNgib9ncfe+tO4+vpeJ1pa9Er23CS95qPOiJoUu6Yk+xDklY6oHfEHznM6sD5Lz/bv 15bdtP0M7V1byVuPXw3EIMvcJYNAcbXeHxQbE= 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=hIDpS1xW+NSRLMDI8g8ZTR9s0aYDIeJjjnG5kylhFe0JPv8/sYkTltDK/Q/jcUVfcU caJ3SrzPVEJwHp0tE0GxnKkHyzphx+E73h4ZqbF/fHCcQvhQj7T+eiU4TfDNnj+/FWnB 69MEFOBo8b1Sioo/zDBC/ViVhZPiUSHwrHmNH7UuXBS1D7ceTk3hhTmW02QyL9iNbyPL NokOd0RJM6mHcLoE7/xz3Vlm6IKIiu9pMnpOPmt5dTL1ixVT1K+/mEcyUSqtRODkQD7A ppKLrztRXaoMgV4wwUlLPXP21assSyt79/n4Mfy0gKhc5imPEKNphe9srYSdIsuLzdew HL2Q== X-Gm-Message-State: AOPr4FVaA3UfvFNgwQx6sLzd7J8Vg0BzlNG22GtEGgM93csrBOH7ynW3ojMX5i5WxM0oW/0j X-Received: by 10.194.203.227 with SMTP id kt3mr9092893wjc.73.1462375105232; Wed, 04 May 2016 08:18:25 -0700 (PDT) Received: from new-host-57.home (LMontsouris-657-1-37-90.w80-11.abo.wanadoo.fr. [80.11.198.90]) by smtp.gmail.com with ESMTPSA id c4sm4773821wjm.24.2016.05.04.08.18.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 04 May 2016 08:18:23 -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 Subject: [PATCH v9 1/8] genirq/msi: Add a new MSI_FLAG_IRQ_REMAPPING flag Date: Wed, 4 May 2016 15:18:07 +0000 Message-Id: <1462375094-2390-2-git-send-email-eric.auger@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1462375094-2390-1-git-send-email-eric.auger@linaro.org> References: <1462375094-2390-1-git-send-email-eric.auger@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160504_081848_983601_5A18C4D7 X-CRM114-Status: GOOD ( 11.45 ) 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: julien.grall@arm.com, patches@linaro.org, Jean-Philippe.Brucker@arm.com, p.fedin@samsung.com, linux-kernel@vger.kernel.org, Bharat.Bhushan@freescale.com, iommu@lists.linux-foundation.org, pranav.sawargaonkar@gmail.com, yehuday@marvell.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=-6.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=unavailable 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 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(+) 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,