[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [PATCH rfcv2 01/20] backends/iommufd: Add helpers for invalidating u
From: |
Duan, Zhenzhong |
Subject: |
RE: [PATCH rfcv2 01/20] backends/iommufd: Add helpers for invalidating user-managed HWPT |
Date: |
Fri, 28 Feb 2025 09:36:57 +0000 |
Hi Shameer,
>-----Original Message-----
>From: Shameerali Kolothum Thodi <shameerali.kolothum.thodi@huawei.com>
>Subject: RE: [PATCH rfcv2 01/20] backends/iommufd: Add helpers for invalidating
>user-managed HWPT
>
>Hi Zhenzhong,
>
>> -----Original Message-----
>> From: Zhenzhong Duan <zhenzhong.duan@intel.com>
>> Sent: Wednesday, February 19, 2025 8:22 AM
>> To: qemu-devel@nongnu.org
>> Cc: alex.williamson@redhat.com; clg@redhat.com; eric.auger@redhat.com;
>> mst@redhat.com; jasowang@redhat.com; peterx@redhat.com;
>> jgg@nvidia.com; nicolinc@nvidia.com; Shameerali Kolothum Thodi
>> <shameerali.kolothum.thodi@huawei.com>; joao.m.martins@oracle.com;
>> clement.mathieu--drif@eviden.com; kevin.tian@intel.com;
>> yi.l.liu@intel.com; chao.p.peng@intel.com; Zhenzhong Duan
>> <zhenzhong.duan@intel.com>
>> Subject: [PATCH rfcv2 01/20] backends/iommufd: Add helpers for
>> invalidating user-managed HWPT
>>
>> Signed-off-by: Nicolin Chen <nicolinc@nvidia.com>
>> Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com>
>> ---
>> 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
- [PATCH rfcv2 00/20] intel_iommu: Enable stage-1 translation for passthrough device, Zhenzhong Duan, 2025/02/19
- [PATCH rfcv2 01/20] backends/iommufd: Add helpers for invalidating user-managed HWPT, Zhenzhong Duan, 2025/02/19
- [PATCH rfcv2 04/20] vfio/iommufd: Implement HostIOMMUDeviceClass::realize_late() handler, Zhenzhong Duan, 2025/02/19
- [PATCH rfcv2 03/20] HostIOMMUDevice: Introduce realize_late callback, Zhenzhong Duan, 2025/02/19
- [PATCH rfcv2 02/20] vfio/iommufd: Add properties and handlers to TYPE_HOST_IOMMU_DEVICE_IOMMUFD, Zhenzhong Duan, 2025/02/19
- [PATCH rfcv2 05/20] vfio/iommufd: Implement [at|de]tach_hwpt handlers, Zhenzhong Duan, 2025/02/19