40 static std::map<msrs::field_type, msrs::value_type>
g_msrs;
41 static std::map<cpuid::field_type, cpuid::value_type>
g_cpuid;
95 throw gsl::fail_fast(
"");
97 return 0x0000000ABCDEF0000;
120 vmxon_ut::test_start_success()
122 MockRepository mocks;
125 setup_intrinsics(mocks, mm);
135 vmxon_ut::test_start_start_twice()
137 MockRepository mocks;
140 setup_intrinsics(mocks, mm);
153 vmxon_ut::test_start_execute_vmxon_already_on_failure()
155 MockRepository mocks;
158 setup_intrinsics(mocks, mm);
170 vmxon_ut::test_start_execute_vmxon_failure()
172 MockRepository mocks;
175 setup_intrinsics(mocks, mm);
177 auto ___ = gsl::finally([&]
190 vmxon_ut::test_start_check_ia32_vmx_cr4_fixed0_msr_failure()
192 MockRepository mocks;
195 setup_intrinsics(mocks, mm);
207 vmxon_ut::test_start_check_ia32_vmx_cr4_fixed1_msr_failure()
209 MockRepository mocks;
212 setup_intrinsics(mocks, mm);
225 vmxon_ut::test_start_enable_vmx_operation_failure()
227 MockRepository mocks;
230 setup_intrinsics(mocks, mm);
234 auto ___ = gsl::finally([&]
245 vmxon_ut::test_start_v8086_disabled_failure()
247 MockRepository mocks;
250 setup_intrinsics(mocks, mm);
254 auto ___ = gsl::finally([&]
265 vmxon_ut::test_start_check_ia32_feature_control_msr_lock_bit_clear()
267 MockRepository mocks;
270 setup_intrinsics(mocks, mm);
283 vmxon_ut::test_start_check_ia32_feature_control_msr_lock_bit_set()
285 MockRepository mocks;
288 setup_intrinsics(mocks, mm);
300 vmxon_ut::test_start_check_ia32_vmx_cr0_fixed0_msr()
302 MockRepository mocks;
305 setup_intrinsics(mocks, mm);
317 vmxon_ut::test_start_check_ia32_vmx_cr0_fixed1_msr()
319 MockRepository mocks;
322 setup_intrinsics(mocks, mm);
335 vmxon_ut::test_start_check_vmx_capabilities_msr_memtype_failure()
337 MockRepository mocks;
340 setup_intrinsics(mocks, mm);
352 vmxon_ut::test_start_check_vmx_capabilities_msr_addr_width_failure()
354 MockRepository mocks;
357 setup_intrinsics(mocks, mm);
369 vmxon_ut::test_start_check_vmx_capabilities_true_based_controls_failure()
371 MockRepository mocks;
374 setup_intrinsics(mocks, mm);
386 vmxon_ut::test_start_check_cpuid_vmx_supported_failure()
388 MockRepository mocks;
391 setup_intrinsics(mocks, mm);
403 vmxon_ut::test_start_virt_to_phys_failure()
405 MockRepository mocks;
408 setup_intrinsics(mocks, mm);
410 auto ___ = gsl::finally([&]
423 vmxon_ut::test_stop_success()
425 MockRepository mocks;
428 setup_intrinsics(mocks, mm);
440 vmxon_ut::test_stop_stop_twice()
442 MockRepository mocks;
445 setup_intrinsics(mocks, mm);
458 vmxon_ut::test_stop_vmxoff_check_failure()
460 MockRepository mocks;
463 setup_intrinsics(mocks, mm);
472 auto ___ = gsl::finally([&]
480 vmxon_ut::test_stop_vmxoff_failure()
482 MockRepository mocks;
485 setup_intrinsics(mocks, mm);
487 auto ___ = gsl::finally([&]
#define expect_exception(f, e)
#define RUN_UNITTEST_WITH_MOCKS(a, b)
#define expect_no_exception(f)
constexpr const auto mask
bool __vmxon(void *ptr) noexcept
virtual integer_pointer virtptr_to_physint(pointer virt) const
void uint64_t uint64_t uint64_t *rdx noexcept
bool g_virt_to_phys_return_nullptr
constexpr const auto addr
std::map< msrs::field_type, msrs::value_type > g_msrs
uint32_t __cpuid_ecx(uint32_t val) noexcept
static memory_manager_x64 * instance() noexcept
uint64_t __read_rflags(void) noexcept
bool __vmxoff(void) noexcept
void __write_msr(uint32_t addr, uint64_t val) noexcept
void __write_cr4(uint64_t val) noexcept
uint64_t __read_msr(uint32_t addr) noexcept
constexpr const auto vmxon
uint64_t __read_cr4(void) noexcept
rflags::value_type g_rflags
uintptr_t virtptr_to_physint(void *ptr)
uint64_t __read_cr0(void) noexcept