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

Function vtd_enable

freebsd/amd64/vmm/intel/vtd.c:404–425  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

402}
403
404static void
405vtd_enable(void)
406{
407 int i;
408 struct vtdmap *vtdmap;
409
410 for (i = 0; i < drhd_num; i++) {
411 vtdmap = vtdmaps[i];
412 vtd_wbflush(vtdmap);
413
414 /* Update the root table address */
415 vtdmap->rta = vtophys(root_table);
416 vtdmap->gcr = VTD_GCR_SRTP;
417 while ((vtdmap->gsr & VTD_GSR_RTPS) == 0)
418 ;
419
420 vtd_ctx_global_invalidate(vtdmap);
421 vtd_iotlb_global_invalidate(vtdmap);
422
423 vtd_translation_enable(vtdmap);
424 }
425}
426
427static void
428vtd_disable(void)

Callers

nothing calls this directly

Calls 4

vtd_wbflushFunction · 0.85
vtd_translation_enableFunction · 0.85

Tested by

no test coverage detected