test.h
Go to the documentation of this file.
1 //
2 // Bareflank Hypervisor
3 //
4 // Copyright (C) 2015 Assured Information Security, Inc.
5 // Author: Rian Quinn <quinnr@ainfosec.com>
6 // Author: Brendan Kerrigan <kerriganb@ainfosec.com>
7 //
8 // This library is free software; you can redistribute it and/or
9 // modify it under the terms of the GNU Lesser General Public
10 // License as published by the Free Software Foundation; either
11 // version 2.1 of the License, or (at your option) any later version.
12 //
13 // This library is distributed in the hope that it will be useful,
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 // Lesser General Public License for more details.
17 //
18 // You should have received a copy of the GNU Lesser General Public
19 // License along with this library; if not, write to the Free Software
20 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21 
22 #ifndef TEST_H
23 #define TEST_H
24 
25 #include <unittest.h>
26 #include <vector>
27 #include <functional>
28 #include <memory>
29 #include <vmcs/vmcs_intel_x64.h>
33 
35 
36 #define test_vmcs_check(cfg, ...) test_vmcs_check_with_args(gsl::cstring_span<>(__PRETTY_FUNCTION__), __LINE__, cfg, __VA_ARGS__)
37 
38 using namespace intel_x64;
39 
41 {
42  std::function<void()> setup;
43  std::shared_ptr<std::exception> exception;
45 };
46 
47 struct vm_control;
48 
49 struct cpuid_regs
50 {
51  uint32_t eax;
52  uint32_t ebx;
53  uint32_t ecx;
54  uint32_t edx;
55 };
56 
57 
58 extern std::map<uint32_t, uint64_t> g_msrs;
59 extern std::map<uint64_t, uint64_t> g_vmcs_fields;
60 extern std::map<uint32_t, uint32_t> g_eax_cpuid;
63 extern uintptr_t g_test_addr;
64 extern uintptr_t g_virt_apic_addr;
65 extern uintptr_t g_vmcs_link_addr;
66 extern uintptr_t g_pdpt_addr;
67 extern struct cpuid_regs g_cpuid_regs;
68 
69 extern uint8_t g_virt_apic_mem[0x81];
70 extern uint32_t g_vmcs_link_mem[1];
71 extern uint64_t g_pdpt_mem[4];
72 
73 void setup_mock(MockRepository &mocks, memory_manager_x64 *mm);
74 uintptr_t virtptr_to_physint(void *ptr);
75 void *physint_to_virtptr(uintptr_t phys);
76 
77 void proc_ctl_allow1(uint64_t mask);
78 void proc_ctl_allow0(uint64_t mask);
79 void proc_ctl_disallow1(uint64_t mask);
80 
81 void proc_ctl2_allow1(uint64_t mask);
82 void proc_ctl2_allow0(uint64_t mask);
83 void proc_ctl2_disallow1(uint64_t mask);
84 
85 void pin_ctl_allow1(uint64_t mask);
86 void pin_ctl_allow0(uint64_t mask);
87 
88 void exit_ctl_allow1(uint64_t mask);
89 void exit_ctl_allow0(uint64_t mask);
90 
91 void entry_ctl_allow1(uint64_t mask);
92 void entry_ctl_allow0(uint64_t mask);
93 
94 void vmfunc_ctl_allow1(uint64_t mask);
95 
96 class vmcs_ut : public unittest
97 {
98 public:
99 
100  vmcs_ut();
101  ~vmcs_ut() override = default;
102 
103 protected:
104 
105  bool init() override;
106  bool fini() override;
107  bool list() override;
108 
109  template<class L, class C,
110  class = typename std::enable_if<std::is_integral<L>::value>::type>
111  void test_vmcs_check_with_args(gsl::cstring_span<> fut, L line,
112  const std::vector<struct control_flow_path> &cfg, C chk)
113  {
114  for (int i = 0; static_cast<size_t>(i) < cfg.size(); i++)
115  {
116  MockRepository mocks;
117  auto mm = mocks.Mock<memory_manager_x64>();
118 
119  setup_mock(mocks, mm);
120 
121  auto path = cfg[static_cast<size_t>(i)];
122  path.setup();
123 
124  RUN_UNITTEST_WITH_MOCKS(mocks, [&]
125  {
126  if (path.throws_exception)
127  this->expect_exception_with_args(std::forward<decltype(chk)>(chk), path.exception, fut, line, i);
128  else
129  this->expect_no_exception_with_args(std::forward<decltype(chk)>(chk), fut, line, i);
130  });
131  }
132  }
133 
134 private:
135 
136  void list_vmcs_intel_x64_cpp();
137  void list_vmcs_intel_x64_h();
138  void list_16bit_control_fields();
139  void list_16bit_guest_state_fields();
140  void list_16bit_host_state_fields();
141  void list_64bit_control_fields();
142  void list_64bit_read_only_data_field();
143  void list_64bit_guest_state_fields();
144  void list_64bit_host_state_fields();
145  void list_32bit_control_fields();
146  void list_32bit_read_only_data_fields();
147  void list_32bit_guest_state_fields();
148  void list_32bit_host_state_field();
149  void list_natural_width_control_fields();
150  void list_natural_width_read_only_data_fields();
151  void list_natural_width_guest_state_fields();
152  void list_natural_width_host_state_fields();
153 
154  void list_checks_on_vmx_controls();
155  void list_checks_on_host_state();
156  void list_checks_on_guest_state();
157 
158  void test_launch_success();
159  void test_launch_vmlaunch_failure();
160  void test_launch_vmlaunch_demote_failure();
161  void test_launch_create_vmcs_region_failure();
162  void test_launch_create_exit_handler_stack_failure();
163  void test_launch_clear_failure();
164  void test_launch_load_failure();
165  void test_promote_failure();
166  void test_resume_failure();
167  void test_get_vmcs_field();
168  void test_get_vmcs_field_if_exists();
169  void test_set_vmcs_field();
170  void test_set_vmcs_field_if_exists();
171  void test_set_vm_control();
172  void test_set_vm_control_if_allowed();
173  void test_set_vm_function_control();
174  void test_set_vm_function_control_if_allowed();
175  void test_vmcs_vm_instruction_error_description();
176  void test_vmcs_vm_instruction_error_description_if_exists();
177  void test_vmcs_virtual_processor_identifier();
178  void test_vmcs_posted_interrupt_notification_vector();
179  void test_vmcs_eptp_index();
180  void test_vmcs_guest_es_selector();
181  void test_vmcs_guest_es_selector_rpl();
182  void test_vmcs_guest_es_selector_ti();
183  void test_vmcs_guest_es_selector_index();
184  void test_vmcs_guest_cs_selector();
185  void test_vmcs_guest_cs_selector_rpl();
186  void test_vmcs_guest_cs_selector_ti();
187  void test_vmcs_guest_cs_selector_index();
188  void test_vmcs_guest_ss_selector();
189  void test_vmcs_guest_ss_selector_rpl();
190  void test_vmcs_guest_ss_selector_ti();
191  void test_vmcs_guest_ss_selector_index();
192  void test_vmcs_guest_ds_selector();
193  void test_vmcs_guest_ds_selector_rpl();
194  void test_vmcs_guest_ds_selector_ti();
195  void test_vmcs_guest_ds_selector_index();
196  void test_vmcs_guest_fs_selector();
197  void test_vmcs_guest_fs_selector_rpl();
198  void test_vmcs_guest_fs_selector_ti();
199  void test_vmcs_guest_fs_selector_index();
200  void test_vmcs_guest_gs_selector();
201  void test_vmcs_guest_gs_selector_rpl();
202  void test_vmcs_guest_gs_selector_ti();
203  void test_vmcs_guest_gs_selector_index();
204  void test_vmcs_guest_ldtr_selector();
205  void test_vmcs_guest_ldtr_selector_rpl();
206  void test_vmcs_guest_ldtr_selector_ti();
207  void test_vmcs_guest_ldtr_selector_index();
208  void test_vmcs_guest_tr_selector();
209  void test_vmcs_guest_tr_selector_rpl();
210  void test_vmcs_guest_tr_selector_ti();
211  void test_vmcs_guest_tr_selector_index();
212  void test_vmcs_guest_interrupt_status();
213  void test_vmcs_host_es_selector();
214  void test_vmcs_host_es_selector_rpl();
215  void test_vmcs_host_es_selector_ti();
216  void test_vmcs_host_es_selector_index();
217  void test_vmcs_host_cs_selector();
218  void test_vmcs_host_cs_selector_rpl();
219  void test_vmcs_host_cs_selector_ti();
220  void test_vmcs_host_cs_selector_index();
221  void test_vmcs_host_ss_selector();
222  void test_vmcs_host_ss_selector_rpl();
223  void test_vmcs_host_ss_selector_ti();
224  void test_vmcs_host_ss_selector_index();
225  void test_vmcs_host_ds_selector();
226  void test_vmcs_host_ds_selector_rpl();
227  void test_vmcs_host_ds_selector_ti();
228  void test_vmcs_host_ds_selector_index();
229  void test_vmcs_host_fs_selector();
230  void test_vmcs_host_fs_selector_rpl();
231  void test_vmcs_host_fs_selector_ti();
232  void test_vmcs_host_fs_selector_index();
233  void test_vmcs_host_gs_selector();
234  void test_vmcs_host_gs_selector_rpl();
235  void test_vmcs_host_gs_selector_ti();
236  void test_vmcs_host_gs_selector_index();
237  void test_vmcs_host_tr_selector();
238  void test_vmcs_host_tr_selector_rpl();
239  void test_vmcs_host_tr_selector_ti();
240  void test_vmcs_host_tr_selector_index();
241  void test_vmcs_address_of_io_bitmap_a();
242  void test_vmcs_address_of_io_bitmap_b();
243  void test_vmcs_address_of_msr_bitmap();
244  void test_vmcs_vm_exit_msr_store_address();
245  void test_vmcs_vm_exit_msr_load_address();
246  void test_vmcs_vm_entry_msr_load_address();
247  void test_vmcs_executive_vmcs_pointer();
248  void test_vmcs_pml_address();
249  void test_vmcs_tsc_offset();
250  void test_vmcs_virtual_apic_address();
251  void test_vmcs_apic_access_address();
252  void test_vmcs_posted_interrupt_descriptor_address();
253  void test_vmcs_vm_function_controls();
254  void test_vmcs_vm_function_controls_eptp_switching();
255  void test_vmcs_vm_function_controls_reserved();
256  void test_vmcs_ept_pointer();
257  void test_vmcs_ept_pointer_memory_type();
258  void test_vmcs_ept_pointer_page_walk_length_minus_one();
259  void test_vmcs_ept_pointer_accessed_and_dirty_flags();
260  void test_vmcs_ept_pointer_phys_addr();
261  void test_vmcs_ept_pointer_reserved();
262  void test_vmcs_eoi_exit_bitmap_0();
263  void test_vmcs_eoi_exit_bitmap_1();
264  void test_vmcs_eoi_exit_bitmap_2();
265  void test_vmcs_eoi_exit_bitmap_3();
266  void test_vmcs_eptp_list_address();
267  void test_vmcs_vmread_bitmap_address();
268  void test_vmcs_vmwrite_bitmap_address();
269  void test_vmcs_virtualization_exception_information_address();
270  void test_vmcs_xss_exiting_bitmap();
271  void test_vmcs_guest_physical_address();
272  void test_vmcs_guest_rflags();
273  void test_vmcs_guest_rflags_carry_flag();
274  void test_vmcs_guest_rflags_parity_flag();
275  void test_vmcs_guest_rflags_auxiliary_carry_flag();
276  void test_vmcs_guest_rflags_zero_flag();
277  void test_vmcs_guest_rflags_sign_flag();
278  void test_vmcs_guest_rflags_trap_flag();
279  void test_vmcs_guest_rflags_interrupt_enable_flag();
280  void test_vmcs_guest_rflags_direction_flag();
281  void test_vmcs_guest_rflags_overflow_flag();
282  void test_vmcs_guest_rflags_privilege_level();
283  void test_vmcs_guest_rflags_nested_task();
284  void test_vmcs_guest_rflags_resume_flag();
285  void test_vmcs_guest_rflags_virtual_8086_mode();
286  void test_vmcs_guest_rflags_alignment_check_access_control();
287  void test_vmcs_guest_rflags_virtual_interupt_flag();
288  void test_vmcs_guest_rflags_virtual_interupt_pending();
289  void test_vmcs_guest_rflags_id_flag();
290  void test_vmcs_guest_rflags_reserved();
291  void test_vmcs_guest_rflags_always_disabled();
292  void test_vmcs_guest_rflags_always_enabled();
293  void test_vmcs_guest_cr0();
294  void test_vmcs_guest_cr0_protection_enable();
295  void test_vmcs_guest_cr0_monitor_coprocessor();
296  void test_vmcs_guest_cr0_emulation();
297  void test_vmcs_guest_cr0_task_switched();
298  void test_vmcs_guest_cr0_extension_type();
299  void test_vmcs_guest_cr0_numeric_error();
300  void test_vmcs_guest_cr0_write_protect();
301  void test_vmcs_guest_cr0_alignment_mask();
302  void test_vmcs_guest_cr0_not_write_through();
303  void test_vmcs_guest_cr0_cache_disable();
304  void test_vmcs_guest_cr0_paging();
305  void test_vmcs_guest_cr3();
306  void test_vmcs_guest_cr4();
307  void test_vmcs_guest_cr4_v8086_mode_extensions();
308  void test_vmcs_guest_cr4_protected_mode_virtual_interrupts();
309  void test_vmcs_guest_cr4_time_stamp_disable();
310  void test_vmcs_guest_cr4_debugging_extensions();
311  void test_vmcs_guest_cr4_page_size_extensions();
312  void test_vmcs_guest_cr4_physical_address_extensions();
313  void test_vmcs_guest_cr4_machine_check_enable();
314  void test_vmcs_guest_cr4_page_global_enable();
315  void test_vmcs_guest_cr4_performance_monitor_counter_enable();
316  void test_vmcs_guest_cr4_osfxsr();
317  void test_vmcs_guest_cr4_osxmmexcpt();
318  void test_vmcs_guest_cr4_vmx_enable_bit();
319  void test_vmcs_guest_cr4_smx_enable_bit();
320  void test_vmcs_guest_cr4_fsgsbase_enable_bit();
321  void test_vmcs_guest_cr4_pcid_enable_bit();
322  void test_vmcs_guest_cr4_osxsave();
323  void test_vmcs_guest_cr4_smep_enable_bit();
324  void test_vmcs_guest_cr4_smap_enable_bit();
325  void test_vmcs_guest_cr4_protection_key_enable_bit();
326  void test_vmcs_guest_es_base();
327  void test_vmcs_guest_cs_base();
328  void test_vmcs_guest_ss_base();
329  void test_vmcs_guest_ds_base();
330  void test_vmcs_guest_fs_base();
331  void test_vmcs_guest_gs_base();
332  void test_vmcs_guest_ldtr_base();
333  void test_vmcs_guest_tr_base();
334  void test_vmcs_guest_gdtr_base();
335  void test_vmcs_guest_idtr_base();
336  void test_vmcs_guest_dr7();
337  void test_vmcs_guest_rsp();
338  void test_vmcs_guest_rip();
339  void test_vmcs_guest_pending_debug_exceptions();
340  void test_vmcs_guest_pending_debug_exceptions_b0();
341  void test_vmcs_guest_pending_debug_exceptions_b1();
342  void test_vmcs_guest_pending_debug_exceptions_b2();
343  void test_vmcs_guest_pending_debug_exceptions_b3();
344  void test_vmcs_guest_pending_debug_exceptions_reserved();
345  void test_vmcs_guest_pending_debug_exceptions_enabled_breakpoint();
346  void test_vmcs_guest_pending_debug_exceptions_bs();
347  void test_vmcs_guest_pending_debug_exceptions_rtm();
348  void test_vmcs_guest_ia32_sysenter_esp();
349  void test_vmcs_guest_ia32_sysenter_eip();
350  void test_vmcs_host_cr0();
351  void test_vmcs_host_cr0_protection_enable();
352  void test_vmcs_host_cr0_monitor_coprocessor();
353  void test_vmcs_host_cr0_emulation();
354  void test_vmcs_host_cr0_task_switched();
355  void test_vmcs_host_cr0_extension_type();
356  void test_vmcs_host_cr0_numeric_error();
357  void test_vmcs_host_cr0_write_protect();
358  void test_vmcs_host_cr0_alignment_mask();
359  void test_vmcs_host_cr0_not_write_through();
360  void test_vmcs_host_cr0_cache_disable();
361  void test_vmcs_host_cr0_paging();
362  void test_vmcs_host_cr3();
363  void test_vmcs_host_cr4();
364  void test_vmcs_host_cr4_v8086_mode_extensions();
365  void test_vmcs_host_cr4_protected_mode_virtual_interrupts();
366  void test_vmcs_host_cr4_time_stamp_disable();
367  void test_vmcs_host_cr4_debugging_extensions();
368  void test_vmcs_host_cr4_page_size_extensions();
369  void test_vmcs_host_cr4_physical_address_extensions();
370  void test_vmcs_host_cr4_machine_check_enable();
371  void test_vmcs_host_cr4_page_global_enable();
372  void test_vmcs_host_cr4_performance_monitor_counter_enable();
373  void test_vmcs_host_cr4_osfxsr();
374  void test_vmcs_host_cr4_osxmmexcpt();
375  void test_vmcs_host_cr4_vmx_enable_bit();
376  void test_vmcs_host_cr4_smx_enable_bit();
377  void test_vmcs_host_cr4_fsgsbase_enable_bit();
378  void test_vmcs_host_cr4_pcid_enable_bit();
379  void test_vmcs_host_cr4_osxsave();
380  void test_vmcs_host_cr4_smep_enable_bit();
381  void test_vmcs_host_cr4_smap_enable_bit();
382  void test_vmcs_host_cr4_protection_key_enable_bit();
383  void test_vmcs_host_fs_base();
384  void test_vmcs_host_gs_base();
385  void test_vmcs_host_tr_base();
386  void test_vmcs_host_gdtr_base();
387  void test_vmcs_host_idtr_base();
388  void test_vmcs_host_ia32_sysenter_esp();
389  void test_vmcs_host_ia32_sysenter_eip();
390  void test_vmcs_host_rsp();
391  void test_vmcs_host_rip();
392  void test_vmcs_host_ia32_pat();
393  void test_vmcs_host_ia32_pat_pa0();
394  void test_vmcs_host_ia32_pat_pa0_memory_type();
395  void test_vmcs_host_ia32_pat_pa0_reserved();
396  void test_vmcs_host_ia32_pat_pa1();
397  void test_vmcs_host_ia32_pat_pa1_memory_type();
398  void test_vmcs_host_ia32_pat_pa1_reserved();
399  void test_vmcs_host_ia32_pat_pa2();
400  void test_vmcs_host_ia32_pat_pa2_memory_type();
401  void test_vmcs_host_ia32_pat_pa2_reserved();
402  void test_vmcs_host_ia32_pat_pa3();
403  void test_vmcs_host_ia32_pat_pa3_memory_type();
404  void test_vmcs_host_ia32_pat_pa3_reserved();
405  void test_vmcs_host_ia32_pat_pa4();
406  void test_vmcs_host_ia32_pat_pa4_memory_type();
407  void test_vmcs_host_ia32_pat_pa4_reserved();
408  void test_vmcs_host_ia32_pat_pa5();
409  void test_vmcs_host_ia32_pat_pa5_memory_type();
410  void test_vmcs_host_ia32_pat_pa5_reserved();
411  void test_vmcs_host_ia32_pat_pa6();
412  void test_vmcs_host_ia32_pat_pa6_memory_type();
413  void test_vmcs_host_ia32_pat_pa6_reserved();
414  void test_vmcs_host_ia32_pat_pa7();
415  void test_vmcs_host_ia32_pat_pa7_memory_type();
416  void test_vmcs_host_ia32_pat_pa7_reserved();
417  void test_vmcs_host_ia32_efer();
418  void test_vmcs_host_ia32_efer_sce();
419  void test_vmcs_host_ia32_efer_lme();
420  void test_vmcs_host_ia32_efer_lma();
421  void test_vmcs_host_ia32_efer_nxe();
422  void test_vmcs_host_ia32_efer_reserved();
423  void test_vmcs_host_ia32_perf_global_ctrl();
424  void test_vmcs_host_ia32_perf_global_ctrl_reserved();
425  void test_vmcs_guest_es_limit();
426  void test_vmcs_guest_cs_limit();
427  void test_vmcs_guest_ss_limit();
428  void test_vmcs_guest_ds_limit();
429  void test_vmcs_guest_fs_limit();
430  void test_vmcs_guest_gs_limit();
431  void test_vmcs_guest_ldtr_limit();
432  void test_vmcs_guest_tr_limit();
433  void test_vmcs_guest_gdtr_limit();
434  void test_vmcs_guest_idtr_limit();
435  void test_vmcs_guest_es_access_rights();
436  void test_vmcs_guest_es_access_rights_type();
437  void test_vmcs_guest_es_access_rights_s();
438  void test_vmcs_guest_es_access_rights_dpl();
439  void test_vmcs_guest_es_access_rights_present();
440  void test_vmcs_guest_es_access_rights_avl();
441  void test_vmcs_guest_es_access_rights_l();
442  void test_vmcs_guest_es_access_rights_db();
443  void test_vmcs_guest_es_access_rights_granularity();
444  void test_vmcs_guest_es_access_rights_reserved();
445  void test_vmcs_guest_es_access_rights_unusable();
446  void test_vmcs_guest_cs_access_rights();
447  void test_vmcs_guest_cs_access_rights_type();
448  void test_vmcs_guest_cs_access_rights_s();
449  void test_vmcs_guest_cs_access_rights_dpl();
450  void test_vmcs_guest_cs_access_rights_present();
451  void test_vmcs_guest_cs_access_rights_avl();
452  void test_vmcs_guest_cs_access_rights_l();
453  void test_vmcs_guest_cs_access_rights_db();
454  void test_vmcs_guest_cs_access_rights_granularity();
455  void test_vmcs_guest_cs_access_rights_reserved();
456  void test_vmcs_guest_cs_access_rights_unusable();
457  void test_vmcs_guest_ss_access_rights();
458  void test_vmcs_guest_ss_access_rights_type();
459  void test_vmcs_guest_ss_access_rights_s();
460  void test_vmcs_guest_ss_access_rights_dpl();
461  void test_vmcs_guest_ss_access_rights_present();
462  void test_vmcs_guest_ss_access_rights_avl();
463  void test_vmcs_guest_ss_access_rights_l();
464  void test_vmcs_guest_ss_access_rights_db();
465  void test_vmcs_guest_ss_access_rights_granularity();
466  void test_vmcs_guest_ss_access_rights_reserved();
467  void test_vmcs_guest_ss_access_rights_unusable();
468  void test_vmcs_guest_ds_access_rights();
469  void test_vmcs_guest_ds_access_rights_type();
470  void test_vmcs_guest_ds_access_rights_s();
471  void test_vmcs_guest_ds_access_rights_dpl();
472  void test_vmcs_guest_ds_access_rights_present();
473  void test_vmcs_guest_ds_access_rights_avl();
474  void test_vmcs_guest_ds_access_rights_l();
475  void test_vmcs_guest_ds_access_rights_db();
476  void test_vmcs_guest_ds_access_rights_granularity();
477  void test_vmcs_guest_ds_access_rights_reserved();
478  void test_vmcs_guest_ds_access_rights_unusable();
479  void test_vmcs_guest_fs_access_rights();
480  void test_vmcs_guest_fs_access_rights_type();
481  void test_vmcs_guest_fs_access_rights_s();
482  void test_vmcs_guest_fs_access_rights_dpl();
483  void test_vmcs_guest_fs_access_rights_present();
484  void test_vmcs_guest_fs_access_rights_avl();
485  void test_vmcs_guest_fs_access_rights_l();
486  void test_vmcs_guest_fs_access_rights_db();
487  void test_vmcs_guest_fs_access_rights_granularity();
488  void test_vmcs_guest_fs_access_rights_reserved();
489  void test_vmcs_guest_fs_access_rights_unusable();
490  void test_vmcs_guest_gs_access_rights();
491  void test_vmcs_guest_gs_access_rights_type();
492  void test_vmcs_guest_gs_access_rights_s();
493  void test_vmcs_guest_gs_access_rights_dpl();
494  void test_vmcs_guest_gs_access_rights_present();
495  void test_vmcs_guest_gs_access_rights_avl();
496  void test_vmcs_guest_gs_access_rights_l();
497  void test_vmcs_guest_gs_access_rights_db();
498  void test_vmcs_guest_gs_access_rights_granularity();
499  void test_vmcs_guest_gs_access_rights_reserved();
500  void test_vmcs_guest_gs_access_rights_unusable();
501  void test_vmcs_guest_ldtr_access_rights();
502  void test_vmcs_guest_ldtr_access_rights_type();
503  void test_vmcs_guest_ldtr_access_rights_s();
504  void test_vmcs_guest_ldtr_access_rights_dpl();
505  void test_vmcs_guest_ldtr_access_rights_present();
506  void test_vmcs_guest_ldtr_access_rights_avl();
507  void test_vmcs_guest_ldtr_access_rights_l();
508  void test_vmcs_guest_ldtr_access_rights_db();
509  void test_vmcs_guest_ldtr_access_rights_granularity();
510  void test_vmcs_guest_ldtr_access_rights_reserved();
511  void test_vmcs_guest_ldtr_access_rights_unusable();
512  void test_vmcs_guest_tr_access_rights();
513  void test_vmcs_guest_tr_access_rights_type();
514  void test_vmcs_guest_tr_access_rights_s();
515  void test_vmcs_guest_tr_access_rights_dpl();
516  void test_vmcs_guest_tr_access_rights_present();
517  void test_vmcs_guest_tr_access_rights_avl();
518  void test_vmcs_guest_tr_access_rights_l();
519  void test_vmcs_guest_tr_access_rights_db();
520  void test_vmcs_guest_tr_access_rights_granularity();
521  void test_vmcs_guest_tr_access_rights_reserved();
522  void test_vmcs_guest_tr_access_rights_unusable();
523  void test_vmcs_guest_interruptibility_state();
524  void test_vmcs_guest_interruptibility_state_blocking_by_sti();
525  void test_vmcs_guest_interruptibility_state_blocking_by_mov_ss();
526  void test_vmcs_guest_interruptibility_state_blocking_by_smi();
527  void test_vmcs_guest_interruptibility_state_blocking_by_nmi();
528  void test_vmcs_guest_interruptibility_state_enclave_interruption();
529  void test_vmcs_guest_interruptibility_state_reserved();
530  void test_vmcs_guest_activity_state();
531  void test_vmcs_guest_smbase();
532  void test_vmcs_guest_ia32_sysenter_cs();
533  void test_vmcs_vmx_preemption_timer_value();
534  void test_vmcs_host_ia32_sysenter_cs();
535  void test_vmcs_cr0_guest_host_mask();
536  void test_vmcs_cr4_guest_host_mask();
537  void test_vmcs_cr0_read_shadow();
538  void test_vmcs_cr4_read_shadow();
539  void test_vmcs_cr3_target_value_0();
540  void test_vmcs_cr3_target_value_1();
541  void test_vmcs_cr3_target_value_2();
542  void test_vmcs_cr3_target_value_3();
543  void test_vmcs_pin_based_vm_execution_controls();
544  void test_vmcs_pin_based_vm_execution_controls_external_interrupt_exiting();
545  void test_vmcs_pin_based_vm_execution_controls_nmi_exiting();
546  void test_vmcs_pin_based_vm_execution_controls_virtual_nmis();
547  void test_vmcs_pin_based_vm_execution_controls_activate_vmx_preemption_timer();
548  void test_vmcs_pin_based_vm_execution_controls_process_posted_interrupts();
549  void test_vmcs_primary_processor_based_vm_execution_controls();
550  void test_vmcs_primary_processor_based_vm_execution_controls_interrupt_window_exiting();
551  void test_vmcs_primary_processor_based_vm_execution_controls_use_tsc_offsetting();
552  void test_vmcs_primary_processor_based_vm_execution_controls_hlt_exiting();
553  void test_vmcs_primary_processor_based_vm_execution_controls_invlpg_exiting();
554  void test_vmcs_primary_processor_based_vm_execution_controls_mwait_exiting();
555  void test_vmcs_primary_processor_based_vm_execution_controls_rdpmc_exiting();
556  void test_vmcs_primary_processor_based_vm_execution_controls_rdtsc_exiting();
557  void test_vmcs_primary_processor_based_vm_execution_controls_cr3_load_exiting();
558  void test_vmcs_primary_processor_based_vm_execution_controls_cr3_store_exiting();
559  void test_vmcs_primary_processor_based_vm_execution_controls_cr8_load_exiting();
560  void test_vmcs_primary_processor_based_vm_execution_controls_cr8_store_exiting();
561  void test_vmcs_primary_processor_based_vm_execution_controls_use_tpr_shadow();
562  void test_vmcs_primary_processor_based_vm_execution_controls_nmi_window_exiting();
563  void test_vmcs_primary_processor_based_vm_execution_controls_mov_dr_exiting();
564  void test_vmcs_primary_processor_based_vm_execution_controls_unconditional_io_exiting();
565  void test_vmcs_primary_processor_based_vm_execution_controls_use_io_bitmaps();
566  void test_vmcs_primary_processor_based_vm_execution_controls_monitor_trap_flag();
567  void test_vmcs_primary_processor_based_vm_execution_controls_use_msr_bitmap();
568  void test_vmcs_primary_processor_based_vm_execution_controls_monitor_exiting();
569  void test_vmcs_primary_processor_based_vm_execution_controls_pause_exiting();
570  void test_vmcs_primary_processor_based_vm_execution_controls_activate_secondary_controls();
571  void test_vmcs_exception_bitmap();
572  void test_vmcs_page_fault_error_code_mask();
573  void test_vmcs_page_fault_error_code_match();
574  void test_vmcs_cr3_target_count();
575  void test_vmcs_vm_exit_controls();
576  void test_vmcs_vm_exit_controls_save_debug_controls();
577  void test_vmcs_vm_exit_controls_host_address_space_size();
578  void test_vmcs_vm_exit_controls_load_ia32_perf_global_ctrl();
579  void test_vmcs_vm_exit_controls_acknowledge_interrupt_on_exit();
580  void test_vmcs_vm_exit_controls_save_ia32_pat();
581  void test_vmcs_vm_exit_controls_load_ia32_pat();
582  void test_vmcs_vm_exit_controls_save_ia32_efer();
583  void test_vmcs_vm_exit_controls_load_ia32_efer();
584  void test_vmcs_vm_exit_controls_save_vmx_preemption_timer_value();
585  void test_vmcs_vm_exit_controls_clear_ia32_bndcfgs();
586  void test_vmcs_vm_exit_msr_store_count();
587  void test_vmcs_vm_exit_msr_load_count();
588  void test_vmcs_vm_entry_controls();
589  void test_vmcs_vm_entry_controls_load_debug_controls();
590  void test_vmcs_vm_entry_controls_ia_32e_mode_guest();
591  void test_vmcs_vm_entry_controls_entry_to_smm();
592  void test_vmcs_vm_entry_controls_deactivate_dual_monitor_treatment();
593  void test_vmcs_vm_entry_controls_load_ia32_perf_global_ctrl();
594  void test_vmcs_vm_entry_controls_load_ia32_pat();
595  void test_vmcs_vm_entry_controls_load_ia32_efer();
596  void test_vmcs_vm_entry_controls_load_ia32_bndcfgs();
597  void test_vmcs_vm_entry_msr_load_count();
598  void test_vmcs_vm_entry_interruption_information_field();
599  void test_vmcs_vm_entry_interruption_information_field_vector();
600  void test_vmcs_vm_entry_interruption_information_field_type();
601  void test_vmcs_vm_entry_interruption_information_field_deliver_error_code_bit();
602  void test_vmcs_vm_entry_interruption_information_field_reserved();
603  void test_vmcs_vm_entry_interruption_information_field_valid_bit();
604  void test_vmcs_vm_entry_exception_error_code();
605  void test_vmcs_vm_entry_instruction_length();
606  void test_vmcs_tpr_threshold();
607  void test_vmcs_secondary_processor_based_vm_execution_controls();
608  void test_vmcs_secondary_processor_based_vm_execution_controls_virtualize_apic_accesses();
609  void test_vmcs_secondary_processor_based_vm_execution_controls_enable_ept();
610  void test_vmcs_secondary_processor_based_vm_execution_controls_descriptor_table_exiting();
611  void test_vmcs_secondary_processor_based_vm_execution_controls_enable_rdtscp();
612  void test_vmcs_secondary_processor_based_vm_execution_controls_virtualize_x2apic_mode();
613  void test_vmcs_secondary_processor_based_vm_execution_controls_enable_vpid();
614  void test_vmcs_secondary_processor_based_vm_execution_controls_wbinvd_exiting();
615  void test_vmcs_secondary_processor_based_vm_execution_controls_unrestricted_guest();
616  void test_vmcs_secondary_processor_based_vm_execution_controls_apic_register_virtualization();
617  void test_vmcs_secondary_processor_based_vm_execution_controls_virtual_interrupt_delivery();
618  void test_vmcs_secondary_processor_based_vm_execution_controls_pause_loop_exiting();
619  void test_vmcs_secondary_processor_based_vm_execution_controls_rdrand_exiting();
620  void test_vmcs_secondary_processor_based_vm_execution_controls_enable_invpcid();
621  void test_vmcs_secondary_processor_based_vm_execution_controls_enable_vm_functions();
622  void test_vmcs_secondary_processor_based_vm_execution_controls_vmcs_shadowing();
623  void test_vmcs_secondary_processor_based_vm_execution_controls_rdseed_exiting();
624  void test_vmcs_secondary_processor_based_vm_execution_controls_enable_pml();
625  void test_vmcs_secondary_processor_based_vm_execution_controls_ept_violation_ve();
626  void test_vmcs_secondary_processor_based_vm_execution_controls_enable_xsaves_xrstors();
627  void test_vmcs_ple_gap();
628  void test_vmcs_ple_window();
629  void test_vmcs_vm_instruction_error();
630  void test_vmcs_exit_reason();
631  void test_vmcs_exit_reason_basic_exit_reason();
632  void test_vmcs_exit_reason_basic_exit_reason_description();
633  void test_vmcs_exit_reason_basic_exit_reason_description_if_exists();
634  void test_vmcs_exit_reason_reserved();
635  void test_vmcs_exit_reason_vm_exit_incident_to_enclave_mode();
636  void test_vmcs_exit_reason_pending_mtf_vm_exit();
637  void test_vmcs_exit_reason_vm_exit_from_vmx_root_operation();
638  void test_vmcs_exit_reason_vm_entry_failure();
639  void test_vmcs_vm_exit_interruption_information();
640  void test_vmcs_vm_exit_interruption_information_vector();
641  void test_vmcs_vm_exit_interruption_information_interruption_type();
642  void test_vmcs_vm_exit_interruption_information_error_code_valid();
643  void test_vmcs_vm_exit_interruption_information_nmi_blocking_due_to_iret();
644  void test_vmcs_vm_exit_interruption_information_reserved();
645  void test_vmcs_vm_exit_interruption_information_valid_bit();
646  void test_vmcs_vm_exit_interruption_error_code();
647  void test_vmcs_idt_vectoring_information();
648  void test_vmcs_idt_vectoring_information_vector();
649  void test_vmcs_idt_vectoring_information_interruption_type();
650  void test_vmcs_idt_vectoring_information_error_code_valid();
651  void test_vmcs_idt_vectoring_information_reserved();
652  void test_vmcs_idt_vectoring_information_valid_bit();
653  void test_vmcs_idt_vectoring_error_code();
654  void test_vmcs_vm_exit_instruction_length();
655  void test_vmcs_vm_exit_instruction_information();
656  void test_vmcs_vm_exit_instruction_information_ins();
657  void test_vmcs_vm_exit_instruction_information_ins_address_size();
658  void test_vmcs_vm_exit_instruction_information_outs();
659  void test_vmcs_vm_exit_instruction_information_outs_address_size();
660  void test_vmcs_vm_exit_instruction_information_outs_segment_register();
661  void test_vmcs_vm_exit_instruction_information_invept();
662  void test_vmcs_vm_exit_instruction_information_invept_scaling();
663  void test_vmcs_vm_exit_instruction_information_invept_address_size();
664  void test_vmcs_vm_exit_instruction_information_invept_segment_register();
665  void test_vmcs_vm_exit_instruction_information_invept_index_reg();
666  void test_vmcs_vm_exit_instruction_information_invept_index_reg_invalid();
667  void test_vmcs_vm_exit_instruction_information_invept_base_reg();
668  void test_vmcs_vm_exit_instruction_information_invept_base_reg_invalid();
669  void test_vmcs_vm_exit_instruction_information_invept_reg2();
670  void test_vmcs_vm_exit_instruction_information_invpcid();
671  void test_vmcs_vm_exit_instruction_information_invpcid_scaling();
672  void test_vmcs_vm_exit_instruction_information_invpcid_address_size();
673  void test_vmcs_vm_exit_instruction_information_invpcid_segment_register();
674  void test_vmcs_vm_exit_instruction_information_invpcid_index_reg();
675  void test_vmcs_vm_exit_instruction_information_invpcid_index_reg_invalid();
676  void test_vmcs_vm_exit_instruction_information_invpcid_base_reg();
677  void test_vmcs_vm_exit_instruction_information_invpcid_base_reg_invalid();
678  void test_vmcs_vm_exit_instruction_information_invpcid_reg2();
679  void test_vmcs_vm_exit_instruction_information_invvpid();
680  void test_vmcs_vm_exit_instruction_information_invvpid_scaling();
681  void test_vmcs_vm_exit_instruction_information_invvpid_address_size();
682  void test_vmcs_vm_exit_instruction_information_invvpid_segment_register();
683  void test_vmcs_vm_exit_instruction_information_invvpid_index_reg();
684  void test_vmcs_vm_exit_instruction_information_invvpid_index_reg_invalid();
685  void test_vmcs_vm_exit_instruction_information_invvpid_base_reg();
686  void test_vmcs_vm_exit_instruction_information_invvpid_base_reg_invalid();
687  void test_vmcs_vm_exit_instruction_information_invvpid_reg2();
688  void test_vmcs_vm_exit_instruction_information_lidt();
689  void test_vmcs_vm_exit_instruction_information_lidt_scaling();
690  void test_vmcs_vm_exit_instruction_information_lidt_address_size();
691  void test_vmcs_vm_exit_instruction_information_lidt_operand_size();
692  void test_vmcs_vm_exit_instruction_information_lidt_segment_register();
693  void test_vmcs_vm_exit_instruction_information_lidt_index_reg();
694  void test_vmcs_vm_exit_instruction_information_lidt_index_reg_invalid();
695  void test_vmcs_vm_exit_instruction_information_lidt_base_reg();
696  void test_vmcs_vm_exit_instruction_information_lidt_base_reg_invalid();
697  void test_vmcs_vm_exit_instruction_information_lidt_instruction_identity();
698  void test_vmcs_vm_exit_instruction_information_lgdt();
699  void test_vmcs_vm_exit_instruction_information_lgdt_scaling();
700  void test_vmcs_vm_exit_instruction_information_lgdt_address_size();
701  void test_vmcs_vm_exit_instruction_information_lgdt_operand_size();
702  void test_vmcs_vm_exit_instruction_information_lgdt_segment_register();
703  void test_vmcs_vm_exit_instruction_information_lgdt_index_reg();
704  void test_vmcs_vm_exit_instruction_information_lgdt_index_reg_invalid();
705  void test_vmcs_vm_exit_instruction_information_lgdt_base_reg();
706  void test_vmcs_vm_exit_instruction_information_lgdt_base_reg_invalid();
707  void test_vmcs_vm_exit_instruction_information_lgdt_instruction_identity();
708  void test_vmcs_vm_exit_instruction_information_sidt();
709  void test_vmcs_vm_exit_instruction_information_sidt_scaling();
710  void test_vmcs_vm_exit_instruction_information_sidt_address_size();
711  void test_vmcs_vm_exit_instruction_information_sidt_operand_size();
712  void test_vmcs_vm_exit_instruction_information_sidt_segment_register();
713  void test_vmcs_vm_exit_instruction_information_sidt_index_reg();
714  void test_vmcs_vm_exit_instruction_information_sidt_index_reg_invalid();
715  void test_vmcs_vm_exit_instruction_information_sidt_base_reg();
716  void test_vmcs_vm_exit_instruction_information_sidt_base_reg_invalid();
717  void test_vmcs_vm_exit_instruction_information_sidt_instruction_identity();
718  void test_vmcs_vm_exit_instruction_information_sgdt();
719  void test_vmcs_vm_exit_instruction_information_sgdt_scaling();
720  void test_vmcs_vm_exit_instruction_information_sgdt_address_size();
721  void test_vmcs_vm_exit_instruction_information_sgdt_operand_size();
722  void test_vmcs_vm_exit_instruction_information_sgdt_segment_register();
723  void test_vmcs_vm_exit_instruction_information_sgdt_index_reg();
724  void test_vmcs_vm_exit_instruction_information_sgdt_index_reg_invalid();
725  void test_vmcs_vm_exit_instruction_information_sgdt_base_reg();
726  void test_vmcs_vm_exit_instruction_information_sgdt_base_reg_invalid();
727  void test_vmcs_vm_exit_instruction_information_sgdt_instruction_identity();
728  void test_vmcs_vm_exit_instruction_information_lldt();
729  void test_vmcs_vm_exit_instruction_information_lldt_scaling();
730  void test_vmcs_vm_exit_instruction_information_lldt_reg1();
731  void test_vmcs_vm_exit_instruction_information_lldt_address_size();
732  void test_vmcs_vm_exit_instruction_information_lldt_mem_reg();
733  void test_vmcs_vm_exit_instruction_information_lldt_segment_register();
734  void test_vmcs_vm_exit_instruction_information_lldt_index_reg();
735  void test_vmcs_vm_exit_instruction_information_lldt_index_reg_invalid();
736  void test_vmcs_vm_exit_instruction_information_lldt_base_reg();
737  void test_vmcs_vm_exit_instruction_information_lldt_base_reg_invalid();
738  void test_vmcs_vm_exit_instruction_information_lldt_instruction_identity();
739  void test_vmcs_vm_exit_instruction_information_ltr();
740  void test_vmcs_vm_exit_instruction_information_ltr_scaling();
741  void test_vmcs_vm_exit_instruction_information_ltr_reg1();
742  void test_vmcs_vm_exit_instruction_information_ltr_address_size();
743  void test_vmcs_vm_exit_instruction_information_ltr_mem_reg();
744  void test_vmcs_vm_exit_instruction_information_ltr_segment_register();
745  void test_vmcs_vm_exit_instruction_information_ltr_index_reg();
746  void test_vmcs_vm_exit_instruction_information_ltr_index_reg_invalid();
747  void test_vmcs_vm_exit_instruction_information_ltr_base_reg();
748  void test_vmcs_vm_exit_instruction_information_ltr_base_reg_invalid();
749  void test_vmcs_vm_exit_instruction_information_ltr_instruction_identity();
750  void test_vmcs_vm_exit_instruction_information_sldt();
751  void test_vmcs_vm_exit_instruction_information_sldt_scaling();
752  void test_vmcs_vm_exit_instruction_information_sldt_reg1();
753  void test_vmcs_vm_exit_instruction_information_sldt_address_size();
754  void test_vmcs_vm_exit_instruction_information_sldt_mem_reg();
755  void test_vmcs_vm_exit_instruction_information_sldt_segment_register();
756  void test_vmcs_vm_exit_instruction_information_sldt_index_reg();
757  void test_vmcs_vm_exit_instruction_information_sldt_index_reg_invalid();
758  void test_vmcs_vm_exit_instruction_information_sldt_base_reg();
759  void test_vmcs_vm_exit_instruction_information_sldt_base_reg_invalid();
760  void test_vmcs_vm_exit_instruction_information_sldt_instruction_identity();
761  void test_vmcs_vm_exit_instruction_information_str();
762  void test_vmcs_vm_exit_instruction_information_str_scaling();
763  void test_vmcs_vm_exit_instruction_information_str_reg1();
764  void test_vmcs_vm_exit_instruction_information_str_address_size();
765  void test_vmcs_vm_exit_instruction_information_str_mem_reg();
766  void test_vmcs_vm_exit_instruction_information_str_segment_register();
767  void test_vmcs_vm_exit_instruction_information_str_index_reg();
768  void test_vmcs_vm_exit_instruction_information_str_index_reg_invalid();
769  void test_vmcs_vm_exit_instruction_information_str_base_reg();
770  void test_vmcs_vm_exit_instruction_information_str_base_reg_invalid();
771  void test_vmcs_vm_exit_instruction_information_str_instruction_identity();
772  void test_vmcs_vm_exit_instruction_information_rdrand();
773  void test_vmcs_vm_exit_instruction_information_rdrand_destination_register();
774  void test_vmcs_vm_exit_instruction_information_rdrand_operand_size();
775  void test_vmcs_vm_exit_instruction_information_rdseed();
776  void test_vmcs_vm_exit_instruction_information_rdseed_destination_register();
777  void test_vmcs_vm_exit_instruction_information_rdseed_operand_size();
778  void test_vmcs_vm_exit_instruction_information_vmclear();
779  void test_vmcs_vm_exit_instruction_information_vmclear_scaling();
780  void test_vmcs_vm_exit_instruction_information_vmclear_address_size();
781  void test_vmcs_vm_exit_instruction_information_vmclear_segment_register();
782  void test_vmcs_vm_exit_instruction_information_vmclear_index_reg();
783  void test_vmcs_vm_exit_instruction_information_vmclear_index_reg_invalid();
784  void test_vmcs_vm_exit_instruction_information_vmclear_base_reg();
785  void test_vmcs_vm_exit_instruction_information_vmclear_base_reg_invalid();
786  void test_vmcs_vm_exit_instruction_information_vmptrld();
787  void test_vmcs_vm_exit_instruction_information_vmptrld_scaling();
788  void test_vmcs_vm_exit_instruction_information_vmptrld_address_size();
789  void test_vmcs_vm_exit_instruction_information_vmptrld_segment_register();
790  void test_vmcs_vm_exit_instruction_information_vmptrld_index_reg();
791  void test_vmcs_vm_exit_instruction_information_vmptrld_index_reg_invalid();
792  void test_vmcs_vm_exit_instruction_information_vmptrld_base_reg();
793  void test_vmcs_vm_exit_instruction_information_vmptrld_base_reg_invalid();
794  void test_vmcs_vm_exit_instruction_information_vmptrst();
795  void test_vmcs_vm_exit_instruction_information_vmptrst_scaling();
796  void test_vmcs_vm_exit_instruction_information_vmptrst_address_size();
797  void test_vmcs_vm_exit_instruction_information_vmptrst_segment_register();
798  void test_vmcs_vm_exit_instruction_information_vmptrst_index_reg();
799  void test_vmcs_vm_exit_instruction_information_vmptrst_index_reg_invalid();
800  void test_vmcs_vm_exit_instruction_information_vmptrst_base_reg();
801  void test_vmcs_vm_exit_instruction_information_vmptrst_base_reg_invalid();
802  void test_vmcs_vm_exit_instruction_information_vmxon();
803  void test_vmcs_vm_exit_instruction_information_vmxon_scaling();
804  void test_vmcs_vm_exit_instruction_information_vmxon_address_size();
805  void test_vmcs_vm_exit_instruction_information_vmxon_segment_register();
806  void test_vmcs_vm_exit_instruction_information_vmxon_index_reg();
807  void test_vmcs_vm_exit_instruction_information_vmxon_index_reg_invalid();
808  void test_vmcs_vm_exit_instruction_information_vmxon_base_reg();
809  void test_vmcs_vm_exit_instruction_information_vmxon_base_reg_invalid();
810  void test_vmcs_vm_exit_instruction_information_xrstors();
811  void test_vmcs_vm_exit_instruction_information_xrstors_scaling();
812  void test_vmcs_vm_exit_instruction_information_xrstors_address_size();
813  void test_vmcs_vm_exit_instruction_information_xrstors_segment_register();
814  void test_vmcs_vm_exit_instruction_information_xrstors_index_reg();
815  void test_vmcs_vm_exit_instruction_information_xrstors_index_reg_invalid();
816  void test_vmcs_vm_exit_instruction_information_xrstors_base_reg();
817  void test_vmcs_vm_exit_instruction_information_xrstors_base_reg_invalid();
818  void test_vmcs_vm_exit_instruction_information_xsaves();
819  void test_vmcs_vm_exit_instruction_information_xsaves_scaling();
820  void test_vmcs_vm_exit_instruction_information_xsaves_address_size();
821  void test_vmcs_vm_exit_instruction_information_xsaves_segment_register();
822  void test_vmcs_vm_exit_instruction_information_xsaves_index_reg();
823  void test_vmcs_vm_exit_instruction_information_xsaves_index_reg_invalid();
824  void test_vmcs_vm_exit_instruction_information_xsaves_base_reg();
825  void test_vmcs_vm_exit_instruction_information_xsaves_base_reg_invalid();
826  void test_vmcs_vm_exit_instruction_information_vmread();
827  void test_vmcs_vm_exit_instruction_information_vmread_scaling();
828  void test_vmcs_vm_exit_instruction_information_vmread_reg1();
829  void test_vmcs_vm_exit_instruction_information_vmread_address_size();
830  void test_vmcs_vm_exit_instruction_information_vmread_mem_reg();
831  void test_vmcs_vm_exit_instruction_information_vmread_segment_register();
832  void test_vmcs_vm_exit_instruction_information_vmread_index_reg();
833  void test_vmcs_vm_exit_instruction_information_vmread_index_reg_invalid();
834  void test_vmcs_vm_exit_instruction_information_vmread_base_reg();
835  void test_vmcs_vm_exit_instruction_information_vmread_base_reg_invalid();
836  void test_vmcs_vm_exit_instruction_information_vmread_reg2();
837  void test_vmcs_vm_exit_instruction_information_vmwrite();
838  void test_vmcs_vm_exit_instruction_information_vmwrite_scaling();
839  void test_vmcs_vm_exit_instruction_information_vmwrite_reg1();
840  void test_vmcs_vm_exit_instruction_information_vmwrite_address_size();
841  void test_vmcs_vm_exit_instruction_information_vmwrite_mem_reg();
842  void test_vmcs_vm_exit_instruction_information_vmwrite_segment_register();
843  void test_vmcs_vm_exit_instruction_information_vmwrite_index_reg();
844  void test_vmcs_vm_exit_instruction_information_vmwrite_index_reg_invalid();
845  void test_vmcs_vm_exit_instruction_information_vmwrite_base_reg();
846  void test_vmcs_vm_exit_instruction_information_vmwrite_base_reg_invalid();
847  void test_vmcs_vm_exit_instruction_information_vmwrite_reg2();
848  void test_vmcs_exit_qualification();
849  void test_vmcs_exit_qualification_debug_exception();
850  void test_vmcs_exit_qualification_debug_exception_b0();
851  void test_vmcs_exit_qualification_debug_exception_b1();
852  void test_vmcs_exit_qualification_debug_exception_b2();
853  void test_vmcs_exit_qualification_debug_exception_b3();
854  void test_vmcs_exit_qualification_debug_exception_reserved();
855  void test_vmcs_exit_qualification_debug_exception_bd();
856  void test_vmcs_exit_qualification_debug_exception_bs();
857  void test_vmcs_exit_qualification_page_fault_exception();
858  void test_vmcs_exit_qualification_sipi();
859  void test_vmcs_exit_qualification_sipi_vector();
860  void test_vmcs_exit_qualification_task_switch();
861  void test_vmcs_exit_qualification_task_switch_tss_selector();
862  void test_vmcs_exit_qualification_task_switch_reserved();
863  void test_vmcs_exit_qualification_task_switch_source_of_task_switch_init();
864  void test_vmcs_exit_qualification_invept();
865  void test_vmcs_exit_qualification_invpcid();
866  void test_vmcs_exit_qualification_invvpid();
867  void test_vmcs_exit_qualification_lgdt();
868  void test_vmcs_exit_qualification_lidt();
869  void test_vmcs_exit_qualification_lldt();
870  void test_vmcs_exit_qualification_ltr();
871  void test_vmcs_exit_qualification_sgdt();
872  void test_vmcs_exit_qualification_sidt();
873  void test_vmcs_exit_qualification_sldt();
874  void test_vmcs_exit_qualification_str();
875  void test_vmcs_exit_qualification_vmclear();
876  void test_vmcs_exit_qualification_vmptrld();
877  void test_vmcs_exit_qualification_vmread();
878  void test_vmcs_exit_qualification_vmwrite();
879  void test_vmcs_exit_qualification_vmxon();
880  void test_vmcs_exit_qualification_xrstors();
881  void test_vmcs_exit_qualification_xsaves();
882  void test_vmcs_exit_qualification_control_register_access();
883  void test_vmcs_exit_qualification_control_register_access_control_register_number();
884  void test_vmcs_exit_qualification_control_register_access_access_type();
885  void test_vmcs_exit_qualification_control_register_access_lmsw_operand_type();
886  void test_vmcs_exit_qualification_control_register_access_reserved();
887  void test_vmcs_exit_qualification_control_register_access_general_purpose_register();
888  void test_vmcs_exit_qualification_control_register_access_source_data();
889  void test_vmcs_exit_qualification_mov_dr();
890  void test_vmcs_exit_qualification_mov_dr_debug_register_number();
891  void test_vmcs_exit_qualification_mov_dr_reserved();
892  void test_vmcs_exit_qualification_mov_dr_direction_of_access();
893  void test_vmcs_exit_qualification_mov_dr_general_purpose_register();
894  void test_vmcs_exit_qualification_io_instruction();
895  void test_vmcs_exit_qualification_io_instruction_size_of_access();
896  void test_vmcs_exit_qualification_io_instruction_direction_of_access();
897  void test_vmcs_exit_qualification_io_instruction_string_instruction();
898  void test_vmcs_exit_qualification_io_instruction_rep_prefixed();
899  void test_vmcs_exit_qualification_io_instruction_operand_encoding();
900  void test_vmcs_exit_qualification_io_instruction_reserved();
901  void test_vmcs_exit_qualification_io_instruction_port_number();
902  void test_vmcs_exit_qualification_mwait();
903  void test_vmcs_exit_qualification_linear_apic_access();
904  void test_vmcs_exit_qualification_linear_apic_access_offset();
905  void test_vmcs_exit_qualification_linear_apic_access_access_type();
906  void test_vmcs_exit_qualification_linear_apic_access_reserved();
907  void test_vmcs_exit_qualification_guest_physical_apic_access();
908  void test_vmcs_exit_qualification_guest_physical_apic_access_access_type();
909  void test_vmcs_exit_qualification_guest_physical_apic_access_reserved();
910  void test_vmcs_exit_qualification_ept_violation();
911  void test_vmcs_exit_qualification_ept_violation_data_read();
912  void test_vmcs_exit_qualification_ept_violation_data_write();
913  void test_vmcs_exit_qualification_ept_violation_instruction_fetch();
914  void test_vmcs_exit_qualification_ept_violation_readable();
915  void test_vmcs_exit_qualification_ept_violation_writeable();
916  void test_vmcs_exit_qualification_ept_violation_executable();
917  void test_vmcs_exit_qualification_ept_violation_reserved();
918  void test_vmcs_exit_qualification_ept_violation_valid_guest_linear_address();
919  void test_vmcs_exit_qualification_ept_violation_nmi_unblocking_due_to_iret();
920  void test_vmcs_exit_qualification_eoi_virtualization();
921  void test_vmcs_exit_qualification_eoi_virtualization_vector();
922  void test_vmcs_exit_qualification_apic_write();
923  void test_vmcs_exit_qualification_apic_write_offset();
924  void test_vmcs_io_rcx();
925  void test_vmcs_io_rsi();
926  void test_vmcs_io_rdi();
927  void test_vmcs_io_rip();
928  void test_vmcs_guest_linear_address();
929  void test_vmcs_vmcs_link_pointer();
930  void test_vmcs_guest_ia32_debugctl();
931  void test_vmcs_guest_ia32_debugctl_lbr();
932  void test_vmcs_guest_ia32_debugctl_btf();
933  void test_vmcs_guest_ia32_debugctl_tr();
934  void test_vmcs_guest_ia32_debugctl_bts();
935  void test_vmcs_guest_ia32_debugctl_btint();
936  void test_vmcs_guest_ia32_debugctl_bt_off_os();
937  void test_vmcs_guest_ia32_debugctl_bt_off_user();
938  void test_vmcs_guest_ia32_debugctl_freeze_lbrs_on_pmi();
939  void test_vmcs_guest_ia32_debugctl_freeze_perfmon_on_pmi();
940  void test_vmcs_guest_ia32_debugctl_enable_uncore_pmi();
941  void test_vmcs_guest_ia32_debugctl_freeze_while_smm();
942  void test_vmcs_guest_ia32_debugctl_rtm_debug();
943  void test_vmcs_guest_ia32_debugctl_reserved();
944  void test_vmcs_guest_ia32_pat();
945  void test_vmcs_guest_ia32_pat_pa0();
946  void test_vmcs_guest_ia32_pat_pa0_memory_type();
947  void test_vmcs_guest_ia32_pat_pa0_reserved();
948  void test_vmcs_guest_ia32_pat_pa1();
949  void test_vmcs_guest_ia32_pat_pa1_memory_type();
950  void test_vmcs_guest_ia32_pat_pa1_reserved();
951  void test_vmcs_guest_ia32_pat_pa2();
952  void test_vmcs_guest_ia32_pat_pa2_memory_type();
953  void test_vmcs_guest_ia32_pat_pa2_reserved();
954  void test_vmcs_guest_ia32_pat_pa3();
955  void test_vmcs_guest_ia32_pat_pa3_memory_type();
956  void test_vmcs_guest_ia32_pat_pa3_reserved();
957  void test_vmcs_guest_ia32_pat_pa4();
958  void test_vmcs_guest_ia32_pat_pa4_memory_type();
959  void test_vmcs_guest_ia32_pat_pa4_reserved();
960  void test_vmcs_guest_ia32_pat_pa5();
961  void test_vmcs_guest_ia32_pat_pa5_memory_type();
962  void test_vmcs_guest_ia32_pat_pa5_reserved();
963  void test_vmcs_guest_ia32_pat_pa6();
964  void test_vmcs_guest_ia32_pat_pa6_memory_type();
965  void test_vmcs_guest_ia32_pat_pa6_reserved();
966  void test_vmcs_guest_ia32_pat_pa7();
967  void test_vmcs_guest_ia32_pat_pa7_memory_type();
968  void test_vmcs_guest_ia32_pat_pa7_reserved();
969  void test_vmcs_guest_ia32_efer();
970  void test_vmcs_guest_ia32_efer_sce();
971  void test_vmcs_guest_ia32_efer_lme();
972  void test_vmcs_guest_ia32_efer_lma();
973  void test_vmcs_guest_ia32_efer_nxe();
974  void test_vmcs_guest_ia32_efer_reserved();
975  void test_vmcs_guest_ia32_perf_global_ctrl();
976  void test_vmcs_guest_ia32_perf_global_ctrl_reserved();
977  void test_vmcs_guest_pdpte0();
978  void test_vmcs_guest_pdpte0_present();
979  void test_vmcs_guest_pdpte0_reserved();
980  void test_vmcs_guest_pdpte0_pwt();
981  void test_vmcs_guest_pdpte0_pcd();
982  void test_vmcs_guest_pdpte0_page_directory_addr();
983  void test_vmcs_guest_pdpte1();
984  void test_vmcs_guest_pdpte1_present();
985  void test_vmcs_guest_pdpte1_reserved();
986  void test_vmcs_guest_pdpte1_pwt();
987  void test_vmcs_guest_pdpte1_pcd();
988  void test_vmcs_guest_pdpte1_page_directory_addr();
989  void test_vmcs_guest_pdpte2();
990  void test_vmcs_guest_pdpte2_present();
991  void test_vmcs_guest_pdpte2_reserved();
992  void test_vmcs_guest_pdpte2_pwt();
993  void test_vmcs_guest_pdpte2_pcd();
994  void test_vmcs_guest_pdpte2_page_directory_addr();
995  void test_vmcs_guest_pdpte3();
996  void test_vmcs_guest_pdpte3_present();
997  void test_vmcs_guest_pdpte3_reserved();
998  void test_vmcs_guest_pdpte3_pwt();
999  void test_vmcs_guest_pdpte3_pcd();
1000  void test_vmcs_guest_pdpte3_page_directory_addr();
1001  void test_vmcs_guest_ia32_bndcfgs();
1002  void test_vmcs_guest_ia32_bndcfgs_en();
1003  void test_vmcs_guest_ia32_bndcfgs_bndpreserve();
1004  void test_vmcs_guest_ia32_bndcfgs_reserved();
1005  void test_vmcs_guest_ia32_bndcfgs_base_addr_of_bnd_directory();
1006 
1007  void test_check_control_vmx_controls_all();
1008  void test_check_control_vm_execution_control_fields_all();
1009  void test_check_control_pin_based_ctls_reserved_properly_set();
1010  void test_check_control_proc_based_ctls_reserved_properly_set();
1011  void test_check_control_proc_based_ctls2_reserved_properly_set();
1012  void test_check_control_cr3_count_less_than_4();
1013  void test_check_control_io_bitmap_address_bits();
1014  void test_check_control_msr_bitmap_address_bits();
1015  void test_check_control_tpr_shadow_and_virtual_apic();
1016  void test_check_control_nmi_exiting_and_virtual_nmi();
1017  void test_check_control_virtual_nmi_and_nmi_window();
1018  void test_check_control_virtual_apic_address_bits();
1019  void test_check_control_x2apic_mode_and_virtual_apic_access();
1020  void test_check_control_virtual_interrupt_and_external_interrupt();
1021  void test_check_control_process_posted_interrupt_checks();
1022  void test_check_control_vpid_checks();
1023  void test_check_control_enable_ept_checks();
1024  void test_check_control_unrestricted_guests();
1025  void test_check_control_enable_vm_functions();
1026  void test_check_control_enable_vmcs_shadowing();
1027  void test_check_control_enable_ept_violation_checks();
1028  void test_check_control_enable_pml_checks();
1029 
1030  void test_check_control_vm_exit_control_fields_all();
1031  void test_check_control_vm_exit_ctls_reserved_properly_set();
1032  void test_check_control_activate_and_save_preemption_timer_must_be_0();
1033  void test_check_control_exit_msr_store_address();
1034  void test_check_control_exit_msr_load_address();
1035 
1036  void test_check_control_vm_entry_control_fields_all();
1037  void test_check_control_vm_entry_ctls_reserved_properly_set();
1038  void test_check_control_event_injection_type_vector_checks();
1039  void test_check_control_event_injection_delivery_ec_checks();
1040  void test_check_control_event_injection_reserved_bits_checks();
1041  void test_check_control_event_injection_ec_checks();
1042  void test_check_control_event_injection_instr_length_checks();
1043  void test_check_control_entry_msr_load_address();
1044 
1045  void test_check_host_state_all();
1046  void test_check_host_control_registers_and_msrs_all();
1047  void test_check_host_cr0_for_unsupported_bits();
1048  void test_check_host_cr4_for_unsupported_bits();
1049  void test_check_host_cr3_for_unsupported_bits();
1050  void test_check_host_ia32_sysenter_esp_canonical_address();
1051  void test_check_host_ia32_sysenter_eip_canonical_address();
1052  void test_check_host_verify_load_ia32_perf_global_ctrl();
1053  void test_check_host_verify_load_ia32_pat();
1054  void test_check_host_verify_load_ia32_efer();
1055 
1056  void test_check_host_segment_and_descriptor_table_registers_all();
1057  void test_check_host_es_selector_rpl_ti_equal_zero();
1058  void test_check_host_cs_selector_rpl_ti_equal_zero();
1059  void test_check_host_ss_selector_rpl_ti_equal_zero();
1060  void test_check_host_ds_selector_rpl_ti_equal_zero();
1061  void test_check_host_fs_selector_rpl_ti_equal_zero();
1062  void test_check_host_gs_selector_rpl_ti_equal_zero();
1063  void test_check_host_tr_selector_rpl_ti_equal_zero();
1064  void test_check_host_cs_not_equal_zero();
1065  void test_check_host_tr_not_equal_zero();
1066  void test_check_host_ss_not_equal_zero();
1067  void test_check_host_fs_canonical_base_address();
1068  void test_check_host_gs_canonical_base_address();
1069  void test_check_host_gdtr_canonical_base_address();
1070  void test_check_host_idtr_canonical_base_address();
1071  void test_check_host_tr_canonical_base_address();
1072 
1073  void test_check_host_address_space_size_all();
1074  void test_check_host_if_outside_ia32e_mode();
1075  void test_check_host_address_space_size_exit_ctl_is_set();
1076  void test_check_host_address_space_disabled();
1077  void test_check_host_address_space_enabled();
1078 
1079  void test_check_guest_state_all();
1080  void test_check_guest_control_registers_debug_registers_and_msrs_all();
1081  void test_check_guest_cr0_for_unsupported_bits();
1082  void test_check_guest_cr0_verify_paging_enabled();
1083  void test_check_guest_cr4_for_unsupported_bits();
1084  void test_check_guest_load_debug_controls_verify_reserved();
1085  void test_check_guest_verify_ia_32e_mode_enabled();
1086  void test_check_guest_verify_ia_32e_mode_disabled();
1087  void test_check_guest_cr3_for_unsupported_bits();
1088  void test_check_guest_load_debug_controls_verify_dr7();
1089  void test_check_guest_ia32_sysenter_esp_canonical_address();
1090  void test_check_guest_ia32_sysenter_eip_canonical_address();
1091  void test_check_guest_verify_load_ia32_perf_global_ctrl();
1092  void test_check_guest_verify_load_ia32_pat();
1093  void test_check_guest_verify_load_ia32_efer();
1094  void test_check_guest_verify_load_ia32_bndcfgs();
1095 
1096  void test_check_guest_segment_registers_all();
1097  void test_check_guest_tr_ti_bit_equals_0();
1098  void test_check_guest_ldtr_ti_bit_equals_0();
1099  void test_check_guest_ss_and_cs_rpl_are_the_same();
1100  void test_check_guest_cs_base_is_shifted();
1101  void test_check_guest_ss_base_is_shifted();
1102  void test_check_guest_ds_base_is_shifted();
1103  void test_check_guest_es_base_is_shifted();
1104  void test_check_guest_fs_base_is_shifted();
1105  void test_check_guest_gs_base_is_shifted();
1106  void test_check_guest_tr_base_is_canonical();
1107  void test_check_guest_fs_base_is_canonical();
1108  void test_check_guest_gs_base_is_canonical();
1109  void test_check_guest_ldtr_base_is_canonical();
1110  void test_check_guest_cs_base_upper_dword_0();
1111  void test_check_guest_ss_base_upper_dword_0();
1112  void test_check_guest_ds_base_upper_dword_0();
1113  void test_check_guest_es_base_upper_dword_0();
1114  void test_check_guest_cs_limit();
1115  void test_check_guest_ss_limit();
1116  void test_check_guest_ds_limit();
1117  void test_check_guest_es_limit();
1118  void test_check_guest_gs_limit();
1119  void test_check_guest_fs_limit();
1120  void test_check_guest_v8086_cs_access_rights();
1121  void test_check_guest_v8086_ss_access_rights();
1122  void test_check_guest_v8086_ds_access_rights();
1123  void test_check_guest_v8086_es_access_rights();
1124  void test_check_guest_v8086_fs_access_rights();
1125  void test_check_guest_v8086_gs_access_rights();
1126  void test_check_guest_cs_access_rights_type();
1127  void test_check_guest_ss_access_rights_type();
1128  void test_check_guest_ds_access_rights_type();
1129  void test_check_guest_es_access_rights_type();
1130  void test_check_guest_fs_access_rights_type();
1131  void test_check_guest_gs_access_rights_type();
1132  void test_check_guest_cs_is_not_a_system_descriptor();
1133  void test_check_guest_ss_is_not_a_system_descriptor();
1134  void test_check_guest_ds_is_not_a_system_descriptor();
1135  void test_check_guest_es_is_not_a_system_descriptor();
1136  void test_check_guest_fs_is_not_a_system_descriptor();
1137  void test_check_guest_gs_is_not_a_system_descriptor();
1138  void test_check_guest_cs_type_not_equal_3();
1139  void test_check_guest_cs_dpl_adheres_to_ss_dpl();
1140  void test_check_guest_ss_dpl_must_equal_rpl();
1141  void test_check_guest_ss_dpl_must_equal_zero();
1142  void test_check_guest_ds_dpl();
1143  void test_check_guest_es_dpl();
1144  void test_check_guest_fs_dpl();
1145  void test_check_guest_gs_dpl();
1146  void test_check_guest_cs_must_be_present();
1147  void test_check_guest_ss_must_be_present_if_usable();
1148  void test_check_guest_ds_must_be_present_if_usable();
1149  void test_check_guest_es_must_be_present_if_usable();
1150  void test_check_guest_fs_must_be_present_if_usable();
1151  void test_check_guest_gs_must_be_present_if_usable();
1152  void test_check_guest_cs_access_rights_reserved_must_be_0();
1153  void test_check_guest_ss_access_rights_reserved_must_be_0();
1154  void test_check_guest_ds_access_rights_reserved_must_be_0();
1155  void test_check_guest_es_access_rights_reserved_must_be_0();
1156  void test_check_guest_fs_access_rights_reserved_must_be_0();
1157  void test_check_guest_gs_access_rights_reserved_must_be_0();
1158  void test_check_guest_cs_db_must_be_0_if_l_equals_1();
1159  void test_check_guest_cs_granularity();
1160  void test_check_guest_ss_granularity();
1161  void test_check_guest_ds_granularity();
1162  void test_check_guest_es_granularity();
1163  void test_check_guest_fs_granularity();
1164  void test_check_guest_gs_granularity();
1165  void test_check_guest_cs_access_rights_remaining_reserved_bit_0();
1166  void test_check_guest_ss_access_rights_remaining_reserved_bit_0();
1167  void test_check_guest_ds_access_rights_remaining_reserved_bit_0();
1168  void test_check_guest_es_access_rights_remaining_reserved_bit_0();
1169  void test_check_guest_fs_access_rights_remaining_reserved_bit_0();
1170  void test_check_guest_gs_access_rights_remaining_reserved_bit_0();
1171  void test_check_guest_tr_type_must_be_11();
1172  void test_check_guest_tr_must_be_a_system_descriptor();
1173  void test_check_guest_tr_must_be_present();
1174  void test_check_guest_tr_access_rights_reserved_must_be_0();
1175  void test_check_guest_tr_granularity();
1176  void test_check_guest_tr_must_be_usable();
1177  void test_check_guest_tr_access_rights_remaining_reserved_bit_0();
1178  void test_check_guest_ldtr_type_must_be_2();
1179  void test_check_guest_ldtr_must_be_a_system_descriptor();
1180  void test_check_guest_ldtr_must_be_present();
1181  void test_check_guest_ldtr_access_rights_reserved_must_be_0();
1182  void test_check_guest_ldtr_granularity();
1183  void test_check_guest_ldtr_access_rights_remaining_reserved_bit_0();
1184 
1185  void test_check_guest_descriptor_table_registers_all();
1186  void test_check_guest_gdtr_base_must_be_canonical();
1187  void test_check_guest_idtr_base_must_be_canonical();
1188  void test_check_guest_gdtr_limit_reserved_bits();
1189  void test_check_guest_idtr_limit_reserved_bits();
1190 
1191  void test_check_guest_rip_and_rflags_all();
1192  void test_check_guest_rip_upper_bits();
1193  void test_check_guest_rip_valid_addr();
1194  void test_check_guest_rflags_reserved_bits();
1195  void test_check_guest_rflags_vm_bit();
1196  void test_check_guest_rflag_interrupt_enable();
1197 
1198  void test_check_guest_non_register_state_all();
1199  void test_check_guest_valid_activity_state();
1200  void test_check_guest_activity_state_not_hlt_when_dpl_not_0();
1201  void test_check_guest_must_be_active_if_injecting_blocking_state();
1202  void test_check_guest_hlt_valid_interrupts();
1203  void test_check_guest_shutdown_valid_interrupts();
1204  void test_check_guest_sipi_valid_interrupts();
1205  void test_check_guest_valid_activity_state_and_smm();
1206  void test_check_guest_interruptibility_state_reserved();
1207  void test_check_guest_interruptibility_state_sti_mov_ss();
1208  void test_check_guest_interruptibility_state_sti();
1209  void test_check_guest_interruptibility_state_external_interrupt();
1210  void test_check_guest_interruptibility_state_nmi();
1211  void test_check_guest_interruptibility_not_in_smm();
1212  void test_check_guest_interruptibility_entry_to_smm();
1213  void test_check_guest_interruptibility_state_sti_and_nmi();
1214  void test_check_guest_interruptibility_state_virtual_nmi();
1215  void test_check_guest_interruptibility_state_enclave_interrupt();
1216  void test_check_guest_pending_debug_exceptions_reserved();
1217  void test_check_guest_pending_debug_exceptions_dbg_ctl();
1218  void test_check_guest_pending_debug_exceptions_rtm();
1219  void test_check_guest_vmcs_link_pointer_bits_11_0();
1220  void test_check_guest_vmcs_link_pointer_valid_addr();
1221  void test_check_guest_vmcs_link_pointer_first_word();
1222 
1223  void test_check_guest_pdptes_all();
1224  void test_check_guest_valid_pdpte_with_ept_disabled();
1225  void test_check_guest_valid_pdpte_with_ept_enabled();
1226 
1227  void test_check_control_reserved_properly_set();
1228  void test_check_memory_type_reserved();
1229 
1230  void test_debug_dump();
1231  void test_debug_dump_16bit_control_fields();
1232  void test_debug_dump_16bit_guest_state_fields();
1233  void test_debug_dump_16bit_host_state_fields();
1234  void test_debug_dump_64bit_control_fields();
1235  void test_debug_dump_64bit_read_only_data_field();
1236  void test_debug_dump_64bit_guest_state_fields();
1237  void test_debug_dump_64bit_host_state_fields();
1238  void test_debug_dump_32bit_control_fields();
1239  void test_debug_dump_32bit_read_only_data_fields();
1240  void test_debug_dump_32bit_guest_state_fields();
1241  void test_debug_dump_32bit_host_state_field();
1242  void test_debug_dump_natural_width_control_fields();
1243  void test_debug_dump_natural_width_read_only_data_fields();
1244  void test_debug_dump_natural_width_guest_state_fields();
1245  void test_debug_dump_natural_width_host_state_fields();
1246  void test_debug_dump_vmx_controls();
1247  void test_debug_dump_pin_based_vm_execution_controls();
1248  void test_debug_dump_primary_processor_based_vm_execution_controls();
1249  void test_debug_dump_secondary_processor_based_vm_execution_controls();
1250  void test_debug_dump_vm_exit_control_fields();
1251  void test_debug_dump_vm_entry_control_fields();
1252  void test_debug_dump_vmcs_field();
1253  void test_debug_dump_vm_control();
1254 
1255  void test_state();
1256  void test_state_segment_registers();
1257  void test_state_control_registers();
1258  void test_state_debug_registers();
1259  void test_state_rflags();
1260  void test_state_gdt_base();
1261  void test_state_idt_base();
1262  void test_state_gdt_limit();
1263  void test_state_idt_limit();
1264  void test_state_segment_registers_limit();
1265  void test_state_segment_registers_access_rights();
1266  void test_state_segment_register_base();
1267  void test_state_msrs();
1268  void test_state_is_guest();
1269  void test_state_dump();
1270 
1271  void test_host_vm_state();
1272  void test_host_vm_state_segment_registers();
1273  void test_host_vm_state_control_registers();
1274  void test_host_vm_state_debug_registers();
1275  void test_host_vm_state_rflags();
1276  void test_host_vm_state_gdt_base();
1277  void test_host_vm_state_idt_base();
1278  void test_host_vm_state_gdt_limit();
1279  void test_host_vm_state_idt_limit();
1280  void test_host_vm_state_es_limit();
1281  void test_host_vm_state_cs_limit();
1282  void test_host_vm_state_ss_limit();
1283  void test_host_vm_state_ds_limit();
1284  void test_host_vm_state_fs_limit();
1285  void test_host_vm_state_gs_limit();
1286  void test_host_vm_state_tr_limit();
1287  void test_host_vm_state_ldtr_limit();
1288  void test_host_vm_state_es_access_rights();
1289  void test_host_vm_state_cs_access_rights();
1290  void test_host_vm_state_ss_access_rights();
1291  void test_host_vm_state_ds_access_rights();
1292  void test_host_vm_state_fs_access_rights();
1293  void test_host_vm_state_gs_access_rights();
1294  void test_host_vm_state_tr_access_rights();
1295  void test_host_vm_state_ldtr_access_rights();
1296  void test_host_vm_state_es_base();
1297  void test_host_vm_state_cs_base();
1298  void test_host_vm_state_ss_base();
1299  void test_host_vm_state_ds_base();
1300  void test_host_vm_state_fs_base();
1301  void test_host_vm_state_gs_base();
1302  void test_host_vm_state_tr_base();
1303  void test_host_vm_state_ldtr_base();
1304  void test_host_vm_state_ia32_msrs();
1305  void test_host_vm_state_ia32_msrs_with_perf_global_ctrl();
1306  void test_host_vm_state_ia32_msrs_without_perf_global_ctrl();
1307  void test_host_vm_state_dump();
1308 
1309  void test_vmm_state_gdt_not_setup();
1310  void test_vmm_state();
1311  void test_vmm_state_segment_registers();
1312  void test_vmm_state_control_registers();
1313  void test_vmm_state_rflags();
1314  void test_vmm_state_gdt_base();
1315  void test_vmm_state_idt_base();
1316  void test_vmm_state_gdt_limit();
1317  void test_vmm_state_idt_limit();
1318  void test_vmm_state_segment_registers_limit();
1319  void test_vmm_state_segment_registers_access_rights();
1320  void test_vmm_state_segment_registers_base();
1321  void test_vmm_state_ia32_efer_msr();
1322  void test_vmm_state_dump();
1323 };
1324 
1325 #endif
uint8_t g_virt_apic_mem[0x81]
Definition: test.cpp:45
void entry_ctl_allow0(uint64_t mask)
Definition: test.cpp:114
void proc_ctl_allow1(uint64_t mask)
Definition: test.cpp:70
std::map< uint64_t, uint64_t > g_vmcs_fields
Definition: test.cpp:32
void exit_ctl_allow1(uint64_t mask)
Definition: test.cpp:102
#define RUN_UNITTEST_WITH_MOCKS(a, b)
Definition: unittest.h:229
bool g_virt_to_phys_return_nullptr
Definition: test.cpp:40
uintptr_t g_virt_apic_addr
Definition: test.cpp:44
void proc_ctl2_allow1(uint64_t mask)
Definition: test.cpp:82
void vmfunc_ctl_allow1(uint64_t mask)
Definition: test.cpp:118
constexpr const auto mask
Definition: cpuid_x64.h:85
uint64_t g_pdpt_mem[4]
Definition: test.cpp:51
bool throws_exception
Definition: test.h:44
uintptr_t g_test_addr
Definition: test.cpp:43
struct cpuid_regs g_cpuid_regs
Definition: test.cpp:35
void exit_ctl_allow0(uint64_t mask)
Definition: test.cpp:106
uintptr_t g_pdpt_addr
Definition: test.cpp:50
bool g_phys_to_virt_return_nullptr
Definition: test.cpp:41
void pin_ctl_allow1(uint64_t mask)
Definition: test.cpp:94
std::map< uint32_t, uint64_t > g_msrs
void proc_ctl2_disallow1(uint64_t mask)
Definition: test.cpp:90
std::shared_ptr< std::exception > exception
Definition: test.h:43
void * physint_to_virtptr(uintptr_t phys)
Definition: test.cpp:184
void entry_ctl_allow1(uint64_t mask)
Definition: test.cpp:110
Definition: test.h:96
uintptr_t g_vmcs_link_addr
Definition: test.cpp:47
void setup_mock(MockRepository &mocks, memory_manager_x64 *mm)
Definition: test.cpp:63
uintptr_t virtptr_to_physint(void *ptr)
Definition: test.cpp:173
void proc_ctl2_allow0(uint64_t mask)
Definition: test.cpp:86
void proc_ctl_disallow1(uint64_t mask)
Definition: test.cpp:78
void proc_ctl_allow0(uint64_t mask)
Definition: test.cpp:74
void pin_ctl_allow0(uint64_t mask)
Definition: test.cpp:98
uint32_t g_vmcs_link_mem[1]
Definition: test.cpp:48
void test_vmcs_check_with_args(gsl::cstring_span<> fut, L line, const std::vector< struct control_flow_path > &cfg, C chk)
Definition: test.h:111
std::map< uint32_t, uint32_t > g_eax_cpuid
std::function< void()> setup
Definition: test.h:42