[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <A2975661238FB949B60364EF0F2C257439E2D7A7@SHSMSX104.ccr.corp.intel.com>
Date: Fri, 8 Mar 2019 11:33:46 +0000
From: "Liu, Yi L" <yi.l.liu@...el.com>
To: Alex Williamson <alex.williamson@...hat.com>
CC: "kwankhede@...dia.com" <kwankhede@...dia.com>,
"Tian, Kevin" <kevin.tian@...el.com>,
"baolu.lu@...ux.intel.com" <baolu.lu@...ux.intel.com>,
"joro@...tes.org" <joro@...tes.org>,
"jean-philippe.brucker@....com" <jean-philippe.brucker@....com>,
"peterx@...hat.com" <peterx@...hat.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"Sun, Yi Y" <yi.y.sun@...el.com>
Subject: RE: [RFC v1 0/2] vfio/pci: wrap pci device as mdev with vfio-pci
driver
> From: Alex Williamson [mailto:alex.williamson@...hat.com]
> Sent: Friday, March 8, 2019 4:40 AM
> To: Liu, Yi L <yi.l.liu@...el.com>
> Cc: kwankhede@...dia.com; Tian, Kevin <kevin.tian@...el.com>;
> baolu.lu@...ux.intel.com; joro@...tes.org; jean-philippe.brucker@....com;
> peterx@...hat.com; linux-kernel@...r.kernel.org; Sun, Yi Y <yi.y.sun@...el.com>
> Subject: Re: [RFC v1 0/2] vfio/pci: wrap pci device as mdev with vfio-pci driver
>
> On Sun, 3 Mar 2019 20:57:59 +0800
> "Liu, Yi L" <yi.l.liu@...el.com> wrote:
>
> > This patchset aims to add a vfio-pci-like meta driver on existing
> > PCI devices, as a demo user of the vfio changes introduced in
> > "vfio/mdev: IOMMU aware mediated device" patchset from Baolu Lu.
> >
> > To build such a meta driver. We have two choices.
> > a) add a vfio-pci alike sample driver under samples directory
> > b) add some extensions in vfio-pci driver to make it wrap pci
> > device as mdev
> >
> > For choice a), the new sample driver will have quite a few
> > duplicated code with vfio-pci driver since the new sample
> > driver also wants to virtualize the PCI config space. So
> > this choice may bring in extra maintain effort in kernel
> > and also looks strange since there will be a bunch of
> > duplicated code with vfio-pci driver.
> >
> > For choice b), it may reuse the existing vfio-pci driver
> > by adding a new working mode. With this mode, user can wrap
> > a pci device as a mediated device by binding it with the
> > vfio-pci driver which works in the new mode. Thus can be used
> > to verify the ""vfio/mdev: IOMMU aware mediated device"
> > patchset.
> >
> > This patchset is following choice b). However, we are open on
> > the direction of the implementation of this vfio-pci-like meta
> > driver. Pls feel free give your suggestions.
>
> Thanks for doing this Yi! Rather than a module option for vfio-pci,
> what about having this build into a separate module (ex.
> vfio-pci-mdev)? Then we could test "regular" vfio-pci along side mdev
> wrapped devices simply by which driver we bind and it'd probably be more
> friendly to existing users, like libvirt. This might also make a good
> base driver for experimenting with device specific mdev migration as
> well. Thanks,
Yeah, much better user experience. Let me do that. Thanks for the suggestion. :-)
Regards,
Yi Liu
Powered by blists - more mailing lists