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

Function vmexit_entry

kernel/integration/bf_debug_op_dump_vmexit_log.cpp:195–229  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

193 /// @param exit_reason the exit reason associated with the VMExit
194 ///
195 extern "C" void
196 vmexit_entry(
197 bsl::safe_u16::value_type const vsid, bsl::safe_u64::value_type const exit_reason) noexcept
198 {
199 /// NOTE:
200 /// - Call into the vmexit handler. This entry point serves as a
201 /// trampoline between C and C++. Specifically, the microkernel
202 /// cannot call a member function directly, and can only call
203 /// a C style function.
204 ///
205
206 auto const ret{dispatch_vmexit( // --
207 g_mut_gs, // --
208 g_mut_tls, // --
209 g_mut_sys, // --
210 g_mut_intrinsic, // --
211 g_mut_vp_pool, // --
212 g_mut_vs_pool, // --
213 bsl::to_u16(vsid), // --
214 bsl::to_u64(exit_reason))};
215
216 if (bsl::unlikely(!ret)) {
217 bsl::print<bsl::V>() << bsl::here();
218 return bf_control_op_exit();
219 }
220
221 /// NOTE:
222 /// - This code should never be reached. The VMExit handler should
223 /// always call one of the "run" ABIs to return back to the
224 /// microkernel when a VMExit is finished. If this is called, it
225 /// is because the VMExit handler returned with an error.
226 ///
227
228 return bf_control_op_exit();
229 }
230
231 /// <!-- description -->
232 /// @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