Hi Shameer,

>-----Original Message-----
>From: Shameerali Kolothum Thodi <[email protected]>
>Subject: RE: [PATCH rfcv2 01/20] backends/iommufd: Add helpers for invalidating
>user-managed HWPT
>
>Hi Zhenzhong,
>
>> -----Original Message-----
>> From: Zhenzhong Duan <[email protected]>
>> Sent: Wednesday, February 19, 2025 8:22 AM
>> To: [email protected]
>> Cc: [email protected]; [email protected]; [email protected];
>> [email protected]; [email protected]; [email protected];
>> [email protected]; [email protected]; Shameerali Kolothum Thodi
>> <[email protected]>; [email protected];
>> [email protected]; [email protected];
>> [email protected]; [email protected]; Zhenzhong Duan
>> <[email protected]>
>> Subject: [PATCH rfcv2 01/20] backends/iommufd: Add helpers for
>> invalidating user-managed HWPT
>>
>> Signed-off-by: Nicolin Chen <[email protected]>
>> Signed-off-by: Zhenzhong Duan <[email protected]>
>> ---
>>  include/system/iommufd.h |  3 +++
>>  backends/iommufd.c       | 30 ++++++++++++++++++++++++++++++
>>  backends/trace-events    |  1 +
>>  3 files changed, 34 insertions(+)
>>
>> diff --git a/include/system/iommufd.h b/include/system/iommufd.h
>> index cbab75bfbf..5d02e9d148 100644
>> --- a/include/system/iommufd.h
>> +++ b/include/system/iommufd.h
>> @@ -61,6 +61,9 @@ bool
>> iommufd_backend_get_dirty_bitmap(IOMMUFDBackend *be, uint32_t
>> hwpt_id,
>>                                        uint64_t iova, ram_addr_t size,
>>                                        uint64_t page_size, uint64_t *data,
>>                                        Error **errp);
>> +int iommufd_backend_invalidate_cache(IOMMUFDBackend *be, uint32_t
>> hwpt_id,
>> +                                     uint32_t data_type, uint32_t entry_len,
>> +                                     uint32_t *entry_num, void *data_ptr);
>>
>>  #define TYPE_HOST_IOMMU_DEVICE_IOMMUFD
>> TYPE_HOST_IOMMU_DEVICE "-iommufd"
>>  #endif
>> diff --git a/backends/iommufd.c b/backends/iommufd.c
>> index d57da44755..fc32aad5cb 100644
>> --- a/backends/iommufd.c
>> +++ b/backends/iommufd.c
>> @@ -311,6 +311,36 @@ bool
>> iommufd_backend_get_device_info(IOMMUFDBackend *be, uint32_t devid,
>>      return true;
>>  }
>>
>> +int iommufd_backend_invalidate_cache(IOMMUFDBackend *be, uint32_t
>> hwpt_id,
>
>Nit: As per struct iommu_hwpt_invalidate documentation this can be an ID of
>Nested HWPT or vIOMMU.  May be better to rename this just to id.

Sure, will do.

Thanks
Zhenzhong

Reply via email to