Received: by 10.192.165.148 with SMTP id m20csp4898779imm; Tue, 8 May 2018 17:02:53 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqh5Pg+b88IGb+OEbYmY2xrnQlEDt83XHueq/w+jS0NJSErGpNCrIhxCtRr7yff5vMFKyr3 X-Received: by 10.98.61.201 with SMTP id x70mr41172624pfj.85.1525824173720; Tue, 08 May 2018 17:02:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525824173; cv=none; d=google.com; s=arc-20160816; b=I07MtU0lurE+h+BhGCpDJaHwCtWnqIbzRAwO+bXJ+3A5bkGLT+b7V79SSk4E5atPdi sjgmIgOStNaQAr6ez05gQ5QGJXBZPboleEuCn9KIB5TjwN2BuGQ+GKECmY/QDNaNPFue 0C1ZqyF09UxO2U9dOHqAzYqg3iIEORJcIxR3wGjiAry9yvm17nsJ1GaNalS9tIgyRxup huFzlXosJDs1mpv6Khnia4HAf55K+a69ozZZrTq+ivJgOA8dG6YTMNLAX+N/8iCvS/fW dwxdICNm4jiYt2THB/G58hSE13jky5Wd+W44ZPz5CzdnCvbs6XwDYoVMJ/OTJXA6fOEn Zqdg== 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:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :arc-authentication-results; bh=eAIeLNW1UbtjyY5QcgdU5bXAu01eTfzN1RPe6U0HE0U=; b=NlakFN5cpFaiq8/QU4EVs8TsQF716tJSYVnvwRoOF0VLASX3LPL9OrwOQtbEBY3yZj wCcee1M9HHA55RuL9EOWtXV3yXfKw+se3R/1ew93YHu0S2dkBC+8LN0HufD7xVQzn6B5 yPQJRcRfF3NK/R5UP94ypGWff0PaFjUGr8BbidLhMgjtnYbgS++n42ITTdSAe7O20Mzz LW0mnVnSTXg5NcSzaENhqV45qsgJezmJ4SrwtC3J9PiJRDBZ34UsJL1PKhOJXkJEvsLR QId/LGEQ+yKvZ7SN1dC4ABWm8lX0dPn9pKGpF2euc/JsSjsoJmdqCL6cGpd2z8jJb4sf zFsw== 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 o73si20672590pfg.327.2018.05.08.17.02.37; Tue, 08 May 2018 17:02:53 -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 S932759AbeEIACC (ORCPT + 99 others); Tue, 8 May 2018 20:02:02 -0400 Received: from mx1.redhat.com ([209.132.183.28]:38808 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754148AbeEIACA (ORCPT ); Tue, 8 May 2018 20:02:00 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D850682B8; Wed, 9 May 2018 00:01:59 +0000 (UTC) Received: from w520.home (ovpn-116-103.phx2.redhat.com [10.3.116.103]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3D987780D9; Wed, 9 May 2018 00:01:58 +0000 (UTC) Date: Tue, 8 May 2018 18:01:57 -0600 From: Alex Williamson To: Don Dutile 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?SsOpcsO0?= =?UTF-8?B?bWU=?= Glisse , Benjamin Herrenschmidt , Christian =?UTF-8?B?S8O2bmln?= Subject: Re: [PATCH v4 04/14] PCI/P2PDMA: Clear ACS P2P flags for all devices behind switches Message-ID: <20180508180157.7c7b393f@w520.home> In-Reply-To: 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> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Wed, 09 May 2018 00:02:00 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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