Changeset View
Changeset View
Standalone View
Standalone View
usr.sbin/bhyve/bhyverun.c
Show First 20 Lines • Show All 1,556 Lines • ▼ Show 20 Lines | #endif | ||||
if (lpc_bootrom()) | if (lpc_bootrom()) | ||||
fwctl_init(); | fwctl_init(); | ||||
/* | /* | ||||
* Change the proc title to include the VM name. | * Change the proc title to include the VM name. | ||||
*/ | */ | ||||
setproctitle("%s", vmname); | setproctitle("%s", vmname); | ||||
#ifdef BHYVE_SNAPSHOT | |||||
/* initialize mutex/cond variables */ | |||||
init_snapshot(); | |||||
/* | |||||
* checkpointing thread for communication with bhyvectl | |||||
*/ | |||||
if (init_checkpoint_thread(ctx) != 0) | |||||
errx(EX_OSERR, "Failed to start checkpoint thread"); | |||||
#endif | |||||
#ifndef WITHOUT_CAPSICUM | #ifndef WITHOUT_CAPSICUM | ||||
caph_cache_catpages(); | caph_cache_catpages(); | ||||
if (caph_limit_stdout() == -1 || caph_limit_stderr() == -1) | if (caph_limit_stdout() == -1 || caph_limit_stderr() == -1) | ||||
errx(EX_OSERR, "Unable to apply rights for sandbox"); | errx(EX_OSERR, "Unable to apply rights for sandbox"); | ||||
if (caph_enter() == -1) | if (caph_enter() == -1) | ||||
errx(EX_OSERR, "cap_enter() failed"); | errx(EX_OSERR, "cap_enter() failed"); | ||||
#endif | #endif | ||||
#ifdef BHYVE_SNAPSHOT | #ifdef BHYVE_SNAPSHOT | ||||
/* initialize mutex/cond variables */ | |||||
init_snapshot(); | |||||
/* | |||||
* checkpointing thread for communication with bhyvectl | |||||
*/ | |||||
if (init_checkpoint_thread(ctx) != 0) | |||||
errx(EX_OSERR, "Failed to start checkpoint thread"); | |||||
if (restore_file != NULL) { | if (restore_file != NULL) { | ||||
destroy_restore_state(&rstate); | destroy_restore_state(&rstate); | ||||
if (vm_restore_time(ctx) < 0) | if (vm_restore_time(ctx) < 0) | ||||
err(EX_OSERR, "Unable to restore time"); | err(EX_OSERR, "Unable to restore time"); | ||||
for (int i = 0; i < guest_ncpus; i++) { | for (int i = 0; i < guest_ncpus; i++) { | ||||
if (i == BSP) | if (i == BSP) | ||||
continue; | continue; | ||||
Show All 13 Lines |