Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752620AbeAERLO (ORCPT + 1 other); Fri, 5 Jan 2018 12:11:14 -0500 Received: from ale.deltatee.com ([207.54.116.67]:45906 "EHLO ale.deltatee.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752197AbeAERLK (ORCPT ); Fri, 5 Jan 2018 12:11:10 -0500 To: Alex Williamson Cc: Bjorn Helgaas , 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, Stephen Bates , Christoph Hellwig , Jens Axboe , Keith Busch , Sagi Grimberg , Bjorn Helgaas , Jason Gunthorpe , Max Gurtovoy , Dan Williams , =?UTF-8?B?SsOpcsO0bWUgR2xpc3Nl?= , Benjamin Herrenschmidt References: <20180104190137.7654-1-logang@deltatee.com> <20180104190137.7654-5-logang@deltatee.com> <20180104215721.GF189897@bhelgaas-glaptop.roam.corp.google.com> <20180104153551.3118f71b@t450s.home> <20fdb5bb-0236-c093-ed53-e12664022f53@deltatee.com> <20180104203300.79487c98@w520.home> From: Logan Gunthorpe Message-ID: <77ec7893-6ff5-ebdf-163d-fc4e02077cc2@deltatee.com> Date: Fri, 5 Jan 2018 10:10:51 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <20180104203300.79487c98@w520.home> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 172.16.1.162 X-SA-Exim-Rcpt-To: benh@kernel.crashing.org, jglisse@redhat.com, dan.j.williams@intel.com, maxg@mellanox.com, jgg@mellanox.com, bhelgaas@google.com, sagi@grimberg.me, keith.busch@intel.com, axboe@kernel.dk, hch@lst.de, sbates@raithlin.com, linux-block@vger.kernel.org, linux-nvdimm@lists.01.org, linux-rdma@vger.kernel.org, linux-nvme@lists.infradead.org, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, helgaas@kernel.org, alex.williamson@redhat.com X-SA-Exim-Mail-From: logang@deltatee.com Subject: Re: [PATCH 04/12] pci-p2p: Clear ACS P2P flags for all client devices X-SA-Exim-Version: 4.2.1 (built Tue, 02 Aug 2016 21:08:31 +0000) X-SA-Exim-Scanned: Yes (on ale.deltatee.com) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On 04/01/18 08:33 PM, Alex Williamson wrote: > That's exactly what IOMMU groups represent, the smallest set of devices > which have DMA isolation from other devices. By poking this hole, the > IOMMU group is invalid. We cannot turn off ACS only for a specific > device, in order to enable p2p it needs to be disabled at every > downstream port between the devices where we want to enable p2p. > Depending on the topology, that could mean we're also enabling p2p for > unrelated devices. Those unrelated devices might be in active use and > the p2p IOVAs now have a different destination which is no longer IOMMU > translated. Oh, so IOMMU groups are created based on the existing hierarchy at boot time and not based on the user's needs for isolation? Logan