Re: [Qemu-devel] [PATCH v14 00/22] Add Mediated device support

2016-11-18 Thread Alex Williamson
On Fri, 18 Nov 2016 17:09:59 +0100
Daniel Vetter  wrote:

> On Fri, Nov 18, 2016 at 4:40 PM, Alex Williamson
>  wrote:
> >> Alex, could you do a pull request of mdev for Daniel's drm-intel tree?
> >> We need to send KVMGT mdev support pull base on that.  
> >
> > No, this is not how I intend or prefer to merge this.  This is a large
> > change for vfio and it is not exclusive to KVMGT.  We have linux-next
> > to facilitate handling dependencies between subsystems during
> > development and a two week merge window to allow managing how these
> > changes enter the mainline tree.  If I were to have this pulled into
> > drm-intel it ties my hands as to how I can manage changes within my
> > functional area.  I want these two weeks of linux-next exposure for
> > vetting the changes and resolving any remaining issues.  I'm not going
> > to compromise my ability to react to such issues.  linux-next inclusion
> > should be sufficient for you to coordinate through the drm tree, though
> > Daniel will need to be made aware of the dependency.  I will however
> > plan to send my pull request to Linus early in the merge window to
> > accommodate dependent changes also being included for v4.10. Hope
> > you understand, thanks,  
> 
> My understanding was that the mdev changes are needed to be able to
> apply the kvmgt stuff, and otherwise it won't build. For that I need a
> stable git tag request (can be specific topic branch, which means
> subsystems can land in any order, or the full subsystem tree, which
> means depencies need to be tracked correctly). I am not going to
> resolve that in the merge window, since in drm we want everything
> lined up _before_ that opens (the feature cutoff is this w/e, but
> there's some wiggle room ofc).
> 
> Sounds like there's just not enough time to line all the things up in
> time for 4.10, and the i915/kmvgt stuff needs to be postponed to 4.11.

My only alternate suggestion is that perhaps the KVMGT code can be
sufficiently partitioned off with #ifdefs that could be removed later,
allowing mdev and KVMGT to be merged independently.  We have only just
added mdev to linux-next, my intention is that the next two weeks are
for finding and correcting issues.  There are still outstanding API
changes, specifically for KVMGT being proposed by Intel included with
that. Thanks,

Alex



Re: [Qemu-devel] [PATCH v14 00/22] Add Mediated device support

2016-11-18 Thread Daniel Vetter
On Fri, Nov 18, 2016 at 4:40 PM, Alex Williamson
 wrote:
>> Alex, could you do a pull request of mdev for Daniel's drm-intel tree?
>> We need to send KVMGT mdev support pull base on that.
>
> No, this is not how I intend or prefer to merge this.  This is a large
> change for vfio and it is not exclusive to KVMGT.  We have linux-next
> to facilitate handling dependencies between subsystems during
> development and a two week merge window to allow managing how these
> changes enter the mainline tree.  If I were to have this pulled into
> drm-intel it ties my hands as to how I can manage changes within my
> functional area.  I want these two weeks of linux-next exposure for
> vetting the changes and resolving any remaining issues.  I'm not going
> to compromise my ability to react to such issues.  linux-next inclusion
> should be sufficient for you to coordinate through the drm tree, though
> Daniel will need to be made aware of the dependency.  I will however
> plan to send my pull request to Linus early in the merge window to
> accommodate dependent changes also being included for v4.10. Hope
> you understand, thanks,

My understanding was that the mdev changes are needed to be able to
apply the kvmgt stuff, and otherwise it won't build. For that I need a
stable git tag request (can be specific topic branch, which means
subsystems can land in any order, or the full subsystem tree, which
means depencies need to be tracked correctly). I am not going to
resolve that in the merge window, since in drm we want everything
lined up _before_ that opens (the feature cutoff is this w/e, but
there's some wiggle room ofc).

Sounds like there's just not enough time to line all the things up in
time for 4.10, and the i915/kmvgt stuff needs to be postponed to 4.11.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch



Re: [Qemu-devel] [PATCH v14 00/22] Add Mediated device support

2016-11-18 Thread Alex Williamson
On Fri, 18 Nov 2016 17:16:32 +0800
Zhenyu Wang  wrote:

> On 2016.11.17 16:51:45 -0700, Alex Williamson wrote:
> > On Thu, 17 Nov 2016 23:29:38 +
> > "Tian, Kevin"  wrote:
> >   
> > > > From: Alex Williamson [mailto:alex.william...@redhat.com]
> > > > Sent: Friday, November 18, 2016 5:25 AM
> > > > 
> > > > On Thu, 17 Nov 2016 02:16:12 +0530
> > > > Kirti Wankhede  wrote:
> > > > >
> > > > >  Documentation/ABI/testing/sysfs-bus-vfio-mdev |  111 ++
> > > > >  Documentation/vfio-mediated-device.txt|  399 +++
> > > > >  MAINTAINERS   |9 +
> > > > >  drivers/vfio/Kconfig  |1 +
> > > > >  drivers/vfio/Makefile |1 +
> > > > >  drivers/vfio/mdev/Kconfig |   17 +
> > > > >  drivers/vfio/mdev/Makefile|5 +
> > > > >  drivers/vfio/mdev/mdev_core.c |  385 +++
> > > > >  drivers/vfio/mdev/mdev_driver.c   |  119 ++
> > > > >  drivers/vfio/mdev/mdev_private.h  |   41 +
> > > > >  drivers/vfio/mdev/mdev_sysfs.c|  286 +
> > > > >  drivers/vfio/mdev/vfio_mdev.c |  180 +++
> > > > >  drivers/vfio/pci/vfio_pci.c   |   83 +-
> > > > >  drivers/vfio/platform/vfio_platform_common.c  |   31 +-
> > > > >  drivers/vfio/vfio.c   |  340 +-
> > > > >  drivers/vfio/vfio_iommu_type1.c   |  872 +++---
> > > > >  include/linux/mdev.h  |  177 +++
> > > > >  include/linux/vfio.h  |   32 +-
> > > > >  include/uapi/linux/vfio.h |   10 +
> > > > >  samples/vfio-mdev/Makefile|   13 +
> > > > >  samples/vfio-mdev/mtty.c  | 1503
> > > > +
> > > > >  21 files changed, 4358 insertions(+), 257 deletions(-)
> > > > >  create mode 100644 Documentation/ABI/testing/sysfs-bus-vfio-mdev
> > > > >  create mode 100644 Documentation/vfio-mediated-device.txt
> > > > >  create mode 100644 drivers/vfio/mdev/Kconfig
> > > > >  create mode 100644 drivers/vfio/mdev/Makefile
> > > > >  create mode 100644 drivers/vfio/mdev/mdev_core.c
> > > > >  create mode 100644 drivers/vfio/mdev/mdev_driver.c
> > > > >  create mode 100644 drivers/vfio/mdev/mdev_private.h
> > > > >  create mode 100644 drivers/vfio/mdev/mdev_sysfs.c
> > > > >  create mode 100644 drivers/vfio/mdev/vfio_mdev.c
> > > > >  create mode 100644 include/linux/mdev.h
> > > > >  create mode 100644 samples/vfio-mdev/Makefile
> > > > >  create mode 100644 samples/vfio-mdev/mtty.c
> > > > 
> > > > As discussed, I dropped patch 12, updated the documentation, and added
> > > > 'retries' initialization.  This is now applied to my next branch for
> > > > v4.10.  Thanks to the reviewers and Kirti and Neo for your hard work!
> > > > Thanks,
> > > > 
> > > 
> > > That's a great news! Alex, do you have an idea when this series may
> > > hit linux-next? :-)  
> > 
> > Whenever there's a new build, hopefully within the next 24hrs, but I
> > don't really know the schedule.  Thanks,
> >   
> 
> Alex, could you do a pull request of mdev for Daniel's drm-intel tree?
> We need to send KVMGT mdev support pull base on that.

No, this is not how I intend or prefer to merge this.  This is a large
change for vfio and it is not exclusive to KVMGT.  We have linux-next
to facilitate handling dependencies between subsystems during
development and a two week merge window to allow managing how these
changes enter the mainline tree.  If I were to have this pulled into
drm-intel it ties my hands as to how I can manage changes within my
functional area.  I want these two weeks of linux-next exposure for
vetting the changes and resolving any remaining issues.  I'm not going
to compromise my ability to react to such issues.  linux-next inclusion
should be sufficient for you to coordinate through the drm tree, though
Daniel will need to be made aware of the dependency.  I will however
plan to send my pull request to Linus early in the merge window to
accommodate dependent changes also being included for v4.10. Hope
you understand, thanks,

Alex



Re: [Qemu-devel] [PATCH v14 00/22] Add Mediated device support

2016-11-18 Thread Zhenyu Wang
On 2016.11.17 16:51:45 -0700, Alex Williamson wrote:
> On Thu, 17 Nov 2016 23:29:38 +
> "Tian, Kevin"  wrote:
> 
> > > From: Alex Williamson [mailto:alex.william...@redhat.com]
> > > Sent: Friday, November 18, 2016 5:25 AM
> > > 
> > > On Thu, 17 Nov 2016 02:16:12 +0530
> > > Kirti Wankhede  wrote:  
> > > >
> > > >  Documentation/ABI/testing/sysfs-bus-vfio-mdev |  111 ++
> > > >  Documentation/vfio-mediated-device.txt|  399 +++
> > > >  MAINTAINERS   |9 +
> > > >  drivers/vfio/Kconfig  |1 +
> > > >  drivers/vfio/Makefile |1 +
> > > >  drivers/vfio/mdev/Kconfig |   17 +
> > > >  drivers/vfio/mdev/Makefile|5 +
> > > >  drivers/vfio/mdev/mdev_core.c |  385 +++
> > > >  drivers/vfio/mdev/mdev_driver.c   |  119 ++
> > > >  drivers/vfio/mdev/mdev_private.h  |   41 +
> > > >  drivers/vfio/mdev/mdev_sysfs.c|  286 +
> > > >  drivers/vfio/mdev/vfio_mdev.c |  180 +++
> > > >  drivers/vfio/pci/vfio_pci.c   |   83 +-
> > > >  drivers/vfio/platform/vfio_platform_common.c  |   31 +-
> > > >  drivers/vfio/vfio.c   |  340 +-
> > > >  drivers/vfio/vfio_iommu_type1.c   |  872 +++---
> > > >  include/linux/mdev.h  |  177 +++
> > > >  include/linux/vfio.h  |   32 +-
> > > >  include/uapi/linux/vfio.h |   10 +
> > > >  samples/vfio-mdev/Makefile|   13 +
> > > >  samples/vfio-mdev/mtty.c  | 1503  
> > > +  
> > > >  21 files changed, 4358 insertions(+), 257 deletions(-)
> > > >  create mode 100644 Documentation/ABI/testing/sysfs-bus-vfio-mdev
> > > >  create mode 100644 Documentation/vfio-mediated-device.txt
> > > >  create mode 100644 drivers/vfio/mdev/Kconfig
> > > >  create mode 100644 drivers/vfio/mdev/Makefile
> > > >  create mode 100644 drivers/vfio/mdev/mdev_core.c
> > > >  create mode 100644 drivers/vfio/mdev/mdev_driver.c
> > > >  create mode 100644 drivers/vfio/mdev/mdev_private.h
> > > >  create mode 100644 drivers/vfio/mdev/mdev_sysfs.c
> > > >  create mode 100644 drivers/vfio/mdev/vfio_mdev.c
> > > >  create mode 100644 include/linux/mdev.h
> > > >  create mode 100644 samples/vfio-mdev/Makefile
> > > >  create mode 100644 samples/vfio-mdev/mtty.c  
> > > 
> > > As discussed, I dropped patch 12, updated the documentation, and added
> > > 'retries' initialization.  This is now applied to my next branch for
> > > v4.10.  Thanks to the reviewers and Kirti and Neo for your hard work!
> > > Thanks,
> > >   
> > 
> > That's a great news! Alex, do you have an idea when this series may
> > hit linux-next? :-)
> 
> Whenever there's a new build, hopefully within the next 24hrs, but I
> don't really know the schedule.  Thanks,
> 

Alex, could you do a pull request of mdev for Daniel's drm-intel tree?
We need to send KVMGT mdev support pull base on that.

Thanks!

-- 
Open Source Technology Center, Intel ltd.

$gpg --keyserver wwwkeys.pgp.net --recv-keys 4D781827


signature.asc
Description: PGP signature


Re: [Qemu-devel] [PATCH v14 00/22] Add Mediated device support

2016-11-17 Thread Dong Jia Shi
* Alex Williamson  [2016-11-17 16:51:45 -0700]:

> On Thu, 17 Nov 2016 23:29:38 +
> "Tian, Kevin"  wrote:
> 
> > > From: Alex Williamson [mailto:alex.william...@redhat.com]
> > > Sent: Friday, November 18, 2016 5:25 AM
> > > 
> > > On Thu, 17 Nov 2016 02:16:12 +0530
> > > Kirti Wankhede  wrote:  
> > > >
> > > >  Documentation/ABI/testing/sysfs-bus-vfio-mdev |  111 ++
> > > >  Documentation/vfio-mediated-device.txt|  399 +++
> > > >  MAINTAINERS   |9 +
> > > >  drivers/vfio/Kconfig  |1 +
> > > >  drivers/vfio/Makefile |1 +
> > > >  drivers/vfio/mdev/Kconfig |   17 +
> > > >  drivers/vfio/mdev/Makefile|5 +
> > > >  drivers/vfio/mdev/mdev_core.c |  385 +++
> > > >  drivers/vfio/mdev/mdev_driver.c   |  119 ++
> > > >  drivers/vfio/mdev/mdev_private.h  |   41 +
> > > >  drivers/vfio/mdev/mdev_sysfs.c|  286 +
> > > >  drivers/vfio/mdev/vfio_mdev.c |  180 +++
> > > >  drivers/vfio/pci/vfio_pci.c   |   83 +-
> > > >  drivers/vfio/platform/vfio_platform_common.c  |   31 +-
> > > >  drivers/vfio/vfio.c   |  340 +-
> > > >  drivers/vfio/vfio_iommu_type1.c   |  872 +++---
> > > >  include/linux/mdev.h  |  177 +++
> > > >  include/linux/vfio.h  |   32 +-
> > > >  include/uapi/linux/vfio.h |   10 +
> > > >  samples/vfio-mdev/Makefile|   13 +
> > > >  samples/vfio-mdev/mtty.c  | 1503  
> > > +  
> > > >  21 files changed, 4358 insertions(+), 257 deletions(-)
> > > >  create mode 100644 Documentation/ABI/testing/sysfs-bus-vfio-mdev
> > > >  create mode 100644 Documentation/vfio-mediated-device.txt
> > > >  create mode 100644 drivers/vfio/mdev/Kconfig
> > > >  create mode 100644 drivers/vfio/mdev/Makefile
> > > >  create mode 100644 drivers/vfio/mdev/mdev_core.c
> > > >  create mode 100644 drivers/vfio/mdev/mdev_driver.c
> > > >  create mode 100644 drivers/vfio/mdev/mdev_private.h
> > > >  create mode 100644 drivers/vfio/mdev/mdev_sysfs.c
> > > >  create mode 100644 drivers/vfio/mdev/vfio_mdev.c
> > > >  create mode 100644 include/linux/mdev.h
> > > >  create mode 100644 samples/vfio-mdev/Makefile
> > > >  create mode 100644 samples/vfio-mdev/mtty.c  
> > > 
> > > As discussed, I dropped patch 12, updated the documentation, and added
> > > 'retries' initialization.  This is now applied to my next branch for
> > > v4.10.  Thanks to the reviewers and Kirti and Neo for your hard work!
> > > Thanks,
> > >   
> > 
> > That's a great news! Alex, do you have an idea when this series may
> > hit linux-next? :-)
> 
> Whenever there's a new build, hopefully within the next 24hrs, but I
> don't really know the schedule.  Thanks,
Great news! Can't wait to try the upstream version. :->

Thanks everybody that makes this happen!!

> 
> Alex
> 

-- 
Dong Jia




Re: [Qemu-devel] [PATCH v14 00/22] Add Mediated device support

2016-11-17 Thread Jike Song
On 11/18/2016 10:00 AM, Kirti Wankhede wrote:
> On 11/18/2016 3:35 AM, Neo Jia wrote:
>> On Thu, Nov 17, 2016 at 02:25:15PM -0700, Alex Williamson wrote:
>>> On Thu, 17 Nov 2016 02:16:12 +0530
>>> Kirti Wankhede  wrote:

  Documentation/ABI/testing/sysfs-bus-vfio-mdev |  111 ++
  Documentation/vfio-mediated-device.txt|  399 +++
  MAINTAINERS   |9 +
  drivers/vfio/Kconfig  |1 +
  drivers/vfio/Makefile |1 +
  drivers/vfio/mdev/Kconfig |   17 +
  drivers/vfio/mdev/Makefile|5 +
  drivers/vfio/mdev/mdev_core.c |  385 +++
  drivers/vfio/mdev/mdev_driver.c   |  119 ++
  drivers/vfio/mdev/mdev_private.h  |   41 +
  drivers/vfio/mdev/mdev_sysfs.c|  286 +
  drivers/vfio/mdev/vfio_mdev.c |  180 +++
  drivers/vfio/pci/vfio_pci.c   |   83 +-
  drivers/vfio/platform/vfio_platform_common.c  |   31 +-
  drivers/vfio/vfio.c   |  340 +-
  drivers/vfio/vfio_iommu_type1.c   |  872 +++---
  include/linux/mdev.h  |  177 +++
  include/linux/vfio.h  |   32 +-
  include/uapi/linux/vfio.h |   10 +
  samples/vfio-mdev/Makefile|   13 +
  samples/vfio-mdev/mtty.c  | 1503 
 +
  21 files changed, 4358 insertions(+), 257 deletions(-)
  create mode 100644 Documentation/ABI/testing/sysfs-bus-vfio-mdev
  create mode 100644 Documentation/vfio-mediated-device.txt
  create mode 100644 drivers/vfio/mdev/Kconfig
  create mode 100644 drivers/vfio/mdev/Makefile
  create mode 100644 drivers/vfio/mdev/mdev_core.c
  create mode 100644 drivers/vfio/mdev/mdev_driver.c
  create mode 100644 drivers/vfio/mdev/mdev_private.h
  create mode 100644 drivers/vfio/mdev/mdev_sysfs.c
  create mode 100644 drivers/vfio/mdev/vfio_mdev.c
  create mode 100644 include/linux/mdev.h
  create mode 100644 samples/vfio-mdev/Makefile
  create mode 100644 samples/vfio-mdev/mtty.c
>>>
>>> As discussed, I dropped patch 12, updated the documentation, and added
>>> 'retries' initialization.  This is now applied to my next branch for
>>> v4.10.  Thanks to the reviewers and Kirti and Neo for your hard work!
>>
>> Really appreciate your help and reviews to allow us reach here, and thanks to
>> various reviewers for their comments and suggestions!
>>
> 
> Thanks for your constant guidance and reviews.
> Thanks to all reviewers for reviews and suggestions.

Echo Alex: thanks for your great work, congrats! :-)

--
Thanks,
Jike



Re: [Qemu-devel] [PATCH v14 00/22] Add Mediated device support

2016-11-17 Thread Kirti Wankhede


On 11/18/2016 3:35 AM, Neo Jia wrote:
> On Thu, Nov 17, 2016 at 02:25:15PM -0700, Alex Williamson wrote:
>> On Thu, 17 Nov 2016 02:16:12 +0530
>> Kirti Wankhede  wrote:
>>>
>>>  Documentation/ABI/testing/sysfs-bus-vfio-mdev |  111 ++
>>>  Documentation/vfio-mediated-device.txt|  399 +++
>>>  MAINTAINERS   |9 +
>>>  drivers/vfio/Kconfig  |1 +
>>>  drivers/vfio/Makefile |1 +
>>>  drivers/vfio/mdev/Kconfig |   17 +
>>>  drivers/vfio/mdev/Makefile|5 +
>>>  drivers/vfio/mdev/mdev_core.c |  385 +++
>>>  drivers/vfio/mdev/mdev_driver.c   |  119 ++
>>>  drivers/vfio/mdev/mdev_private.h  |   41 +
>>>  drivers/vfio/mdev/mdev_sysfs.c|  286 +
>>>  drivers/vfio/mdev/vfio_mdev.c |  180 +++
>>>  drivers/vfio/pci/vfio_pci.c   |   83 +-
>>>  drivers/vfio/platform/vfio_platform_common.c  |   31 +-
>>>  drivers/vfio/vfio.c   |  340 +-
>>>  drivers/vfio/vfio_iommu_type1.c   |  872 +++---
>>>  include/linux/mdev.h  |  177 +++
>>>  include/linux/vfio.h  |   32 +-
>>>  include/uapi/linux/vfio.h |   10 +
>>>  samples/vfio-mdev/Makefile|   13 +
>>>  samples/vfio-mdev/mtty.c  | 1503 
>>> +
>>>  21 files changed, 4358 insertions(+), 257 deletions(-)
>>>  create mode 100644 Documentation/ABI/testing/sysfs-bus-vfio-mdev
>>>  create mode 100644 Documentation/vfio-mediated-device.txt
>>>  create mode 100644 drivers/vfio/mdev/Kconfig
>>>  create mode 100644 drivers/vfio/mdev/Makefile
>>>  create mode 100644 drivers/vfio/mdev/mdev_core.c
>>>  create mode 100644 drivers/vfio/mdev/mdev_driver.c
>>>  create mode 100644 drivers/vfio/mdev/mdev_private.h
>>>  create mode 100644 drivers/vfio/mdev/mdev_sysfs.c
>>>  create mode 100644 drivers/vfio/mdev/vfio_mdev.c
>>>  create mode 100644 include/linux/mdev.h
>>>  create mode 100644 samples/vfio-mdev/Makefile
>>>  create mode 100644 samples/vfio-mdev/mtty.c
>>
>> As discussed, I dropped patch 12, updated the documentation, and added
>> 'retries' initialization.  This is now applied to my next branch for
>> v4.10.  Thanks to the reviewers and Kirti and Neo for your hard work!
> 
> Really appreciate your help and reviews to allow us reach here, and thanks to
> various reviewers for their comments and suggestions!
> 

Thanks for your constant guidance and reviews.
Thanks to all reviewers for reviews and suggestions.

Thanks,
Kirti



Re: [Qemu-devel] [PATCH v14 00/22] Add Mediated device support

2016-11-17 Thread Alex Williamson
On Thu, 17 Nov 2016 23:29:38 +
"Tian, Kevin"  wrote:

> > From: Alex Williamson [mailto:alex.william...@redhat.com]
> > Sent: Friday, November 18, 2016 5:25 AM
> > 
> > On Thu, 17 Nov 2016 02:16:12 +0530
> > Kirti Wankhede  wrote:  
> > >
> > >  Documentation/ABI/testing/sysfs-bus-vfio-mdev |  111 ++
> > >  Documentation/vfio-mediated-device.txt|  399 +++
> > >  MAINTAINERS   |9 +
> > >  drivers/vfio/Kconfig  |1 +
> > >  drivers/vfio/Makefile |1 +
> > >  drivers/vfio/mdev/Kconfig |   17 +
> > >  drivers/vfio/mdev/Makefile|5 +
> > >  drivers/vfio/mdev/mdev_core.c |  385 +++
> > >  drivers/vfio/mdev/mdev_driver.c   |  119 ++
> > >  drivers/vfio/mdev/mdev_private.h  |   41 +
> > >  drivers/vfio/mdev/mdev_sysfs.c|  286 +
> > >  drivers/vfio/mdev/vfio_mdev.c |  180 +++
> > >  drivers/vfio/pci/vfio_pci.c   |   83 +-
> > >  drivers/vfio/platform/vfio_platform_common.c  |   31 +-
> > >  drivers/vfio/vfio.c   |  340 +-
> > >  drivers/vfio/vfio_iommu_type1.c   |  872 +++---
> > >  include/linux/mdev.h  |  177 +++
> > >  include/linux/vfio.h  |   32 +-
> > >  include/uapi/linux/vfio.h |   10 +
> > >  samples/vfio-mdev/Makefile|   13 +
> > >  samples/vfio-mdev/mtty.c  | 1503  
> > +  
> > >  21 files changed, 4358 insertions(+), 257 deletions(-)
> > >  create mode 100644 Documentation/ABI/testing/sysfs-bus-vfio-mdev
> > >  create mode 100644 Documentation/vfio-mediated-device.txt
> > >  create mode 100644 drivers/vfio/mdev/Kconfig
> > >  create mode 100644 drivers/vfio/mdev/Makefile
> > >  create mode 100644 drivers/vfio/mdev/mdev_core.c
> > >  create mode 100644 drivers/vfio/mdev/mdev_driver.c
> > >  create mode 100644 drivers/vfio/mdev/mdev_private.h
> > >  create mode 100644 drivers/vfio/mdev/mdev_sysfs.c
> > >  create mode 100644 drivers/vfio/mdev/vfio_mdev.c
> > >  create mode 100644 include/linux/mdev.h
> > >  create mode 100644 samples/vfio-mdev/Makefile
> > >  create mode 100644 samples/vfio-mdev/mtty.c  
> > 
> > As discussed, I dropped patch 12, updated the documentation, and added
> > 'retries' initialization.  This is now applied to my next branch for
> > v4.10.  Thanks to the reviewers and Kirti and Neo for your hard work!
> > Thanks,
> >   
> 
> That's a great news! Alex, do you have an idea when this series may
> hit linux-next? :-)

Whenever there's a new build, hopefully within the next 24hrs, but I
don't really know the schedule.  Thanks,

Alex



Re: [Qemu-devel] [PATCH v14 00/22] Add Mediated device support

2016-11-17 Thread Tian, Kevin
> From: Alex Williamson [mailto:alex.william...@redhat.com]
> Sent: Friday, November 18, 2016 5:25 AM
> 
> On Thu, 17 Nov 2016 02:16:12 +0530
> Kirti Wankhede  wrote:
> >
> >  Documentation/ABI/testing/sysfs-bus-vfio-mdev |  111 ++
> >  Documentation/vfio-mediated-device.txt|  399 +++
> >  MAINTAINERS   |9 +
> >  drivers/vfio/Kconfig  |1 +
> >  drivers/vfio/Makefile |1 +
> >  drivers/vfio/mdev/Kconfig |   17 +
> >  drivers/vfio/mdev/Makefile|5 +
> >  drivers/vfio/mdev/mdev_core.c |  385 +++
> >  drivers/vfio/mdev/mdev_driver.c   |  119 ++
> >  drivers/vfio/mdev/mdev_private.h  |   41 +
> >  drivers/vfio/mdev/mdev_sysfs.c|  286 +
> >  drivers/vfio/mdev/vfio_mdev.c |  180 +++
> >  drivers/vfio/pci/vfio_pci.c   |   83 +-
> >  drivers/vfio/platform/vfio_platform_common.c  |   31 +-
> >  drivers/vfio/vfio.c   |  340 +-
> >  drivers/vfio/vfio_iommu_type1.c   |  872 +++---
> >  include/linux/mdev.h  |  177 +++
> >  include/linux/vfio.h  |   32 +-
> >  include/uapi/linux/vfio.h |   10 +
> >  samples/vfio-mdev/Makefile|   13 +
> >  samples/vfio-mdev/mtty.c  | 1503
> +
> >  21 files changed, 4358 insertions(+), 257 deletions(-)
> >  create mode 100644 Documentation/ABI/testing/sysfs-bus-vfio-mdev
> >  create mode 100644 Documentation/vfio-mediated-device.txt
> >  create mode 100644 drivers/vfio/mdev/Kconfig
> >  create mode 100644 drivers/vfio/mdev/Makefile
> >  create mode 100644 drivers/vfio/mdev/mdev_core.c
> >  create mode 100644 drivers/vfio/mdev/mdev_driver.c
> >  create mode 100644 drivers/vfio/mdev/mdev_private.h
> >  create mode 100644 drivers/vfio/mdev/mdev_sysfs.c
> >  create mode 100644 drivers/vfio/mdev/vfio_mdev.c
> >  create mode 100644 include/linux/mdev.h
> >  create mode 100644 samples/vfio-mdev/Makefile
> >  create mode 100644 samples/vfio-mdev/mtty.c
> 
> As discussed, I dropped patch 12, updated the documentation, and added
> 'retries' initialization.  This is now applied to my next branch for
> v4.10.  Thanks to the reviewers and Kirti and Neo for your hard work!
> Thanks,
> 

That's a great news! Alex, do you have an idea when this series may
hit linux-next? :-)

Thanks
Kevin



Re: [Qemu-devel] [PATCH v14 00/22] Add Mediated device support

2016-11-17 Thread Neo Jia
On Thu, Nov 17, 2016 at 02:25:15PM -0700, Alex Williamson wrote:
> On Thu, 17 Nov 2016 02:16:12 +0530
> Kirti Wankhede  wrote:
> > 
> >  Documentation/ABI/testing/sysfs-bus-vfio-mdev |  111 ++
> >  Documentation/vfio-mediated-device.txt|  399 +++
> >  MAINTAINERS   |9 +
> >  drivers/vfio/Kconfig  |1 +
> >  drivers/vfio/Makefile |1 +
> >  drivers/vfio/mdev/Kconfig |   17 +
> >  drivers/vfio/mdev/Makefile|5 +
> >  drivers/vfio/mdev/mdev_core.c |  385 +++
> >  drivers/vfio/mdev/mdev_driver.c   |  119 ++
> >  drivers/vfio/mdev/mdev_private.h  |   41 +
> >  drivers/vfio/mdev/mdev_sysfs.c|  286 +
> >  drivers/vfio/mdev/vfio_mdev.c |  180 +++
> >  drivers/vfio/pci/vfio_pci.c   |   83 +-
> >  drivers/vfio/platform/vfio_platform_common.c  |   31 +-
> >  drivers/vfio/vfio.c   |  340 +-
> >  drivers/vfio/vfio_iommu_type1.c   |  872 +++---
> >  include/linux/mdev.h  |  177 +++
> >  include/linux/vfio.h  |   32 +-
> >  include/uapi/linux/vfio.h |   10 +
> >  samples/vfio-mdev/Makefile|   13 +
> >  samples/vfio-mdev/mtty.c  | 1503 
> > +
> >  21 files changed, 4358 insertions(+), 257 deletions(-)
> >  create mode 100644 Documentation/ABI/testing/sysfs-bus-vfio-mdev
> >  create mode 100644 Documentation/vfio-mediated-device.txt
> >  create mode 100644 drivers/vfio/mdev/Kconfig
> >  create mode 100644 drivers/vfio/mdev/Makefile
> >  create mode 100644 drivers/vfio/mdev/mdev_core.c
> >  create mode 100644 drivers/vfio/mdev/mdev_driver.c
> >  create mode 100644 drivers/vfio/mdev/mdev_private.h
> >  create mode 100644 drivers/vfio/mdev/mdev_sysfs.c
> >  create mode 100644 drivers/vfio/mdev/vfio_mdev.c
> >  create mode 100644 include/linux/mdev.h
> >  create mode 100644 samples/vfio-mdev/Makefile
> >  create mode 100644 samples/vfio-mdev/mtty.c
> 
> As discussed, I dropped patch 12, updated the documentation, and added
> 'retries' initialization.  This is now applied to my next branch for
> v4.10.  Thanks to the reviewers and Kirti and Neo for your hard work!

Really appreciate your help and reviews to allow us reach here, and thanks to
various reviewers for their comments and suggestions!

Thanks,
Neo


> Thanks,
> 
> Alex



Re: [Qemu-devel] [PATCH v14 00/22] Add Mediated device support

2016-11-17 Thread Alex Williamson
On Thu, 17 Nov 2016 02:16:12 +0530
Kirti Wankhede  wrote:
> 
>  Documentation/ABI/testing/sysfs-bus-vfio-mdev |  111 ++
>  Documentation/vfio-mediated-device.txt|  399 +++
>  MAINTAINERS   |9 +
>  drivers/vfio/Kconfig  |1 +
>  drivers/vfio/Makefile |1 +
>  drivers/vfio/mdev/Kconfig |   17 +
>  drivers/vfio/mdev/Makefile|5 +
>  drivers/vfio/mdev/mdev_core.c |  385 +++
>  drivers/vfio/mdev/mdev_driver.c   |  119 ++
>  drivers/vfio/mdev/mdev_private.h  |   41 +
>  drivers/vfio/mdev/mdev_sysfs.c|  286 +
>  drivers/vfio/mdev/vfio_mdev.c |  180 +++
>  drivers/vfio/pci/vfio_pci.c   |   83 +-
>  drivers/vfio/platform/vfio_platform_common.c  |   31 +-
>  drivers/vfio/vfio.c   |  340 +-
>  drivers/vfio/vfio_iommu_type1.c   |  872 +++---
>  include/linux/mdev.h  |  177 +++
>  include/linux/vfio.h  |   32 +-
>  include/uapi/linux/vfio.h |   10 +
>  samples/vfio-mdev/Makefile|   13 +
>  samples/vfio-mdev/mtty.c  | 1503 
> +
>  21 files changed, 4358 insertions(+), 257 deletions(-)
>  create mode 100644 Documentation/ABI/testing/sysfs-bus-vfio-mdev
>  create mode 100644 Documentation/vfio-mediated-device.txt
>  create mode 100644 drivers/vfio/mdev/Kconfig
>  create mode 100644 drivers/vfio/mdev/Makefile
>  create mode 100644 drivers/vfio/mdev/mdev_core.c
>  create mode 100644 drivers/vfio/mdev/mdev_driver.c
>  create mode 100644 drivers/vfio/mdev/mdev_private.h
>  create mode 100644 drivers/vfio/mdev/mdev_sysfs.c
>  create mode 100644 drivers/vfio/mdev/vfio_mdev.c
>  create mode 100644 include/linux/mdev.h
>  create mode 100644 samples/vfio-mdev/Makefile
>  create mode 100644 samples/vfio-mdev/mtty.c

As discussed, I dropped patch 12, updated the documentation, and added
'retries' initialization.  This is now applied to my next branch for
v4.10.  Thanks to the reviewers and Kirti and Neo for your hard work!
Thanks,

Alex



[Qemu-devel] [PATCH v14 00/22] Add Mediated device support

2016-11-16 Thread Kirti Wankhede
This series adds Mediated device support to Linux host kernel. Purpose
of this series is to provide a common interface for mediated device
management that can be used by different devices. This series introduces
Mdev core module that creates and manages mediated devices, VFIO based
driver for mediated devices that are created by mdev core module and
update VFIO type1 IOMMU module to support pinning & unpinning for mediated
devices.

What changed v13-> v14?
- Added retries to notify DMA_UNMAP, if pfn_list is not empty.
- Added BUG_ON if pages are not unpined during DMA_UNMAP after 10 retries.
- Removed unpinning from detach_group() and release() and added WARN_ON
  if pfn_list is not empty.
- Updated page accounting logic.

Tested by assigning below combinations of devices to a single VM:
- GPU pass through only
- vGPU device only
- One GPU pass through and one vGPU device
- Linux VM hot plug and unplug vGPU device while GPU pass through device
  exist
- Linux VM hot plug and unplug GPU pass through device while vGPU device
  exist

Tested with Linux-next upto commit e76d21c40bd6.

Kirti Wankhede (22):
  vfio: Mediated device Core driver
  vfio: VFIO based driver for Mediated devices
  vfio: Rearrange functions to get vfio_group from dev
  vfio: Common function to increment container_users
  vfio iommu: Added pin and unpin callback functions to
vfio_iommu_driver_ops
  vfio iommu type1: Update arguments of vfio_lock_acct
  vfio iommu type1: Update argument of vaddr_get_pfn()
  vfio iommu type1: Add find_iommu_group() function
  vfio iommu type1: Add task structure to vfio_dma
  vfio iommu type1: Add support for mediated devices
  vfio iommu: Add blocking notifier to notify DMA_UNMAP
  vfio: Add notifier callback to parent's ops structure of mdev
  vfio: Introduce common function to add capabilities
  vfio_pci: Update vfio_pci to use vfio_info_add_capability()
  vfio: Introduce vfio_set_irqs_validate_and_prepare()
  vfio_pci: Updated to use vfio_set_irqs_validate_and_prepare()
  vfio_platform: Updated to use vfio_set_irqs_validate_and_prepare()
  vfio: Define device_api strings
  docs: Add Documentation for Mediated devices
  docs: Sysfs ABI for mediated device framework
  docs: Sample driver to demonstrate how to use Mediated device
framework.
  MAINTAINERS: Add entry VFIO based Mediated device drivers

 Documentation/ABI/testing/sysfs-bus-vfio-mdev |  111 ++
 Documentation/vfio-mediated-device.txt|  399 +++
 MAINTAINERS   |9 +
 drivers/vfio/Kconfig  |1 +
 drivers/vfio/Makefile |1 +
 drivers/vfio/mdev/Kconfig |   17 +
 drivers/vfio/mdev/Makefile|5 +
 drivers/vfio/mdev/mdev_core.c |  385 +++
 drivers/vfio/mdev/mdev_driver.c   |  119 ++
 drivers/vfio/mdev/mdev_private.h  |   41 +
 drivers/vfio/mdev/mdev_sysfs.c|  286 +
 drivers/vfio/mdev/vfio_mdev.c |  180 +++
 drivers/vfio/pci/vfio_pci.c   |   83 +-
 drivers/vfio/platform/vfio_platform_common.c  |   31 +-
 drivers/vfio/vfio.c   |  340 +-
 drivers/vfio/vfio_iommu_type1.c   |  872 +++---
 include/linux/mdev.h  |  177 +++
 include/linux/vfio.h  |   32 +-
 include/uapi/linux/vfio.h |   10 +
 samples/vfio-mdev/Makefile|   13 +
 samples/vfio-mdev/mtty.c  | 1503 +
 21 files changed, 4358 insertions(+), 257 deletions(-)
 create mode 100644 Documentation/ABI/testing/sysfs-bus-vfio-mdev
 create mode 100644 Documentation/vfio-mediated-device.txt
 create mode 100644 drivers/vfio/mdev/Kconfig
 create mode 100644 drivers/vfio/mdev/Makefile
 create mode 100644 drivers/vfio/mdev/mdev_core.c
 create mode 100644 drivers/vfio/mdev/mdev_driver.c
 create mode 100644 drivers/vfio/mdev/mdev_private.h
 create mode 100644 drivers/vfio/mdev/mdev_sysfs.c
 create mode 100644 drivers/vfio/mdev/vfio_mdev.c
 create mode 100644 include/linux/mdev.h
 create mode 100644 samples/vfio-mdev/Makefile
 create mode 100644 samples/vfio-mdev/mtty.c

-- 
2.7.0