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

Function vmexit_entry

kernel/integration/fast_fail_wait_no_fail.cpp:197–231  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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