Received: by 10.192.165.148 with SMTP id m20csp4157809imm; Mon, 23 Apr 2018 20:35:31 -0700 (PDT) X-Google-Smtp-Source: AIpwx49f4dQRMDmr32SpL1llb91k0LhPDErXVltLusN122YYKMpp0d2k9bPOWUb8vXjwXpsFVfdL X-Received: by 2002:a17:902:9349:: with SMTP id g9-v6mr23123931plp.73.1524540931428; Mon, 23 Apr 2018 20:35:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524540931; cv=none; d=google.com; s=arc-20160816; b=qsknznt4TVzt2WXwW/k1XZmy37mL9/dBuFX8Gg/eBHDVKuo1WT2sbRZg9u5KnABCKV /aQpulKlTYZcP3KxfoBR7zBuekVhbdgepYiwX33kXuPhVn9qap8Y426moti/nqqwAt/+ PlmQilswN9xZZHjo/P+UDjHTdR387f5NaH/LugIsI0xoQ52KWrZwIIWhLxCSrgUgk4Wz gUF2hqI0/7qUPo6AmoiyY+3gANYv2cEEWjvZWWNWcWob//HGUCxk+9Vtg41Ed7fEvxs2 k4wCQ5pDCmDJndKlEZOLia59aK8R+K4R6Snkuo4EicH21fgXd1eOZA/kwVd3NP7S8CiY VCbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=LpUaxZbpTCXPN2ieLYDjDMA6xkx14tP0dTGvPETiqoQ=; b=icrpHeqhRWPuCLk+zyymnyzJffV7DF+U8BaVKkEC+e+p82x1AD6yFk/2YMaxh0QGsF 9OObJoKjagphg+N9PksTkqrExShJahsB6Lo2T952XHrqOYYNhhgaBRZH0C3DhHnZ6mRo yrD5f4ntLHNlWi1S5HsdQKr+nNjNjRc08sNWEsdITQRov1ScfLsMLDsMd6SEkkNjJc7l Sn2pCeTI4+7tbtE+LXFRBbWDzTxvSOM6LdWZO2ASRTNtDI3E2gt9wP1hrvcVOxxSdlYT dKR6oUaXPoTl9G52VRsCHkJO+ny79QZucBXDoabI8XSHcIvtrePD/UWeIOvG6ZkUOu54 VZaA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=I8tQrPIV; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y11si10974330pgq.435.2018.04.23.20.35.15; Mon, 23 Apr 2018 20:35:31 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=I8tQrPIV; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932868AbeDXDeH (ORCPT + 99 others); Mon, 23 Apr 2018 23:34:07 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:59392 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932797AbeDXDeF (ORCPT ); Mon, 23 Apr 2018 23:34:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Content-Transfer-Encoding: Content-Type:In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To: Subject:Sender:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=LpUaxZbpTCXPN2ieLYDjDMA6xkx14tP0dTGvPETiqoQ=; b=I8tQrPIVlWf/kkEzUwCDeNSNH 8klxlZagXwqg7s+J95XmLU5gQBGnWT0BGE5OcR/liY2L9e9IM1fJR5vXhCJUtTdM5xJDGkCs+Zcfc c/zECzLxdnSG+Iu7POjtuNN2/H6mO22Ip3sQHsvRSB5n7kbKMs1lEP4WGjhJUFeMkl6Lq3mJ3GYnS aYWcW/Epex96Mv6HovbAXBhF8KsBea9KTwXTO+lfHNlsILx1G6C+1b3xGYKa9SfAKK0qGGRNy7gid 6jw/l/sWfhwWIVq3q7Ebo/lkrxpWz2AW0elu1BBvA1S/4gtK3NTrEJ+7R+YUBzz56Bl3pq1NMLgO7 v+umtDMjA==; Received: from static-50-53-52-16.bvtn.or.frontiernet.net ([50.53.52.16] helo=midway.dunlab) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1fAoiC-0003Qs-SK; Tue, 24 Apr 2018 03:33:48 +0000 Subject: Re: [PATCH v4 04/14] PCI/P2PDMA: Clear ACS P2P flags for all devices behind switches To: Logan Gunthorpe , linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, linux-nvme@lists.infradead.org, linux-rdma@vger.kernel.org, linux-nvdimm@lists.01.org, linux-block@vger.kernel.org Cc: Stephen Bates , Christoph Hellwig , Jens Axboe , Keith Busch , Sagi Grimberg , Bjorn Helgaas , Jason Gunthorpe , Max Gurtovoy , Dan Williams , =?UTF-8?B?SsOpcsO0bWUgR2xpc3Nl?= , Benjamin Herrenschmidt , Alex Williamson , =?UTF-8?Q?Christian_K=c3=b6nig?= References: <20180423233046.21476-1-logang@deltatee.com> <20180423233046.21476-5-logang@deltatee.com> From: Randy Dunlap Message-ID: <76c1bd8e-6eb4-3238-5cee-7fdeaeccc574@infradead.org> Date: Mon, 23 Apr 2018 20:33:47 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <20180423233046.21476-5-logang@deltatee.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 04/23/2018 04:30 PM, Logan Gunthorpe wrote:> > Signed-off-by: Logan Gunthorpe > --- > drivers/pci/Kconfig | 9 +++++++++> drivers/pci/p2pdma.c | 45 ++++++++++++++++++++++++++++++---------------> drivers/pci/pci.c | 6 ++++++> include/linux/pci-p2pdma.h | 5 +++++> 4 files changed, 50 insertions(+), 15 deletions(-) > > diff --git a/drivers/pci/Kconfig b/drivers/pci/Kconfig > index b2396c22b53e..b6db41d4b708 100644 > --- a/drivers/pci/Kconfig > +++ b/drivers/pci/Kconfig > @@ -139,6 +139,15 @@ config PCI_P2PDMA > transations must be between devices behind the same root port. > (Typically behind a network of PCIe switches). > > + Enabling this option will also disable ACS on all ports behind > + any PCIe switch. This effectively puts all devices behind any > + switch heirarchy into the same IOMMU group. Which implies that hierarchy group, which and sames fixes in the commit description... > + individual devices behind any switch will not be able to be > + assigned to separate VMs because there is no isolation between > + them. Additionally, any malicious PCIe devices will be able to > + DMA to memory exposed by other EPs in the same domain as TLPs > + will not be checked by the IOMMU. > + > If unsure, say N. > > config PCI_LABEL -- ~Randy