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

Function vmx_disable

freebsd/amd64/vmm/intel/vmx.c:591–610  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

589}
590
591static void
592vmx_disable(void *arg __unused)
593{
594 struct invvpid_desc invvpid_desc = { 0 };
595 struct invept_desc invept_desc = { 0 };
596
597 if (vmxon_enabled[curcpu]) {
598 /*
599 * See sections 25.3.3.3 and 25.3.3.4 in Intel Vol 3b.
600 *
601 * VMXON or VMXOFF are not required to invalidate any TLB
602 * caching structures. This prevents potential retention of
603 * cached information in the TLB between distinct VMX episodes.
604 */
605 invvpid(INVVPID_TYPE_ALL_CONTEXTS, invvpid_desc);
606 invept(INVEPT_TYPE_ALL_CONTEXTS, invept_desc);
607 vmxoff();
608 }
609 load_cr4(rcr4() & ~CR4_VMXE);
610}
611
612static int
613vmx_modcleanup(void)

Callers

nothing calls this directly

Calls 5

invvpidFunction · 0.85
inveptFunction · 0.85
vmxoffFunction · 0.85
load_cr4Function · 0.50
rcr4Function · 0.50

Tested by

no test coverage detected