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

Function vmexit_entry

kernel/integration/bf_vs_op_clear.cpp:212–246  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

210 /// @param exit_reason the exit reason associated with the VMExit
211 ///
212 extern "C" void
213 vmexit_entry(
214 bsl::safe_u16::value_type const vsid, bsl::safe_u64::value_type const exit_reason) noexcept
215 {
216 /// NOTE:
217 /// - Call into the vmexit handler. This entry point serves as a
218 /// trampoline between C and C++. Specifically, the microkernel
219 /// cannot call a member function directly, and can only call
220 /// a C style function.
221 ///
222
223 auto const ret{dispatch_vmexit( // --
224 g_mut_gs, // --
225 g_mut_tls, // --
226 g_mut_sys, // --
227 g_mut_intrinsic, // --
228 g_mut_vp_pool, // --
229 g_mut_vs_pool, // --
230 bsl::to_u16(vsid), // --
231 bsl::to_u64(exit_reason))};
232
233 if (bsl::unlikely(!ret)) {
234 bsl::print<bsl::V>() << bsl::here();
235 return bf_control_op_exit();
236 }
237
238 /// NOTE:
239 /// - This code should never be reached. The VMExit handler should
240 /// always call one of the "run" ABIs to return back to the
241 /// microkernel when a VMExit is finished. If this is called, it
242 /// is because the VMExit handler returned with an error.
243 ///
244
245 return bf_control_op_exit();
246 }
247
248 /// <!-- description -->
249 /// @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