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

Function vmexit_entry

kernel/integration/bf_vs_op_create_vs.cpp:234–268  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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