Data Structures | Macros | Functions | Variables
test.h File Reference

Go to the source code of this file.

Data Structures

struct  control_flow_path
 
class  vmcs_ut
 

Macros

#define test_vmcs_check(cfg, ...)   test_vmcs_check_with_args(gsl::cstring_span<>(__PRETTY_FUNCTION__), __LINE__, cfg, __VA_ARGS__)
 

Functions

void setup_mock (MockRepository &mocks, memory_manager_x64 *mm)
 
uintptr_t virtptr_to_physint (void *ptr)
 
void * physint_to_virtptr (uintptr_t phys)
 
void proc_ctl_allow1 (uint64_t mask)
 
void proc_ctl_allow0 (uint64_t mask)
 
void proc_ctl_disallow1 (uint64_t mask)
 
void proc_ctl2_allow1 (uint64_t mask)
 
void proc_ctl2_allow0 (uint64_t mask)
 
void proc_ctl2_disallow1 (uint64_t mask)
 
void pin_ctl_allow1 (uint64_t mask)
 
void pin_ctl_allow0 (uint64_t mask)
 
void exit_ctl_allow1 (uint64_t mask)
 
void exit_ctl_allow0 (uint64_t mask)
 
void entry_ctl_allow1 (uint64_t mask)
 
void entry_ctl_allow0 (uint64_t mask)
 
void vmfunc_ctl_allow1 (uint64_t mask)
 

Variables

std::map< uint32_t, uint64_t > g_msrs
 
std::map< uint64_t, uint64_t > g_vmcs_fields
 
std::map< uint32_t, uint32_t > g_eax_cpuid
 
bool g_virt_to_phys_return_nullptr
 
bool g_phys_to_virt_return_nullptr
 
uintptr_t g_test_addr
 
uintptr_t g_virt_apic_addr
 
uintptr_t g_vmcs_link_addr
 
uintptr_t g_pdpt_addr
 
struct cpuid_regs g_cpuid_regs
 
uint8_t g_virt_apic_mem [0x81]
 
uint32_t g_vmcs_link_mem [1]
 
uint64_t g_pdpt_mem [4]
 

Macro Definition Documentation

◆ test_vmcs_check

#define test_vmcs_check (   cfg,
  ... 
)    test_vmcs_check_with_args(gsl::cstring_span<>(__PRETTY_FUNCTION__), __LINE__, cfg, __VA_ARGS__)

Definition at line 36 of file test.h.

Function Documentation

◆ setup_mock()

void setup_mock ( MockRepository &  mocks,
memory_manager_x64 mm 
)

Definition at line 63 of file test.cpp.

◆ virtptr_to_physint()

uintptr_t virtptr_to_physint ( void *  ptr)

Definition at line 173 of file test.cpp.

◆ physint_to_virtptr()

void* physint_to_virtptr ( uintptr_t  phys)

Definition at line 184 of file test.cpp.

◆ proc_ctl_allow1()

void proc_ctl_allow1 ( uint64_t  mask)

Definition at line 70 of file test.cpp.

◆ proc_ctl_allow0()

void proc_ctl_allow0 ( uint64_t  mask)

Definition at line 74 of file test.cpp.

◆ proc_ctl_disallow1()

void proc_ctl_disallow1 ( uint64_t  mask)

Definition at line 78 of file test.cpp.

◆ proc_ctl2_allow1()

void proc_ctl2_allow1 ( uint64_t  mask)

Definition at line 82 of file test.cpp.

◆ proc_ctl2_allow0()

void proc_ctl2_allow0 ( uint64_t  mask)

Definition at line 86 of file test.cpp.

◆ proc_ctl2_disallow1()

void proc_ctl2_disallow1 ( uint64_t  mask)

Definition at line 90 of file test.cpp.

◆ pin_ctl_allow1()

void pin_ctl_allow1 ( uint64_t  mask)

Definition at line 94 of file test.cpp.

◆ pin_ctl_allow0()

void pin_ctl_allow0 ( uint64_t  mask)

Definition at line 98 of file test.cpp.

◆ exit_ctl_allow1()

void exit_ctl_allow1 ( uint64_t  mask)

Definition at line 102 of file test.cpp.

◆ exit_ctl_allow0()

void exit_ctl_allow0 ( uint64_t  mask)

Definition at line 106 of file test.cpp.

◆ entry_ctl_allow1()

void entry_ctl_allow1 ( uint64_t  mask)

Definition at line 110 of file test.cpp.

◆ entry_ctl_allow0()

void entry_ctl_allow0 ( uint64_t  mask)

Definition at line 114 of file test.cpp.

◆ vmfunc_ctl_allow1()

void vmfunc_ctl_allow1 ( uint64_t  mask)

Definition at line 118 of file test.cpp.

Variable Documentation

◆ g_msrs

std::map<uint32_t, uint64_t> g_msrs

Definition at line 27 of file test_msrs_x64.cpp.

◆ g_vmcs_fields

std::map<uint64_t, uint64_t> g_vmcs_fields

Definition at line 32 of file test.cpp.

◆ g_eax_cpuid

std::map<uint32_t, uint32_t> g_eax_cpuid

Definition at line 27 of file test_cpuid_x64.cpp.

◆ g_virt_to_phys_return_nullptr

bool g_virt_to_phys_return_nullptr

Definition at line 40 of file test.cpp.

◆ g_phys_to_virt_return_nullptr

bool g_phys_to_virt_return_nullptr

Definition at line 41 of file test.cpp.

◆ g_test_addr

uintptr_t g_test_addr

Definition at line 43 of file test.cpp.

◆ g_virt_apic_addr

uintptr_t g_virt_apic_addr

Definition at line 44 of file test.cpp.

◆ g_vmcs_link_addr

uintptr_t g_vmcs_link_addr

Definition at line 47 of file test.cpp.

◆ g_pdpt_addr

uintptr_t g_pdpt_addr

Definition at line 50 of file test.cpp.

◆ g_cpuid_regs

struct cpuid_regs g_cpuid_regs

Definition at line 35 of file test.cpp.

◆ g_virt_apic_mem

uint8_t g_virt_apic_mem[0x81]

Definition at line 45 of file test.cpp.

◆ g_vmcs_link_mem

uint32_t g_vmcs_link_mem[1]

Definition at line 48 of file test.cpp.

◆ g_pdpt_mem

uint64_t g_pdpt_mem[4]

Definition at line 51 of file test.cpp.