[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v10 10/19] vfio iommu: Add blocking notifier to
From: |
Kirti Wankhede |
Subject: |
Re: [Qemu-devel] [PATCH v10 10/19] vfio iommu: Add blocking notifier to notify DMA_UNMAP |
Date: |
Mon, 31 Oct 2016 11:29:01 +0530 |
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().
>> Vendor driver should register notifer using these APIs.
>> Vendor driver should use VFIO_IOMMU_NOTIFY_DMA_UNMAP action to invalidate
>> mappings.
>>
>> Signed-off-by: Kirti Wankhede <address@hidden>
>> Signed-off-by: Neo Jia <address@hidden>
>> Change-Id: I5910d0024d6be87f3e8d3e0ca0eaeaaa0b17f271
>> ---
>> drivers/vfio/vfio.c | 73 +++++++++++++++++++++++++++++++++
>> drivers/vfio/vfio_iommu_type1.c | 89
>> ++++++++++++++++++++++++++++++++++++-----
>> include/linux/vfio.h | 11 +++++
>> 3 files changed, 163 insertions(+), 10 deletions(-)
>>
>> diff --git a/drivers/vfio/vfio.c b/drivers/vfio/vfio.c
>> index 28b50ca14c52..ff05ac6b1e90 100644
>> --- a/drivers/vfio/vfio.c
>> +++ b/drivers/vfio/vfio.c
>> @@ -1891,6 +1891,79 @@ err_unpin_pages:
>> }
>> EXPORT_SYMBOL(vfio_unpin_pages);
>>
>> +int vfio_register_notifier(struct device *dev, struct notifier_block *nb)
>> +{
>
> Hi Kirti,
>
> Given that below 4 methods are members of vfio_iommu_driver_ops:
>
> pin_pages
> unpin_pages
> register_notifier
> unregister_notifier
>
> the names of exposed VFIO APIs could possibly be clearer:
>
> vfio_iommu_pin_pages
> vfio_iommu_unpin_pages
> vfio_iommu_register_notifier
> vfio_iommu_unreigster_nodier
>
Hey Jike,
I had followed the same style as other members in this structure:
attach_group
detach_group
Thanks,
Kirti
- Re: [Qemu-devel] [PATCH v10 09/19] vfio iommu type1: Add support for mediated devices, (continued)
- [Qemu-devel] [PATCH v10 10/19] vfio iommu: Add blocking notifier to notify DMA_UNMAP, Kirti Wankhede, 2016/10/26
- Re: [Qemu-devel] [PATCH v10 10/19] vfio iommu: Add blocking notifier to notify DMA_UNMAP, Jike Song, 2016/10/28
- Re: [Qemu-devel] [PATCH v10 10/19] vfio iommu: Add blocking notifier to notify DMA_UNMAP, Kirti Wankhede, 2016/10/28
- Re: [Qemu-devel] [PATCH v10 10/19] vfio iommu: Add blocking notifier to notify DMA_UNMAP, Alex Williamson, 2016/10/28
- Re: [Qemu-devel] [PATCH v10 10/19] vfio iommu: Add blocking notifier to notify DMA_UNMAP, Kirti Wankhede, 2016/10/28
- Re: [Qemu-devel] [PATCH v10 10/19] vfio iommu: Add blocking notifier to notify DMA_UNMAP, Alex Williamson, 2016/10/28
- Re: [Qemu-devel] [PATCH v10 10/19] vfio iommu: Add blocking notifier to notify DMA_UNMAP, Kirti Wankhede, 2016/10/29
- Re: [Qemu-devel] [PATCH v10 10/19] vfio iommu: Add blocking notifier to notify DMA_UNMAP, Alex Williamson, 2016/10/29
Re: [Qemu-devel] [PATCH v10 10/19] vfio iommu: Add blocking notifier to notify DMA_UNMAP, Jike Song, 2016/10/30
[Qemu-devel] [PATCH v10 11/19] vfio: Introduce common function to add capabilities, Kirti Wankhede, 2016/10/26
[Qemu-devel] [PATCH v10 12/19] vfio_pci: Update vfio_pci to use vfio_info_add_capability(), Kirti Wankhede, 2016/10/26
[Qemu-devel] [PATCH v10 13/19] vfio: Introduce vfio_set_irqs_validate_and_prepare(), Kirti Wankhede, 2016/10/26
[Qemu-devel] [PATCH v10 14/19] vfio_pci: Updated to use vfio_set_irqs_validate_and_prepare(), Kirti Wankhede, 2016/10/26
[Qemu-devel] [PATCH v10 15/19] vfio_platform: Updated to use vfio_set_irqs_validate_and_prepare(), Kirti Wankhede, 2016/10/26
[Qemu-devel] [PATCH v10 16/19] vfio: Define device_api strings, Kirti Wankhede, 2016/10/26
[Qemu-devel] [PATCH v10 17/19] docs: Add Documentation for Mediated devices, Kirti Wankhede, 2016/10/26
[Qemu-devel] [PATCH v10 18/19] docs: Sysfs ABI for mediated device framework, Kirti Wankhede, 2016/10/26