Re: [Qemu-devel] [PATCH v9 04/12] vfio iommu: Add support for mediated devices

2016-11-02 Thread Kirti Wankhede
On 11/2/2016 6:30 PM, Jike Song wrote: > On 11/02/2016 08:41 PM, Kirti Wankhede wrote: >> On 11/2/2016 5:51 PM, Jike Song wrote: >>> On 11/02/2016 12:09 PM, Alexey Kardashevskiy wrote: >>>> Or you could just reference and use @mm as KVM and others do. Or there is &g

Re: [Qemu-devel] [PATCH v9 04/12] vfio iommu: Add support for mediated devices

2016-11-02 Thread Kirti Wankhede
On 11/2/2016 5:51 PM, Jike Song wrote: > On 11/02/2016 12:09 PM, Alexey Kardashevskiy wrote: >> On 02/11/16 14:29, Kirti Wankhede wrote: >>> >>> >>> On 11/2/2016 6:54 AM, Alexey Kardashevskiy wrote: >>>> On 02/11/16 01:01, Kirti Wankhede wrote:

Re: [Qemu-devel] [PATCH v10 07/19] vfio iommu type1: Update argument of vaddr_get_pfn()

2016-11-02 Thread Kirti Wankhede
On 10/28/2016 11:31 AM, Jike Song wrote: > On 10/27/2016 08:24 PM, Kirti Wankhede wrote: >> >> >> On 10/27/2016 5:41 PM, Jike Song wrote: >>> On 10/27/2016 05:29 AM, Kirti Wankhede wrote: >>>> Update arguments of vaddr_get_pfn() to take s

Re: [Qemu-devel] [PATCH v10 01/19] vfio: Mediated device Core driver

2016-11-02 Thread Kirti Wankhede
On 10/29/2016 11:41 PM, Jike Song wrote: > On 10/29/2016 06:06 PM, Kirti Wankhede wrote: >> >> >> On 10/29/2016 10:00 AM, Jike Song wrote: >>> On 10/27/2016 05:29 AM, Kirti Wankhede wrote: >>>> +int mdev_register_device(struct device *dev, const struc

Re: [Qemu-devel] [PATCH v10 18/19] docs: Sysfs ABI for mediated device framework

2016-11-02 Thread Kirti Wankhede
On 10/31/2016 12:49 PM, Jike Song wrote: > On 10/27/2016 05:29 AM, Kirti Wankhede wrote: >> Added details of sysfs ABI for mediated device framework >> >> Signed-off-by: Kirti Wankhede <kwankh...@nvidia.com> >> Signed-off-by: Neo J

Re: [Qemu-devel] [PATCH v9 04/12] vfio iommu: Add support for mediated devices

2016-11-01 Thread Kirti Wankhede
On 11/2/2016 6:54 AM, Alexey Kardashevskiy wrote: > On 02/11/16 01:01, Kirti Wankhede wrote: >> >> >> On 10/28/2016 7:48 AM, Alexey Kardashevskiy wrote: >>> On 27/10/16 23:31, Kirti Wankhede wrote: >>>> >>>> >>>> On 10/27/2016 12

Re: [Qemu-devel] [PATCH v9 04/12] vfio iommu: Add support for mediated devices

2016-11-01 Thread Kirti Wankhede
On 10/28/2016 7:48 AM, Alexey Kardashevskiy wrote: > On 27/10/16 23:31, Kirti Wankhede wrote: >> >> >> On 10/27/2016 12:50 PM, Alexey Kardashevskiy wrote: >>> On 18/10/16 08:22, Kirti Wankhede wrote: >>>> VFIO IOMMU drivers are designed for the devi

Re: [Qemu-devel] [PATCH v10 10/19] vfio iommu: Add blocking notifier to notify DMA_UNMAP

2016-11-01 Thread Kirti Wankhede
On 11/1/2016 9:15 AM, Dong Jia Shi wrote: > * Alex Williamson <alex.william...@redhat.com> [2016-10-29 08:03:01 -0600]: > >> On Sat, 29 Oct 2016 16:07:05 +0530 >> Kirti Wankhede <kwankh...@nvidia.com> wrote: >> >>> On 10/29/2016 2:03 AM, Alex Willia

Re: [Qemu-devel] [PATCH v10 10/19] vfio iommu: Add blocking notifier to notify DMA_UNMAP

2016-10-31 Thread Kirti Wankhede
On 10/31/2016 9:20 AM, Jike Song wrote: > On 10/27/2016 05:29 AM, Kirti Wankhede wrote: >> Added blocking notifier to IOMMU TYPE1 driver to notify vendor drivers >> about DMA_UNMAP. >> Exported two APIs vfio_register_notifier() and vfio_unregister_notifier(). >> Ve

Re: [Qemu-devel] [PATCH v10 10/19] vfio iommu: Add blocking notifier to notify DMA_UNMAP

2016-10-29 Thread Kirti Wankhede
On 10/29/2016 2:03 AM, Alex Williamson wrote: > On Sat, 29 Oct 2016 01:32:35 +0530 > Kirti Wankhede <kwankh...@nvidia.com> wrote: > >> On 10/28/2016 6:10 PM, Alex Williamson wrote: >>> On Fri, 28 Oct 2016 15:33:58 +0800 >>>

Re: [Qemu-devel] [PATCH v10 01/19] vfio: Mediated device Core driver

2016-10-29 Thread Kirti Wankhede
On 10/29/2016 10:00 AM, Jike Song wrote: > On 10/27/2016 05:29 AM, Kirti Wankhede wrote: >> +int mdev_register_device(struct device *dev, const struct parent_ops *ops) >> +{ >> +int ret; >> +struct parent_device *parent; >> + >> +/* check for ma

Re: [Qemu-devel] [PATCH v10 10/19] vfio iommu: Add blocking notifier to notify DMA_UNMAP

2016-10-28 Thread Kirti Wankhede
On 10/28/2016 6:10 PM, Alex Williamson wrote: > On Fri, 28 Oct 2016 15:33:58 +0800 > Jike Song <jike.s...@intel.com> wrote: > >> On 10/27/2016 05:29 AM, Kirti Wankhede wrote: >>> Added blocking notifier to IOMMU TYPE1 driver to notify vendor drivers >>>

Re: [Qemu-devel] [PATCH v10 10/19] vfio iommu: Add blocking notifier to notify DMA_UNMAP

2016-10-28 Thread Kirti Wankhede
On 10/28/2016 1:03 PM, Jike Song wrote: > On 10/27/2016 05:29 AM, Kirti Wankhede wrote: >> >> +/* >> + * This function finds pfn in domain->external_addr_space->pfn_list for >> given >> + * iova range. If pfn exist, notify pfn to registered notifier list

Re: [Qemu-devel] [PATCH v9 04/12] vfio iommu: Add support for mediated devices

2016-10-27 Thread Kirti Wankhede
On 10/27/2016 8:00 PM, Alex Williamson wrote: > On Thu, 27 Oct 2016 18:01:51 +0530 > Kirti Wankhede <kwankh...@nvidia.com> wrote: > >> On 10/27/2016 12:50 PM, Alexey Kardashevskiy wrote: >>> On 18/10/16 08:22, Kirti Wankhede wrote: >>>> VFIO IOMMU

Re: [Qemu-devel] [PATCH v9 04/12] vfio iommu: Add support for mediated devices

2016-10-27 Thread Kirti Wankhede
On 10/27/2016 12:50 PM, Alexey Kardashevskiy wrote: > On 18/10/16 08:22, Kirti Wankhede wrote: >> VFIO IOMMU drivers are designed for the devices which are IOMMU capable. >> Mediated device only uses IOMMU APIs, the underlying hardware can be >> managed by an IO

Re: [Qemu-devel] [PATCH v10 07/19] vfio iommu type1: Update argument of vaddr_get_pfn()

2016-10-27 Thread Kirti Wankhede
On 10/27/2016 5:41 PM, Jike Song wrote: > On 10/27/2016 05:29 AM, Kirti Wankhede wrote: >> Update arguments of vaddr_get_pfn() to take struct mm_struct *mm as input >> argument. >> >> Signed-off-by: Kirti Wankhede <kwankh...@nvidia.com> >> Signed-off-by:

[Qemu-devel] [PATCH v10 19/19] docs: Sample driver to demonstrate how to use Mediated device framework.

2016-10-26 Thread Kirti Wankhede
The Sample driver creates mdev device that simulates serial port over PCI card. Signed-off-by: Kirti Wankhede <kwankh...@nvidia.com> Signed-off-by: Neo Jia <c...@nvidia.com> Change-Id: I857f8f12f8b275f2498dfe8c628a5cdc7193b1b2 --- Documentation/vfio-mdev/Makefile

[Qemu-devel] [PATCH v10 14/19] vfio_pci: Updated to use vfio_set_irqs_validate_and_prepare()

2016-10-26 Thread Kirti Wankhede
Updated vfio_pci.c file to use vfio_set_irqs_validate_and_prepare() Signed-off-by: Kirti Wankhede <kwankh...@nvidia.com> Signed-off-by: Neo Jia <c...@nvidia.com> Change-Id: I9f3daba89d8dba5cb5b01a8cff420412f30686c7 --- drivers/vfio/pci/vfio_pci.c | 29 +

[Qemu-devel] [PATCH v10 18/19] docs: Sysfs ABI for mediated device framework

2016-10-26 Thread Kirti Wankhede
Added details of sysfs ABI for mediated device framework Signed-off-by: Kirti Wankhede <kwankh...@nvidia.com> Signed-off-by: Neo Jia <c...@nvidia.com> Change-Id: Icb0fd4ed58a2fa793fbcb1c3d5009a4403c1f3ac --- Documentation/ABI/testing/sysfs-bus-vfio-mdev | 111 ++

[Qemu-devel] [PATCH v10 16/19] vfio: Define device_api strings

2016-10-26 Thread Kirti Wankhede
Defined device API strings. Vendor driver using mediated device framework should use corresponding string for device_api attribute. Signed-off-by: Kirti Wankhede <kwankh...@nvidia.com> Signed-off-by: Neo Jia <c...@nvidia.com> Change-Id: I42d29f475f02a7132ce13297fbf2b48f1da10995 ---

[Qemu-devel] [PATCH v10 12/19] vfio_pci: Update vfio_pci to use vfio_info_add_capability()

2016-10-26 Thread Kirti Wankhede
Update msix_sparse_mmap_cap() to use vfio_info_add_capability() Update region type capability to use vfio_info_add_capability() Signed-off-by: Kirti Wankhede <kwankh...@nvidia.com> Signed-off-by: Neo Jia <c...@nvidia.com> Change-Id: I52bb28c7875a6da5a79ddad1843e6088aff58a45 --- driv

[Qemu-devel] [PATCH v10 10/19] vfio iommu: Add blocking notifier to notify DMA_UNMAP

2016-10-26 Thread Kirti Wankhede
mappings. Signed-off-by: Kirti Wankhede <kwankh...@nvidia.com> Signed-off-by: Neo Jia <c...@nvidia.com> Change-Id: I5910d0024d6be87f3e8d3e0ca0eaeaaa0b17f271 --- drivers/vfio/vfio.c | 73 + drivers/vfio/vfio_iommu_

[Qemu-devel] [PATCH v10 13/19] vfio: Introduce vfio_set_irqs_validate_and_prepare()

2016-10-26 Thread Kirti Wankhede
Vendor driver using mediated device framework would use same mechnism to validate and prepare IRQs. Introducing this function to reduce code replication in multiple drivers. Signed-off-by: Kirti Wankhede <kwankh...@nvidia.com> Signed-off-by: Neo Jia <c...@nvidia.com&g

[Qemu-devel] [PATCH v10 17/19] docs: Add Documentation for Mediated devices

2016-10-26 Thread Kirti Wankhede
Add file Documentation/vfio-mediated-device.txt that include details of mediated device framework. Signed-off-by: Kirti Wankhede <kwankh...@nvidia.com> Signed-off-by: Neo Jia <c...@nvidia.com> Change-Id: I137dd646442936090d92008b115908b7b2c7bc5d --- Documentation/vfio-mdev/v

[Qemu-devel] [PATCH v10 09/19] vfio iommu type1: Add support for mediated devices

2016-10-26 Thread Kirti Wankhede
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 Signed-off-by: Kirti Wankhede <kwankh...@nvidia.com> Signed-off-by: Neo Jia <c...@nvidia.com&g

[Qemu-devel] [PATCH v10 08/19] vfio iommu type1: Add find_iommu_group() function

2016-10-26 Thread Kirti Wankhede
Add find_iommu_group() Signed-off-by: Kirti Wankhede <kwankh...@nvidia.com> Signed-off-by: Neo Jia <c...@nvidia.com> Change-Id: I9d372f1ebe9eb01a5a21374b8a2b03f7df73601f --- drivers/vfio/vfio_iommu_type1.c | 58 - 1 file changed, 34 inser

[Qemu-devel] [PATCH v10 15/19] vfio_platform: Updated to use vfio_set_irqs_validate_and_prepare()

2016-10-26 Thread Kirti Wankhede
Updated vfio_platform_common.c file to use vfio_set_irqs_validate_and_prepare() Signed-off-by: Kirti Wankhede <kwankh...@nvidia.com> Signed-off-by: Neo Jia <c...@nvidia.com> Change-Id: Id87cd6b78ae901610b39bf957974baa6f40cd7b0 --- drivers/vfio/platform/vfio_platform_c

[Qemu-devel] [PATCH v10 11/19] vfio: Introduce common function to add capabilities

2016-10-26 Thread Kirti Wankhede
Vendor driver using mediated device framework should use vfio_info_add_capability() to add capabilities. Introduced this function to reduce code duplication in vendor drivers. Signed-off-by: Kirti Wankhede <kwankh...@nvidia.com> Signed-off-by: Neo Jia <c...@nvidia.com&g

[Qemu-devel] [PATCH v10 06/19] vfio iommu type1: Update arguments of vfio_lock_acct

2016-10-26 Thread Kirti Wankhede
Updated arguments of vfio_lock_acct to take task as input argument Signed-off-by: Kirti Wankhede <kwankh...@nvidia.com> Signed-off-by: Neo Jia <c...@nvidia.com> Change-Id: I5d3673cc9d3786bb436b395d5f74537f1a36da80 --- drivers/vfio/vfio_iommu_type1.c | 20 ++-- 1 file

[Qemu-devel] [PATCH v10 07/19] vfio iommu type1: Update argument of vaddr_get_pfn()

2016-10-26 Thread Kirti Wankhede
Update arguments of vaddr_get_pfn() to take struct mm_struct *mm as input argument. Signed-off-by: Kirti Wankhede <kwankh...@nvidia.com> Signed-off-by: Neo Jia <c...@nvidia.com> Change-Id: I885fd4cd4a9f66f4ee2c1caf58267464ec239f52 --- drivers/vfio/vfio_iommu_

[Qemu-devel] [PATCH v10 03/19] vfio: Rearrange functions to get vfio_group from dev

2016-10-26 Thread Kirti Wankhede
This patch rearranges functions to get vfio_group from device Signed-off-by: Kirti Wankhede <kwankh...@nvidia.com> Signed-off-by: Neo Jia <c...@nvidia.com> Change-Id: I1f93262bdbab75094bc24b087b29da35ba70c4c6 --- drivers/vfio/vfio.c | 23 --- 1 file changed, 1

[Qemu-devel] [PATCH v10 05/19] vfio iommu: Added pin and unpin callback functions to vfio_iommu_driver_ops

2016-10-26 Thread Kirti Wankhede
and unpin pages. Signed-off-by: Kirti Wankhede <kwankh...@nvidia.com> Signed-off-by: Neo Jia <c...@nvidia.com> Change-Id: Ia7417723aaae86bec2959ad9ae6c2915ddd340e0 --- drivers/vfio/vfio.c | 92 include/linux/vfio.h | 12 ++- 2 files

[Qemu-devel] [PATCH v10 00/19] Add Mediated device support

2016-10-26 Thread Kirti Wankhede
date mappings. - Exported APIs to register notifier for DMA_UNMAP action. Documentation: - Added sysfs ABI for mediated device framework. - Updated Documentation/vfio-mdev/vfio-mediated-device.txt. - Updated mtty.c with bug fixes. Kirti Wankhede (19): vfio: Mediated device Core driver vfio:

[Qemu-devel] [PATCH v10 01/19] vfio: Mediated device Core driver

2016-10-26 Thread Kirti Wankhede
ocks to serialize above callbacks in mdev driver and vfio_mdev driver. If required, vendor driver can have locks to serialize above APIs in their driver. Signed-off-by: Kirti Wankhede <kwankh...@nvidia.com> Signed-off-by: Neo Jia <c...@nvidia.com> Change-Id: I73a5084574270b14541c5294

[Qemu-devel] [PATCH v10 02/19] vfio: VFIO based driver for Mediated devices

2016-10-26 Thread Kirti Wankhede
operations to vendor driver for mediated devices. Signed-off-by: Kirti Wankhede <kwankh...@nvidia.com> Signed-off-by: Neo Jia <c...@nvidia.com> Change-Id: I583f4734752971d3d112324d69e2508c88f359ec --- drivers/vfio/mdev/Kconfig | 7 ++ drivers/vfio/mdev/Makefile| 1 + drive

[Qemu-devel] [PATCH v10 04/19] vfio: Common function to increment container_users

2016-10-26 Thread Kirti Wankhede
This change rearrange functions to have common function to increment container_users Signed-off-by: Kirti Wankhede <kwankh...@nvidia.com> Signed-off-by: Neo Jia <c...@nvidia.com> Change-Id: I8bdeb352bc8439b107ffd519480fd4dc238677f2 --- drivers/vfio

Re: [Qemu-devel] [PATCH v9 04/12] vfio iommu: Add support for mediated devices

2016-10-26 Thread Kirti Wankhede
On 10/26/2016 12:49 PM, Tian, Kevin wrote: >> From: Alex Williamson [mailto:alex.william...@redhat.com] >> Sent: Monday, October 24, 2016 10:32 AM >> > -static long vfio_unpin_pages(unsigned long pfn, long npage, > - int prot, bool do_accounting) > +static long

Re: [Qemu-devel] [PATCH v9 02/12] vfio: VFIO based driver for Mediated devices

2016-10-26 Thread Kirti Wankhede
>> +static void vfio_mdev_release(void *device_data) >> +{ >> +struct mdev_device *mdev = device_data; >> +struct parent_device *parent = mdev->parent; >> + >> +if (parent->ops->release) > > likely() > >> +parent->ops->release(mdev); >> + >> +module_put(THIS_MODULE);

Re: [Qemu-devel] [PATCH v9 01/12] vfio: Mediated device Core driver

2016-10-26 Thread Kirti Wankhede
>> Medisted bus driver is responsible to add/delete mediated devices to/from > > Medisted -> Mediated > Thanks for pointing out the typeo. Correcting it. >> VFIO group when devices are bound and unbound to the driver. >> >> 2. Physical device driver interface >> This interface provides vendor

Re: [Qemu-devel] [PATCH v9 05/12] vfio: Introduce common function to add capabilities

2016-10-24 Thread Kirti Wankhede
On 10/21/2016 12:54 AM, Alex Williamson wrote: > On Tue, 18 Oct 2016 02:52:05 +0530 > Kirti Wankhede <kwankh...@nvidia.com> wrote: > >> Vendor driver using mediated device framework should use >> vfio_info_add_capability() to add capabilities. >> Introd

Re: [Qemu-devel] [PATCH v9 06/12] vfio_pci: Update vfio_pci to use vfio_info_add_capability()

2016-10-24 Thread Kirti Wankhede
On 10/21/2016 12:54 AM, Alex Williamson wrote: > On Tue, 18 Oct 2016 02:52:06 +0530 > Kirti Wankhede <kwankh...@nvidia.com> wrote: > >> Update msix_sparse_mmap_cap() to use vfio_info_add_capability() >> Update region type capability to use vfio_info_add_capability()

Re: [Qemu-devel] [PATCH v9 04/12] vfio iommu: Add support for mediated devices

2016-10-24 Thread Kirti Wankhede
On 10/21/2016 8:06 PM, Alex Williamson wrote: > On Fri, 21 Oct 2016 15:49:07 +0800 > Jike Song <jike.s...@intel.com> wrote: > >> On 10/18/2016 05:22 AM, Kirti Wankhede wrote: >>> diff --git a/drivers/vfio/vfio_iommu_type1.c >>> b/drivers/vfio/vf

Re: [Qemu-devel] [PATCH v9 10/12] vfio: Add function to get device_api string from vfio_device_info.flags

2016-10-20 Thread Kirti Wankhede
On 10/21/2016 2:52 AM, Alex Williamson wrote: > On Fri, 21 Oct 2016 02:44:37 +0530 > Kirti Wankhede <kwankh...@nvidia.com> wrote: > ... >>>>>> >>>>>> +extern const char *vfio_device_api_string(u32 flags); >>>>>> +

Re: [Qemu-devel] [PATCH v9 10/12] vfio: Add function to get device_api string from vfio_device_info.flags

2016-10-20 Thread Kirti Wankhede
On 10/21/2016 2:35 AM, Alex Williamson wrote: > On Fri, 21 Oct 2016 01:59:55 +0530 > Kirti Wankhede <kwankh...@nvidia.com> wrote: > >> On 10/21/2016 1:04 AM, Alex Williamson wrote: >>> On Tue, 18 Oct 2016 02:52:10 +0530 >>> Kirti Wankhede <kwankh.

Re: [Qemu-devel] [PATCH v9 10/12] vfio: Add function to get device_api string from vfio_device_info.flags

2016-10-20 Thread Kirti Wankhede
On 10/21/2016 1:04 AM, Alex Williamson wrote: > On Tue, 18 Oct 2016 02:52:10 +0530 > Kirti Wankhede <kwankh...@nvidia.com> wrote: > >> Function vfio_device_api_string() returns string based on flag set in >> vfio_device_info's flag. This should be used by vendor dr

Re: [Qemu-devel] [PATCH v9 04/12] vfio iommu: Add support for mediated devices

2016-10-20 Thread Kirti Wankhede
Alex, Addressing your comments other than invalidation part. On 10/20/2016 2:32 AM, Alex Williamson wrote: > On Tue, 18 Oct 2016 02:52:04 +0530 > Kirti Wankhede <kwankh...@nvidia.com> wrote: > ... >> Tested by assigning below combinations of devices to a single VM: >&

Re: [Qemu-devel] [PATCH v9 12/12] docs: Sample driver to demonstrate how to use Mediated device framework.

2016-10-19 Thread Kirti Wankhede
On 10/18/2016 10:47 PM, Alex Williamson wrote: > On Tue, 18 Oct 2016 10:54:11 +0800 > Dong Jia Shi <bjsdj...@linux.vnet.ibm.com> wrote: > >> * Kirti Wankhede <kwankh...@nvidia.com> [2016-10-18 02:52:12 +0530]: >> >> ...snip... >> >>> +sta

Re: [Qemu-devel] [PATCH v9 01/12] vfio: Mediated device Core driver

2016-10-19 Thread Kirti Wankhede
On 10/19/2016 4:46 AM, Alex Williamson wrote: > On Tue, 18 Oct 2016 02:52:01 +0530 > Kirti Wankhede <kwankh...@nvidia.com> wrote: > ... >> +static struct mdev_device *__find_mdev_device(struct parent_device *parent, >> +

[Qemu-devel] [PATCH v9 12/12] docs: Sample driver to demonstrate how to use Mediated device framework.

2016-10-17 Thread Kirti Wankhede
The Sample driver creates mdev device that simulates serial port over PCI card. Signed-off-by: Kirti Wankhede <kwankh...@nvidia.com> Signed-off-by: Neo Jia <c...@nvidia.com> Change-Id: I857f8f12f8b275f2498dfe8c628a5cdc7193b1b2 --- Documentation/vfio-mdev/Makefile

[Qemu-devel] [PATCH v9 06/12] vfio_pci: Update vfio_pci to use vfio_info_add_capability()

2016-10-17 Thread Kirti Wankhede
Update msix_sparse_mmap_cap() to use vfio_info_add_capability() Update region type capability to use vfio_info_add_capability() Can't split this commit for MSIx and region_type cap since there is a common code which need to be updated for both the cases. Signed-off-by: Kirti Wankhede <kwa

[Qemu-devel] [PATCH v9 07/12] vfio: Introduce vfio_set_irqs_validate_and_prepare()

2016-10-17 Thread Kirti Wankhede
Vendor driver using mediated device framework would use same mechnism to validate and prepare IRQs. Introducing this function to reduce code replication in multiple drivers. Signed-off-by: Kirti Wankhede <kwankh...@nvidia.com> Signed-off-by: Neo Jia <c...@nvidia.com&g

[Qemu-devel] [PATCH v9 11/12] docs: Add Documentation for Mediated devices

2016-10-17 Thread Kirti Wankhede
Add file Documentation/vfio-mediated-device.txt that include details of mediated device framework. Signed-off-by: Kirti Wankhede <kwankh...@nvidia.com> Signed-off-by: Neo Jia <c...@nvidia.com> Change-Id: I137dd646442936090d92008b115908b7b2c7bc5d --- Documentation/vfio-mdev/v

[Qemu-devel] [PATCH v9 08/12] vfio_pci: Updated to use vfio_set_irqs_validate_and_prepare()

2016-10-17 Thread Kirti Wankhede
Updated vfio_pci.c file to use vfio_set_irqs_validate_and_prepare() Signed-off-by: Kirti Wankhede <kwankh...@nvidia.com> Signed-off-by: Neo Jia <c...@nvidia.com> Change-Id: I9f3daba89d8dba5cb5b01a8cff420412f30686c7 --- drivers/vfio/pci/vfio_pci.c | 29 +

[Qemu-devel] [PATCH v9 09/12] vfio_platform: Updated to use vfio_set_irqs_validate_and_prepare()

2016-10-17 Thread Kirti Wankhede
Updated vfio_platform_common.c file to use vfio_set_irqs_validate_and_prepare() Signed-off-by: Kirti Wankhede <kwankh...@nvidia.com> Signed-off-by: Neo Jia <c...@nvidia.com> Change-Id: Id87cd6b78ae901610b39bf957974baa6f40cd7b0 --- drivers/vfio/platform/vfio_platform_c

[Qemu-devel] [PATCH v9 05/12] vfio: Introduce common function to add capabilities

2016-10-17 Thread Kirti Wankhede
Vendor driver using mediated device framework should use vfio_info_add_capability() to add capabilities. Introduced this function to reduce code duplication in vendor drivers. Signed-off-by: Kirti Wankhede <kwankh...@nvidia.com> Signed-off-by: Neo Jia <c...@nvidia.com&g

[Qemu-devel] [PATCH v9 10/12] vfio: Add function to get device_api string from vfio_device_info.flags

2016-10-17 Thread Kirti Wankhede
Function vfio_device_api_string() returns string based on flag set in vfio_device_info's flag. This should be used by vendor driver to get string based on flag for device_api attribute. Signed-off-by: Kirti Wankhede <kwankh...@nvidia.com> Signed-off-by: Neo Jia <c...@nvidia.com&g

[Qemu-devel] [PATCH v9 01/12] vfio: Mediated device Core driver

2016-10-17 Thread Kirti Wankhede
ern int mdev_register_device(struct device *dev, const struct parent_ops *ops); extern void mdev_unregister_device(struct device *dev); There are no locks to serialize above callbacks in mdev driver and vfio_mdev driver. If required, vendor driver can have locks to serialize above APIs

[Qemu-devel] [PATCH v9 04/12] vfio iommu: Add support for mediated devices

2016-10-17 Thread Kirti Wankhede
- 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 Signed-off-by: Kirti Wankhede <kwankh...@nvidia.com> Signed-off-by: Neo Jia <c...@n

[Qemu-devel] [PATCH v9 03/12] vfio: Rearrange functions to get vfio_group from dev

2016-10-17 Thread Kirti Wankhede
Rearrange functions to have common function to increment container_users. Signed-off-by: Kirti Wankhede <kwankh...@nvidia.com> Signed-off-by: Neo Jia <c...@nvidia.com> Change-Id: I1f93262bdbab75094bc24b087b29da35ba70c4c6 --- drivers/vfio

[Qemu-devel] [PATCH v9 00/12] Add Mediated device support

2016-10-17 Thread Kirti Wankhede
Documentation and sample driver, mtty.c, accordingly. Kirti Wankhede (12): vfio: Mediated device Core driver vfio: VFIO based driver for Mediated devices vfio: Rearrange functions to get vfio_group from dev vfio iommu: Add support for mediated devices vfio: Introduce common function to ad

[Qemu-devel] [PATCH v9 02/12] vfio: VFIO based driver for Mediated devices

2016-10-17 Thread Kirti Wankhede
operations to vendor driver for mediated devices. Signed-off-by: Kirti Wankhede <kwankh...@nvidia.com> Signed-off-by: Neo Jia <c...@nvidia.com> Change-Id: I583f4734752971d3d112324d69e2508c88f359ec --- drivers/vfio/mdev/Kconfig | 7 ++ drivers/vfio/mdev/Makefile| 1 + drive

Re: [Qemu-devel] [PATCH v8 3/6] vfio iommu: Add support for mediated devices

2016-10-14 Thread Kirti Wankhede
On 10/12/2016 4:01 PM, Tian, Kevin wrote: >> From: Kirti Wankhede [mailto:kwankh...@nvidia.com] >> Sent: Tuesday, October 11, 2016 4:29 AM >> > [...] >> diff --git a/drivers/vfio/vfio_iommu_type1.c >> b/drivers/vfio/vfio_iommu_type1.c >> index 2ba19424e4a

Re: [Qemu-devel] [PATCH v8 4/6] docs: Add Documentation for Mediated devices

2016-10-13 Thread Kirti Wankhede
On 10/13/2016 8:06 PM, Alex Williamson wrote: > On Thu, 13 Oct 2016 14:52:09 +0530 > Kirti Wankhede <kwankh...@nvidia.com> wrote: > >> On 10/13/2016 3:14 AM, Alex Williamson wrote: >>> On Thu, 13 Oct 2016 00:32:48 +0530 >>> Kirti Wankhede <kwankh...@nv

Re: [Qemu-devel] [PATCH v8 4/6] docs: Add Documentation for Mediated devices

2016-10-13 Thread Kirti Wankhede
On 10/14/2016 7:52 AM, Jike Song wrote: > On 10/11/2016 04:28 AM, Kirti Wankhede wrote: >> + >> +Under per-physical device sysfs: >> + >> + >> +* mdev_supported_types: >> +List of current supported mediated dev

Re: [Qemu-devel] [PATCH v8 3/6] vfio iommu: Add support for mediated devices

2016-10-13 Thread Kirti Wankhede
On 10/12/2016 3:36 AM, Alex Williamson wrote: > On Tue, 11 Oct 2016 01:58:34 +0530 > Kirti Wankhede <kwankh...@nvidia.com> wrote: > ... >> +static struct vfio_group *vfio_group_from_dev(struct device *dev) >> +{ >> +struct vfio_device *device; >> +

Re: [Qemu-devel] [PATCH v8 4/6] docs: Add Documentation for Mediated devices

2016-10-13 Thread Kirti Wankhede
On 10/13/2016 3:14 AM, Alex Williamson wrote: > On Thu, 13 Oct 2016 00:32:48 +0530 > Kirti Wankhede <kwankh...@nvidia.com> wrote: > >> On 10/12/2016 9:29 PM, Alex Williamson wrote: >>> On Wed, 12 Oct 2016 20:43:48 +0530 >>> Kirti Wankhede <kwankh...@nv

Re: [Qemu-devel] [PATCH v8 6/6] Add common functions for SET_IRQS and GET_REGION_INFO ioctls

2016-10-12 Thread Kirti Wankhede
On 10/12/2016 4:48 AM, Alex Williamson wrote: > On Tue, 11 Oct 2016 01:58:37 +0530 > Kirti Wankhede <kwankh...@nvidia.com> wrote: > >> Add common functions for SET_IRQS and to add capability buffer for >> GET_REGION_INFO ioctls > > Clearly should be two

Re: [Qemu-devel] [PATCH v8 4/6] docs: Add Documentation for Mediated devices

2016-10-12 Thread Kirti Wankhede
On 10/12/2016 9:29 PM, Alex Williamson wrote: > On Wed, 12 Oct 2016 20:43:48 +0530 > Kirti Wankhede <kwankh...@nvidia.com> wrote: > >> On 10/12/2016 7:22 AM, Tian, Kevin wrote: >>>> From: Kirti Wankhede [mailto:kwankh...@nvidia.com] >>>&

Re: [Qemu-devel] [PATCH v8 4/6] docs: Add Documentation for Mediated devices

2016-10-12 Thread Kirti Wankhede
On 10/12/2016 7:22 AM, Tian, Kevin wrote: >> From: Kirti Wankhede [mailto:kwankh...@nvidia.com] >> Sent: Wednesday, October 12, 2016 4:45 AM >>>> +* mdev_supported_types: >>>> +List of current supported mediated device types and its details are

Re: [Qemu-devel] [PATCH v8 4/6] docs: Add Documentation for Mediated devices

2016-10-11 Thread Kirti Wankhede
On 10/11/2016 7:44 PM, Daniel P. Berrange wrote: > On Tue, Oct 11, 2016 at 01:58:35AM +0530, Kirti Wankhede wrote: >> Add file Documentation/vfio-mediated-device.txt that include details of >> mediated device framework. >> >> Signed-off-by: Kirti Wankhede <kwank

Re: [Qemu-devel] [PATCH v8 2/6] vfio: VFIO based driver for Mediated devices

2016-10-11 Thread Kirti Wankhede
On 10/11/2016 9:25 AM, Alex Williamson wrote: > On Tue, 11 Oct 2016 01:58:33 +0530 > Kirti Wankhede <kwankh...@nvidia.com> wrote: > >> vfio_mdev driver registers with mdev core driver. >> MDEV core driver creates mediated device and calls probe routine of >>

Re: [Qemu-devel] [PATCH v8 1/6] vfio: Mediated device Core driver

2016-10-11 Thread Kirti Wankhede
On 10/11/2016 9:21 AM, Alex Williamson wrote: > On Tue, 11 Oct 2016 01:58:32 +0530 > Kirti Wankhede <kwankh...@nvidia.com> wrote: >> --- >> drivers/vfio/Kconfig | 1 + >> drivers/vfio/Makefile| 1 + >> drivers/vfio/mdev/Kconfig

[Qemu-devel] [PATCH v8 5/6] Add simple sample driver for mediated device framework

2016-10-10 Thread Kirti Wankhede
Sample driver creates mdev device that simulates serial port over PCI card. Signed-off-by: Kirti Wankhede <kwankh...@nvidia.com> Signed-off-by: Neo Jia <c...@nvidia.com> Change-Id: I857f8f12f8b275f2498dfe8c628a5cdc7193b1b2 --- Documentation/vfio-mdev/Makefile

[Qemu-devel] [PATCH v8 4/6] docs: Add Documentation for Mediated devices

2016-10-10 Thread Kirti Wankhede
Add file Documentation/vfio-mediated-device.txt that include details of mediated device framework. Signed-off-by: Kirti Wankhede <kwankh...@nvidia.com> Signed-off-by: Neo Jia <c...@nvidia.com> Change-Id: I137dd646442936090d92008b115908b7b2c7bc5d --- Documentation/vfio-mdev/v

[Qemu-devel] [PATCH v8 6/6] Add common functions for SET_IRQS and GET_REGION_INFO ioctls

2016-10-10 Thread Kirti Wankhede
Add common functions for SET_IRQS and to add capability buffer for GET_REGION_INFO ioctls Signed-off-by: Kirti Wankhede <kwankh...@nvidia.com> Signed-off-by: Neo Jia <c...@nvidia.com> Change-Id: Id9e976a2c08b9b2b37da77dac4365ae8f6024b4a --- drivers/vfio/pci/vfio

[Qemu-devel] [PATCH v8 3/6] vfio iommu: Add support for mediated devices

2016-10-10 Thread Kirti Wankhede
- 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 Signed-off-by: Kirti Wankhede <kwankh...@nvidia.com> Signed-off-by: Neo Jia <c...@n

[Qemu-devel] [PATCH v8 1/6] vfio: Mediated device Core driver

2016-10-10 Thread Kirti Wankhede
ern int mdev_register_device(struct device *dev, const struct parent_ops *ops); extern void mdev_unregister_device(struct device *dev); There are no locks to serialize above callbacks in mdev driver and vfio_mdev driver. If required, vendor driver can have locks to serialize above APIs

[Qemu-devel] [PATCH v8 0/6] Add Mediated device support

2016-10-10 Thread Kirti Wankhede
use mediated device framework. - Moved updated document and example driver to 'vfio-mdev' directory in Documentation. Kirti Wankhede (6): vfio: Mediated device Core driver vfio: VFIO based driver for Mediated devices vfio iommu: Add support for mediated devices docs: Add Documenta

[Qemu-devel] [PATCH v8 2/6] vfio: VFIO based driver for Mediated devices

2016-10-10 Thread Kirti Wankhede
operations to vendor driver for mediated devices. Signed-off-by: Kirti Wankhede <kwankh...@nvidia.com> Signed-off-by: Neo Jia <c...@nvidia.com> Change-Id: I583f4734752971d3d112324d69e2508c88f359ec --- drivers/vfio/mdev/Kconfig | 6 ++ drivers/vfio/mdev/Makefile | 1 +

Re: [Qemu-devel] [RFC v2] libvirt vGPU QEMU integration

2016-10-06 Thread Kirti Wankhede
can have 'class' as optional attribute. So Intel don't have to >> provide 'class' attribute and they don't have to specify mandatory >> attributes of that class. We would provide 'class' attribute and provide >> mandatory attributes. > Thanks, Kirti On 10/3/2016 1:50 PM, Kirt

Re: [Qemu-devel] [RFC v2] libvirt vGPU QEMU integration

2016-10-03 Thread Kirti Wankhede
On 9/30/2016 10:49 AM, Kirti Wankhede wrote: > ... >>>>>> Hi Daniel, >>>>>> >>>>>> Here you are proposing to add a class named "gpu", which will make all >>>>>> those gpu >>>>>> rela

Re: [Qemu-devel] [PATCH v7 3/4] vfio iommu: Add support for mediated devices

2016-09-30 Thread Kirti Wankhede
On 9/30/2016 8:40 AM, Jike Song wrote: > On 09/30/2016 10:58 AM, Jike Song wrote: >> On 09/29/2016 11:06 PM, Kirti Wankhede wrote: >>> >>> >>> On 9/29/2016 7:47 AM, Jike Song wrote: >>>> +Guangrong >>>> >>>> On 08/25

Re: [Qemu-devel] [RFC v2] libvirt vGPU QEMU integration

2016-09-29 Thread Kirti Wankhede
a...@redhat.com] >>>> Sent: Thursday, September 29, 2016 4:06 PM >>>> >>>> On Wed, Sep 28, 2016 at 12:48:33PM -0700, Neo Jia wrote: >>>>> On Tue, Sep 20, 2016 at 10:47:53AM +0100, Daniel P. Berrange wrote: >>>>>> On Tue, Sep 20, 2

Re: [Qemu-devel] [PATCH v7 3/4] vfio iommu: Add support for mediated devices

2016-09-29 Thread Kirti Wankhede
On 9/29/2016 7:47 AM, Jike Song wrote: > +Guangrong > > On 08/25/2016 11:53 AM, Kirti Wankhede wrote: ... >> +static long vfio_iommu_type1_pin_pages(void *iommu_data, >> + unsigned long *user_pfn, >> +

Re: [Qemu-devel] [RFC v2] libvirt vGPU QEMU integration

2016-09-29 Thread Kirti Wankhede
7. Hot-plug It is same syntax to create a virtual device for hot-plug. >>> >>> How do groups work with hotplug? Can a device be creating into an >>> existing, running group? Can a device be removed from an existing, >>> running group?

Re: [Qemu-devel] summary of current vfio mdev upstreaming status

2016-09-29 Thread Kirti Wankhede
On 9/29/2016 3:16 PM, Xiao Guangrong wrote: > > > On 09/29/2016 05:36 PM, Neo Jia wrote: >> On Thu, Sep 29, 2016 at 05:05:47PM +0800, Xiao Guangrong wrote: >>> >>> >>> On 09/29/2016 04:55 PM, Jike Song wrote: Hi all, In order to have a clear understanding about the VFIO mdev

Re: [Qemu-devel] summary of current vfio mdev upstreaming status

2016-09-29 Thread Kirti Wankhede
On 9/29/2016 2:47 PM, Neo Jia wrote: > On Thu, Sep 29, 2016 at 04:55:39PM +0800, Jike Song wrote: >> Hi all, >> >> In order to have a clear understanding about the VFIO mdev upstreaming >> status, I'd like to summarize it. Please share your opinions on this, >> and correct my misunderstandings.

[Qemu-devel] [PATCH 1/1] Add simple sample driver for mediated device framework

2016-09-29 Thread Kirti Wankhede
Sample driver creates mdev device that simulates serial port over PCI card. Signed-off-by: Kirti Wankhede <kwankh...@nvidia.com> Signed-off-by: Neo Jia <c...@nvidia.com> Change-Id: I857f8f12f8b275f2498dfe8c628a5cdc7193b1b2 --- Documentation/mdev/Makefile

[Qemu-devel] [PATCH 0/1] Sample driver for mediated device framework

2016-09-29 Thread Kirti Wankhede
and how it is supposed to work. Kirti Wankhede (1): Add simple sample driver for mediated device framework Documentation/mdev/Makefile | 14 + Documentation/mdev/mtty.c | 1202 + Documentation/{ => mdev}/vfio-media

Re: [Qemu-devel] [RFC v2] libvirt vGPU QEMU integration

2016-09-23 Thread Kirti Wankhede
On 9/23/2016 12:55 AM, Tian, Kevin wrote: >> From: Kirti Wankhede [mailto:kwankh...@nvidia.com] >> Sent: Wednesday, September 21, 2016 12:23 AM >>> >>>>> I have >>>>> a hard time believing that a given vendor can even allocate unique type >

Re: [Qemu-devel] [RFC v2] libvirt vGPU QEMU integration

2016-09-21 Thread Kirti Wankhede
> My concern is that a type id seems arbitrary but we're specifying that > it be unique. We already have something unique, the name. So why try > to make the type id unique as well? A vendor can accidentally create > their vendor driver so that a given name means something

Re: [Qemu-devel] [RFC v2] libvirt vGPU QEMU integration

2016-09-21 Thread Kirti Wankhede
On 9/20/2016 10:20 PM, Alex Williamson wrote: > On Tue, 20 Sep 2016 21:53:16 +0530 > Kirti Wankhede <kwankh...@nvidia.com> wrote: > >> On 9/20/2016 8:13 PM, Alex Williamson wrote: >>> On Tue, 20 Sep 2016 19:51:58 +0530 >>> Kirti Wankhede <kwankh...@nvi

Re: [Qemu-devel] [RFC v2] libvirt vGPU QEMU integration

2016-09-20 Thread Kirti Wankhede
On 9/20/2016 10:06 PM, Daniel P. Berrange wrote: > On Tue, Sep 20, 2016 at 10:01:18PM +0530, Kirti Wankhede wrote: >> >> >> On 9/20/2016 8:44 PM, Daniel P. Berrange wrote: >>> On Tue, Sep 20, 2016 at 05:05:43PM +0200, Paolo Bonzini wrote: >>>> >>

Re: [Qemu-devel] [RFC v2] libvirt vGPU QEMU integration

2016-09-20 Thread Kirti Wankhede
On 9/20/2016 8:44 PM, Daniel P. Berrange wrote: > On Tue, Sep 20, 2016 at 05:05:43PM +0200, Paolo Bonzini wrote: >> >> >> On 20/09/2016 16:58, Daniel P. Berrange wrote: > As I've said in my earlier reply - libvirt will *NOT* support passing > arbitrary vendor specific parameters as a

Re: [Qemu-devel] [RFC v2] libvirt vGPU QEMU integration

2016-09-20 Thread Kirti Wankhede
On 9/20/2016 8:13 PM, Alex Williamson wrote: > On Tue, 20 Sep 2016 19:51:58 +0530 > Kirti Wankhede <kwankh...@nvidia.com> wrote: > >> On 9/20/2016 3:06 AM, Alex Williamson wrote: >>> On Tue, 20 Sep 2016 02:05:52 +0530 >>> Kirti Wankhede <kwankh...

Re: [Qemu-devel] [RFC v2] libvirt vGPU QEMU integration

2016-09-20 Thread Kirti Wankhede
On 9/20/2016 3:06 AM, Alex Williamson wrote: > On Tue, 20 Sep 2016 02:05:52 +0530 > Kirti Wankhede <kwankh...@nvidia.com> wrote: > >> Hi libvirt experts, >> >> Thanks for valuable input on v1 version of RFC. >> >> Quick brief, VFIO based mediated dev

Re: [Qemu-devel] [RFC v2] libvirt vGPU QEMU integration

2016-09-20 Thread Kirti Wankhede
On 9/20/2016 3:55 AM, Alex Williamson wrote: > On Mon, 19 Sep 2016 23:50:56 +0200 > Paolo Bonzini <pbonz...@redhat.com> wrote: > >> On 19/09/2016 23:36, Alex Williamson wrote: >>> On Tue, 20 Sep 2016 02:05:52 +0530 >>> Kirti Wankhede <kwan

[Qemu-devel] [RFC v2] libvirt vGPU QEMU integration

2016-09-19 Thread Kirti Wankhede
Hi libvirt experts, Thanks for valuable input on v1 version of RFC. Quick brief, VFIO based mediated device framework provides a way to virtualize their devices without SR-IOV, like NVIDIA vGPU, Intel KVMGT and IBM's channel IO. This framework reuses VFIO APIs for all the functionalities for

Re: [Qemu-devel] [PATCH v7 1/4] vfio: Mediated device Core driver

2016-09-19 Thread Kirti Wankhede
On 9/19/2016 11:41 PM, Alex Williamson wrote: > On Mon, 19 Sep 2016 22:59:34 +0530 > Kirti Wankhede <kwankh...@nvidia.com> wrote: > >> On 9/12/2016 9:23 PM, Alex Williamson wrote: >>> On Mon, 12 Sep 2016 13:19:11 +0530 >>> Kirti Wankhede <kwankh...@nvid

Re: [Qemu-devel] [PATCH v7 2/4] vfio: VFIO driver for mediated devices

2016-09-19 Thread Kirti Wankhede
On 9/20/2016 12:06 AM, Alex Williamson wrote: > On Mon, 19 Sep 2016 23:52:36 +0530 > Kirti Wankhede <kwankh...@nvidia.com> wrote: > >> On 8/26/2016 7:43 PM, Kirti Wankhede wrote: >>> * PGP Signed: 08/26/2016 at 07:15:44 AM, Decrypted >>> On 8/25/2016 2:5

<    4   5   6   7   8   9   10   >