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

Function fail_entry

kernel/integration/support/src/main.cpp:153–186  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

151 /// input is undefined.
152 ///
153 extern "C" void
154 fail_entry(bsl::safe_u64::value_type const errc, bsl::safe_u64::value_type const addr) noexcept
155 {
156 /// NOTE:
157 /// - Call into the fast fail handler. This entry point serves as a
158 /// trampoline between C and C++. Specifically, the microkernel
159 /// cannot call a member function directly, and can only call
160 /// a C style function.
161 ///
162
163 auto const ret{dispatch_fail( // --
164 g_mut_gs, // --
165 g_mut_tls, // --
166 g_mut_sys, // --
167 g_mut_intrinsic, // --
168 g_mut_vp_pool, // --
169 g_mut_vs_pool, // --
170 bsl::to_u64(errc), // --
171 bsl::to_u64(addr))};
172
173 if (bsl::unlikely(!ret)) {
174 bsl::print<bsl::V>() << bsl::here();
175 return bf_control_op_exit();
176 }
177
178 /// NOTE:
179 /// - This code should never be reached. The fast fail handler should
180 /// always call one of the "run" ABIs to return back to the
181 /// microkernel when a fast fail is finished. If this is called, it
182 /// is because the fast fail handler returned with an error.
183 ///
184
185 return bf_control_op_exit();
186 }
187
188 /// <!-- description -->
189 /// @brief Implements the VMExit entry function. This is registered

Callers

nothing calls this directly

Calls 2

dispatch_failFunction · 0.70
bf_control_op_exitFunction · 0.50

Tested by

no test coverage detected