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