Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752391AbdHGHi4 (ORCPT ); Mon, 7 Aug 2017 03:38:56 -0400 Received: from ozlabs.ru ([107.173.13.209]:52698 "EHLO ozlabs.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752240AbdHGHia (ORCPT ); Mon, 7 Aug 2017 03:38:30 -0400 From: Alexey Kardashevskiy To: linuxppc-dev@lists.ozlabs.org Cc: Alexey Kardashevskiy , David Gibson , kvm-ppc@vger.kernel.org, kvm@vger.kernel.org, Yongji Xie , Eric Auger , Kyle Mahlkuch , Alex Williamson , Jike Song , Bjorn Helgaas , Robin Murphy , Joerg Roedel , Arvind Yadav , Benjamin Herrenschmidt , David Woodhouse , Kirti Wankhede , Mauricio Faria de Oliveira , Neo Jia , Paul Mackerras , Vlad Tsyrklevich , iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org Subject: [RFC PATCH v5 4/5] powerpc/iommu: Set IOMMU_GROUP_CAP_ISOLATE_MSIX Date: Mon, 7 Aug 2017 17:25:47 +1000 Message-Id: <20170807072548.3023-5-aik@ozlabs.ru> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170807072548.3023-1-aik@ozlabs.ru> References: <20170807072548.3023-1-aik@ozlabs.ru> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1076 Lines: 30 This sets IOMMU_GROUP_CAP_ISOLATE_MSIX to a group unconditionally as there is no IOMMU-capable hardware without such a feature. On IBM POWERPC (POWER8) [1], PCI host bridge maintains BFDN-to-PE translation (PE stands for "partitionable endpoint"), and PE index is used to look at Interrupt Vector Table (IVT) to identify the interrupt server. Without these translations in place, MSIX messages won't pass PHB. [1] 3.2.4. MSI Design http://openpowerfoundation.org/wp-content/uploads/resources/IODA2Spec/IODA2WGSpec-1.0.0-20160217.pdf Signed-off-by: Alexey Kardashevskiy --- arch/powerpc/kernel/iommu.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/powerpc/kernel/iommu.c b/arch/powerpc/kernel/iommu.c index 233ca3fe4754..dca0a83f1560 100644 --- a/arch/powerpc/kernel/iommu.c +++ b/arch/powerpc/kernel/iommu.c @@ -936,6 +936,7 @@ void iommu_register_group(struct iommu_table_group *table_group, if (!name) return; iommu_group_set_name(grp, name); + iommu_group_set_caps(grp, 0, IOMMU_GROUP_CAP_ISOLATE_MSIX); kfree(name); } -- 2.11.0