>> @@ -411,6 +484,13 @@ void vtd_accel_pasid_cache_sync(IntelIOMMUState
>*s, VTDPASIDCacheInfo *pc_info)
>> TYPE_HOST_IOMMU_DEVICE_IOMMUFD)) {
>> continue;
>> }
>> +
>> + /*
>> + * PASID entry removal is handled before addition intentionally,
>> + * because it's unnecessary to iterate on an entry that will be
>> + * removed.
>
>how about below? :)
>
>/*
> * The replay path inevitably needs to iterate through existing
> * PASID cache entries. Since cached PASID entries that are marked
> * for removal don't need to be iterated, we intentionally handle
> * removals before additions to optimize the replay process.
> */
Good, will do.
Thanks
Zhenzhong