Skip to content

Commit fba85be

Browse files
committed
bogus exits should never be returned to the server
1 parent d8a7d20 commit fba85be

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

bin/propolis-server/src/lib/vcpu_tasks.rs

+13-6
Original file line numberDiff line numberDiff line change
@@ -215,13 +215,20 @@ impl VcpuTasks {
215215
event_handler.unhandled_vm_exit(vcpu.id, exit.kind);
216216
VmEntry::Run
217217
}
218+
// Bhyve emits the `Bogus` exit kind when there is no actual
219+
// guest exit for user space to handle, but circumstances
220+
// nevertheless dictate that the kernel VMM should exit to
221+
// user space (e.g. a caller requested that all vCPUs be
222+
// forced to exit to user space so their threads can
223+
// rendezvous there).
224+
//
225+
// `process_vmexit` should always successfully handle this
226+
// exit, since it never entails any work that could fail to
227+
// be completed.
218228
VmExitKind::Bogus => {
219-
error!(log,
220-
"lib returned bogus exit from vCPU {}",
221-
vcpu.id);
222-
223-
event_handler.unhandled_vm_exit(vcpu.id, exit.kind);
224-
VmEntry::Run
229+
unreachable!(
230+
"propolis-lib always handles VmExitKind::Bogus"
231+
);
225232
}
226233
VmExitKind::Debug => {
227234
error!(log,

0 commit comments

Comments
 (0)