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

Function bootstrap_entry

kernel/integration/bf_debug_op_dump_vm.cpp:107–139  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

105 /// @param ppid0 the physical process to bootstrap
106 ///
107 extern "C" void
108 bootstrap_entry(bsl::safe_u16::value_type const ppid0) noexcept
109 {
110 bsl::discard(ppid0);
111 constexpr auto one{bsl::safe_u16::magic_1()};
112
113 // invalid id
114 {
115 constexpr auto vmid{syscall::BF_INVALID_ID};
116 syscall::bf_debug_op_dump_vm(vmid);
117 }
118
119 // id out of range
120 {
121 constexpr auto vmid{(bsl::to_u16(HYPERVISOR_MAX_VMS) + one).checked()};
122 syscall::bf_debug_op_dump_vm(vmid);
123 }
124
125 // id never allocated
126 {
127 constexpr auto vmid{(bsl::to_u16(HYPERVISOR_MAX_VMS) - one).checked()};
128 syscall::bf_debug_op_dump_vm(vmid);
129 }
130
131 // success
132 {
133 auto const vmid{g_mut_sys.bf_vm_op_create_vm()};
134 syscall::bf_debug_op_dump_vm(vmid);
135 }
136
137 bsl::debug() << "success. remaining backtrace is expected\n" << bsl::here();
138 return bf_control_op_exit();
139 }
140
141 /// <!-- description -->
142 /// @brief Implements the fast fail entry function. This is registered

Callers

nothing calls this directly

Calls 3

bf_debug_op_dump_vmFunction · 0.50
bf_control_op_exitFunction · 0.50
bf_vm_op_create_vmMethod · 0.45

Tested by

no test coverage detected