Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3160114pxb; Mon, 25 Jan 2021 08:26:53 -0800 (PST) X-Google-Smtp-Source: ABdhPJwXblnN+Zmf/rrRprMthuuvYZBDAXI7C3JhihrzLHp1/gbuJdBdoGGeOjlgSUEL4wN2UsPW X-Received: by 2002:aa7:cfc3:: with SMTP id r3mr1143098edy.125.1611592013375; Mon, 25 Jan 2021 08:26:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611592013; cv=none; d=google.com; s=arc-20160816; b=qBVa3ebNkgN6jOgX6IwaW8lhoZ7tFXMxfMd0QOqWLKpK+BQK/maDBGOCWdi+TZi2L/ ezL5Pv9tNvxp7YK1FBu1aOHBF0ut6Q22o2W1bTqOwwQMv19upsjy5MYctA6g4N93mBGI kPR3MUwBRy0Npm3U7k/Uz5WtHT60akSHXJLK7NeM4u5OM6ljTDQ6RPhjXbi2eSVKZoMi +Vvpwjo6bV6dvlY9cLD/kvLEhVw9IiYM0TktpSJMca8cU3l7pA5Ux15D6xuLrr8l4jX8 9iegS2pqXBhmcvFylbOEnkUmk0POecypgZo5CV2l/kM8FsP0ADuTV9isznbqgzuYEYFO JODw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date:dkim-signature; bh=d8rYmfLQ4//SMhY+Gkg+k76r3SnhHe3zISj6ZiBrG4Y=; b=YBFgiMGNv1VxwvW6ZXoLI5ZuLtXRBomnwNTMvDf25mOsrPe9IOgEFiAhgPJiqxJPc0 ZlHM5325Z9Hj+JWiekruSoHEIBpvctS3Nrht46v07+8UVh84DvcLSiZL9lPR9ufqgN7Q QaxKqZ9ZyKR+DB5XoB7rVNWzAkMa7Lvf1E8oeve548LUOqgEXrCCyRezMTtzrD+ZQOQC fWaurA2Lo6nzC8Wach+10LuXPfbgv520tHzyQd+ZIgw8cWyd7fjPIrWumq4SNNUOc22A urw6FXidvyr+4SOH8sFxV8mKGZV469BbxC+yBCfL4SSzryuMBgs5NLb8sJts8Biv1Lj0 O8+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=ihy6sFZp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c15si2370544ede.341.2021.01.25.08.26.27; Mon, 25 Jan 2021 08:26:53 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=ihy6sFZp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730679AbhAYQXK (ORCPT + 99 others); Mon, 25 Jan 2021 11:23:10 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:33903 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730655AbhAYQW0 (ORCPT ); Mon, 25 Jan 2021 11:22:26 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1611591658; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=d8rYmfLQ4//SMhY+Gkg+k76r3SnhHe3zISj6ZiBrG4Y=; b=ihy6sFZp92x2XiIjRt3iskniFukXNZZJDGd2ntX9Q0jdadiEs6Xwcg83GFrSkxy/3pxM+k +yrha1Y0lnH3Im/7yb0jCuctZHhyvEkXq0I0QcLfK3ReddhvKi9b5Esu02iNVE66p03jSD uB9B3KY1J/n4Cf5Twm+CLbZwUPYSAPU= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-13-CK0MpY7VNdCvcI1ywKLZEw-1; Mon, 25 Jan 2021 11:20:54 -0500 X-MC-Unique: CK0MpY7VNdCvcI1ywKLZEw-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id C0183107ACE4; Mon, 25 Jan 2021 16:20:51 +0000 (UTC) Received: from gondolin (ovpn-113-161.ams2.redhat.com [10.36.113.161]) by smtp.corp.redhat.com (Postfix) with ESMTP id F2F566ACE5; Mon, 25 Jan 2021 16:20:37 +0000 (UTC) Date: Mon, 25 Jan 2021 17:20:35 +0100 From: Cornelia Huck To: Jason Gunthorpe Cc: Alex Williamson , Max Gurtovoy , , , , , , , , , , , , , , Subject: Re: [PATCH RFC v1 0/3] Introduce vfio-pci-core subsystem Message-ID: <20210125172035.3b61b91b.cohuck@redhat.com> In-Reply-To: <20210122200421.GH4147@nvidia.com> References: <20210117181534.65724-1-mgurtovoy@nvidia.com> <20210122122503.4e492b96@omen.home.shazbot.org> <20210122200421.GH4147@nvidia.com> Organization: Red Hat GmbH 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.15 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 22 Jan 2021 16:04:21 -0400 Jason Gunthorpe wrote: > On Fri, Jan 22, 2021 at 12:25:03PM -0700, Alex Williamson wrote: > > > In this way, we'll use the HW vendor driver core to manage the lifecycle > > > of these devices. This is reasonable since only the vendor driver knows > > > exactly about the status on its internal state and the capabilities of > > > its acceleratots, for example. > > > > But mdev provides that too, or the vendor could write their own vfio > > Not really, mdev has a completely different lifecycle model that is > not very compatible with what is required here. > > And writing a VFIO driver is basically what this does, just a large > portion of the driver is reusing code from the normal vfio-pci cases. I think you cut out an important part of Alex' comment, so let me repost it here: "But mdev provides that too, or the vendor could write their own vfio bus driver for the device, this doesn't really justify or delve deep enough to show examples beyond "TODO" remarks for a vendor driver actually interacting with vfio-pci-core in an extensible way. One of the concerns of previous efforts was that it's trying to directly expose vfio-pci's implementation as an API for vendor drivers, I don't really see that anything has changed in that respect here." I'm missing the bigger picture of how this api is supposed to work out, a driver with a lot of TODOs does not help much to figure out whether this split makes sense and is potentially useful for a number of use cases, or whether mdev (even with its different lifecycle model) or a different vfio bus driver might be a better fit for the more involved cases. (For example, can s390 ISM fit here?)