Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp3008594ybl; Mon, 20 Jan 2020 13:57:32 -0800 (PST) X-Google-Smtp-Source: APXvYqx5/vwAM7g7Kdmp4KH9b1DR693bi/A8w++Y2vonurcf88I8sz0qX3kgVxKtc0qXmbopzeTL X-Received: by 2002:aca:edc5:: with SMTP id l188mr675418oih.55.1579557452791; Mon, 20 Jan 2020 13:57:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579557452; cv=none; d=google.com; s=arc-20160816; b=s45BKTQ67hKgw/vII5J6iiVmRffofSOb7GiDs5ctd8D76JemJMNBNnwHA1GkC2JFIt pqCtqfK+I2COuKXwNIgjYAkjziI4UHV6MkxpRW+xIUeNk/A36qAfniBhzL06putUBfPB DyBgnmV+TO+lI2uAY/qS1d6MxBERhuuycXzp48Bz7/fFK7OVbNCv78tOGFSf1/bYB3Of gGcn7kreNsvCLCQycwHuMRdQkdHhhgv8XVvJcnaJPnlCCeQkk5lct5DgIz20xbAp1M35 HDBSXnKOCWtxHYebtg5LJztlzyhIfsj9tcD5H5crvJga2IGSEcOIoOQFCFz1Ynob9/Xf 6ctA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=62LNkLQMXjSxzZ1qGIQnfYNgDgSpvkpj5nXVuzQSLnI=; b=AaP7lThTLafEjOFIK6lVXDcFju62z2hn5NApXlj2xqe8zvioHT+eQfs+P71/kZ4C4N UuVyITarcD+ee/Mbczq9/+tSJm/8LmbZs6YGO34MKZlxyRIXsjBR03bRWbT84aGPLu0O dBF1ywAsiQhPzqmll2AiH2zz6MILKP2DXHBm5I9XvEv8co4NrHhd1OKnUjWsIvc6gWhw gxqzyx88T2tvv6ANRir7CEY7PQl73ZtxxYb7FMNzpone+XuruJjdow9TsGJ5Vpy2Ub8I ngAREjl0ZYdYahWVrULZxkl6MyCxpjlsFgELXH4O5dfUx6Rxv9h0GFjdJznlRGatqCSL ZhWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=H1s3SHwK; 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=pass (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 h9si19997766otb.49.2020.01.20.13.57.20; Mon, 20 Jan 2020 13:57:32 -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; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=H1s3SHwK; 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=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728792AbgATV4V (ORCPT + 99 others); Mon, 20 Jan 2020 16:56:21 -0500 Received: from us-smtp-2.mimecast.com ([207.211.31.81]:31891 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726942AbgATV4U (ORCPT ); Mon, 20 Jan 2020 16:56:20 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1579557378; 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: in-reply-to:in-reply-to:references:references; bh=62LNkLQMXjSxzZ1qGIQnfYNgDgSpvkpj5nXVuzQSLnI=; b=H1s3SHwKMXbHdsrs8727GxtDJBRc3UVRvqk7noaEDU4g9CCixc398oy1qP/dkG9rObPNg2 HCD2ezH1RvDzi/ZVwedN3e+zYcFoKj/AyelWdduT89BkE8mwwYG1Dt2qYTpa4TOy5dwCxV WX6nJ+tJck5zRwcM7rQeaGPwyqO6Rro= Received: from mail-qt1-f198.google.com (mail-qt1-f198.google.com [209.85.160.198]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-353-P-doivMaNhi9lH5_udOCPg-1; Mon, 20 Jan 2020 16:56:16 -0500 X-MC-Unique: P-doivMaNhi9lH5_udOCPg-1 Received: by mail-qt1-f198.google.com with SMTP id e1so665050qto.5 for ; Mon, 20 Jan 2020 13:56:16 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=62LNkLQMXjSxzZ1qGIQnfYNgDgSpvkpj5nXVuzQSLnI=; b=SKvQD4FOZU+607P2r6OGa36MPQInjiyh76L2T30ldW3EpXQrkkpI9mvPJCKBmC/YNG w53jTxLZrZ/KjhNI01jdkpwg4l3t7ye5wQLg+vwThRgRBpL/IGYGpgmIEyjFRyfynfI8 sZMBqvwuaAtOxkiYxM/9K9kc/a5RHlo8+E3XtWRrEwR2EaLAZZPXLDvRuyeuG7gXa3jO L2j5u9iYB/uY019ytLkRNnaD+J9Ns5vmSkBFNHIazE2GRVcbR8lkXrLAvd3uQQMBbuWV iUe6p3eY4D+rh0b4EpYLJnYBEENixMmRXtM2wJc+Vv/PpDYOsB+M1Uc82elvymZ3yE6Q +ifQ== X-Gm-Message-State: APjAAAWBrw67sajLbm/jwgSMMutdeVHemzBxLyltu36SmPmbgv02sl1M ePiYGR9MEU1KiOe7Z6MACoX4jxkYuR4dX2BrJTWL7uEyx/DIsoKrTySYk8fdf77rnAbfyXmAkqq F8OHNBl6WFLtJH4HL5MNbLk6w X-Received: by 2002:aed:27de:: with SMTP id m30mr1474667qtg.151.1579557376425; Mon, 20 Jan 2020 13:56:16 -0800 (PST) X-Received: by 2002:aed:27de:: with SMTP id m30mr1474647qtg.151.1579557376187; Mon, 20 Jan 2020 13:56:16 -0800 (PST) Received: from redhat.com (bzq-79-179-85-180.red.bezeqint.net. [79.179.85.180]) by smtp.gmail.com with ESMTPSA id z15sm7493120qtv.56.2020.01.20.13.56.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Jan 2020 13:56:15 -0800 (PST) Date: Mon, 20 Jan 2020 16:56:06 -0500 From: "Michael S. Tsirkin" To: Jason Gunthorpe Cc: Jason Wang , "linux-kernel@vger.kernel.org" , "kvm@vger.kernel.org" , "virtualization@lists.linux-foundation.org" , "netdev@vger.kernel.org" , "tiwei.bie@intel.com" , "maxime.coquelin@redhat.com" , "cunming.liang@intel.com" , "zhihong.wang@intel.com" , "rob.miller@broadcom.com" , "xiao.w.wang@intel.com" , "haotian.wang@sifive.com" , "lingshan.zhu@intel.com" , "eperezma@redhat.com" , "lulu@redhat.com" , Parav Pandit , "kevin.tian@intel.com" , "stefanha@redhat.com" , "rdunlap@infradead.org" , "hch@infradead.org" , "aadam@redhat.com" , "jakub.kicinski@netronome.com" , Jiri Pirko , Shahaf Shuler , "hanand@xilinx.com" , "mhabets@solarflare.com" Subject: Re: [PATCH 3/5] vDPA: introduce vDPA bus Message-ID: <20200120164916-mutt-send-email-mst@kernel.org> References: <20200116124231.20253-1-jasowang@redhat.com> <20200116124231.20253-4-jasowang@redhat.com> <20200116152209.GH20978@mellanox.com> <03cfbcc2-fef0-c9d8-0b08-798b2a293b8c@redhat.com> <20200117135435.GU20978@mellanox.com> <20200120071406-mutt-send-email-mst@kernel.org> <20200120175050.GC3891@mellanox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200120175050.GC3891@mellanox.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jan 20, 2020 at 05:50:55PM +0000, Jason Gunthorpe wrote: > On Mon, Jan 20, 2020 at 07:17:26AM -0500, Michael S. Tsirkin wrote: > > On Fri, Jan 17, 2020 at 01:54:42PM +0000, Jason Gunthorpe wrote: > > > > 1) "virtio" vs "vhost", I implemented matching method for this in mdev > > > > series, but it looks unnecessary for vDPA device driver to know about this. > > > > Anyway we can use sysfs driver bind/unbind to switch drivers > > > > 2) virtio device id and vendor id. I'm not sure we need this consider the > > > > two drivers so far (virtio/vhost) are all bus drivers. > > > > > > As we seem to be contemplating some dynamic creation of vdpa devices I > > > think upon creation time it should be specified what mode they should > > > run it and then all driver binding and autoloading should happen > > > automatically. Telling the user to bind/unbind is a very poor > > > experience. > > > > Maybe but OTOH it's an existing interface. I think we can reasonably > > start with bind/unbind and then add ability to specify > > the mode later. bind/unbind come from core so they will be > > maintained anyway. > > Existing where? Driver core. > For vfio? vfio is the only thing I am aware doing > that, and this is not vfio.. > > Jason vfio is not doing anything. anyone can use a combination of unbind and driver_override to attach a driver to a device. It's not a great interface but it's there without any code, and it will stay there without maintainance overhead if we later add a nicer one. -- MST