| 1295 | } |
| 1296 | |
| 1297 | static void |
| 1298 | vmx_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. |
no test coverage detected