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

Function vmx_set_pcpu_defaults

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

Source from the content-addressed store, hash-verified

1295}
1296
1297static void
1298vmx_set_pcpu_defaults(struct vmx *vmx, int vcpu, pmap_t pmap)
1299{
1300 struct vmxstate *vmxstate;
1301
1302 vmxstate = &vmx->state[vcpu];
1303 if (vmxstate->lastcpu == curcpu)
1304 return;
1305
1306 vmxstate->lastcpu = curcpu;
1307
1308 vmm_stat_incr(vmx->vm, vcpu, VCPU_MIGRATIONS, 1);
1309
1310 vmcs_write(VMCS_HOST_TR_BASE, vmm_get_host_trbase());
1311 vmcs_write(VMCS_HOST_GDTR_BASE, vmm_get_host_gdtrbase());
1312 vmcs_write(VMCS_HOST_GS_BASE, vmm_get_host_gsbase());
1313 vmx_invvpid(vmx, vcpu, pmap, 1);
1314}
1315
1316/*
1317 * We depend on 'procbased_ctls' to have the Interrupt Window Exiting bit set.

Callers 1

vmx_runFunction · 0.85

Calls 6

vmm_stat_incrFunction · 0.85
vmcs_writeFunction · 0.85
vmm_get_host_trbaseFunction · 0.85
vmm_get_host_gdtrbaseFunction · 0.85
vmm_get_host_gsbaseFunction · 0.85
vmx_invvpidFunction · 0.85

Tested by

no test coverage detected