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

Function vmexit_entry

kernel/integration/bf_vs_op_write.cpp:247–281  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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