22 #ifndef VMCS_INTEL_X64_CHECK_H 23 #define VMCS_INTEL_X64_CHECK_H 25 #include <type_traits> 267 template<
class MA,
class C,
268 class =
typename std::enable_if<std::is_integral<MA>::value>
::type,
269 class = typename std::enable_if<std::is_integral<C>::value>::type>
272 using namespace vmcs::primary_processor_based_vm_execution_controls;
276 auto allowed1_failed =
false;
278 ctls &= 0x00000000FFFFFFFFUL;
282 bferror <<
" failed: controls_reserved_properly_set" <<
'\n';
286 throw std::logic_error(
"invalid "_s + ctls_name);
289 allowed1_failed = (ctls & ~
allowed1) != 0UL;
296 bferror <<
" failed: check_control_ctls_reserved_properly_set" <<
'\n';
300 throw std::logic_error(
"invalid "_s + ctls_name);
304 template<class T, class = typename std::enable_if<std::is_integral<T>::value>::type>
void guest_valid_activity_state()
void guest_fs_must_be_present_if_usable()
void guest_gs_granularity()
void guest_ss_access_rights_type()
void guest_es_is_not_a_system_descriptor()
void control_entry_msr_load_address()
void host_gs_selector_rpl_ti_equal_zero()
void guest_ss_granularity()
void guest_vmcs_link_pointer_bits_11_0()
void guest_interruptibility_state_sti_mov_ss()
void guest_rflags_vm_bit()
void guest_interruptibility_not_in_smm()
constexpr const auto addr
void guest_ds_base_upper_dword_0()
void control_x2apic_mode_and_virtual_apic_access()
void control_vmx_controls_all()
void guest_ds_base_is_shifted()
void guest_cs_access_rights_type()
void guest_fs_granularity()
void guest_cr4_for_unsupported_bits()
void guest_pending_debug_exceptions_rtm()
void guest_load_debug_controls_verify_reserved()
void control_pin_based_ctls_reserved_properly_set()
void host_cr4_for_unsupported_bits()
void host_es_selector_rpl_ti_equal_zero()
void guest_ia32_sysenter_esp_canonical_address()
void guest_ss_must_be_present_if_usable()
void guest_cr0_for_unsupported_bits()
void guest_cs_type_not_equal_3()
void guest_ds_granularity()
void control_event_injection_reserved_bits_checks()
void guest_es_access_rights_reserved_must_be_0()
void guest_tr_must_be_usable()
void guest_tr_access_rights_remaining_reserved_bit_0()
void host_ia32_sysenter_eip_canonical_address()
void control_process_posted_interrupt_checks()
void guest_cs_access_rights_remaining_reserved_bit_0()
void control_vm_entry_ctls_reserved_properly_set()
void guest_gdtr_limit_reserved_bits()
void guest_verify_load_ia32_efer()
void guest_fs_is_not_a_system_descriptor()
void control_cr3_count_less_then_4()
void guest_must_be_active_if_injecting_blocking_state()
void guest_interruptibility_state_nmi()
void control_virtual_interrupt_and_external_interrupt()
void control_exit_msr_load_address()
void guest_gs_access_rights_remaining_reserved_bit_0()
void host_segment_and_descriptor_table_registers_all()
void guest_ds_access_rights_reserved_must_be_0()
void host_tr_selector_rpl_ti_equal_zero()
void guest_v8086_gs_access_rights()
void host_tr_not_equal_zero()
void guest_cs_base_is_shifted()
void guest_cs_db_must_be_0_if_l_equals_1()
void control_virtual_nmi_and_nmi_window()
void guest_ss_base_upper_dword_0()
void guest_ss_base_is_shifted()
void control_enable_ept_checks()
void host_tr_canonical_base_address()
void guest_es_base_is_shifted()
void control_event_injection_instr_length_checks()
void host_fs_selector_rpl_ti_equal_zero()
void guest_gs_access_rights_type()
void host_ds_selector_rpl_ti_equal_zero()
void guest_es_must_be_present_if_usable()
void control_unrestricted_guests()
void guest_shutdown_valid_interrupts()
void guest_descriptor_table_registers_all()
auto memory_type_reserved(T memory_type)
void control_proc_based_ctls_reserved_properly_set()
void host_gs_canonical_base_address()
void guest_interruptibility_state_enclave_interrupt()
void guest_v8086_fs_access_rights()
void guest_activity_state_not_hlt_when_dpl_not_0()
void guest_gs_is_not_a_system_descriptor()
void guest_tr_must_be_a_system_descriptor()
void guest_gs_access_rights_reserved_must_be_0()
void guest_ss_is_not_a_system_descriptor()
void guest_ss_and_cs_rpl_are_the_same()
void control_event_injection_ec_checks()
void host_ss_not_equal_zero()
void host_cr0_for_unsupported_bits()
void host_fs_canonical_base_address()
void host_verify_load_ia32_perf_global_ctrl()
void guest_gs_base_is_canonical()
void control_enable_vm_functions()
void control_enable_vmcs_shadowing()
void guest_cs_access_rights_reserved_must_be_0()
void guest_es_access_rights_type()
void control_virtual_apic_address_bits()
void guest_cs_granularity()
void guest_pending_debug_exceptions_dbg_ctl()
void guest_tr_type_must_be_11()
void guest_verify_ia_32e_mode_enabled()
void guest_tr_granularity()
void guest_load_debug_controls_verify_dr7()
void guest_rflag_interrupt_enable()
void guest_verify_load_ia32_bndcfgs()
void guest_ldtr_ti_bit_equals_0()
void guest_fs_access_rights_remaining_reserved_bit_0()
void guest_ldtr_access_rights_remaining_reserved_bit_0()
void guest_interruptibility_entry_to_smm()
void host_cs_selector_rpl_ti_equal_zero()
void guest_v8086_ds_access_rights()
void guest_cs_base_upper_dword_0()
void guest_interruptibility_state_sti()
void control_vm_entry_control_fields_all()
void guest_pending_debug_exceptions_reserved()
constexpr const auto write_back
void guest_ss_dpl_must_equal_zero()
void guest_v8086_ss_access_rights()
void guest_verify_load_ia32_pat()
void host_control_registers_and_msrs_all()
void control_exit_msr_store_address()
void host_address_space_size_all()
void host_cr3_for_unsupported_bits()
void control_nmi_exiting_and_virtual_nmi()
void guest_gs_base_is_shifted()
void guest_fs_access_rights_reserved_must_be_0()
void guest_valid_pdpte_with_ept_disabled()
constexpr const auto uncacheable_minus
void control_enable_ept_violation_checks()
void guest_sipi_valid_interrupts()
void guest_ldtr_base_is_canonical()
auto get(A addr) noexcept
void guest_fs_access_rights_type()
void guest_verify_ia_32e_mode_disabled()
void guest_ss_access_rights_remaining_reserved_bit_0()
void host_address_space_enabled()
void guest_tr_ti_bit_equals_0()
void control_msr_bitmap_address_bits()
void host_cs_not_equal_zero()
const void * view_as_pointer(const T val)
void guest_ss_dpl_must_equal_rpl()
void guest_rip_and_rflags_all()
void guest_interruptibility_state_reserved()
void control_vpid_checks()
void guest_rip_upper_bits()
void guest_verify_load_ia32_perf_global_ctrl()
void guest_rflags_reserved_bits()
constexpr const auto write_protected
void guest_vmcs_link_pointer_valid_addr()
void control_proc_based_ctls2_reserved_properly_set()
void guest_ldtr_must_be_present()
void guest_idtr_limit_reserved_bits()
void host_verify_load_ia32_efer()
void guest_vmcs_link_pointer_in_smm()
void guest_tr_access_rights_reserved_must_be_0()
void host_if_outside_ia32e_mode()
constexpr const auto uncacheable
void guest_cs_dpl_adheres_to_ss_dpl()
void guest_control_registers_debug_registers_and_msrs_all()
void control_io_bitmap_address_bits()
void guest_idtr_base_must_be_canonical()
void host_ss_selector_rpl_ti_equal_zero()
void control_tpr_shadow_and_virtual_apic()
void control_vm_execution_control_fields_all()
void control_event_injection_delivery_ec_checks()
void guest_vmcs_link_pointer_not_in_smm()
void guest_es_access_rights_remaining_reserved_bit_0()
void guest_non_register_state_all()
void guest_interruptibility_state_sti_and_nmi()
void host_address_space_disabled()
void guest_interruptibility_state_virtual_nmi()
void guest_cr0_verify_paging_enabled()
void control_enable_pml_checks()
void guest_ds_must_be_present_if_usable()
void guest_tr_must_be_present()
void guest_fs_base_is_canonical()
void guest_cs_must_be_present()
constexpr const auto msr_addr
void guest_ds_access_rights_type()
void guest_vmcs_link_pointer_first_word()
void control_activate_and_save_preemption_timer_must_be_0()
void control_vm_exit_ctls_reserved_properly_set()
void control_event_injection_type_vector_checks()
void guest_ldtr_must_be_a_system_descriptor()
void guest_cs_is_not_a_system_descriptor()
void control_vm_exit_control_fields_all()
auto control_reserved_properly_set(MA msr_addr, C ctls, const char *ctls_name)
void guest_tr_base_is_canonical()
void guest_ds_is_not_a_system_descriptor()
constexpr const auto write_through
void guest_gs_must_be_present_if_usable()
void guest_interruptibility_state_external_interrupt()
void guest_cr3_for_unsupported_bits()
void guest_ds_access_rights_remaining_reserved_bit_0()
void host_verify_load_ia32_pat()
void guest_ss_access_rights_reserved_must_be_0()
void host_address_space_size_exit_ctl_is_set()
void guest_rip_valid_addr()
void guest_v8086_es_access_rights()
void host_idtr_canonical_base_address()
void host_ia32_sysenter_esp_canonical_address()
void guest_gdtr_base_must_be_canonical()
void guest_v8086_cs_access_rights()
void host_gdtr_canonical_base_address()
void guest_ldtr_type_must_be_2()
constexpr const auto write_combining
void guest_segment_registers_all()
void guest_valid_activity_state_and_smm()
void guest_ldtr_granularity()
void guest_ia32_sysenter_eip_canonical_address()
void guest_valid_pdpte_with_ept_enabled()
void guest_es_base_upper_dword_0()
void guest_hlt_valid_interrupts()
void guest_fs_base_is_shifted()
void guest_ldtr_access_rights_reserved_must_be_0()
void guest_es_granularity()