MCPcopy Create free account
hub / github.com/F-Stack/f-stack / dmar_flush_for_ctx_entry

Function dmar_flush_for_ctx_entry

freebsd/x86/iommu/intel_ctx.c:209–231  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

207}
208
209static int
210dmar_flush_for_ctx_entry(struct dmar_unit *dmar, bool force)
211{
212 int error;
213
214 /*
215 * If dmar declares Caching Mode as Set, follow 11.5 "Caching
216 * Mode Consideration" and do the (global) invalidation of the
217 * negative TLB entries.
218 */
219 if ((dmar->hw_cap & DMAR_CAP_CM) == 0 && !force)
220 return (0);
221 if (dmar->qi_enabled) {
222 dmar_qi_invalidate_ctx_glob_locked(dmar);
223 if ((dmar->hw_ecap & DMAR_ECAP_DI) != 0 || force)
224 dmar_qi_invalidate_iotlb_glob_locked(dmar);
225 return (0);
226 }
227 error = dmar_inv_ctx_glob(dmar);
228 if (error == 0 && ((dmar->hw_ecap & DMAR_ECAP_DI) != 0 || force))
229 error = dmar_inv_iotlb_glob(dmar);
230 return (error);
231}
232
233static int
234domain_init_rmrr(struct dmar_domain *domain, device_t dev, int bus,

Callers 2

dmar_get_ctx_for_dev1Function · 0.85
dmar_move_ctx_to_domainFunction · 0.85

Calls 4

dmar_inv_ctx_globFunction · 0.85
dmar_inv_iotlb_globFunction · 0.85

Tested by

no test coverage detected