From patchwork Mon Apr 4 08:19:30 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Auger X-Patchwork-Id: 8738301 Return-Path: X-Original-To: patchwork-kvm@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 D91C5C0553 for ; Mon, 4 Apr 2016 08:20:10 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0FA42201DD for ; Mon, 4 Apr 2016 08:20:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1EC6C20259 for ; Mon, 4 Apr 2016 08:20:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754730AbcDDITu (ORCPT ); Mon, 4 Apr 2016 04:19:50 -0400 Received: from mail-lf0-f42.google.com ([209.85.215.42]:35555 "EHLO mail-lf0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754537AbcDDITt (ORCPT ); Mon, 4 Apr 2016 04:19:49 -0400 Received: by mail-lf0-f42.google.com with SMTP id c126so38840042lfb.2 for ; Mon, 04 Apr 2016 01:19:48 -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=zB2wDg59XNtH3PXzpfR+aImbEOn4ilYrFwkpOh2hE6g=; b=KvFFpIDRO5V/y6JWvIFVbRiPlVU5I8SS51DYSxD4tGF5xvlfAIJ0Zjb26uyrHAPLZD OYCEqv44EzWdxfSpIcdFS7NNoXU0/KKErdjLdvcCTrlD9bcEl6MxBgjowe+yRzngZ9O0 ybtJo9s8pgqC4jzE73lK3R/XV2dHjrAV3+lBs= 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=zB2wDg59XNtH3PXzpfR+aImbEOn4ilYrFwkpOh2hE6g=; b=DaCbe25rz1H3cStcVcBqz3pkT1ScbP4mDAFXWq/AiMVhB3ss1zx2Q/24oOR9QRFieE fNNogcslZHMXazuAVRe29x8zTfWpZnA072wm8BbVEpsUAvXHz/wEFmq6yV4BGXzys2Ck 7Bzgv9FAXNk2pVoCfmz8cO1htDkbVoUtj+wWhhdjbPqTIy4e2a2CwBCLM3uVsFvZxmCF t28OryrBY9AynZq5fngQKBhOv/ovjI2QcLsUtrsHYqBwQKqLrbvi/MHy/ngQXwAhxZLS NjWQyeLdlmhx3m8/vdGkNbzLRN6bVsQOwY7A9VXSxcXL3UF/Ra56p/lt5tnIMNz6nykL RXBg== X-Gm-Message-State: AD7BkJKVC2zI3iIg7Xh2uG6BXlejiTVMQtfPPXUP6ciapvUpQFDXYKra37aNL9BM1t7pmjYJ X-Received: by 10.194.205.138 with SMTP id lg10mr16786001wjc.153.1459757987461; Mon, 04 Apr 2016 01:19:47 -0700 (PDT) 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.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 04 Apr 2016 01:19:45 -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 2/4] irqchip/gic-v3-its: ITS advertises MSI_FLAG_IRQ_REMAPPING Date: Mon, 4 Apr 2016 08:19:30 +0000 Message-Id: <1459757972-2814-3-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> Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Spam-Status: No, score=-7.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,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 The ITS is the first ARM MSI controller advertising the new MSI_FLAG_IRQ_REMAPPING flag. It does so because it supports interrupt translation service. This HW support offers isolation of MSIs, feature used when using KVM device passthrough. Signed-off-by: Eric Auger --- v5: new --- drivers/irqchip/irq-gic-v3-its-pci-msi.c | 3 ++- drivers/irqchip/irq-gic-v3-its-platform-msi.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) 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/drivers/irqchip/irq-gic-v3-its-platform-msi.c b/drivers/irqchip/irq-gic-v3-its-platform-msi.c index 470b4aa..8c0d69d 100644 --- a/drivers/irqchip/irq-gic-v3-its-platform-msi.c +++ b/drivers/irqchip/irq-gic-v3-its-platform-msi.c @@ -63,7 +63,8 @@ static struct msi_domain_ops its_pmsi_ops = { }; static struct msi_domain_info its_pmsi_domain_info = { - .flags = (MSI_FLAG_USE_DEF_DOM_OPS | MSI_FLAG_USE_DEF_CHIP_OPS), + .flags = (MSI_FLAG_USE_DEF_DOM_OPS | MSI_FLAG_USE_DEF_CHIP_OPS | + MSI_FLAG_IRQ_REMAPPING), .ops = &its_pmsi_ops, .chip = &its_pmsi_irq_chip, };