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

Function vmexit_loop

kernel/src/vmexit_loop.hpp:53–75  ·  view source on GitHub ↗

<!-- description --> @brief Provides the main entry point for VMExits that occur after a successful launch of the hypervisor. <!-- inputs/outputs --> @param mut_tls the current TLS block @param mut_intrinsic the intrinsic_t to use @param mut_vs_pool the VPS pool to use @param mut_log the VMExit log to use @return Returns bsl::errc_success on success, bsl::errc_failure otherwise

Source from the content-addressed store, hash-verified

51 /// otherwise
52 ///
53 [[nodiscard]] constexpr auto
54 vmexit_loop(
55 tls_t &mut_tls,
56 intrinsic_t &mut_intrinsic,
57 vs_pool_t &mut_vs_pool,
58 vmexit_log_t &mut_log) noexcept -> bsl::errc_type
59 {
60 while (true) {
61 auto const exit_reason{mut_vs_pool.run(mut_tls, mut_intrinsic, mut_log)};
62 if (bsl::unlikely(exit_reason.is_invalid())) {
63 bsl::print<bsl::V>() << bsl::here();
64 return bsl::errc_failure;
65 }
66
67 auto const ret{mut_tls.ext_vmexit->vmexit(mut_tls, mut_intrinsic, exit_reason)};
68 if (bsl::unlikely(!ret)) {
69 bsl::print<bsl::V>() << bsl::here();
70 return bsl::errc_failure;
71 }
72
73 mut_tls.first_launch_succeeded = bsl::safe_u64::magic_1().get();
74 }
75 }
76}
77
78#endif

Callers 5

processMethod · 0.70
behavior.cppFile · 0.50
requirements.cppFile · 0.50
behavior.cppFile · 0.50
requirements.cppFile · 0.50

Calls 2

runMethod · 0.45
vmexitMethod · 0.45

Tested by

no test coverage detected