All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Jason Gunthorpe <jgg@mellanox.com>
Cc: Jason Wang <jasowang@redhat.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
	"virtualization@lists.linux-foundation.org"
	<virtualization@lists.linux-foundation.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"tiwei.bie@intel.com" <tiwei.bie@intel.com>,
	"maxime.coquelin@redhat.com" <maxime.coquelin@redhat.com>,
	"cunming.liang@intel.com" <cunming.liang@intel.com>,
	"zhihong.wang@intel.com" <zhihong.wang@intel.com>,
	"rob.miller@broadcom.com" <rob.miller@broadcom.com>,
	"xiao.w.wang@intel.com" <xiao.w.wang@intel.com>,
	"haotian.wang@sifive.com" <haotian.wang@sifive.com>,
	"lingshan.zhu@intel.com" <lingshan.zhu@intel.com>,
	"eperezma@redhat.com" <eperezma@redhat.com>,
	"lulu@redhat.com" <lulu@redhat.com>
Subject: Re: [PATCH 3/5] vDPA: introduce vDPA bus
Date: Mon, 20 Jan 2020 16:56:06 -0500	[thread overview]
Message-ID: <20200120164916-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <20200120175050.GC3891@mellanox.com>

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

WARNING: multiple messages have this Message-ID (diff)
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Jason Gunthorpe <jgg@mellanox.com>
Cc: Jason Wang <jasowang@redhat.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
	"virtualization@lists.linux-foundation.org" 
	<virtualization@lists.linux-foundation.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"tiwei.bie@intel.com" <tiwei.bie@intel.com>,
	"maxime.coquelin@redhat.com" <maxime.coquelin@redhat.com>,
	"cunming.liang@intel.com" <cunming.liang@intel.com>,
	"zhihong.wang@intel.com" <zhihong.wang@intel.com>,
	"rob.miller@broadcom.com" <rob.miller@broadcom.com>,
	"xiao.w.wang@intel.com" <xiao.w.wang@intel.com>,
	"haotian.wang@sifive.com" <haotian.wang@sifive.com>,
	"lingshan.zhu@intel.com" <lingshan.zhu@intel.com>,
	"eperezma@redhat.com" <eperezma@redhat.com>,
	"lulu@redhat.com" <lulu@redhat.com>,
	Parav Pandit <parav@mellanox.com>,
	"kevin.tian@intel.com" <kevin.tian@intel.com>,
	"stefanha@redhat.com" <stefanha@redhat.com>,
	"rdunlap@infradead.org" <rdunlap@infradead.org>,
	"hch@infradead.org" <hch@infradead.org>,
	"aadam@redhat.com" <aadam@redhat.com>,
	"jakub.kicinski@netronome.com" <jakub.kicinski@netronome.com>,
	Jiri Pirko <jiri@mellanox.com>,
	Shahaf Shuler <shahafs@mellanox.com>,
	"hanand@xilinx.com" <hanand@xilinx.com>,
	"mhabets@solarflare.com" <mhabets@solarflare.com>
Subject: Re: [PATCH 3/5] vDPA: introduce vDPA bus
Date: Mon, 20 Jan 2020 16:56:06 -0500	[thread overview]
Message-ID: <20200120164916-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <20200120175050.GC3891@mellanox.com>

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


  reply	other threads:[~2020-01-20 21:56 UTC|newest]

Thread overview: 141+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-16 12:42 [PATCH 0/5] vDPA support Jason Wang
2020-01-16 12:42 ` [PATCH 1/5] vhost: factor out IOTLB Jason Wang
2020-01-17  4:14   ` Randy Dunlap
2020-01-17  9:34     ` Jason Wang
2020-01-18  0:01   ` kbuild test robot
2020-01-18  0:01     ` kbuild test robot
2020-01-18  0:01     ` kbuild test robot
2020-01-18  0:40   ` kbuild test robot
2020-01-18  0:40     ` kbuild test robot
2020-01-18  0:40     ` kbuild test robot
2020-01-16 12:42 ` [PATCH 2/5] vringh: IOTLB support Jason Wang
2020-01-17 21:54   ` kbuild test robot
2020-01-17 21:54     ` kbuild test robot
2020-01-17 21:54     ` kbuild test robot
2020-01-17 22:33   ` kbuild test robot
2020-01-17 22:33     ` kbuild test robot
2020-01-17 22:33     ` kbuild test robot
2020-01-16 12:42 ` [PATCH 3/5] vDPA: introduce vDPA bus Jason Wang
2020-01-16 15:22   ` Jason Gunthorpe
2020-01-16 15:22     ` Jason Gunthorpe
2020-01-17  3:03     ` Jason Wang
2020-01-17  3:03       ` Jason Wang
2020-01-17 13:54       ` Jason Gunthorpe
2020-01-17 13:54         ` Jason Gunthorpe
2020-01-20  7:50         ` Jason Wang
2020-01-20  7:50           ` Jason Wang
2020-01-20 12:17         ` Michael S. Tsirkin
2020-01-20 12:17           ` Michael S. Tsirkin
2020-01-20 17:50           ` Jason Gunthorpe
2020-01-20 17:50             ` Jason Gunthorpe
2020-01-20 21:56             ` Michael S. Tsirkin [this message]
2020-01-20 21:56               ` Michael S. Tsirkin
2020-01-21 14:12               ` Jason Gunthorpe
2020-01-21 14:12                 ` Jason Gunthorpe
2020-01-21 14:15                 ` Michael S. Tsirkin
2020-01-21 14:15                   ` Michael S. Tsirkin
2020-01-21 14:16                   ` Jason Gunthorpe
2020-01-21 14:16                     ` Jason Gunthorpe
2020-01-21  8:40       ` Tian, Kevin
2020-01-21  8:40         ` Tian, Kevin
2020-01-21  9:41         ` Jason Wang
2020-01-21  9:41           ` Jason Wang
2020-01-17  4:16   ` Randy Dunlap
2020-01-17  9:34     ` Jason Wang
2020-01-17 12:13   ` Michael S. Tsirkin
2020-01-17 13:52     ` Jason Wang
2020-01-17 14:12       ` Rob Miller via Virtualization
2020-01-19  9:07         ` Shahaf Shuler
2020-01-19  9:07           ` Shahaf Shuler
2020-01-19  9:59           ` Michael S. Tsirkin
2020-01-19  9:59             ` Michael S. Tsirkin
2020-01-20  8:44             ` Jason Wang
2020-01-20  8:44               ` Jason Wang
2020-01-20 12:09               ` Michael S. Tsirkin
2020-01-20 12:09                 ` Michael S. Tsirkin
2020-01-21  3:32                 ` Jason Wang
2020-01-21  3:32                   ` Jason Wang
2020-01-20  8:43           ` Jason Wang
2020-01-20  8:43             ` Jason Wang
2020-01-20 17:49             ` Jason Gunthorpe
2020-01-20 17:49               ` Jason Gunthorpe
2020-01-20 20:51               ` Shahaf Shuler
2020-01-20 20:51                 ` Shahaf Shuler
2020-01-20 21:25                 ` Michael S. Tsirkin
2020-01-20 21:25                   ` Michael S. Tsirkin
2020-01-20 21:47                   ` Shahaf Shuler
2020-01-20 21:47                     ` Shahaf Shuler
2020-01-20 21:59                     ` Michael S. Tsirkin
2020-01-20 21:59                       ` Michael S. Tsirkin
2020-01-21  6:01                       ` Shahaf Shuler
2020-01-21  6:01                         ` Shahaf Shuler
2020-01-21  7:57                         ` Jason Wang
2020-01-21  7:57                           ` Jason Wang
2020-01-21 14:07                   ` Jason Gunthorpe
2020-01-21 14:07                     ` Jason Gunthorpe
2020-01-21 14:16                     ` Michael S. Tsirkin
2020-01-21 14:16                       ` Michael S. Tsirkin
2020-01-20 21:48               ` Michael S. Tsirkin
2020-01-20 21:48                 ` Michael S. Tsirkin
2020-01-21  4:00               ` Jason Wang
2020-01-21  4:00                 ` Jason Wang
2020-01-21  5:47                 ` Michael S. Tsirkin
2020-01-21  5:47                   ` Michael S. Tsirkin
2020-01-21  8:00                   ` Jason Wang
2020-01-21  8:00                     ` Jason Wang
2020-01-21  8:15                     ` Michael S. Tsirkin
2020-01-21  8:15                       ` Michael S. Tsirkin
2020-01-21  8:35                       ` Jason Wang
2020-01-21  8:35                         ` Jason Wang
2020-01-21 11:09                         ` Shahaf Shuler
2020-01-21 11:09                           ` Shahaf Shuler
2020-01-22  6:36                           ` Jason Wang
2020-01-22  6:36                             ` Jason Wang
2020-01-21 14:05                       ` Jason Gunthorpe
2020-01-21 14:05                         ` Jason Gunthorpe
2020-01-21 14:17                         ` Michael S. Tsirkin
2020-01-21 14:17                           ` Michael S. Tsirkin
2020-01-22  6:18                           ` Jason Wang
2020-01-22  6:18                             ` Jason Wang
2020-01-20  8:19         ` Jason Wang
2020-01-20  8:19           ` Jason Wang
2020-01-16 12:42 ` [PATCH 4/5] virtio: introduce a vDPA based transport Jason Wang
2020-01-16 15:38   ` Jason Gunthorpe
2020-01-16 15:38     ` Jason Gunthorpe
2020-01-17  9:32     ` Jason Wang
2020-01-17  9:32       ` Jason Wang
2020-01-17 14:00       ` Jason Gunthorpe
2020-01-17 14:00         ` Jason Gunthorpe
2020-01-20  7:52         ` Jason Wang
2020-01-20  7:52           ` Jason Wang
2020-01-17  4:10   ` Randy Dunlap
2020-01-16 12:42 ` [PATCH 5/5] vdpasim: vDPA device simulator Jason Wang
2020-01-16 15:47   ` Jason Gunthorpe
2020-01-16 15:47     ` Jason Gunthorpe
2020-01-17  9:32     ` Jason Wang
2020-01-17  9:32       ` Jason Wang
2020-01-17 14:10       ` Jason Gunthorpe
2020-01-17 14:10         ` Jason Gunthorpe
2020-01-20  8:01         ` Jason Wang
2020-01-20  8:01           ` Jason Wang
2020-02-04  4:19         ` Jason Wang
2020-02-04  4:19           ` Jason Wang
2020-01-17  4:12   ` Randy Dunlap
2020-01-17  9:35     ` Jason Wang
2020-01-18 18:18   ` kbuild test robot
2020-01-18 18:18     ` kbuild test robot
2020-01-18 18:18     ` kbuild test robot
2020-01-28  3:32   ` Dan Carpenter
2020-01-28  3:32     ` Dan Carpenter
2020-01-28  3:32     ` Dan Carpenter
2020-01-28  3:32     ` Dan Carpenter
2020-02-04  4:07     ` Jason Wang
2020-02-04  4:07       ` Jason Wang
2020-02-04  8:21   ` Zhu Lingshan
2020-02-04  8:28     ` Jason Wang
2020-02-04 12:52       ` Jason Gunthorpe
2020-02-05  3:14         ` Jason Wang
2020-01-21  8:44 ` [PATCH 0/5] vDPA support Tian, Kevin
2020-01-21  8:44   ` Tian, Kevin
2020-01-21  9:39   ` Jason Wang
2020-01-21  9:39     ` Jason Wang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200120164916-mutt-send-email-mst@kernel.org \
    --to=mst@redhat.com \
    --cc=cunming.liang@intel.com \
    --cc=eperezma@redhat.com \
    --cc=haotian.wang@sifive.com \
    --cc=jasowang@redhat.com \
    --cc=jgg@mellanox.com \
    --cc=kvm@vger.kernel.org \
    --cc=lingshan.zhu@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lulu@redhat.com \
    --cc=maxime.coquelin@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=rob.miller@broadcom.com \
    --cc=tiwei.bie@intel.com \
    --cc=virtualization@lists.linux-foundation.org \
    --cc=xiao.w.wang@intel.com \
    --cc=zhihong.wang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.