QLIST_INSERT_HEAD(&vtd_hiod->pasid_cache_list, vtd_pce, next);
}
-static void vtd_accel_delete_pc(VTDAccelPASIDCacheEntry *vtd_pce)
+static void vtd_accel_delete_pc(VTDAccelPASIDCacheEntry *vtd_pce,
+ VTDPASIDCacheInfo *pc_info)
{
QLIST_REMOVE(vtd_pce, next);
g_free(vtd_pce);
+
+ if (pc_info->type == VTD_INV_DESC_PASIDC_G_PASID_SI) {
+ pc_info->accel_pce_deleted = true;
+ }
}
static void
* to be either all-zero or non-present. Either case means existing
* pasid cache should be invalidated.
*/
- vtd_accel_delete_pc(vtd_pce);
+ vtd_accel_delete_pc(vtd_pce, pc_info);
}
}
* removals before additions to optimize the replay process.
*/
vtd_accel_pasid_cache_invalidate(vtd_hiod, pc_info);
- vtd_accel_replay_pasid_bind_for_dev(vtd_hiod, start, end, pc_info);
+
+ if (pc_info->accel_pce_deleted) {
+ pc_info->accel_pce_deleted = false;
+ } else {
+ vtd_accel_replay_pasid_bind_for_dev(vtd_hiod, start, end, pc_info);
+ }
}
}