Hi Shameer, >-----Original Message----- >From: Shameerali Kolothum Thodi <shameerali.kolothum.th...@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.d...@intel.com> >> Sent: Wednesday, February 19, 2025 8:22 AM >> To: qemu-devel@nongnu.org >> Cc: alex.william...@redhat.com; c...@redhat.com; eric.au...@redhat.com; >> m...@redhat.com; jasow...@redhat.com; pet...@redhat.com; >> j...@nvidia.com; nicol...@nvidia.com; Shameerali Kolothum Thodi >> <shameerali.kolothum.th...@huawei.com>; joao.m.mart...@oracle.com; >> clement.mathieu--d...@eviden.com; kevin.t...@intel.com; >> yi.l....@intel.com; chao.p.p...@intel.com; Zhenzhong Duan >> <zhenzhong.d...@intel.com> >> Subject: [PATCH rfcv2 01/20] backends/iommufd: Add helpers for >> invalidating user-managed HWPT >> >> Signed-off-by: Nicolin Chen <nicol...@nvidia.com> >> Signed-off-by: Zhenzhong Duan <zhenzhong.d...@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