Received: by 10.192.165.148 with SMTP id m20csp60776imm; Wed, 9 May 2018 08:48:10 -0700 (PDT) X-Google-Smtp-Source: AB8JxZos210d0r7y1+8xHWCJxCPR2OFU5ni2pfBiKFnZFR/dUjhpBM1L0+0n1KC5m0F1BosOeAqL X-Received: by 2002:a63:7e58:: with SMTP id o24-v6mr37252427pgn.325.1525880890468; Wed, 09 May 2018 08:48:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525880890; cv=none; d=google.com; s=arc-20160816; b=KXg7O0K0CFrfQfKMOOmKAk3LBW5FPc+NJjVon6rxg+24EAI/abJcWoL/HcAEDl9Ktd ecMCi7nw6jel7Uk25X4+gK7swtuu789TMcpA5OiCVdrbYpViG1cQPi+H5rq5YJClsk7q csMW3ytgjHBx1gPxt53Z6aRAeAg43yWrnu15b4yVsivW63QutOhrNkDma2BZ6sg2HL47 KfZmHnEzaVEBju2IoAaR7nibGHrOU2YvRpIWZe1RLnM7ZXQThu6z4h1uEzqchS91G9Xj XMo7+fq37jUN8fCY0ScYQ8jCLYNAXpbqI2ntsuYH4EbziZ+xRwvugUJg0ZiHATbIEnQF AC6g== 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:arc-authentication-results; bh=gmebqu++agosTtSg5SJIHxVLyVMnVlTSxOX032gDhtc=; b=IYhfr6WbxyveT+zfhU9bWRIjRNEYGt3mA5R7TX0HtTh1E+jvcVY7VqROFza6Pmhf94 208lOSHkLzkL+bsMMDyHZkbJIQ4v5cDwZ/6xBDR78JMPQdqLGR3FVKciffTx5UDsnZn7 86ootx9ExRB9gYHqWUhH6XJneHJNbXEEhNgJCL9suUkqfAv7az7v2+OVEqhNl6tS6Jz2 3ggB5YpFYBS25HMAvLyyezgfAO1SLLrj+A9nkXFWgy6vXx1Y0FZ0KEMSfmEOqYS9HveT U4koRNQtCNNW09RFRvdqzEidpt4SzpX+T0c81f0dEX0hNRU0htlCsaKofvGgrrKwpFj1 kIQA== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w9-v6si25952315plp.389.2018.05.09.08.47.55; Wed, 09 May 2018 08:48:10 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965231AbeEIPrc (ORCPT + 99 others); Wed, 9 May 2018 11:47:32 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:35882 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S964907AbeEIPr2 (ORCPT ); Wed, 9 May 2018 11:47:28 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 08FA6407C561; Wed, 9 May 2018 15:47:27 +0000 (UTC) Received: from [10.18.17.89] (dhcp-17-89.bos.redhat.com [10.18.17.89]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1AA662023456; Wed, 9 May 2018 15:47:25 +0000 (UTC) Subject: Re: [PATCH v4 04/14] PCI/P2PDMA: Clear ACS P2P flags for all devices behind switches To: Alex Williamson Cc: Stephen Bates , Dan Williams , Logan Gunthorpe , Linux Kernel Mailing List , "linux-pci@vger.kernel.org" , "linux-nvme@lists.infradead.org" , linux-rdma , linux-nvdimm , "linux-block@vger.kernel.org" , Christoph Hellwig , Jens Axboe , Keith Busch , Sagi Grimberg , Bjorn Helgaas , Jason Gunthorpe , Max Gurtovoy , =?UTF-8?B?SsOpcsO0bWUgR2xpc3Nl?= , Benjamin Herrenschmidt , =?UTF-8?Q?Christian_K=c3=b6nig?= References: <20180423233046.21476-1-logang@deltatee.com> <20180423233046.21476-5-logang@deltatee.com> <64C231F5-DE36-415F-B308-3A423B0BBACB@raithlin.com> <15433946-f7f5-f610-4e80-380fb59920e5@redhat.com> <3C9FB262-A93C-4C8F-B1E0-85C6D6F78BC2@raithlin.com> <20180508180157.7c7b393f@w520.home> From: Don Dutile Message-ID: Date: Wed, 9 May 2018 11:47:31 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <20180508180157.7c7b393f@w520.home> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Wed, 09 May 2018 15:47:27 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Wed, 09 May 2018 15:47:27 +0000 (UTC) for IP:'10.11.54.4' DOMAIN:'int-mx04.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'ddutile@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/08/2018 08:01 PM, Alex Williamson wrote: > On Tue, 8 May 2018 19:06:17 -0400 > Don Dutile wrote: >> On 05/08/2018 05:27 PM, Stephen Bates wrote: >>> As I understand it VMs need to know because VFIO passes IOMMU >>> grouping up into the VMs. So if a IOMMU grouping changes the VM's >>> view of its PCIe topology changes. I think we even have to be >>> cognizant of the fact the OS running on the VM may not even support >>> hot-plug of PCI devices. >> Alex: >> Really? IOMMU groups are created by the kernel, so don't know how >> they would be passed into the VMs, unless indirectly via PCI(e) >> layout. At best, twiddling w/ACS enablement (emulation) would cause >> VMs to see different IOMMU groups, but again, VMs are not the >> security point/level, the host/HV's are. > > Correct, the VM has no concept of the host's IOMMU groups, only the > hypervisor knows about the groups, but really only to the extent of > which device belongs to which group and whether the group is viable. > Any runtime change to grouping though would require DMA mapping > updates, which I don't see how we can reasonably do with drivers, > vfio-pci or native host drivers, bound to the affected devices. Thanks, > > Alex > A change in iommu groups would/could require a device remove/add cycle to get an updated DMA-mapping (yet-another-overused-term: iommu 'domain').