From patchwork Fri Feb 12 08:13:13 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Auger Eric X-Patchwork-Id: 61828 Delivered-To: patches@linaro.org Received: by 10.112.43.199 with SMTP id y7csp676758lbl; Fri, 12 Feb 2016 00:14:28 -0800 (PST) X-Received: by 10.28.187.198 with SMTP id l189mr3164751wmf.0.1455264868773; Fri, 12 Feb 2016 00:14:28 -0800 (PST) Return-Path: Received: from mail-wm0-x234.google.com (mail-wm0-x234.google.com. [2a00:1450:400c:c09::234]) by mx.google.com with ESMTPS id bw12si7057975wjb.24.2016.02.12.00.14.28 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 12 Feb 2016 00:14:28 -0800 (PST) Received-SPF: pass (google.com: domain of eric.auger@linaro.org designates 2a00:1450:400c:c09::234 as permitted sender) client-ip=2a00:1450:400c:c09::234; Authentication-Results: mx.google.com; spf=pass (google.com: domain of eric.auger@linaro.org designates 2a00:1450:400c:c09::234 as permitted sender) smtp.mailfrom=eric.auger@linaro.org; dkim=pass header.i=@linaro.org Received: by mail-wm0-x234.google.com with SMTP id g62so52011637wme.0 for ; Fri, 12 Feb 2016 00:14:28 -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=goSpaPTahf6fgFaMgWLjo6qFUR2mWx+rHu+Z4BEF63g=; b=Qw3B6qLqIjtq/C2vlhOmKKUIChn+r5IBE/ZqkDskDBy8TRQ7e2P/jfUrTFCm3YsNau yK9BNz4C8eC10auTEKDX3z57JDu+5X1hZ4mOAvJ4mp5kmoTzXclGvmIR8ihVfBQOCZyZ 3PpyIoKu66HUMLg787iJM2gzPi/3u9Uzm2hNo= 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=goSpaPTahf6fgFaMgWLjo6qFUR2mWx+rHu+Z4BEF63g=; b=O5XkwKsbyL2ihH/1Bx81wP1FSx02sYXiiRIvO+t3MC6hiaJM88CIE5cgggHheM4Ffj YUdKDa4NkXPTV22D9DMgkuwW6bLZpsdWUShGoy+yTOZ+B8vp3N+LSCseLCzJNxkbDRsK KygKGUN7Dr2l5EthItTN/EsCtDoXviVHufL6MyLHszI5f/+sQSeCiODw/v4RTWG2jKyv glIlMAKs/iitPYT0UCXq2lHvuiwGTf/wFv0BGkTGqw0bAxnptMqajbNt2C16O4sZiKtk 7JcrhgIFm3xpW0DMUzOcEHZPXPJOzS++PMJ3jUPtU6heJPMi1PYopL5Aq8Vh36KC74/H 5Uig== X-Gm-Message-State: AG10YOSChiDFaJ3r/lj0YW5Kin1N76SAOIoWXXaUCg7UFNdy0VtQhMVr9Dbq9WpcHAPIZt9Skmg= X-Received: by 10.28.47.9 with SMTP id v9mr2743745wmv.69.1455264868592; Fri, 12 Feb 2016 00:14:28 -0800 (PST) Return-Path: Received: from new-host-17.home (LMontsouris-657-1-37-90.w80-11.abo.wanadoo.fr. [80.11.198.90]) by smtp.gmail.com with ESMTPSA id x66sm1243977wmb.20.2016.02.12.00.14.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 12 Feb 2016 00:14:25 -0800 (PST) From: Eric Auger To: eric.auger@st.com, eric.auger@linaro.org, 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, sherry.hurwitz@amd.com, brijesh.singh@amd.com, leo.duran@amd.com, Thomas.Lendacky@amd.com Subject: [RFC v3 11/15] msi: Add a new MSI_FLAG_IRQ_REMAPPING flag Date: Fri, 12 Feb 2016 08:13:13 +0000 Message-Id: <1455264797-2334-12-git-send-email-eric.auger@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1455264797-2334-1-git-send-email-eric.auger@linaro.org> References: <1455264797-2334-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 capability is abstracted on IOMMU side while on ARM it is abstracted on MSI controller side. GICv3 ITS HW is the first HW advertising that feature. Signed-off-by: Eric Auger --- drivers/irqchip/irq-gic-v3-its-pci-msi.c | 3 ++- include/linux/msi.h | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) -- 1.9.1 diff --git a/drivers/irqchip/irq-gic-v3-its-pci-msi.c b/drivers/irqchip/irq-gic-v3-its-pci-msi.c index aee60ed..8223765 100644 --- a/drivers/irqchip/irq-gic-v3-its-pci-msi.c +++ b/drivers/irqchip/irq-gic-v3-its-pci-msi.c @@ -96,7 +96,8 @@ static struct msi_domain_ops its_pci_msi_ops = { static struct msi_domain_info its_pci_msi_domain_info = { .flags = (MSI_FLAG_USE_DEF_DOM_OPS | MSI_FLAG_USE_DEF_CHIP_OPS | - MSI_FLAG_MULTI_PCI_MSI | MSI_FLAG_PCI_MSIX), + MSI_FLAG_MULTI_PCI_MSI | MSI_FLAG_PCI_MSIX | + MSI_FLAG_IRQ_REMAPPING), .ops = &its_pci_msi_ops, .chip = &its_msi_irq_chip, }; 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,