Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lib: log vCPU diagnostics on triple fault and for some unhandled exit types #795

Merged
merged 11 commits into from
Oct 22, 2024
Prev Previous commit
Next Next commit
bogus exits should never be returned to the server
gjcolombo committed Oct 18, 2024
commit e4f891fa751b6d2ce4500b36b54355bc7266cdb9
19 changes: 13 additions & 6 deletions bin/propolis-server/src/lib/vcpu_tasks.rs
Original file line number Diff line number Diff line change
@@ -215,13 +215,20 @@ impl VcpuTasks {
event_handler.unhandled_vm_exit(vcpu.id, exit.kind);
VmEntry::Run
}
// Bhyve emits the `Bogus` exit kind when there is no actual
// guest exit for user space to handle, but circumstances
// nevertheless dictate that the kernel VMM should exit to
// user space (e.g. a caller requested that all vCPUs be
// forced to exit to user space so their threads can
// rendezvous there).
//
// `process_vmexit` should always successfully handle this
// exit, since it never entails any work that could fail to
// be completed.
VmExitKind::Bogus => {
error!(log,
"lib returned bogus exit from vCPU {}",
vcpu.id);

event_handler.unhandled_vm_exit(vcpu.id, exit.kind);
VmEntry::Run
unreachable!(
"propolis-lib always handles VmExitKind::Bogus"
);
}
VmExitKind::Debug => {
error!(log,