MCPcopy Create free account
hub / github.com/Bareflank/hypervisor / vmexit_entry

Function vmexit_entry

kernel/integration/bf_vm_op_destroy_vm.cpp:226–260  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

224 /// @param exit_reason the exit reason associated with the VMExit
225 ///
226 extern "C" void
227 vmexit_entry(
228 bsl::safe_u16::value_type const vsid, bsl::safe_u64::value_type const exit_reason) noexcept
229 {
230 /// NOTE:
231 /// - Call into the vmexit handler. This entry point serves as a
232 /// trampoline between C and C++. Specifically, the microkernel
233 /// cannot call a member function directly, and can only call
234 /// a C style function.
235 ///
236
237 auto const ret{dispatch_vmexit( // --
238 g_mut_gs, // --
239 g_mut_tls, // --
240 g_mut_sys, // --
241 g_mut_intrinsic, // --
242 g_mut_vp_pool, // --
243 g_mut_vs_pool, // --
244 bsl::to_u16(vsid), // --
245 bsl::to_u64(exit_reason))};
246
247 if (bsl::unlikely(!ret)) {
248 bsl::print<bsl::V>() << bsl::here();
249 return bf_control_op_exit();
250 }
251
252 /// NOTE:
253 /// - This code should never be reached. The VMExit handler should
254 /// always call one of the "run" ABIs to return back to the
255 /// microkernel when a VMExit is finished. If this is called, it
256 /// is because the VMExit handler returned with an error.
257 ///
258
259 return bf_control_op_exit();
260 }
261
262 /// <!-- description -->
263 /// @brief Implements the main entry function for this example

Callers

nothing calls this directly

Calls 2

dispatch_vmexitFunction · 0.50
bf_control_op_exitFunction · 0.50

Tested by

no test coverage detected