22 #ifndef VMCS_INTEL_X64_64BIT_CONTROL_FIELDS_H 23 #define VMCS_INTEL_X64_64BIT_CONTROL_FIELDS_H 36 template<
class MA,
class CA,
class M,
37 class =
typename std::enable_if<std::is_integral<MA>::value>
::type,
38 class = typename
std::enable_if<std::is_integral<CA>::value>
::type,
39 class = typename std::enable_if<std::is_integral<M>::value>
::type>
41 const char *name, M mask, bool field_exists)
45 throw std::logic_error(
"set_vm_function_control failed: "_s +
name 46 +
" control doesn't exist");
58 throw std::logic_error(
"set_vm_function_control failed: "_s +
name 59 +
" control is not allowed to be set to 1");
66 template<
class MA,
class CA,
class M,
67 class =
typename std::enable_if<std::is_integral<MA>::value>
::type,
68 class = typename
std::enable_if<std::is_integral<CA>::value>
::type,
69 class = typename std::enable_if<std::is_integral<M>::value>
::type>
71 const char *name, M mask,
72 bool verbose, bool field_exists)
noexcept 76 bfwarning <<
"set_vm_function_control_if_allowed failed: " <<
name 77 <<
" function control doesn't exist" <<
'\n';
90 bfwarning <<
"set_vm_function_control failed: " <<
name 91 <<
" function control is not allowed to be set to 1";
105 namespace address_of_io_bitmap_a
107 constexpr
const auto addr = 0x0000000000002000UL;
108 constexpr
const auto name =
"address_of_io_bitmap_a";
119 template<class T, class = typename std::enable_if<std::is_integral<T>::value>
::type>
122 template<class T, class = typename std::enable_if<std::is_integral<T>::value>
::type>
127 namespace address_of_io_bitmap_b
129 constexpr
const auto addr = 0x0000000000002002UL;
130 constexpr
const auto name =
"address_of_io_bitmap_b";
141 template<class T, class = typename std::enable_if<std::is_integral<T>::value>
::type>
144 template<class T, class = typename std::enable_if<std::is_integral<T>::value>
::type>
149 namespace address_of_msr_bitmap
151 constexpr
const auto addr = 0x0000000000002004UL;
152 constexpr
const auto name =
"address_of_msr_bitmap";
163 template<class T, class = typename std::enable_if<std::is_integral<T>::value>
::type>
166 template<class T, class = typename std::enable_if<std::is_integral<T>::value>
::type>
171 namespace vm_exit_msr_store_address
173 constexpr
const auto addr = 0x0000000000002006UL;
174 constexpr
const auto name =
"vm_exit_msr_store_address";
185 template<class T, class = typename std::enable_if<std::is_integral<T>::value>
::type>
188 template<class T, class = typename std::enable_if<std::is_integral<T>::value>
::type>
193 namespace vm_exit_msr_load_address
195 constexpr
const auto addr = 0x0000000000002008UL;
196 constexpr
const auto name =
"vm_exit_msr_load_address";
207 template<class T, class = typename std::enable_if<std::is_integral<T>::value>
::type>
210 template<class T, class = typename std::enable_if<std::is_integral<T>::value>
::type>
215 namespace vm_entry_msr_load_address
217 constexpr
const auto addr = 0x000000000000200AUL;
218 constexpr
const auto name =
"vm_entry_msr_load_address";
229 template<class T, class = typename std::enable_if<std::is_integral<T>::value>
::type>
232 template<class T, class = typename std::enable_if<std::is_integral<T>::value>
::type>
237 namespace executive_vmcs_pointer
239 constexpr
const auto addr = 0x000000000000200CUL;
240 constexpr
const auto name =
"executive_vmcs_pointer";
251 template<class T, class = typename std::enable_if<std::is_integral<T>::value>
::type>
254 template<class T, class = typename std::enable_if<std::is_integral<T>::value>
::type>
259 namespace pml_address
261 constexpr
const auto addr = 0x000000000000200EUL;
262 constexpr
const auto name =
"pml_address";
276 template<class T, class = typename std::enable_if<std::is_integral<T>::value>
::type>
279 template<class T, class = typename std::enable_if<std::is_integral<T>::value>
::type>
286 constexpr
const auto addr = 0x0000000000002010UL;
287 constexpr
const auto name =
"tsc_offset";
298 template<class T, class = typename std::enable_if<std::is_integral<T>::value>
::type>
301 template<class T, class = typename std::enable_if<std::is_integral<T>::value>
::type>
306 namespace virtual_apic_address
308 constexpr
const auto addr = 0x0000000000002012UL;
309 constexpr
const auto name =
"virtual_apic_address";
320 template<class T, class = typename std::enable_if<std::is_integral<T>::value>
::type>
323 template<class T, class = typename std::enable_if<std::is_integral<T>::value>
::type>
328 namespace apic_access_address
330 constexpr
const auto addr = 0x0000000000002014UL;
331 constexpr
const auto name =
"apic_access_address";
345 template<class T, class = typename std::enable_if<std::is_integral<T>::value>
::type>
348 template<class T, class = typename std::enable_if<std::is_integral<T>::value>
::type>
353 namespace posted_interrupt_descriptor_address
355 constexpr
const auto addr = 0x0000000000002016UL;
356 constexpr
const auto name =
"posted_interrupt_descriptor_address";
367 template<class T, class = typename std::enable_if<std::is_integral<T>::value>
::type>
370 template<class T, class = typename std::enable_if<std::is_integral<T>::value>
::type>
375 namespace vm_function_controls
377 constexpr
const auto addr = 0x0000000000002018UL;
378 constexpr
const auto name =
"vm_function_controls";
393 template<class T, class = typename std::enable_if<std::is_integral<T>::value>
::type>
396 template<class T, class = typename std::enable_if<std::is_integral<T>::value>
::type>
400 namespace eptp_switching
402 constexpr
const auto mask = 0x0000000000000001UL;
404 constexpr
const auto name =
"eptp_switching";
433 constexpr
const auto mask = 0xFFFFFFFFFFFFFFFEUL;
435 constexpr
const auto name =
"reserved";
443 template<class T, class = typename std::enable_if<std::is_integral<T>::value>
::type>
450 template<class T, class = typename std::enable_if<std::is_integral<T>::value>
::type>
459 namespace ept_pointer
461 constexpr
const auto addr = 0x000000000000201AUL;
462 constexpr
const auto name =
"ept_pointer";
476 template<class T, class = typename std::enable_if<std::is_integral<T>::value>
::type>
479 template<class T, class = typename std::enable_if<std::is_integral<T>::value>
::type>
483 namespace memory_type
485 constexpr
const auto mask = 0x0000000000000007UL;
487 constexpr
const auto name =
"memory_type";
498 template<class T, class = typename std::enable_if<std::is_integral<T>::value>
::type>
505 template<class T, class = typename std::enable_if<std::is_integral<T>::value>
::type>
513 namespace page_walk_length_minus_one
515 constexpr
const auto mask = 0x0000000000000038UL;
517 constexpr
const auto name =
"page_walk_length_minus_one";
525 template<class T, class = typename std::enable_if<std::is_integral<T>::value>
::type>
532 template<class T, class = typename std::enable_if<std::is_integral<T>::value>
::type>
540 namespace accessed_and_dirty_flags
542 constexpr
const auto mask = 0x0000000000000040UL;
544 constexpr
const auto name =
"accessed_and_dirty_flags";
585 constexpr
const auto mask = 0x0000FFFFFFFFF000UL;
587 constexpr
const auto name =
"phys_addr";
595 template<class T, class = typename std::enable_if<std::is_integral<T>::value>
::type>
602 template<class T, class = typename std::enable_if<std::is_integral<T>::value>
::type>
612 constexpr
const auto mask = 0xFFFF000000000F80UL;
614 constexpr
const auto name =
"reserved";
622 template<class T, class = typename std::enable_if<std::is_integral<T>::value>
::type>
629 template<class T, class = typename std::enable_if<std::is_integral<T>::value>
::type>
638 namespace eoi_exit_bitmap_0
640 constexpr
const auto addr = 0x000000000000201CUL;
641 constexpr
const auto name =
"eoi_exit_bitmap_0";
655 template<class T, class = typename std::enable_if<std::is_integral<T>::value>
::type>
658 template<class T, class = typename std::enable_if<std::is_integral<T>::value>
::type>
663 namespace eoi_exit_bitmap_1
665 constexpr
const auto addr = 0x000000000000201EUL;
666 constexpr
const auto name =
"eoi_exit_bitmap_1";
680 template<class T, class = typename std::enable_if<std::is_integral<T>::value>
::type>
683 template<class T, class = typename std::enable_if<std::is_integral<T>::value>
::type>
688 namespace eoi_exit_bitmap_2
690 constexpr
const auto addr = 0x0000000000002020UL;
691 constexpr
const auto name =
"eoi_exit_bitmap_2";
705 template<class T, class = typename std::enable_if<std::is_integral<T>::value>
::type>
708 template<class T, class = typename std::enable_if<std::is_integral<T>::value>
::type>
713 namespace eoi_exit_bitmap_3
715 constexpr
const auto addr = 0x0000000000002022UL;
716 constexpr
const auto name =
"eoi_exit_bitmap_3";
730 template<class T, class = typename std::enable_if<std::is_integral<T>::value>
::type>
733 template<class T, class = typename std::enable_if<std::is_integral<T>::value>
::type>
738 namespace eptp_list_address
740 constexpr
const auto addr = 0x0000000000002024UL;
741 constexpr
const auto name =
"eptp_list_address";
756 template<class T, class = typename std::enable_if<std::is_integral<T>::value>
::type>
759 template<class T, class = typename std::enable_if<std::is_integral<T>::value>
::type>
764 namespace vmread_bitmap_address
766 constexpr
const auto addr = 0x0000000000002026UL;
767 constexpr
const auto name =
"vmread_bitmap_address";
781 template<class T, class = typename std::enable_if<std::is_integral<T>::value>
::type>
784 template<class T, class = typename std::enable_if<std::is_integral<T>::value>
::type>
789 namespace vmwrite_bitmap_address
791 constexpr
const auto addr = 0x0000000000002028UL;
792 constexpr
const auto name =
"vmwrite_bitmap_address";
806 template<class T, class = typename std::enable_if<std::is_integral<T>::value>
::type>
809 template<class T, class = typename std::enable_if<std::is_integral<T>::value>
::type>
814 namespace virtualization_exception_information_address
816 constexpr
const auto addr = 0x000000000000202AUL;
817 constexpr
const auto name =
"virtualization_exception_information_address";
831 template<class T, class = typename std::enable_if<std::is_integral<T>::value>
::type>
834 template<class T, class = typename std::enable_if<std::is_integral<T>::value>
::type>
839 namespace xss_exiting_bitmap
841 constexpr
const auto addr = 0x000000000000202CUL;
842 constexpr
const auto name =
"xss_exiting_bitmap";
856 template<class T, class = typename std::enable_if<std::is_integral<T>::value>
::type>
859 template<class T, class = typename std::enable_if<std::is_integral<T>::value>
::type>
auto get_if_exists(bool verbose=false) noexcept
auto get_vmcs_field_if_exists(T addr, const char *name, bool verbose, bool exists)
auto set_vm_function_control(bool val, MA msr_addr, CA ctls_addr, const char *name, M mask, bool field_exists)
constexpr const auto addr
auto is_allowed1() noexcept
constexpr const auto addr
constexpr const auto from
constexpr const auto addr
auto is_allowed1() noexcept
void set_if_exists(T val, bool verbose=false) noexcept
void set_if_exists(T val, bool verbose=false) noexcept
void set_if_exists(T val, bool verbose=false) noexcept
void set_if_exists(T val, bool verbose=false) noexcept
constexpr const auto addr
constexpr const auto name
auto get_if_exists(bool verbose=false) noexcept
auto get_if_exists(bool verbose=false) noexcept
auto get_if_exists(bool verbose=false) noexcept
constexpr const auto name
constexpr const auto addr
void enable_if_allowed(bool verbose=false) noexcept
void set_if_exists(T val, bool verbose=false) noexcept
constexpr const auto mask
constexpr const auto name
auto get_if_exists(bool verbose=false) noexcept
constexpr const auto addr
auto is_allowed1() noexcept
void set_if_exists(T val, bool verbose=false) noexcept
constexpr const auto mask
auto get_if_exists(bool verbose=false) noexcept
constexpr const auto name
constexpr const auto addr
void set_if_exists(T val, bool verbose=false) noexcept
auto get_if_exists(bool verbose=false) noexcept
constexpr const auto name
auto is_allowed1() noexcept
auto get_if_exists(bool verbose=false) noexcept
constexpr const auto addr
auto get_if_exists(bool verbose=false) noexcept
constexpr const auto addr
constexpr const auto name
auto get_if_exists(bool verbose=false) noexcept
auto get_if_exists(bool verbose=false) noexcept
constexpr const auto from
void set_if_exists(T val, bool verbose=false) noexcept
constexpr const auto name
void set_if_exists(T val, bool verbose=false) noexcept
constexpr const auto addr
constexpr const auto mask
constexpr const auto addr
auto get_if_exists(bool verbose=false) noexcept
auto get_if_exists(bool verbose=false) noexcept
auto get_if_exists(bool verbose=false) noexcept
auto is_allowed1() noexcept
constexpr const auto name
constexpr const auto write_back
constexpr const auto mask
constexpr const auto name
void set_if_exists(T val, bool verbose=false) noexcept
auto get_if_exists(bool verbose=false) noexcept
void set_if_exists(T val, bool verbose=false) noexcept
constexpr const auto name
constexpr const auto addr
constexpr const auto mask
auto is_enabled_if_exists(bool verbose=false) noexcept
void set_if_exists(T val, bool verbose=false) noexcept
void set_if_exists(T val, bool verbose=false) noexcept
constexpr const auto name
constexpr const auto mask
auto is_allowed1() noexcept
auto get_if_exists(bool verbose=false) noexcept
void set_if_exists(T val, bool verbose=false) noexcept
constexpr const auto name
auto get_if_exists(bool verbose=false) noexcept
constexpr const auto msr_addr
auto is_allowed1() noexcept
void set_if_exists(T val, bool verbose=false) noexcept
auto set_vmcs_field_if_exists(V val, A addr, const char *name, bool verbose, bool exists) noexcept
void disable_if_allowed(bool verbose=false) noexcept
constexpr const auto uncacheable
void uint64_t uint64_t uint64_t *rdx noexcept
void set_if_exists(T val, bool verbose=false) noexcept
void set_if_exists(T val, bool verbose=false) noexcept
void set_if_exists(T val, bool verbose=false) noexcept
constexpr const auto from
constexpr const auto name
constexpr const auto name
constexpr const auto addr
auto get_if_exists(bool verbose=false) noexcept
auto is_bit_cleared(T t, B b) noexcept
void set_if_exists(T val, bool verbose=false) noexcept
constexpr const auto from
void set_if_exists(T val, bool verbose=false) noexcept
auto is_disabled_if_exists(bool verbose=false) noexcept
auto get_if_exists(bool verbose=false) noexcept
void write(field_type field, value_type value, name_type name="")
auto is_allowed1() noexcept
constexpr const auto name
auto is_allowed1() noexcept
auto get(A addr) noexcept
auto clear_bit(T t, B b) noexcept
constexpr const auto reserved
auto set_vmcs_field(V val, A addr, const char *name, bool exists)
constexpr const auto addr
constexpr const auto name
auto set_bit(T t, B b) noexcept
constexpr const auto addr
void set_if_exists(T val, bool verbose=false) noexcept
constexpr const auto addr
constexpr const auto name
auto get_bits(T t, M m) noexcept
auto is_allowed1() noexcept
auto read(field_type field, name_type name="")
constexpr const auto addr
constexpr const auto name
constexpr const auto name
auto is_allowed1() noexcept
void disable_if_exists(bool verbose=false) noexcept
auto get_if_exists(bool verbose=false) noexcept
auto get_if_exists(bool verbose=false) noexcept
constexpr const auto from
auto get_if_exists(bool verbose=false) noexcept
constexpr const auto name
auto get_if_exists(bool verbose=false) noexcept
auto get_vmcs_field(T addr, const char *name, bool exists)
auto is_disabled_if_exists(bool verbose=false) noexcept
void set_if_exists(T val, bool verbose=false) noexcept
constexpr const auto name
constexpr const auto from
auto is_enabled_if_exists(bool verbose=false) noexcept
void set_if_exists(T val, bool verbose=false) noexcept
constexpr const auto addr
void set_if_exists(T val, bool verbose=false) noexcept
auto set_vm_function_control_if_allowed(bool val, MA msr_addr, CA ctls_addr, const char *name, M mask, bool verbose, bool field_exists) noexcept
void set_if_exists(T val, bool verbose=false) noexcept
auto get_if_exists(bool verbose=false) noexcept
auto is_bit_set(T t, B b) noexcept
auto get_if_exists(bool verbose=false) noexcept
constexpr const auto addr
constexpr const auto addr
constexpr const auto mask
constexpr const auto addr
void set_if_exists(T val, bool verbose=false) noexcept
auto set_bits(T t, M m, V v) noexcept
auto get_if_exists(bool verbose=false) noexcept
auto is_allowed1() noexcept
constexpr const auto from
void set_if_exists(T val, bool verbose=false) noexcept
constexpr const auto addr
constexpr const auto name
void enable_if_exists(bool verbose=false) noexcept
auto get_if_exists(bool verbose=false) noexcept