Received: by 10.223.185.116 with SMTP id b49csp252421wrg; Fri, 2 Mar 2018 18:19:00 -0800 (PST) X-Google-Smtp-Source: AG47ELskXr5WF/2sYc5RsNc5pCNVRGD8oCm7yVAXFKp7rCg6z9TkRUkrVRhbZ1NDIrVKkOe759Sz X-Received: by 10.101.72.199 with SMTP id o7mr6085549pgs.303.1520043540393; Fri, 02 Mar 2018 18:19:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520043540; cv=none; d=google.com; s=arc-20160816; b=S2BlYSpHjCbkb35+ADinvbkIlEJJAUeRapACZeV+DCSZ/Tpq62V+HAYnIBl6ejHcmR JyBItJOVA5n91ccRi1Tw/fVi1e+ZTJFix9z2anAmRSmvJYc2UBK4ggJbd4C3z191v0nU HzDOTa6uwWcSi2P+26zglEQDVgR7w+6tuKRDMttXit1x9QgRlyVb6LFHA6YPUXBBm2W/ iU3VLWBWphYshDjZjd7ejbo+CM4T0L/H1sjgOJfxQu/1p4CZrG4WL8vMv0+3AvOnBOHX 6mslH9gkQm+v6Dt5fzqhLnLqRM9eu69SLUwJThJDOJwHexQe/UwtJPAogrx7csjaMh35 yjqw== 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=z7oEThgoa6yXyxDvG1+J5KSlCW29Yro6i1bLLLnMMaQ=; b=W3AS1WcMD2y+0Mua+Hm1+C5YwRCDvpwTUpRE7VBN+g+ME7Q09DipE40ceIP78oTnCk fJ7sIn4iildaedstwioWt1nfH6bI2gF0cDhkXVva2W/RdfcrmmU2NJ08xLu/9+q5ZF/4 LQuBQmcqNck1IT329B/1Mvi6UI9Bq2lbJFgnOzQOF6fGzTVFdbhnpcPLq0p6Uq+rPOph Fcg5vsdswAp7Wemg0A3bA9xXUAge/D9vy3A4yNclNlmnTlnnjJdWKsGCm3+d3PaA/tH1 BT7tF/QoDI/o/gMkNhZIhUthlfV8jdhu5hUmrq6k1kSBSeOkExK0QzrziAH63xTX4auq faNg== 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 t134si4843999pgc.664.2018.03.02.18.18.45; Fri, 02 Mar 2018 18:19:00 -0800 (PST) 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 S1428476AbeCBSOP (ORCPT + 99 others); Fri, 2 Mar 2018 13:14:15 -0500 Received: from mx1.redhat.com ([209.132.183.28]:53464 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751841AbeCBSON (ORCPT ); Fri, 2 Mar 2018 13:14:13 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 8AC8B85550; Fri, 2 Mar 2018 18:14:13 +0000 (UTC) Received: from t450s.home (ovpn-117-203.phx2.redhat.com [10.3.117.203]) by smtp.corp.redhat.com (Postfix) with ESMTP id B4B5B608EF; Fri, 2 Mar 2018 18:14:11 +0000 (UTC) Date: Fri, 2 Mar 2018 11:14:11 -0700 From: Alex Williamson To: "Tian, Kevin" Cc: Alexander Duyck , Bjorn Helgaas , "linux-pci@vger.kernel.org" , "Duyck, Alexander H" , "virtio-dev@lists.oasis-open.org" , "kvm@vger.kernel.org" , Netdev , "Daly, Dan" , LKML , Maximilian Heyne , "Wang, Liang-min" , "Rustad, Mark D" , David Woodhouse , "dwmw@amazon.co.uk" , Ilya Lesokhin , Don Dutile , Kirti Wankhede Subject: Re: [PATCH] pci-iov: Add support for unmanaged SR-IOV Message-ID: <20180302111411.47a58371@t450s.home> In-Reply-To: References: <20180227190520.3273.79728.stgit@localhost.localdomain> <20180227144015.228d4f5c@w520.home> <20180228155949.00fde8ae@w520.home> <20180301132224.1ca06949@w520.home> 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.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Fri, 02 Mar 2018 18:14:13 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 2 Mar 2018 06:54:17 +0000 "Tian, Kevin" wrote: > > From: Alex Williamson > > Sent: Friday, March 2, 2018 4:22 AM > > > > > > I am pretty sure that you are describing is true of some, but not for > > > all. I think the Amazon solutions and the virtio solution are doing > > > hard partitioning of the part. I will leave it to those guys to speak > > > for themselves since I don't know anything about the hardware design > > > of those parts. > > > > I think we'd need device specific knowledge and enablement to be able > > to take advantage of any hardware partitioning, otherwise we need to > > assume the pf is privileged, as implemented in other sriov devices. > > > > I'm also trying to imagine whether there's a solution via the new > > vfio/mdev interface, where the mdev vendor driver would bind to the pf > > and effectively present itself as the mdev device. The vendor driver > > could provide sriov capabilities and bear the burden of ensuring that > > the pf is used cooperatively. The only existing mdev vendor drivers are > > vGPUs and rely on on-device DMA translation and isolation, such as > > through GTTs, but there have been some thoughts on providing IOMMU > > based > > isolation of mdev/sriov mixed devices (assuming DMA is even required > > for userspace management of the pf in this use case). [Cc Kirti] > > Thanks, > > > > Hope not distracting this thread, but above sounds like an interesting > idea. Actually we ever brainstormed similar thought for another > potential usage - supporting VF live migration. We are already working > on an generic extension to allow state save/restore of mdev instance. > If vendor driver could further wrap pf as a mdev instance, it could > leverage the same framework for a clean state migration on VF. based > on mmap callback the vendor driver can easily switch back-and-forth > between pass through and trap/emulation of the VF resources. Of > course doing so alone doesn't address all the demands of VF live > migration (e.g. dirty page tracking still requires other techniques), > but it does pave a way toward a general framework to support VF > live migration. > > If above is feasible, finally we could use one mdev framework to > manage both mdev and pf/vf assignment, while providing added > values which are difficult to achieve today. :-) mdev drivers may be the first to support migration, but I wonder if a full mdev implementation is necessary for it. Once the vfio api is define, device specific extensions to vfio-pci might be able to implement migration more directly. Thanks, Alex