Changeset View
Changeset View
Standalone View
Standalone View
usr.sbin/bhyve/bhyverun.c
Show First 20 Lines • Show All 1,483 Lines • ▼ Show 20 Lines | if (vm_set_capability(ctx, BSP, VM_CAP_UNRESTRICTED_GUEST, 1)) { | ||||
exit(4); | exit(4); | ||||
} | } | ||||
error = vcpu_reset(ctx, BSP); | error = vcpu_reset(ctx, BSP); | ||||
assert(error == 0); | assert(error == 0); | ||||
} | } | ||||
#ifdef BHYVE_SNAPSHOT | #ifdef BHYVE_SNAPSHOT | ||||
if (restore_file != NULL) { | if (restore_file != NULL) { | ||||
fprintf(stdout, "Pausing pci devs...\r\n"); | fprintf(stdout, "Pausing devices...\n"); | ||||
if (vm_pause_user_devs(ctx) != 0) { | if ((error = vm_pause_devices(ctx)) != 0) { | ||||
fprintf(stderr, "Failed to pause PCI device state.\n"); | fprintf(stderr, "Failed to pause device state: %d\n", | ||||
error); | |||||
exit(1); | exit(1); | ||||
} | } | ||||
fprintf(stdout, "Restoring vm mem...\r\n"); | fprintf(stdout, "Restoring vm mem...\r\n"); | ||||
if (restore_vm_mem(ctx, &rstate) != 0) { | if (restore_vm_mem(ctx, &rstate) != 0) { | ||||
fprintf(stderr, "Failed to restore VM memory.\n"); | fprintf(stderr, "Failed to restore VM memory.\n"); | ||||
corvink: Is this rename necessary? | |||||
Done Inline ActionsI think yes, because:
gusev.vitaliy_gmail.com: I think yes, because:
# Using "*user*" is confusing.
# Implementation of bhyve devices… | |||||
exit(1); | exit(1); | ||||
} | } | ||||
fprintf(stdout, "Restoring pci devs...\r\n"); | fprintf(stdout, "Restoring devices...\n"); | ||||
if (vm_restore_user_devs(ctx, &rstate) != 0) { | if ((error = vm_restore_devices(ctx, &rstate)) != 0) { | ||||
fprintf(stderr, "Failed to restore PCI device state.\n"); | fprintf(stderr, "Failed to restore devices state: %d\n", | ||||
error); | |||||
exit(1); | exit(1); | ||||
} | } | ||||
fprintf(stdout, "Restoring kernel structs...\r\n"); | fprintf(stdout, "Restoring kernel data...\n"); | ||||
if (vm_restore_kern_structs(ctx, &rstate) != 0) { | if ((error = vm_restore_kern_structs(ctx, &rstate)) != 0) { | ||||
fprintf(stderr, "Failed to restore kernel structs.\n"); | fprintf(stderr, "Failed to restore kernel data: %d\n", | ||||
error); | |||||
exit(1); | exit(1); | ||||
} | } | ||||
fprintf(stdout, "Resuming pci devs...\r\n"); | fprintf(stdout, "Resuming devices...\r\n"); | ||||
if (vm_resume_user_devs(ctx) != 0) { | if ((error = vm_resume_devices(ctx)) != 0) { | ||||
fprintf(stderr, "Failed to resume PCI device state.\n"); | fprintf(stderr, "Cannot resume devices: %d\n", | ||||
error); | |||||
exit(1); | exit(1); | ||||
} | } | ||||
} | } | ||||
#endif | #endif | ||||
error = vm_get_register(ctx, BSP, VM_REG_GUEST_RIP, &rip); | error = vm_get_register(ctx, BSP, VM_REG_GUEST_RIP, &rip); | ||||
assert(error == 0); | assert(error == 0); | ||||
▲ Show 20 Lines • Show All 87 Lines • Show Last 20 Lines |
Is this rename necessary?