[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20191119191053-mutt-send-email-mst@kernel.org>
Date: Tue, 19 Nov 2019 19:16:21 -0500
From: "Michael S. Tsirkin" <mst@...hat.com>
To: Jason Gunthorpe <jgg@...pe.ca>
Cc: Jason Wang <jasowang@...hat.com>,
Parav Pandit <parav@...lanox.com>,
Jeff Kirsher <jeffrey.t.kirsher@...el.com>,
"davem@...emloft.net" <davem@...emloft.net>,
"gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
Dave Ertman <david.m.ertman@...el.com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"linux-rdma@...r.kernel.org" <linux-rdma@...r.kernel.org>,
"nhorman@...hat.com" <nhorman@...hat.com>,
"sassmann@...hat.com" <sassmann@...hat.com>,
Kiran Patil <kiran.patil@...el.com>,
Alex Williamson <alex.williamson@...hat.com>,
"Bie, Tiwei" <tiwei.bie@...el.com>
Subject: Re: [net-next v2 1/1] virtual-bus: Implementation of Virtual Bus
On Tue, Nov 19, 2019 at 07:10:23PM -0400, Jason Gunthorpe wrote:
> On Tue, Nov 19, 2019 at 04:33:40PM -0500, Michael S. Tsirkin wrote:
> > On Tue, Nov 19, 2019 at 03:15:47PM -0400, Jason Gunthorpe wrote:
> > > On Tue, Nov 19, 2019 at 01:58:42PM -0500, Michael S. Tsirkin wrote:
> > > > On Tue, Nov 19, 2019 at 12:46:32PM -0400, Jason Gunthorpe wrote:
> > > > > As always, this is all very hard to tell without actually seeing real
> > > > > accelerated drivers implement this.
> > > > >
> > > > > Your patch series might be a bit premature in this regard.
> > > >
> > > > Actually drivers implementing this have been posted, haven't they?
> > > > See e.g. https://lwn.net/Articles/804379/
> > >
> > > Is that a real driver? It looks like another example quality
> > > thing.
> > >
> > > For instance why do we need any of this if it has '#define
> > > IFCVF_MDEV_LIMIT 1' ?
> > >
> > > Surely for this HW just use vfio over the entire PCI function and be
> > > done with it?
> >
> > What this does is allow using it with unmodified virtio drivers
> > within guests. You won't get this with passthrough as it only
> > implements parts of virtio in hardware.
>
> I don't mean use vfio to perform passthrough, I mean to use vfio to
> implement the software parts in userspace while vfio to talk to the
> hardware.
You repeated vfio twice here, hard to decode what you meant actually.
> kernel -> vfio -> user space virtio driver -> qemu -> guest
Exactly what has been implemented for control path.
The interface between vfio and userspace is
based on virtio which is IMHO much better than
a vendor specific one. userspace stays vendor agnostic.
> Generally we don't want to see things in the kernel that can be done
> in userspace, and to me, at least for this driver, this looks
> completely solvable in userspace.
I don't think that extends as far as actively encouraging userspace
drivers poking at hardware in a vendor specific way. That has lots of
security and portability implications and isn't appropriate for
everyone. It is kernel's job to abstract hardware away and present
a unified interface as far as possible.
--
MST
Powered by blists - more mailing lists