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

Function vmexit_entry

kernel/integration/bf_vs_op_run.cpp:183–217  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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