From mboxrd@z Thu Jan 1 00:00:00 1970 From: Neo Jia Subject: Re: [RFC v2 0/4] adding mdev bus and vfio support Date: Fri, 2 Sep 2016 13:05:13 -0700 Message-ID: <20160902200512.GA32242@nvidia.com> References: <1472804172-25542-1-git-send-email-jike.song@intel.com> <20160902090352.53afdab1@t450s.home> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Cc: , , , , , , , , , To: Alex Williamson , Jike Song Return-path: Received: from hqemgate16.nvidia.com ([216.228.121.65]:14952 "EHLO hqemgate16.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932761AbcIBUFR (ORCPT ); Fri, 2 Sep 2016 16:05:17 -0400 Content-Disposition: inline In-Reply-To: <20160902090352.53afdab1@t450s.home> Sender: kvm-owner@vger.kernel.org List-ID: On Fri, Sep 02, 2016 at 09:03:52AM -0600, Alex Williamson wrote: > On Fri, 2 Sep 2016 16:16:08 +0800 > Jike Song wrote: > > > This patchset is based on NVidia's "Add Mediated device support" series, version 6: > > > > http://www.spinics.net/lists/kvm/msg136472.html > > > Hi Jike, > > I'm thrilled by your active participation here, but I'm confused which > versions I should be reviewing and where the primary development is > going. Kirti sent v7 a week ago, so I would have expected a revision > based on that rather than a re-write based on v6 plus incorporation of a > few of Kirti's patches directly. I liked the last version of these > changes a lot, but we need to figure out how to combine development > because we do not have infinite cycles for review available :-\ Thanks! Agree with Alex, and the primary development is on Kirti's v7 patches thread. Jike, could you please join us in the existing code review thread? I know you are already there with the sysfs discussion recently, but I would like to see your comments on the rest stuff so we can know how to best accommodate your requirements and needs in the future revisions. I believe that would be the best and fastest way to collaborate and that is the main purpose of having code review cycles. Thanks, Neo > > Alex > > > > > > > Key Changes from Nvidia v6: > > > > - Introduced an independent struct device to host device, thereby > > formed a physical-host-mdev hierarchy, and highly reused Linux > > driver core support; > > > > - Added online/offline to mdev_bus_type, leveraging the 'online' > > attr support from Linux driver core; > > > > - Removed mdev_class and other unecessary stuff; > > > > /* > > * Given the changes above, the code volume of mdev core driver > > * dramatically reduced by ~50%. > > */ > > > > > > - Interfaces between vfio_mdev and vendor driver are high-level, > > e.g. ioctl instead of get_irq_info/set_irq_info and reset, > > start/stop became mdev oriented, etc.; > > > > /* > > * Given the changes above, the code volume of mdev core driver > > * dramatically reduced by ~64%. > > */ > > > > > > Test > > > > - Tested with KVMGT > > > > TODO > > > > - Re-implement the attribute group of host device as long as the > > sysfs hierarchy in discussion gets finalized; > > > > - Move common routines from current vfio-pci into a higher location, > > export them for various VFIO bus drivers and/or mdev vendor drivers; > > > > - Add implementation examples for vendor drivers to Documentation; > > > > - Refine IOMMU changes > > > > > > > > Jike Song (2): > > Mediated device Core driver > > vfio: VFIO bus driver for MDEV devices > > > > Kirti Wankhede (2): > > vfio iommu: Add support for mediated devices > > docs: Add Documentation for Mediated devices > > > > Documentation/vfio-mediated-device.txt | 203 ++++++++++++++ > > drivers/vfio/Kconfig | 1 + > > drivers/vfio/Makefile | 1 + > > drivers/vfio/mdev/Kconfig | 18 ++ > > drivers/vfio/mdev/Makefile | 5 + > > drivers/vfio/mdev/mdev_core.c | 250 +++++++++++++++++ > > drivers/vfio/mdev/mdev_driver.c | 155 ++++++++++ > > drivers/vfio/mdev/mdev_private.h | 29 ++ > > drivers/vfio/mdev/mdev_sysfs.c | 155 ++++++++++ > > drivers/vfio/mdev/vfio_mdev.c | 187 ++++++++++++ > > drivers/vfio/vfio.c | 82 ++++++ > > drivers/vfio/vfio_iommu_type1.c | 499 +++++++++++++++++++++++++++++---- > > include/linux/mdev.h | 159 +++++++++++ > > include/linux/vfio.h | 13 +- > > 14 files changed, 1709 insertions(+), 48 deletions(-) > > 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 > > > From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40761) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bfuiK-0006MH-UW for qemu-devel@nongnu.org; Fri, 02 Sep 2016 16:05:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bfuiE-0004fD-Tr for qemu-devel@nongnu.org; Fri, 02 Sep 2016 16:05:23 -0400 Received: from hqemgate16.nvidia.com ([216.228.121.65]:14954) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bfuiE-0004e5-Lf for qemu-devel@nongnu.org; Fri, 02 Sep 2016 16:05:18 -0400 Date: Fri, 2 Sep 2016 13:05:13 -0700 From: Neo Jia Message-ID: <20160902200512.GA32242@nvidia.com> References: <1472804172-25542-1-git-send-email-jike.song@intel.com> <20160902090352.53afdab1@t450s.home> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20160902090352.53afdab1@t450s.home> Subject: Re: [Qemu-devel] [RFC v2 0/4] adding mdev bus and vfio support List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alex Williamson , Jike Song Cc: kwankhede@nvidia.com, qemu-devel@nongnu.org, kvm@vger.kernel.org, bjsdjshi@linux.vnet.ibm.com, kevin.tian@intel.com, guangrong.xiao@linux.intel.com, zhenyuw@linux.intel.com, zhiyuan.lv@intel.com, pbonzini@redhat.com, kraxel@redhat.com On Fri, Sep 02, 2016 at 09:03:52AM -0600, Alex Williamson wrote: > On Fri, 2 Sep 2016 16:16:08 +0800 > Jike Song wrote: > > > This patchset is based on NVidia's "Add Mediated device support" series, version 6: > > > > http://www.spinics.net/lists/kvm/msg136472.html > > > Hi Jike, > > I'm thrilled by your active participation here, but I'm confused which > versions I should be reviewing and where the primary development is > going. Kirti sent v7 a week ago, so I would have expected a revision > based on that rather than a re-write based on v6 plus incorporation of a > few of Kirti's patches directly. I liked the last version of these > changes a lot, but we need to figure out how to combine development > because we do not have infinite cycles for review available :-\ Thanks! Agree with Alex, and the primary development is on Kirti's v7 patches thread. Jike, could you please join us in the existing code review thread? I know you are already there with the sysfs discussion recently, but I would like to see your comments on the rest stuff so we can know how to best accommodate your requirements and needs in the future revisions. I believe that would be the best and fastest way to collaborate and that is the main purpose of having code review cycles. Thanks, Neo > > Alex > > > > > > > Key Changes from Nvidia v6: > > > > - Introduced an independent struct device to host device, thereby > > formed a physical-host-mdev hierarchy, and highly reused Linux > > driver core support; > > > > - Added online/offline to mdev_bus_type, leveraging the 'online' > > attr support from Linux driver core; > > > > - Removed mdev_class and other unecessary stuff; > > > > /* > > * Given the changes above, the code volume of mdev core driver > > * dramatically reduced by ~50%. > > */ > > > > > > - Interfaces between vfio_mdev and vendor driver are high-level, > > e.g. ioctl instead of get_irq_info/set_irq_info and reset, > > start/stop became mdev oriented, etc.; > > > > /* > > * Given the changes above, the code volume of mdev core driver > > * dramatically reduced by ~64%. > > */ > > > > > > Test > > > > - Tested with KVMGT > > > > TODO > > > > - Re-implement the attribute group of host device as long as the > > sysfs hierarchy in discussion gets finalized; > > > > - Move common routines from current vfio-pci into a higher location, > > export them for various VFIO bus drivers and/or mdev vendor drivers; > > > > - Add implementation examples for vendor drivers to Documentation; > > > > - Refine IOMMU changes > > > > > > > > Jike Song (2): > > Mediated device Core driver > > vfio: VFIO bus driver for MDEV devices > > > > Kirti Wankhede (2): > > vfio iommu: Add support for mediated devices > > docs: Add Documentation for Mediated devices > > > > Documentation/vfio-mediated-device.txt | 203 ++++++++++++++ > > drivers/vfio/Kconfig | 1 + > > drivers/vfio/Makefile | 1 + > > drivers/vfio/mdev/Kconfig | 18 ++ > > drivers/vfio/mdev/Makefile | 5 + > > drivers/vfio/mdev/mdev_core.c | 250 +++++++++++++++++ > > drivers/vfio/mdev/mdev_driver.c | 155 ++++++++++ > > drivers/vfio/mdev/mdev_private.h | 29 ++ > > drivers/vfio/mdev/mdev_sysfs.c | 155 ++++++++++ > > drivers/vfio/mdev/vfio_mdev.c | 187 ++++++++++++ > > drivers/vfio/vfio.c | 82 ++++++ > > drivers/vfio/vfio_iommu_type1.c | 499 +++++++++++++++++++++++++++++---- > > include/linux/mdev.h | 159 +++++++++++ > > include/linux/vfio.h | 13 +- > > 14 files changed, 1709 insertions(+), 48 deletions(-) > > 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 > > >