test_vmcs_intel_x64_check_guest.cpp
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 // Author: Connor Davis <davisc@ainfosec.com>
8 //
9 // This library is free software; you can redistribute it and/or
10 // modify it under the terms of the GNU Lesser General Public
11 // License as published by the Free Software Foundation; either
12 // version 2.1 of the License, or (at your option) any later version.
13 //
14 // This library is distributed in the hope that it will be useful,
15 // but WITHOUT ANY WARRANTY; without even the implied warranty of
16 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 // Lesser General Public License for more details.
18 //
19 // You should have received a copy of the GNU Lesser General Public
20 // License along with this library; if not, write to the Free Software
21 
22 #include <test.h>
28 
29 #include <intrinsics/x64.h>
30 #include <intrinsics/pdpte_x64.h>
32 
33 using namespace intel_x64;
34 using namespace msrs;
35 using namespace vmcs;
36 
37 static struct control_flow_path path;
38 
39 static void
40 make_usable(uint32_t access_rights)
41 { g_vmcs_fields[access_rights] &= ~x64::access_rights::unusable; }
42 
43 static void
44 make_unusable(uint32_t access_rights)
45 { g_vmcs_fields[access_rights] |= x64::access_rights::unusable; }
46 
47 static void
48 enable_v8086()
50 
51 static void
52 disable_v8086()
54 
55 static void
56 setup_check_guest_control_registers_debug_registers_and_msrs_all_paths(std::vector<struct control_flow_path> &cfg)
57 {
58  path.setup = [&]
59  {
60  g_msrs[msrs::ia32_vmx_true_entry_ctls::addr] = 0xFFFFFFFF00000000ULL;
62  g_msrs[msrs::ia32_vmx_cr0_fixed1::addr] = 0xFFFFFFFFFFFFFFFFULL;
65  g_msrs[msrs::ia32_vmx_cr4_fixed1::addr] = 0xFFFFFFFFFFFFFFFFULL;
70  guest_cr3::set(0x1000UL);
77  };
78  path.throws_exception = false;
79  cfg.push_back(path);
80 }
81 
82 static void
83 setup_check_guest_segment_registers_all_paths(std::vector<struct control_flow_path> &cfg)
84 {
85  path.setup = [&]
86  {
91  guest_cs_base::set(0x10U);
93  guest_ss_base::set(0x10U);
95  guest_ds_base::set(0x10U);
97  guest_es_base::set(0x10U);
99  guest_fs_base::set(0x10U);
101  guest_gs_base::set(0x10U);
102  guest_tr_base::set(0x10U);
103  guest_cs_limit::set(0xFFFFUL);
104  guest_ss_limit::set(0xFFFFUL);
105  guest_ds_limit::set(0xFFFFUL);
106  guest_es_limit::set(0xFFFFUL);
107  guest_gs_limit::set(0xFFFFUL);
108  guest_fs_limit::set(0xFFFFUL);
119  guest_tr_limit::set(0x1UL);
122  };
123  path.throws_exception = false;
124  cfg.push_back(path);
125 }
126 
127 static void
128 setup_check_guest_descriptor_table_registers_all_paths(std::vector<struct control_flow_path> &cfg)
129 {
130  path.setup = [&]
131  {
132  guest_gdtr_base::set(0x1000UL);
133  guest_idtr_base::set(0x1000UL);
134  };
135  path.throws_exception = false;
136  cfg.push_back(path);
137 }
138 
139 static void
140 setup_check_guest_rip_and_rflags_all_paths(std::vector<struct control_flow_path> &cfg)
141 {
142  path.setup = [&]
143  {
144  g_msrs[msrs::ia32_vmx_true_entry_ctls::addr] = 0xFFFFFFFF00000000ULL;
146  guest_rip::set(0x1000U);
151  };
152  path.throws_exception = false;
153  cfg.push_back(path);
154 }
155 
156 static void
157 setup_check_guest_non_register_state_all_paths(std::vector<struct control_flow_path> &cfg)
158 {
159  path.setup = [&]
160  {
161  g_msrs[msrs::ia32_vmx_true_entry_ctls::addr] = 0xFFFFFFFF00000000ULL;
171  vmcs_link_pointer::set(0xFFFFFFFFFFFFFFFFUL);
172  };
173  path.throws_exception = false;
174  cfg.push_back(path);
175 }
176 
177 static void
178 setup_check_guest_pdptes_all_paths(std::vector<struct control_flow_path> &cfg)
179 {
180  path.setup = [&] { guest_cr0::paging::disable(); };
181  path.throws_exception = false;
182  cfg.push_back(path);
183 }
184 
185 void
186 setup_check_guest_state_all_paths(std::vector<struct control_flow_path> &cfg)
187 {
188  std::vector<struct control_flow_path> sub_cfg;
189 
190  setup_check_guest_control_registers_debug_registers_and_msrs_all_paths(sub_cfg);
191  setup_check_guest_segment_registers_all_paths(sub_cfg);
192  setup_check_guest_descriptor_table_registers_all_paths(sub_cfg);
193  setup_check_guest_rip_and_rflags_all_paths(sub_cfg);
194  setup_check_guest_non_register_state_all_paths(sub_cfg);
195  setup_check_guest_pdptes_all_paths(sub_cfg);
196 
197  path.setup = [sub_cfg]
198  {
199  for (const auto &sub_path : sub_cfg)
200  sub_path.setup();
201  };
202  path.throws_exception = false;
203  cfg.push_back(path);
204 }
205 
206 static void
207 setup_check_guest_cr0_for_unsupported_bits_paths(std::vector<struct control_flow_path> &cfg)
208 {
209  path.setup = [&]
210  {
211  guest_cr0::set(0UL);
213  };
214  path.throws_exception = false;
215  cfg.push_back(path);
216 
217  path.setup = [&]
218  {
223  };
224  path.throws_exception = false;
225  cfg.push_back(path);
226 
227  path.setup = [&]
228  {
232  };
233  path.throws_exception = true;
234  path.exception = ""_ut_lee;
235  cfg.push_back(path);
236 }
237 
238 static void
239 setup_check_guest_cr0_verify_paging_enabled_paths(std::vector<struct control_flow_path> &cfg)
240 {
241  path.setup = [&] { guest_cr0::set(0UL); };
242  path.throws_exception = false;
243  cfg.push_back(path);
244 
245  path.setup = [&] { guest_cr0::paging::enable(); };
246  path.throws_exception = true;
247  path.exception = ""_ut_lee;
248  cfg.push_back(path);
249 
251  path.throws_exception = false;
252  cfg.push_back(path);
253 }
254 
255 static void
256 setup_check_guest_cr4_for_unsupported_bits_paths(std::vector<struct control_flow_path> &cfg)
257 {
258  path.setup = [&]
259  {
260  guest_cr4::set(0U);
262  };
263  path.throws_exception = false;
264  cfg.push_back(path);
265 
266  path.setup = [&] { g_msrs[ia32_vmx_cr4_fixed0::addr] = 1; };
267  path.throws_exception = true;
268  path.exception = ""_ut_lee;
269  cfg.push_back(path);
270 }
271 
272 static void
273 setup_check_guest_load_debug_controls_verify_reserved_paths(std::vector<struct control_flow_path> &cfg)
274 {
275  path.setup = [&]
276  {
279  };
280  path.throws_exception = false;
281  cfg.push_back(path);
282 
283  path.setup = [&]
284  {
288  };
289  path.throws_exception = true;
290  path.exception = ""_ut_lee;
291  cfg.push_back(path);
292 
293  path.setup = [&] { guest_ia32_debugctl::reserved::set(0U); };
294  path.throws_exception = false;
295  cfg.push_back(path);
296 }
297 
298 static void
299 setup_check_guest_verify_ia_32e_mode_enabled_paths(std::vector<struct control_flow_path> &cfg)
300 {
301  path.setup = [&]
302  {
305  };
306  path.throws_exception = false;
307  cfg.push_back(path);
308 
309  path.setup = [&]
310  {
313  guest_cr0::set(0UL);
314  };
315  path.throws_exception = true;
316  path.exception = ""_ut_lee;
317  cfg.push_back(path);
318 
319  path.setup = [&]
320  {
322  guest_cr4::set(0U);
323  };
324  path.throws_exception = true;
325  path.exception = ""_ut_lee;
326  cfg.push_back(path);
327 
329  path.throws_exception = false;
330  cfg.push_back(path);
331 }
332 
333 static void
334 setup_check_guest_verify_ia_32e_mode_disabled_paths(std::vector<struct control_flow_path> &cfg)
335 {
336  path.setup = [&]
337  {
340  };
341  path.throws_exception = false;
342  cfg.push_back(path);
343 
344  path.setup = [&]
345  {
349  };
350  path.throws_exception = true;
351  path.exception = ""_ut_lee;
352  cfg.push_back(path);
353 
354  path.setup = [&] { guest_cr4::set(0UL); };
355  path.throws_exception = false;
356  cfg.push_back(path);
357 }
358 
359 static void
360 setup_check_guest_cr3_for_unsupported_bits_paths(std::vector<struct control_flow_path> &cfg)
361 {
362  path.setup = [&] { guest_cr3::set(0xff00000000000000U); };
363  path.throws_exception = true;
364  path.exception = ""_ut_lee;
365  cfg.push_back(path);
366 
367  path.setup = [&] { guest_cr3::set(0U); };
368  path.throws_exception = false;
369  cfg.push_back(path);
370 }
371 
372 static void
373 setup_check_guest_load_debug_controls_verify_dr7_paths(std::vector<struct control_flow_path> &cfg)
374 {
375  path.setup = [&]
376  {
379  };
380  path.throws_exception = false;
381  cfg.push_back(path);
382 
383  path.setup = [&]
384  {
387  guest_dr7::set(0x100000000U);
388  };
389  path.throws_exception = true;
390  path.exception = ""_ut_lee;
391  cfg.push_back(path);
392 
393  path.setup = [&] { guest_dr7::set(0U); };
394  path.throws_exception = false;
395  cfg.push_back(path);
396 }
397 
398 static void
399 setup_check_guest_ia32_sysenter_esp_canonical_address_paths(std::vector<struct control_flow_path> &cfg)
400 {
401  path.setup = [&] { guest_ia32_sysenter_esp::set(0x800000000000UL); };
402  path.throws_exception = true;
403  path.exception = ""_ut_lee;
404  cfg.push_back(path);
405 
406  path.setup = [&] { guest_ia32_sysenter_esp::set(0UL); };
407  path.throws_exception = false;
408  cfg.push_back(path);
409 }
410 
411 static void
412 setup_check_guest_ia32_sysenter_eip_canonical_address_paths(std::vector<struct control_flow_path> &cfg)
413 {
414  path.setup = [&] { guest_ia32_sysenter_eip::set(0x800000000000UL); };
415  path.throws_exception = true;
416  path.exception = ""_ut_lee;
417  cfg.push_back(path);
418 
419  path.setup = [&] { guest_ia32_sysenter_eip::set(0U); };
420  path.throws_exception = false;
421  cfg.push_back(path);
422 }
423 
424 static void
425 setup_check_guest_verify_load_ia32_perf_global_ctrl_paths(std::vector<struct control_flow_path> &cfg)
426 {
427  path.setup = [&]
428  {
431  };
432  path.throws_exception = false;
433  cfg.push_back(path);
434 
435  path.setup = [&]
436  {
440  };
441  path.throws_exception = true;
442  path.exception = ""_ut_lee;
443  cfg.push_back(path);
444 
446  path.throws_exception = false;
447  cfg.push_back(path);
448 }
449 
450 static void
451 setup_check_guest_verify_load_ia32_pat_paths(std::vector<struct control_flow_path> &cfg)
452 {
453  path.setup = [&]
454  {
457  };
458  path.throws_exception = false;
459  cfg.push_back(path);
460 
461  path.setup = [&]
462  {
465  guest_ia32_pat::set(2ULL);
466  };
467  path.throws_exception = true;
468  path.exception = ""_ut_lee;
469  cfg.push_back(path);
470 
471  path.setup = [&] { guest_ia32_pat::set(2ULL << 8); };
472  path.throws_exception = true;
473  path.exception = ""_ut_lee;
474  cfg.push_back(path);
475 
476  path.setup = [&] { guest_ia32_pat::set(2ULL << 16); };
477  path.throws_exception = true;
478  path.exception = ""_ut_lee;
479  cfg.push_back(path);
480 
481  path.setup = [&] { guest_ia32_pat::set(2ULL << 24); };
482  path.throws_exception = true;
483  path.exception = ""_ut_lee;
484  cfg.push_back(path);
485 
486  path.setup = [&] { guest_ia32_pat::set(2ULL << 32); };
487  path.throws_exception = true;
488  path.exception = ""_ut_lee;
489  cfg.push_back(path);
490 
491  path.setup = [&] { guest_ia32_pat::set(2ULL << 40); };
492  path.throws_exception = true;
493  path.exception = ""_ut_lee;
494  cfg.push_back(path);
495 
496  path.setup = [&] { guest_ia32_pat::set(2ULL << 48); };
497  path.throws_exception = true;
498  path.exception = ""_ut_lee;
499  cfg.push_back(path);
500 
501  path.setup = [&] { guest_ia32_pat::set(2ULL << 56); };
502  path.throws_exception = true;
503  path.exception = ""_ut_lee;
504  cfg.push_back(path);
505 
506  path.setup = [&] { guest_ia32_pat::set(0UL); };
507  path.throws_exception = false;
508  cfg.push_back(path);
509 }
510 
511 static void
512 setup_check_guest_verify_load_ia32_efer_paths(std::vector<struct control_flow_path> &cfg)
513 {
514  path.setup = [&]
515  {
518  };
519  path.throws_exception = false;
520  cfg.push_back(path);
521 
522  path.setup = [&]
523  {
527  };
528  path.throws_exception = true;
529  path.exception = ""_ut_lee;
530  cfg.push_back(path);
531 
532  path.setup = [&]
533  {
538  };
539  path.throws_exception = true;
540  path.exception = ""_ut_lee;
541  cfg.push_back(path);
542 
543  path.setup = [&]
544  {
548  };
549  path.throws_exception = true;
550  path.exception = ""_ut_lee;
551  cfg.push_back(path);
552 
553  path.setup = [&]
554  {
557  };
558  path.throws_exception = false;
559  cfg.push_back(path);
560 
561  path.setup = [&] { guest_cr0::paging::enable(); };
562  path.throws_exception = true;
563  path.exception = ""_ut_lee;
564  cfg.push_back(path);
565 
566  path.setup = [&]
567  {
572  };
573  path.throws_exception = true;
574  path.exception = ""_ut_lee;
575  cfg.push_back(path);
576 
577  path.setup = [&] { guest_ia32_efer::lme::disable(); };
578  path.throws_exception = false;
579  cfg.push_back(path);
580 }
581 
582 static void
583 setup_check_guest_verify_load_ia32_bndcfgs_paths(std::vector<struct control_flow_path> &cfg)
584 {
585  path.setup = [&]
586  {
589  };
590  path.throws_exception = false;
591  cfg.push_back(path);
592 
593  path.setup = [&]
594  {
598  };
599  path.throws_exception = true;
600  path.exception = ""_ut_lee;
601  cfg.push_back(path);
602 
603  path.setup = [&] { guest_ia32_bndcfgs::set(0x800000000000UL); };
604  path.throws_exception = true;
605  path.exception = ""_ut_lee;
606  cfg.push_back(path);
607 
608  path.setup = [&] { guest_ia32_bndcfgs::set(0U); };
609  path.throws_exception = false;
610  cfg.push_back(path);
611 }
612 
613 static void
614 setup_check_guest_tr_ti_bit_equals_0_paths(std::vector<struct control_flow_path> &cfg)
615 {
616  path.setup = [&] { guest_tr_selector::ti::set(false); };
617  path.throws_exception = false;
618  cfg.push_back(path);
619 
620  path.setup = [&] { guest_tr_selector::ti::set(true); };
621  path.throws_exception = true;
622  path.exception = ""_ut_lee;
623  cfg.push_back(path);
624 }
625 
626 static void
627 setup_check_guest_ldtr_ti_bit_equals_0_paths(std::vector<struct control_flow_path> &cfg)
628 {
629  path.setup = [&] { make_unusable(guest_ldtr_access_rights::addr); };
630  path.throws_exception = false;
631  cfg.push_back(path);
632 
633  path.setup = [&]
634  {
635  make_usable(guest_ldtr_access_rights::addr);
637  };
638  path.throws_exception = true;
639  path.exception = ""_ut_lee;
640  cfg.push_back(path);
641 
642  path.setup = [&] { guest_ldtr_selector::set(0U); };
643  path.throws_exception = false;
644  cfg.push_back(path);
645 }
646 
647 static void
648 setup_check_guest_ss_and_cs_rpl_are_the_same_paths(std::vector<struct control_flow_path> &cfg)
649 {
650  path.setup = [&] { enable_v8086(); };
651  path.throws_exception = false;
652  cfg.push_back(path);
653 
654  path.setup = [&]
655  {
656  disable_v8086();
661  };
662  path.throws_exception = false;
663  cfg.push_back(path);
664 
665  path.setup = [&]
666  {
672  };
673  path.throws_exception = true;
674  path.exception = ""_ut_lee;
675  cfg.push_back(path);
676 
677  path.setup = [&] { guest_ss_selector::rpl::set(3U); };
678  path.throws_exception = false;
679  cfg.push_back(path);
680 }
681 
682 static void
683 setup_check_guest_cs_base_is_shifted_paths(std::vector<struct control_flow_path> &cfg)
684 {
685  path.setup = [&] { disable_v8086(); };
686  path.throws_exception = false;
687  cfg.push_back(path);
688 
689  path.setup = [&]
690  {
691  enable_v8086();
693  guest_cs_base::set(0x10U);
694  };
695  path.throws_exception = true;
696  path.exception = ""_ut_lee;
697  cfg.push_back(path);
698 
699  path.setup = [&] { guest_cs_selector::set(1U); };
700  path.throws_exception = false;
701  cfg.push_back(path);
702 }
703 
704 static void
705 setup_check_guest_ss_base_is_shifted_paths(std::vector<struct control_flow_path> &cfg)
706 {
707  path.setup = [&] { disable_v8086(); };
708  path.throws_exception = false;
709  cfg.push_back(path);
710 
711  path.setup = [&]
712  {
713  enable_v8086();
715  guest_ss_base::set(0x10U);
716  };
717  path.throws_exception = true;
718  path.exception = ""_ut_lee;
719  cfg.push_back(path);
720 
721  path.setup = [&] { guest_ss_selector::set(1U); };
722  path.throws_exception = false;
723  cfg.push_back(path);
724 }
725 
726 static void
727 setup_check_guest_ds_base_is_shifted_paths(std::vector<struct control_flow_path> &cfg)
728 {
729  path.setup = [&] { disable_v8086(); };
730  path.throws_exception = false;
731  cfg.push_back(path);
732 
733  path.setup = [&]
734  {
735  enable_v8086();
737  guest_ds_base::set(0x10U);
738  };
739  path.throws_exception = true;
740  path.exception = ""_ut_lee;
741  cfg.push_back(path);
742 
743  path.setup = [&] { guest_ds_selector::set(1U); };
744  path.throws_exception = false;
745  cfg.push_back(path);
746 }
747 
748 static void
749 setup_check_guest_es_base_is_shifted_paths(std::vector<struct control_flow_path> &cfg)
750 {
751  path.setup = [&] { disable_v8086(); };
752  path.throws_exception = false;
753  cfg.push_back(path);
754 
755  path.setup = [&]
756  {
757  enable_v8086();
759  guest_es_base::set(0x10U);
760  };
761  path.throws_exception = true;
762  path.exception = ""_ut_lee;
763  cfg.push_back(path);
764 
765  path.setup = [&] { guest_es_selector::set(1U); };
766  path.throws_exception = false;
767  cfg.push_back(path);
768 }
769 
770 static void
771 setup_check_guest_fs_base_is_shifted_paths(std::vector<struct control_flow_path> &cfg)
772 {
773  path.setup = [&] { disable_v8086(); };
774  path.throws_exception = false;
775  cfg.push_back(path);
776 
777  path.setup = [&]
778  {
779  enable_v8086();
781  guest_fs_base::set(0x10U);
782  };
783  path.throws_exception = true;
784  path.exception = ""_ut_lee;
785  cfg.push_back(path);
786 
787  path.setup = [&] { guest_fs_selector::set(1U); };
788  path.throws_exception = false;
789  cfg.push_back(path);
790 }
791 
792 static void
793 setup_check_guest_gs_base_is_shifted_paths(std::vector<struct control_flow_path> &cfg)
794 {
795  path.setup = [&] { disable_v8086(); };
796  path.throws_exception = false;
797  cfg.push_back(path);
798 
799  path.setup = [&]
800  {
801  enable_v8086();
803  guest_gs_base::set(0x10U);
804  };
805  path.throws_exception = true;
806  path.exception = ""_ut_lee;
807  cfg.push_back(path);
808 
809  path.setup = [&] { guest_gs_selector::set(1U); };
810  path.throws_exception = false;
811  cfg.push_back(path);
812 }
813 
814 static void
815 setup_check_guest_tr_base_is_canonical_paths(std::vector<struct control_flow_path> &cfg)
816 {
817  path.setup = [&] { guest_tr_base::set(0x800000000000U); };
818  path.throws_exception = true;
819  path.exception = ""_ut_lee;
820  cfg.push_back(path);
821 
822  path.setup = [&] { guest_tr_base::set(0UL); };
823  path.throws_exception = false;
824  cfg.push_back(path);
825 }
826 
827 static void
828 setup_check_guest_fs_base_is_canonical_paths(std::vector<struct control_flow_path> &cfg)
829 {
830  path.setup = [&] { guest_fs_base::set(0x800000000000U); };
831  path.throws_exception = true;
832  path.exception = ""_ut_lee;
833  cfg.push_back(path);
834 
835  path.setup = [&] { guest_fs_base::set(0UL); };
836  path.throws_exception = false;
837  cfg.push_back(path);
838 }
839 
840 static void
841 setup_check_guest_gs_base_is_canonical_paths(std::vector<struct control_flow_path> &cfg)
842 {
843  path.setup = [&] { guest_gs_base::set(0x800000000000U); };
844  path.throws_exception = true;
845  path.exception = ""_ut_lee;
846  cfg.push_back(path);
847 
848  path.setup = [&] { guest_gs_base::set(0UL); };
849  path.throws_exception = false;
850  cfg.push_back(path);
851 }
852 
853 static void
854 setup_check_guest_ldtr_base_is_canonical_paths(std::vector<struct control_flow_path> &cfg)
855 {
856  path.setup = [&] { make_unusable(guest_ldtr_access_rights::addr); };
857  path.throws_exception = false;
858  cfg.push_back(path);
859 
860  path.setup = [&]
861  {
862  make_usable(guest_ldtr_access_rights::addr);
863  guest_ldtr_base::set(0x800000000000U);
864  };
865  path.throws_exception = true;
866  path.exception = ""_ut_lee;
867  cfg.push_back(path);
868 
869  path.setup = [&] { guest_ldtr_base::set(0U); };
870  path.throws_exception = false;
871  cfg.push_back(path);
872 }
873 
874 static void
875 setup_check_guest_cs_base_upper_dword_0_paths(std::vector<struct control_flow_path> &cfg)
876 {
877  path.setup = [&] { guest_cs_base::set(0xf00000000U); };
878  path.throws_exception = true;
879  path.exception = ""_ut_lee;
880  cfg.push_back(path);
881 
882  path.setup = [&] { guest_cs_base::set(0U); };
883  path.throws_exception = false;
884  cfg.push_back(path);
885 }
886 
887 static void
888 setup_check_guest_ss_base_upper_dword_0_paths(std::vector<struct control_flow_path> &cfg)
889 {
890  path.setup = [&] { make_unusable(guest_ss_access_rights::addr); };
891  path.throws_exception = false;
892  cfg.push_back(path);
893 
894  path.setup = [&]
895  {
896  make_usable(guest_ss_access_rights::addr);
897  vmcs::guest_ss_base::set(0xf00000000U);
898  };
899  path.throws_exception = true;
900  path.exception = ""_ut_lee;
901  cfg.push_back(path);
902 
903  path.setup = [&] { guest_ss_base::set(0U); };
904  path.throws_exception = false;
905  cfg.push_back(path);
906 }
907 
908 static void
909 setup_check_guest_ds_base_upper_dword_0_paths(std::vector<struct control_flow_path> &cfg)
910 {
911  path.setup = [&] { make_unusable(guest_ds_access_rights::addr); };
912  path.throws_exception = false;
913  cfg.push_back(path);
914 
915  path.setup = [&]
916  {
917  make_usable(guest_ds_access_rights::addr);
918  vmcs::guest_ds_base::set(0xf00000000U);
919  };
920  path.throws_exception = true;
921  path.exception = ""_ut_lee;
922  cfg.push_back(path);
923 
924  path.setup = [&] { guest_ds_base::set(0U); };
925  path.throws_exception = false;
926  cfg.push_back(path);
927 }
928 
929 static void
930 setup_check_guest_es_base_upper_dword_0_paths(std::vector<struct control_flow_path> &cfg)
931 {
932  path.setup = [&] { make_unusable(guest_es_access_rights::addr); };
933  path.throws_exception = false;
934  cfg.push_back(path);
935 
936  path.setup = [&]
937  {
938  make_usable(guest_es_access_rights::addr);
939  vmcs::guest_es_base::set(0xf00000000U);
940  };
941  path.throws_exception = true;
942  path.exception = ""_ut_lee;
943  cfg.push_back(path);
944 
945  path.setup = [&] { guest_es_base::set(0U); };
946  path.throws_exception = false;
947  cfg.push_back(path);
948 }
949 
950 static void
951 setup_check_guest_cs_limit_paths(std::vector<struct control_flow_path> &cfg)
952 {
953  path.setup = [&] { disable_v8086(); };
954  path.throws_exception = false;
955  cfg.push_back(path);
956 
957  path.setup = [&]
958  {
959  enable_v8086();
960  guest_cs_limit::set(0x10000U);
961  };
962  path.throws_exception = true;
963  path.exception = ""_ut_lee;
964  cfg.push_back(path);
965 
966  path.setup = [&] { guest_cs_limit::set(0xffffU); };
967  path.throws_exception = false;
968  cfg.push_back(path);
969 }
970 
971 static void
972 setup_check_guest_ss_limit_paths(std::vector<struct control_flow_path> &cfg)
973 {
974  path.setup = [&] { disable_v8086(); };
975  path.throws_exception = false;
976  cfg.push_back(path);
977 
978  path.setup = [&]
979  {
980  enable_v8086();
981  guest_ss_limit::set(0x10000U);
982  };
983  path.throws_exception = true;
984  path.exception = ""_ut_lee;
985  cfg.push_back(path);
986 
987  path.setup = [&] { guest_ss_limit::set(0xffffU); };
988  path.throws_exception = false;
989  cfg.push_back(path);
990 }
991 
992 static void
993 setup_check_guest_ds_limit_paths(std::vector<struct control_flow_path> &cfg)
994 {
995  path.setup = [&] { disable_v8086(); };
996  path.throws_exception = false;
997  cfg.push_back(path);
998 
999  path.setup = [&]
1000  {
1001  enable_v8086();
1002  guest_ds_limit::set(0x10000U);
1003  };
1004  path.throws_exception = true;
1005  path.exception = ""_ut_lee;
1006  cfg.push_back(path);
1007 
1008  path.setup = [&] { guest_ds_limit::set(0xffffU); };
1009  path.throws_exception = false;
1010  cfg.push_back(path);
1011 }
1012 
1013 static void
1014 setup_check_guest_es_limit_paths(std::vector<struct control_flow_path> &cfg)
1015 {
1016  path.setup = [&] { disable_v8086(); };
1017  path.throws_exception = false;
1018  cfg.push_back(path);
1019 
1020  path.setup = [&]
1021  {
1022  enable_v8086();
1023  guest_es_limit::set(0x10000U);
1024  };
1025  path.throws_exception = true;
1026  path.exception = ""_ut_lee;
1027  cfg.push_back(path);
1028 
1029  path.setup = [&] { guest_es_limit::set(0xffffU); };
1030  path.throws_exception = false;
1031  cfg.push_back(path);
1032 }
1033 
1034 static void
1035 setup_check_guest_gs_limit_paths(std::vector<struct control_flow_path> &cfg)
1036 {
1037  path.setup = [&] { disable_v8086(); };
1038  path.throws_exception = false;
1039  cfg.push_back(path);
1040 
1041  path.setup = [&]
1042  {
1043  enable_v8086();
1044  guest_gs_limit::set(0x10000U);
1045  };
1046  path.throws_exception = true;
1047  path.exception = ""_ut_lee;
1048  cfg.push_back(path);
1049 
1050  path.setup = [&] { guest_gs_limit::set(0xffffU); };
1051  path.throws_exception = false;
1052  cfg.push_back(path);
1053 }
1054 
1055 static void
1056 setup_check_guest_fs_limit_paths(std::vector<struct control_flow_path> &cfg)
1057 {
1058  path.setup = [&] { disable_v8086(); };
1059  path.throws_exception = false;
1060  cfg.push_back(path);
1061 
1062  path.setup = [&]
1063  {
1064  enable_v8086();
1065  guest_fs_limit::set(0x10000U);
1066  };
1067  path.throws_exception = true;
1068  path.exception = ""_ut_lee;
1069  cfg.push_back(path);
1070 
1071  path.setup = [&] { guest_fs_limit::set(0xffffU); };
1072  path.throws_exception = false;
1073  cfg.push_back(path);
1074 }
1075 
1076 static void
1077 setup_check_guest_v8086_cs_access_rights_paths(std::vector<struct control_flow_path> &cfg)
1078 {
1079  path.setup = [&] { disable_v8086(); };
1080  path.throws_exception = false;
1081  cfg.push_back(path);
1082 
1083  path.setup = [&]
1084  {
1085  enable_v8086();
1087  };
1088  path.throws_exception = true;
1089  path.exception = ""_ut_lee;
1090  cfg.push_back(path);
1091 
1092  path.setup = [&] { guest_cs_access_rights::set(0xf3U); };
1093  path.throws_exception = false;
1094  cfg.push_back(path);
1095 }
1096 
1097 static void
1098 setup_check_guest_v8086_ss_access_rights_paths(std::vector<struct control_flow_path> &cfg)
1099 {
1100  path.setup = [&] { disable_v8086(); };
1101  path.throws_exception = false;
1102  cfg.push_back(path);
1103 
1104  path.setup = [&]
1105  {
1106  enable_v8086();
1108  };
1109  path.throws_exception = true;
1110  path.exception = ""_ut_lee;
1111  cfg.push_back(path);
1112 
1113  path.setup = [&] { guest_ss_access_rights::set(0xf3U); };
1114  path.throws_exception = false;
1115  cfg.push_back(path);
1116 }
1117 
1118 static void
1119 setup_check_guest_v8086_ds_access_rights_paths(std::vector<struct control_flow_path> &cfg)
1120 {
1121  path.setup = [&] { disable_v8086(); };
1122  path.throws_exception = false;
1123  cfg.push_back(path);
1124 
1125  path.setup = [&]
1126  {
1127  enable_v8086();
1129  };
1130  path.throws_exception = true;
1131  path.exception = ""_ut_lee;
1132  cfg.push_back(path);
1133 
1134  path.setup = [&] { guest_ds_access_rights::set(0xf3U); };
1135  path.throws_exception = false;
1136  cfg.push_back(path);
1137 }
1138 
1139 static void
1140 setup_check_guest_v8086_es_access_rights_paths(std::vector<struct control_flow_path> &cfg)
1141 {
1142  path.setup = [&] { disable_v8086(); };
1143  path.throws_exception = false;
1144  cfg.push_back(path);
1145 
1146  path.setup = [&]
1147  {
1148  enable_v8086();
1150  };
1151  path.throws_exception = true;
1152  path.exception = ""_ut_lee;
1153  cfg.push_back(path);
1154 
1155  path.setup = [&] { guest_es_access_rights::set(0xf3U); };
1156  path.throws_exception = false;
1157  cfg.push_back(path);
1158 }
1159 
1160 static void
1161 setup_check_guest_v8086_fs_access_rights_paths(std::vector<struct control_flow_path> &cfg)
1162 {
1163  path.setup = [&] { disable_v8086(); };
1164  path.throws_exception = false;
1165  cfg.push_back(path);
1166 
1167  path.setup = [&]
1168  {
1169  enable_v8086();
1171  };
1172  path.throws_exception = true;
1173  path.exception = ""_ut_lee;
1174  cfg.push_back(path);
1175 
1176  path.setup = [&] { guest_fs_access_rights::set(0xf3U); };
1177  path.throws_exception = false;
1178  cfg.push_back(path);
1179 }
1180 
1181 static void
1182 setup_check_guest_v8086_gs_access_rights_paths(std::vector<struct control_flow_path> &cfg)
1183 {
1184  path.setup = [&] { disable_v8086(); };
1185  path.throws_exception = false;
1186  cfg.push_back(path);
1187 
1188  path.setup = [&]
1189  {
1190  enable_v8086();
1192  };
1193  path.throws_exception = true;
1194  path.exception = ""_ut_lee;
1195  cfg.push_back(path);
1196 
1197  path.setup = [&] { guest_gs_access_rights::set(0xf3U); };
1198  path.throws_exception = false;
1199  cfg.push_back(path);
1200 }
1201 
1202 static void
1203 setup_check_guest_cs_access_rights_type_paths(std::vector<struct control_flow_path> &cfg)
1204 {
1205  path.setup = [&] { enable_v8086(); };
1206  path.throws_exception = false;
1207  cfg.push_back(path);
1208 
1209  path.setup = [&]
1210  {
1211  disable_v8086();
1215  };
1216  path.throws_exception = true;
1217  path.exception = ""_ut_lee;
1218  cfg.push_back(path);
1219 
1220  path.setup = [&]
1221  {
1227  };
1228  path.throws_exception = true;
1229  path.exception = ""_ut_lee;
1230  cfg.push_back(path);
1231 
1232  path.setup = [&]
1233  {
1237  };
1238  path.throws_exception = false;
1239  cfg.push_back(path);
1240 
1241  path.setup = [&] { guest_cs_access_rights::set(7U); };
1242  path.throws_exception = true;
1243  path.exception = ""_ut_lee;
1244  cfg.push_back(path);
1245 }
1246 
1247 static void
1248 setup_check_guest_ss_access_rights_type_paths(std::vector<struct control_flow_path> &cfg)
1249 {
1250  path.setup = [&] { enable_v8086(); };
1251  path.throws_exception = false;
1252  cfg.push_back(path);
1253 
1254  path.setup = [&]
1255  {
1256  disable_v8086();
1257  make_unusable(guest_ss_access_rights::addr);
1258  };
1259  path.throws_exception = false;
1260  cfg.push_back(path);
1261 
1262  path.setup = [&]
1263  {
1264  make_usable(guest_ss_access_rights::addr);
1266  };
1267  path.throws_exception = false;
1268  cfg.push_back(path);
1269 
1270  path.setup = [&] { guest_ss_access_rights::set(0U); };
1271  path.throws_exception = true;
1272  path.exception = ""_ut_lee;
1273  cfg.push_back(path);
1274 }
1275 
1276 static void
1277 setup_check_guest_ds_access_rights_type_paths(std::vector<struct control_flow_path> &cfg)
1278 {
1279  path.setup = [&] { enable_v8086(); };
1280  path.throws_exception = false;
1281  cfg.push_back(path);
1282 
1283  path.setup = [&]
1284  {
1285  disable_v8086();
1286  make_unusable(guest_ds_access_rights::addr);
1287  };
1288  path.throws_exception = false;
1289  cfg.push_back(path);
1290 
1291  path.setup = [&]
1292  {
1293  make_usable(guest_ds_access_rights::addr);
1295  };
1296  path.throws_exception = false;
1297  cfg.push_back(path);
1298 
1299  path.setup = [&] { guest_ds_access_rights::set(0U); };
1300  path.throws_exception = true;
1301  path.exception = ""_ut_lee;
1302  cfg.push_back(path);
1303 }
1304 
1305 static void
1306 setup_check_guest_es_access_rights_type_paths(std::vector<struct control_flow_path> &cfg)
1307 {
1308  path.setup = [&] { enable_v8086(); };
1309  path.throws_exception = false;
1310  cfg.push_back(path);
1311 
1312  path.setup = [&]
1313  {
1314  disable_v8086();
1315  make_unusable(guest_es_access_rights::addr);
1316  };
1317  path.throws_exception = false;
1318  cfg.push_back(path);
1319 
1320  path.setup = [&]
1321  {
1322  make_usable(guest_es_access_rights::addr);
1324  };
1325  path.throws_exception = false;
1326  cfg.push_back(path);
1327 
1328  path.setup = [&] { guest_es_access_rights::set(0U); };
1329  path.throws_exception = true;
1330  path.exception = ""_ut_lee;
1331  cfg.push_back(path);
1332 }
1333 
1334 static void
1335 setup_check_guest_fs_access_rights_type_paths(std::vector<struct control_flow_path> &cfg)
1336 {
1337  path.setup = [&] { enable_v8086(); };
1338  path.throws_exception = false;
1339  cfg.push_back(path);
1340 
1341  path.setup = [&]
1342  {
1343  disable_v8086();
1344  make_unusable(guest_fs_access_rights::addr);
1345  };
1346  path.throws_exception = false;
1347  cfg.push_back(path);
1348 
1349  path.setup = [&]
1350  {
1351  make_usable(guest_fs_access_rights::addr);
1353  };
1354  path.throws_exception = false;
1355  cfg.push_back(path);
1356 
1357  path.setup = [&] { guest_fs_access_rights::set(0U); };
1358  path.throws_exception = true;
1359  path.exception = ""_ut_lee;
1360  cfg.push_back(path);
1361 }
1362 
1363 static void
1364 setup_check_guest_gs_access_rights_type_paths(std::vector<struct control_flow_path> &cfg)
1365 {
1366  path.setup = [&] { enable_v8086(); };
1367  path.throws_exception = false;
1368  cfg.push_back(path);
1369 
1370  path.setup = [&]
1371  {
1372  disable_v8086();
1373  make_unusable(guest_gs_access_rights::addr);
1374  };
1375  path.throws_exception = false;
1376  cfg.push_back(path);
1377 
1378  path.setup = [&]
1379  {
1380  make_usable(guest_gs_access_rights::addr);
1382  };
1383  path.throws_exception = false;
1384  cfg.push_back(path);
1385 
1386  path.setup = [&] { guest_gs_access_rights::set(0U); };
1387  path.throws_exception = true;
1388  path.exception = ""_ut_lee;
1389  cfg.push_back(path);
1390 }
1391 
1392 static void
1393 setup_check_guest_cs_is_not_a_system_descriptor_paths(std::vector<struct control_flow_path> &cfg)
1394 {
1395  path.setup = [&] { enable_v8086(); };
1396  path.throws_exception = false;
1397  cfg.push_back(path);
1398 
1399  path.setup = [&]
1400  {
1401  disable_v8086();
1403  };
1404  path.throws_exception = true;
1405  path.exception = ""_ut_lee;
1406  cfg.push_back(path);
1407 
1408  path.setup = [&] { guest_cs_access_rights::s::set(1U); };
1409  path.throws_exception = false;
1410  cfg.push_back(path);
1411 }
1412 
1413 static void
1414 setup_check_guest_ss_is_not_a_system_descriptor_paths(std::vector<struct control_flow_path> &cfg)
1415 {
1416  path.setup = [&] { enable_v8086(); };
1417  path.throws_exception = false;
1418  cfg.push_back(path);
1419 
1420  path.setup = [&]
1421  {
1422  disable_v8086();
1423  make_unusable(guest_ss_access_rights::addr);
1424  };
1425  path.throws_exception = false;
1426  cfg.push_back(path);
1427 
1428  path.setup = [&]
1429  {
1430  make_usable(guest_ss_access_rights::addr);
1432  };
1433  path.throws_exception = true;
1434  path.exception = ""_ut_lee;
1435  cfg.push_back(path);
1436 
1437  path.setup = [&] { guest_ss_access_rights::s::set(1U); };
1438  path.throws_exception = false;
1439  cfg.push_back(path);
1440 }
1441 
1442 static void
1443 setup_check_guest_ds_is_not_a_system_descriptor_paths(std::vector<struct control_flow_path> &cfg)
1444 {
1445  path.setup = [&] { enable_v8086(); };
1446  path.throws_exception = false;
1447  cfg.push_back(path);
1448 
1449  path.setup = [&]
1450  {
1451  disable_v8086();
1452  make_unusable(guest_ds_access_rights::addr);
1453  };
1454  path.throws_exception = false;
1455  cfg.push_back(path);
1456 
1457  path.setup = [&]
1458  {
1459  make_usable(guest_ds_access_rights::addr);
1461  };
1462  path.throws_exception = true;
1463  path.exception = ""_ut_lee;
1464  cfg.push_back(path);
1465 
1466  path.setup = [&] { guest_ds_access_rights::s::set(1U); };
1467  path.throws_exception = false;
1468  cfg.push_back(path);
1469 }
1470 
1471 static void
1472 setup_check_guest_es_is_not_a_system_descriptor_paths(std::vector<struct control_flow_path> &cfg)
1473 {
1474  path.setup = [&] { enable_v8086(); };
1475  path.throws_exception = false;
1476  cfg.push_back(path);
1477 
1478  path.setup = [&]
1479  {
1480  disable_v8086();
1481  make_unusable(guest_es_access_rights::addr);
1482  };
1483  path.throws_exception = false;
1484  cfg.push_back(path);
1485 
1486  path.setup = [&]
1487  {
1488  make_usable(guest_es_access_rights::addr);
1490  };
1491  path.throws_exception = true;
1492  path.exception = ""_ut_lee;
1493  cfg.push_back(path);
1494 
1495  path.setup = [&] { guest_es_access_rights::s::set(1U); };
1496  path.throws_exception = false;
1497  cfg.push_back(path);
1498 }
1499 
1500 static void
1501 setup_check_guest_fs_is_not_a_system_descriptor_paths(std::vector<struct control_flow_path> &cfg)
1502 {
1503  path.setup = [&] { enable_v8086(); };
1504  path.throws_exception = false;
1505  cfg.push_back(path);
1506 
1507  path.setup = [&]
1508  {
1509  disable_v8086();
1510  make_unusable(guest_fs_access_rights::addr);
1511  };
1512  path.throws_exception = false;
1513  cfg.push_back(path);
1514 
1515  path.setup = [&]
1516  {
1517  make_usable(guest_fs_access_rights::addr);
1519  };
1520  path.throws_exception = true;
1521  path.exception = ""_ut_lee;
1522  cfg.push_back(path);
1523 
1524  path.setup = [&] { guest_fs_access_rights::s::set(1U); };
1525  path.throws_exception = false;
1526  cfg.push_back(path);
1527 }
1528 
1529 static void
1530 setup_check_guest_gs_is_not_a_system_descriptor_paths(std::vector<struct control_flow_path> &cfg)
1531 {
1532  path.setup = [&] { enable_v8086(); };
1533  path.throws_exception = false;
1534  cfg.push_back(path);
1535 
1536  path.setup = [&]
1537  {
1538  disable_v8086();
1539  make_unusable(guest_gs_access_rights::addr);
1540  };
1541  path.throws_exception = false;
1542  cfg.push_back(path);
1543 
1544  path.setup = [&]
1545  {
1546  make_usable(guest_gs_access_rights::addr);
1548  };
1549  path.throws_exception = true;
1550  path.exception = ""_ut_lee;
1551  cfg.push_back(path);
1552 
1553  path.setup = [&] { guest_gs_access_rights::s::set(1U); };
1554  path.throws_exception = false;
1555  cfg.push_back(path);
1556 }
1557 
1558 static void
1559 setup_check_guest_cs_type_not_equal_3_paths(std::vector<struct control_flow_path> &cfg)
1560 {
1561  path.setup = [&] { enable_v8086(); };
1562  path.throws_exception = false;
1563  cfg.push_back(path);
1564 
1565  path.setup = [&]
1566  {
1567  disable_v8086();
1569  };
1570  path.throws_exception = false;
1571  cfg.push_back(path);
1572 
1573  path.setup = [&] { guest_cs_access_rights::set(0x63U); };
1574  path.throws_exception = true;
1575  path.exception = ""_ut_lee;
1576  cfg.push_back(path);
1577 
1578  path.setup = [&] { guest_cs_access_rights::set(0x03U); };
1579  path.throws_exception = false;
1580  cfg.push_back(path);
1581 }
1582 
1583 static void
1584 setup_check_guest_cs_dpl_adheres_to_ss_dpl_paths(std::vector<struct control_flow_path> &cfg)
1585 {
1586  path.setup = [&] { enable_v8086(); };
1587  path.throws_exception = false;
1588  cfg.push_back(path);
1589 
1590  path.setup = [&]
1591  {
1592  disable_v8086();
1595  };
1596  path.throws_exception = true;
1597  path.exception = ""_ut_lee;
1598  cfg.push_back(path);
1599 
1600  path.setup = [&] { guest_ss_access_rights::set(0x30U); };
1601  path.throws_exception = false;
1602  cfg.push_back(path);
1603 
1604  path.setup = [&] { guest_cs_access_rights::set(0x6dU); };
1605  path.throws_exception = true;
1606  path.exception = ""_ut_lee;
1607  cfg.push_back(path);
1608 
1609  path.setup = [&] { guest_ss_access_rights::set(0x60U); };
1610  path.throws_exception = false;
1611  cfg.push_back(path);
1612 
1613  path.setup = [&] { guest_cs_access_rights::set(2U); };
1614  path.throws_exception = false;
1615  cfg.push_back(path);
1616 }
1617 
1618 static void
1619 setup_check_guest_ss_dpl_must_equal_rpl_paths(std::vector<struct control_flow_path> &cfg)
1620 {
1621  path.setup = [&] { enable_v8086(); };
1622  path.throws_exception = false;
1623  cfg.push_back(path);
1624 
1625  path.setup = [&]
1626  {
1627  disable_v8086();
1631  };
1632  path.throws_exception = false;
1633  cfg.push_back(path);
1634 
1635  path.setup = [&]
1636  {
1642  };
1643  path.throws_exception = true;
1644  path.exception = ""_ut_lee;
1645  cfg.push_back(path);
1646 
1647  path.setup = [&] { guest_ss_access_rights::set(0U); };
1648  path.throws_exception = false;
1649  cfg.push_back(path);
1650 }
1651 
1652 static void
1653 setup_check_guest_ss_dpl_must_equal_zero_paths(std::vector<struct control_flow_path> &cfg)
1654 {
1655  path.setup = [&] { enable_v8086(); };
1656  path.throws_exception = false;
1657  cfg.push_back(path);
1658 
1659  path.setup = [&]
1660  {
1661  disable_v8086();
1664  };
1665  path.throws_exception = false;
1666  cfg.push_back(path);
1667 
1668  path.setup = [&]
1669  {
1672  };
1673  path.throws_exception = true;
1674  path.exception = ""_ut_lee;
1675  cfg.push_back(path);
1676 }
1677 
1678 static void
1679 setup_check_guest_ds_dpl_paths(std::vector<struct control_flow_path> &cfg)
1680 {
1681  path.setup = [&] { enable_v8086(); };
1682  path.throws_exception = false;
1683  cfg.push_back(path);
1684 
1685  path.setup = [&]
1686  {
1687  disable_v8086();
1692  };
1693  path.throws_exception = false;
1694  cfg.push_back(path);
1695 
1696  path.setup = [&]
1697  {
1701  make_unusable(guest_ds_access_rights::addr);
1702  };
1703  path.throws_exception = false;
1704  cfg.push_back(path);
1705 
1706  path.setup = [&]
1707  {
1708  make_usable(guest_ds_access_rights::addr);
1710  };
1711  path.throws_exception = false;
1712  cfg.push_back(path);
1713 
1714  path.setup = [&]
1715  {
1719  };
1720  path.throws_exception = true;
1721  path.exception = ""_ut_lee;
1722  cfg.push_back(path);
1723 
1724  path.setup = [&] { guest_ds_selector::rpl::set(0U); };
1725  path.throws_exception = false;
1726  cfg.push_back(path);
1727 }
1728 
1729 static void
1730 setup_check_guest_es_dpl_paths(std::vector<struct control_flow_path> &cfg)
1731 {
1732  path.setup = [&] { enable_v8086(); };
1733  path.throws_exception = false;
1734  cfg.push_back(path);
1735 
1736  path.setup = [&]
1737  {
1738  disable_v8086();
1743  };
1744  path.throws_exception = false;
1745  cfg.push_back(path);
1746 
1747  path.setup = [&]
1748  {
1752  make_unusable(guest_es_access_rights::addr);
1753  };
1754  path.throws_exception = false;
1755  cfg.push_back(path);
1756 
1757  path.setup = [&]
1758  {
1759  make_usable(guest_es_access_rights::addr);
1761  };
1762  path.throws_exception = false;
1763  cfg.push_back(path);
1764 
1765  path.setup = [&]
1766  {
1770  };
1771  path.throws_exception = true;
1772  path.exception = ""_ut_lee;
1773  cfg.push_back(path);
1774 
1775  path.setup = [&] { guest_es_selector::rpl::set(0U); };
1776  path.throws_exception = false;
1777  cfg.push_back(path);
1778 }
1779 
1780 static void
1781 setup_check_guest_fs_dpl_paths(std::vector<struct control_flow_path> &cfg)
1782 {
1783  path.setup = [&] { enable_v8086(); };
1784  path.throws_exception = false;
1785  cfg.push_back(path);
1786 
1787  path.setup = [&]
1788  {
1789  disable_v8086();
1794  };
1795  path.throws_exception = false;
1796  cfg.push_back(path);
1797 
1798  path.setup = [&]
1799  {
1803  make_unusable(guest_fs_access_rights::addr);
1804  };
1805  path.throws_exception = false;
1806  cfg.push_back(path);
1807 
1808  path.setup = [&]
1809  {
1810  make_usable(guest_fs_access_rights::addr);
1812  };
1813  path.throws_exception = false;
1814  cfg.push_back(path);
1815 
1816  path.setup = [&]
1817  {
1821  };
1822  path.throws_exception = true;
1823  path.exception = ""_ut_lee;
1824  cfg.push_back(path);
1825 
1826  path.setup = [&] { guest_fs_selector::rpl::set(0U); };
1827  path.throws_exception = false;
1828  cfg.push_back(path);
1829 }
1830 
1831 static void
1832 setup_check_guest_gs_dpl_paths(std::vector<struct control_flow_path> &cfg)
1833 {
1834  path.setup = [&] { enable_v8086(); };
1835  path.throws_exception = false;
1836  cfg.push_back(path);
1837 
1838  path.setup = [&]
1839  {
1840  disable_v8086();
1845  };
1846  path.throws_exception = false;
1847  cfg.push_back(path);
1848 
1849  path.setup = [&]
1850  {
1854  make_unusable(guest_gs_access_rights::addr);
1855  };
1856  path.throws_exception = false;
1857  cfg.push_back(path);
1858 
1859  path.setup = [&]
1860  {
1861  make_usable(guest_gs_access_rights::addr);
1863  };
1864  path.throws_exception = false;
1865  cfg.push_back(path);
1866 
1867  path.setup = [&]
1868  {
1872  };
1873  path.throws_exception = true;
1874  path.exception = ""_ut_lee;
1875  cfg.push_back(path);
1876 
1877  path.setup = [&] { guest_gs_selector::rpl::set(0U); };
1878  path.throws_exception = false;
1879  cfg.push_back(path);
1880 }
1881 
1882 static void
1883 setup_check_guest_cs_must_be_present_paths(std::vector<struct control_flow_path> &cfg)
1884 {
1885  path.setup = [&] { enable_v8086(); };
1886  path.throws_exception = false;
1887  cfg.push_back(path);
1888 
1889  path.setup = [&]
1890  {
1891  disable_v8086();
1893  };
1894  path.throws_exception = true;
1895  path.exception = ""_ut_lee;
1896  cfg.push_back(path);
1897 
1898  path.setup = [&] { guest_cs_access_rights::present::set(1U); };
1899  path.throws_exception = false;
1900  cfg.push_back(path);
1901 }
1902 
1903 static void
1904 setup_check_guest_ss_must_be_present_if_usable_paths(std::vector<struct control_flow_path> &cfg)
1905 {
1906  path.setup = [&] { enable_v8086(); };
1907  path.throws_exception = false;
1908  cfg.push_back(path);
1909 
1910  path.setup = [&]
1911  {
1912  disable_v8086();
1913  make_unusable(guest_ss_access_rights::addr);
1914  };
1915  path.throws_exception = false;
1916  cfg.push_back(path);
1917 
1918  path.setup = [&] { guest_ss_access_rights::set(0U); };
1919  path.throws_exception = true;
1920  path.exception = ""_ut_lee;
1921  cfg.push_back(path);
1922 
1923  path.setup = [&] { guest_ss_access_rights::present::set(1U); };
1924  path.throws_exception = false;
1925  cfg.push_back(path);
1926 }
1927 
1928 static void
1929 setup_check_guest_ds_must_be_present_if_usable_paths(std::vector<struct control_flow_path> &cfg)
1930 {
1931  path.setup = [&] { enable_v8086(); };
1932  path.throws_exception = false;
1933  cfg.push_back(path);
1934 
1935  path.setup = [&]
1936  {
1937  disable_v8086();
1938  make_unusable(guest_ds_access_rights::addr);
1939  };
1940  path.throws_exception = false;
1941  cfg.push_back(path);
1942 
1943  path.setup = [&] { guest_ds_access_rights::set(0U); };
1944  path.throws_exception = true;
1945  path.exception = ""_ut_lee;
1946  cfg.push_back(path);
1947 
1948  path.setup = [&] { guest_ds_access_rights::present::set(1U); };
1949  path.throws_exception = false;
1950  cfg.push_back(path);
1951 }
1952 static void
1953 setup_check_guest_es_must_be_present_if_usable_paths(std::vector<struct control_flow_path> &cfg)
1954 {
1955  path.setup = [&] { enable_v8086(); };
1956  path.throws_exception = false;
1957  cfg.push_back(path);
1958 
1959  path.setup = [&]
1960  {
1961  disable_v8086();
1962  make_unusable(guest_es_access_rights::addr);
1963  };
1964  path.throws_exception = false;
1965  cfg.push_back(path);
1966 
1967  path.setup = [&] { guest_es_access_rights::set(0U); };
1968  path.throws_exception = true;
1969  path.exception = ""_ut_lee;
1970  cfg.push_back(path);
1971 
1972  path.setup = [&] { guest_es_access_rights::present::set(1U); };
1973  path.throws_exception = false;
1974  cfg.push_back(path);
1975 }
1976 
1977 static void
1978 setup_check_guest_fs_must_be_present_if_usable_paths(std::vector<struct control_flow_path> &cfg)
1979 {
1980  path.setup = [&] { enable_v8086(); };
1981  path.throws_exception = false;
1982  cfg.push_back(path);
1983 
1984  path.setup = [&]
1985  {
1986  disable_v8086();
1987  make_unusable(guest_fs_access_rights::addr);
1988  };
1989  path.throws_exception = false;
1990  cfg.push_back(path);
1991 
1992  path.setup = [&] { guest_fs_access_rights::set(0U); };
1993  path.throws_exception = true;
1994  path.exception = ""_ut_lee;
1995  cfg.push_back(path);
1996 
1997  path.setup = [&] { guest_fs_access_rights::present::set(1U); };
1998  path.throws_exception = false;
1999  cfg.push_back(path);
2000 }
2001 static void
2002 setup_check_guest_gs_must_be_present_if_usable_paths(std::vector<struct control_flow_path> &cfg)
2003 {
2004  path.setup = [&] { enable_v8086(); };
2005  path.throws_exception = false;
2006  cfg.push_back(path);
2007 
2008  path.setup = [&]
2009  {
2010  disable_v8086();
2011  make_unusable(guest_gs_access_rights::addr);
2012  };
2013  path.throws_exception = false;
2014  cfg.push_back(path);
2015 
2016  path.setup = [&] { guest_gs_access_rights::set(0U); };
2017  path.throws_exception = true;
2018  path.exception = ""_ut_lee;
2019  cfg.push_back(path);
2020 
2021  path.setup = [&] { guest_gs_access_rights::present::set(1U); };
2022  path.throws_exception = false;
2023  cfg.push_back(path);
2024 }
2025 
2026 static void
2027 setup_check_guest_cs_access_rights_reserved_must_be_0_paths(std::vector<struct control_flow_path> &cfg)
2028 {
2029  path.setup = [&] { enable_v8086(); };
2030  path.throws_exception = false;
2031  cfg.push_back(path);
2032 
2033  path.setup = [&]
2034  {
2035  disable_v8086();
2037  };
2038  path.throws_exception = true;
2039  path.exception = ""_ut_lee;
2040  cfg.push_back(path);
2041 
2042  path.setup = [&] { guest_cs_access_rights::set(0U); };
2043  path.throws_exception = false;
2044  cfg.push_back(path);
2045 }
2046 
2047 static void
2048 setup_check_guest_ss_access_rights_reserved_must_be_0_paths(std::vector<struct control_flow_path> &cfg)
2049 {
2050  path.setup = [&] { enable_v8086(); };
2051  path.throws_exception = false;
2052  cfg.push_back(path);
2053 
2054  path.setup = [&]
2055  {
2056  disable_v8086();
2057  make_unusable(guest_ss_access_rights::addr);
2058  };
2059  path.throws_exception = false;
2060  cfg.push_back(path);
2061 
2062  path.setup = [&]
2063  {
2064  make_usable(guest_ss_access_rights::addr);
2066  };
2067  path.throws_exception = true;
2068  path.exception = ""_ut_lee;
2069  cfg.push_back(path);
2070 
2071  path.setup = [&] { guest_ss_access_rights::reserved::set(0U); };
2072  path.throws_exception = false;
2073  cfg.push_back(path);
2074 }
2075 
2076 static void
2077 setup_check_guest_ds_access_rights_reserved_must_be_0_paths(std::vector<struct control_flow_path> &cfg)
2078 {
2079  path.setup = [&] { enable_v8086(); };
2080  path.throws_exception = false;
2081  cfg.push_back(path);
2082 
2083  path.setup = [&]
2084  {
2085  disable_v8086();
2086  make_unusable(guest_ds_access_rights::addr);
2087  };
2088  path.throws_exception = false;
2089  cfg.push_back(path);
2090 
2091  path.setup = [&]
2092  {
2093  make_usable(guest_ds_access_rights::addr);
2095  };
2096  path.throws_exception = true;
2097  path.exception = ""_ut_lee;
2098  cfg.push_back(path);
2099 
2100  path.setup = [&] { guest_ds_access_rights::reserved::set(0U); };
2101  path.throws_exception = false;
2102  cfg.push_back(path);
2103 }
2104 
2105 static void
2106 setup_check_guest_es_access_rights_reserved_must_be_0_paths(std::vector<struct control_flow_path> &cfg)
2107 {
2108  path.setup = [&] { enable_v8086(); };
2109  path.throws_exception = false;
2110  cfg.push_back(path);
2111 
2112  path.setup = [&]
2113  {
2114  disable_v8086();
2115  make_unusable(guest_es_access_rights::addr);
2116  };
2117  path.throws_exception = false;
2118  cfg.push_back(path);
2119 
2120  path.setup = [&]
2121  {
2122  make_usable(guest_es_access_rights::addr);
2124  };
2125  path.throws_exception = true;
2126  path.exception = ""_ut_lee;
2127  cfg.push_back(path);
2128 
2129  path.setup = [&] { guest_es_access_rights::reserved::set(0U); };
2130  path.throws_exception = false;
2131  cfg.push_back(path);
2132 }
2133 
2134 static void
2135 setup_check_guest_fs_access_rights_reserved_must_be_0_paths(std::vector<struct control_flow_path> &cfg)
2136 {
2137  path.setup = [&] { enable_v8086(); };
2138  path.throws_exception = false;
2139  cfg.push_back(path);
2140 
2141  path.setup = [&]
2142  {
2143  disable_v8086();
2144  make_unusable(guest_fs_access_rights::addr);
2145  };
2146  path.throws_exception = false;
2147  cfg.push_back(path);
2148 
2149  path.setup = [&]
2150  {
2151  make_usable(guest_fs_access_rights::addr);
2153  };
2154  path.throws_exception = true;
2155  path.exception = ""_ut_lee;
2156  cfg.push_back(path);
2157 
2158  path.setup = [&] { guest_fs_access_rights::reserved::set(0U); };
2159  path.throws_exception = false;
2160  cfg.push_back(path);
2161 }
2162 
2163 static void
2164 setup_check_guest_gs_access_rights_reserved_must_be_0_paths(std::vector<struct control_flow_path> &cfg)
2165 {
2166  path.setup = [&] { enable_v8086(); };
2167  path.throws_exception = false;
2168  cfg.push_back(path);
2169 
2170  path.setup = [&]
2171  {
2172  disable_v8086();
2173  make_unusable(guest_gs_access_rights::addr);
2174  };
2175  path.throws_exception = false;
2176  cfg.push_back(path);
2177 
2178  path.setup = [&]
2179  {
2180  make_usable(guest_gs_access_rights::addr);
2182  };
2183  path.throws_exception = true;
2184  path.exception = ""_ut_lee;
2185  cfg.push_back(path);
2186 
2187  path.setup = [&] { guest_gs_access_rights::reserved::set(0U); };
2188  path.throws_exception = false;
2189  cfg.push_back(path);
2190 }
2191 
2192 static void
2193 setup_check_guest_cs_db_must_be_0_if_l_equals_1_paths(std::vector<struct control_flow_path> &cfg)
2194 {
2195  path.setup = [&] { enable_v8086(); };
2196  path.throws_exception = false;
2197  cfg.push_back(path);
2198 
2199  path.setup = [&]
2200  {
2201  disable_v8086();
2204  };
2205  path.throws_exception = false;
2206  cfg.push_back(path);
2207 
2208  path.setup = [&]
2209  {
2213  };
2214  path.throws_exception = false;
2215  cfg.push_back(path);
2216 
2217  path.setup = [&] { guest_cs_access_rights::l::set(1U); };
2218  path.throws_exception = false;
2219  cfg.push_back(path);
2220 
2221  path.setup = [&] { guest_cs_access_rights::db::set(1U); };
2222  path.throws_exception = true;
2223  path.exception = ""_ut_lee;
2224  cfg.push_back(path);
2225 }
2226 
2227 static void
2228 setup_check_guest_cs_granularity_paths(std::vector<struct control_flow_path> &cfg)
2229 {
2230  path.setup = [&] { enable_v8086(); };
2231  path.throws_exception = false;
2232  cfg.push_back(path);
2233 
2234  path.setup = [&]
2235  {
2236  disable_v8086();
2237  guest_cs_limit::set(0U);
2239  };
2240  path.throws_exception = true;
2241  path.exception = ""_ut_lee;
2242  cfg.push_back(path);
2243 
2244  path.setup = [&] { guest_cs_access_rights::granularity::set(0U); };
2245  path.throws_exception = false;
2246  cfg.push_back(path);
2247 
2248  path.setup = [&] { guest_cs_limit::set(0xf000000U); };
2249  path.throws_exception = true;
2250  path.exception = ""_ut_lee;
2251  cfg.push_back(path);
2252 }
2253 
2254 static void
2255 setup_check_guest_ss_granularity_paths(std::vector<struct control_flow_path> &cfg)
2256 {
2257  path.setup = [&] { enable_v8086(); };
2258  path.throws_exception = false;
2259  cfg.push_back(path);
2260 
2261  path.setup = [&]
2262  {
2263  disable_v8086();
2264  make_unusable(guest_ss_access_rights::addr);
2265  };
2266  path.throws_exception = false;
2267  cfg.push_back(path);
2268 
2269  path.setup = [&]
2270  {
2271  make_usable(guest_ss_access_rights::addr);
2272  guest_ss_limit::set(0U);
2274  };
2275  path.throws_exception = true;
2276  path.exception = ""_ut_lee;
2277  cfg.push_back(path);
2278 
2279  path.setup = [&] { guest_ss_access_rights::granularity::set(0U); };
2280  path.throws_exception = false;
2281  cfg.push_back(path);
2282 
2283  path.setup = [&] { guest_ss_limit::set(0xf000000U); };
2284  path.throws_exception = true;
2285  path.exception = ""_ut_lee;
2286  cfg.push_back(path);
2287 }
2288 
2289 static void
2290 setup_check_guest_ds_granularity_paths(std::vector<struct control_flow_path> &cfg)
2291 {
2292  path.setup = [&] { enable_v8086(); };
2293  path.throws_exception = false;
2294  cfg.push_back(path);
2295 
2296  path.setup = [&]
2297  {
2298  disable_v8086();
2299  make_unusable(guest_ds_access_rights::addr);
2300  };
2301  path.throws_exception = false;
2302  cfg.push_back(path);
2303 
2304  path.setup = [&]
2305  {
2306  make_usable(guest_ds_access_rights::addr);
2307  guest_ds_limit::set(0U);
2309  };
2310  path.throws_exception = true;
2311  path.exception = ""_ut_lee;
2312  cfg.push_back(path);
2313 
2314  path.setup = [&] { guest_ds_access_rights::granularity::set(0U); };
2315  path.throws_exception = false;
2316  cfg.push_back(path);
2317 
2318  path.setup = [&] { guest_ds_limit::set(0xf000000U); };
2319  path.throws_exception = true;
2320  path.exception = ""_ut_lee;
2321  cfg.push_back(path);
2322 }
2323 
2324 static void
2325 setup_check_guest_es_granularity_paths(std::vector<struct control_flow_path> &cfg)
2326 {
2327  path.setup = [&] { enable_v8086(); };
2328  path.throws_exception = false;
2329  cfg.push_back(path);
2330 
2331  path.setup = [&]
2332  {
2333  disable_v8086();
2334  make_unusable(guest_es_access_rights::addr);
2335  };
2336  path.throws_exception = false;
2337  cfg.push_back(path);
2338 
2339  path.setup = [&]
2340  {
2341  make_usable(guest_es_access_rights::addr);
2342  guest_es_limit::set(0U);
2344  };
2345  path.throws_exception = true;
2346  path.exception = ""_ut_lee;
2347  cfg.push_back(path);
2348 
2349  path.setup = [&] { guest_es_access_rights::granularity::set(0U); };
2350  path.throws_exception = false;
2351  cfg.push_back(path);
2352 
2353  path.setup = [&] { guest_es_limit::set(0xf000000U); };
2354  path.throws_exception = true;
2355  path.exception = ""_ut_lee;
2356  cfg.push_back(path);
2357 }
2358 
2359 static void
2360 setup_check_guest_fs_granularity_paths(std::vector<struct control_flow_path> &cfg)
2361 {
2362  path.setup = [&] { enable_v8086(); };
2363  path.throws_exception = false;
2364  cfg.push_back(path);
2365 
2366  path.setup = [&]
2367  {
2368  disable_v8086();
2369  make_unusable(guest_fs_access_rights::addr);
2370  };
2371  path.throws_exception = false;
2372  cfg.push_back(path);
2373 
2374  path.setup = [&]
2375  {
2376  make_usable(guest_fs_access_rights::addr);
2377  guest_fs_limit::set(0U);
2379  };
2380  path.throws_exception = true;
2381  path.exception = ""_ut_lee;
2382  cfg.push_back(path);
2383 
2384  path.setup = [&] { guest_fs_access_rights::granularity::set(0U); };
2385  path.throws_exception = false;
2386  cfg.push_back(path);
2387 
2388  path.setup = [&] { guest_fs_limit::set(0xf000000U); };
2389  path.throws_exception = true;
2390  path.exception = ""_ut_lee;
2391  cfg.push_back(path);
2392 }
2393 
2394 static void
2395 setup_check_guest_gs_granularity_paths(std::vector<struct control_flow_path> &cfg)
2396 {
2397  path.setup = [&] { enable_v8086(); };
2398  path.throws_exception = false;
2399  cfg.push_back(path);
2400 
2401  path.setup = [&]
2402  {
2403  disable_v8086();
2404  make_unusable(guest_gs_access_rights::addr);
2405  };
2406  path.throws_exception = false;
2407  cfg.push_back(path);
2408 
2409  path.setup = [&]
2410  {
2411  make_usable(guest_gs_access_rights::addr);
2412  guest_gs_limit::set(0U);
2414  };
2415  path.throws_exception = true;
2416  path.exception = ""_ut_lee;
2417  cfg.push_back(path);
2418 
2419  path.setup = [&] { guest_gs_access_rights::granularity::set(0U); };
2420  path.throws_exception = false;
2421  cfg.push_back(path);
2422 
2423  path.setup = [&] { guest_gs_limit::set(0xf000000U); };
2424  path.throws_exception = true;
2425  path.exception = ""_ut_lee;
2426  cfg.push_back(path);
2427 }
2428 
2429 static void
2430 setup_check_guest_cs_access_rights_remaining_reserved_bit_0_paths(std::vector<struct control_flow_path> &cfg)
2431 {
2432  path.setup = [&] { enable_v8086(); };
2433  path.throws_exception = false;
2434  cfg.push_back(path);
2435 
2436  path.setup = [&]
2437  {
2438  disable_v8086();
2439  guest_cs_access_rights::set(0xE0000U);
2440  };
2441  path.throws_exception = true;
2442  path.exception = ""_ut_lee;
2443  cfg.push_back(path);
2444 
2445  path.setup = [&] { guest_cs_access_rights::set(0U); };
2446  path.throws_exception = false;
2447  cfg.push_back(path);
2448 }
2449 
2450 static void
2451 setup_check_guest_ss_access_rights_remaining_reserved_bit_0_paths(std::vector<struct control_flow_path> &cfg)
2452 {
2453  path.setup = [&] { enable_v8086(); };
2454  path.throws_exception = false;
2455  cfg.push_back(path);
2456 
2457  path.setup = [&]
2458  {
2459  disable_v8086();
2460  make_unusable(guest_ss_access_rights::addr);
2461  };
2462  path.throws_exception = false;
2463  cfg.push_back(path);
2464 
2465  path.setup = [&]
2466  {
2467  make_usable(guest_ss_access_rights::addr);
2468  guest_ss_access_rights::set(0xe0000U);
2469  };
2470  path.throws_exception = true;
2471  path.exception = ""_ut_lee;
2472  cfg.push_back(path);
2473 
2474  path.setup = [&] { guest_ss_access_rights::set(0x0UL); };
2475  path.throws_exception = false;
2476  cfg.push_back(path);
2477 }
2478 
2479 static void
2480 setup_check_guest_ds_access_rights_remaining_reserved_bit_0_paths(std::vector<struct control_flow_path> &cfg)
2481 {
2482  path.setup = [&] { enable_v8086(); };
2483  path.throws_exception = false;
2484  cfg.push_back(path);
2485 
2486  path.setup = [&]
2487  {
2488  disable_v8086();
2489  make_unusable(guest_ds_access_rights::addr);
2490  };
2491  path.throws_exception = false;
2492  cfg.push_back(path);
2493 
2494  path.setup = [&]
2495  {
2496  make_usable(guest_ds_access_rights::addr);
2497  guest_ds_access_rights::set(0xe0000U);
2498  };
2499  path.throws_exception = true;
2500  path.exception = ""_ut_lee;
2501  cfg.push_back(path);
2502 
2503  path.setup = [&] { guest_ds_access_rights::set(0x0UL); };
2504  path.throws_exception = false;
2505  cfg.push_back(path);
2506 }
2507 
2508 static void
2509 setup_check_guest_es_access_rights_remaining_reserved_bit_0_paths(std::vector<struct control_flow_path> &cfg)
2510 {
2511  path.setup = [&] { enable_v8086(); };
2512  path.throws_exception = false;
2513  cfg.push_back(path);
2514 
2515  path.setup = [&]
2516  {
2517  disable_v8086();
2518  make_unusable(guest_es_access_rights::addr);
2519  };
2520  path.throws_exception = false;
2521  cfg.push_back(path);
2522 
2523  path.setup = [&]
2524  {
2525  make_usable(guest_es_access_rights::addr);
2526  guest_es_access_rights::set(0xe0000U);
2527  };
2528  path.throws_exception = true;
2529  path.exception = ""_ut_lee;
2530  cfg.push_back(path);
2531 
2532  path.setup = [&] { guest_es_access_rights::set(0x0UL); };
2533  path.throws_exception = false;
2534  cfg.push_back(path);
2535 }
2536 
2537 static void
2538 setup_check_guest_fs_access_rights_remaining_reserved_bit_0_paths(std::vector<struct control_flow_path> &cfg)
2539 {
2540  path.setup = [&] { enable_v8086(); };
2541  path.throws_exception = false;
2542  cfg.push_back(path);
2543 
2544  path.setup = [&]
2545  {
2546  disable_v8086();
2547  make_unusable(guest_fs_access_rights::addr);
2548  };
2549  path.throws_exception = false;
2550  cfg.push_back(path);
2551 
2552  path.setup = [&]
2553  {
2554  make_usable(guest_fs_access_rights::addr);
2555  guest_fs_access_rights::set(0xe0000U);
2556  };
2557  path.throws_exception = true;
2558  path.exception = ""_ut_lee;
2559  cfg.push_back(path);
2560 
2561  path.setup = [&] { guest_fs_access_rights::set(0x0UL); };
2562  path.throws_exception = false;
2563  cfg.push_back(path);
2564 }
2565 
2566 static void
2567 setup_check_guest_gs_access_rights_remaining_reserved_bit_0_paths(std::vector<struct control_flow_path> &cfg)
2568 {
2569  path.setup = [&] { enable_v8086(); };
2570  path.throws_exception = false;
2571  cfg.push_back(path);
2572 
2573  path.setup = [&]
2574  {
2575  disable_v8086();
2576  make_unusable(guest_gs_access_rights::addr);
2577  };
2578  path.throws_exception = false;
2579  cfg.push_back(path);
2580 
2581  path.setup = [&]
2582  {
2583  make_usable(guest_gs_access_rights::addr);
2584  guest_gs_access_rights::set(0xe0000U);
2585  };
2586  path.throws_exception = true;
2587  path.exception = ""_ut_lee;
2588  cfg.push_back(path);
2589 
2590  path.setup = [&] { guest_gs_access_rights::set(0x0UL); };
2591  path.throws_exception = false;
2592  cfg.push_back(path);
2593 }
2594 
2595 static void
2596 setup_check_guest_tr_type_must_be_11_paths(std::vector<struct control_flow_path> &cfg)
2597 {
2598  path.setup = [&]
2599  {
2603  };
2604  path.throws_exception = true;
2605  path.exception = ""_ut_lee;
2606  cfg.push_back(path);
2607 
2608  path.setup = [&]
2609  {
2612  };
2613  path.throws_exception = false;
2614  cfg.push_back(path);
2615 
2616  path.setup = [&] { guest_tr_access_rights::set(11U); };
2617  path.throws_exception = false;
2618  cfg.push_back(path);
2619 
2620  path.setup = [&] { guest_tr_access_rights::set(0U); };
2621  path.throws_exception = true;
2622  path.exception = ""_ut_lee;
2623  cfg.push_back(path);
2624 }
2625 
2626 static void
2627 setup_check_guest_tr_must_be_a_system_descriptor_paths(std::vector<struct control_flow_path> &cfg)
2628 {
2629  path.setup = [&] { guest_tr_access_rights::s::set(1U); };
2630  path.throws_exception = true;
2631  path.exception = ""_ut_lee;
2632  cfg.push_back(path);
2633 
2634  path.setup = [&] { guest_tr_access_rights::set(0U); };
2635  path.throws_exception = false;
2636  cfg.push_back(path);
2637 }
2638 
2639 static void
2640 setup_check_guest_tr_must_be_present_paths(std::vector<struct control_flow_path> &cfg)
2641 {
2642  path.setup = [&] { guest_tr_access_rights::set(0U); };
2643  path.throws_exception = true;
2644  path.exception = ""_ut_lee;
2645  cfg.push_back(path);
2646 
2647  path.setup = [&] { guest_tr_access_rights::present::set(1U); };
2648  path.throws_exception = false;
2649  cfg.push_back(path);
2650 }
2651 
2652 static void
2653 setup_check_guest_tr_access_rights_reserved_must_be_0_paths(std::vector<struct control_flow_path> &cfg)
2654 {
2655  path.setup = [&] { guest_tr_access_rights::set(0xf00U); };
2656  path.throws_exception = true;
2657  path.exception = ""_ut_lee;
2658  cfg.push_back(path);
2659 
2660  path.setup = [&] { guest_tr_access_rights::set(0U); };
2661  path.throws_exception = false;
2662  cfg.push_back(path);
2663 }
2664 
2665 static void
2666 setup_check_guest_tr_granularity_paths(std::vector<struct control_flow_path> &cfg)
2667 {
2668  path.setup = [&] { enable_v8086(); };
2669  path.throws_exception = false;
2670  cfg.push_back(path);
2671 
2672  path.setup = [&]
2673  {
2674  disable_v8086();
2675  make_unusable(guest_tr_access_rights::addr);
2676  };
2677  path.throws_exception = false;
2678  cfg.push_back(path);
2679 
2680  path.setup = [&]
2681  {
2682  make_usable(guest_tr_access_rights::addr);
2683  guest_tr_limit::set(0U);
2685  };
2686  path.throws_exception = true;
2687  path.exception = ""_ut_lee;
2688  cfg.push_back(path);
2689 
2690  path.setup = [&] { guest_tr_access_rights::granularity::set(0U); };
2691  path.throws_exception = false;
2692  cfg.push_back(path);
2693 
2694  path.setup = [&] { guest_tr_limit::set(0xf000000U); };
2695  path.throws_exception = true;
2696  path.exception = ""_ut_lee;
2697  cfg.push_back(path);
2698 }
2699 
2700 static void
2701 setup_check_guest_tr_must_be_usable_paths(std::vector<struct control_flow_path> &cfg)
2702 {
2703  path.setup = [&] { make_unusable(guest_tr_access_rights::addr); };
2704  path.throws_exception = true;
2705  path.exception = ""_ut_lee;
2706  cfg.push_back(path);
2707 
2708  path.setup = [&] { make_usable(guest_tr_access_rights::addr); };
2709  path.throws_exception = false;
2710  cfg.push_back(path);
2711 }
2712 
2713 static void
2714 setup_check_guest_tr_access_rights_remaining_reserved_bit_0_paths(std::vector<struct control_flow_path> &cfg)
2715 {
2716  path.setup = [&] { guest_tr_access_rights::set(0xe0000U); };
2717  path.throws_exception = true;
2718  path.exception = ""_ut_lee;
2719  cfg.push_back(path);
2720 
2721  path.setup = [&] { guest_tr_access_rights::set(0U); };
2722  path.throws_exception = false;
2723  cfg.push_back(path);
2724 }
2725 
2726 static void
2727 setup_check_guest_ldtr_type_must_be_2_paths(std::vector<struct control_flow_path> &cfg)
2728 {
2729  path.setup = [&] { make_unusable(guest_ldtr_access_rights::addr); };
2730  path.throws_exception = false;
2731  cfg.push_back(path);
2732 
2733  path.setup = [&]
2734  {
2735  make_usable(guest_ldtr_access_rights::addr);
2737  };
2738  path.throws_exception = true;
2739  path.exception = ""_ut_lee;
2740  cfg.push_back(path);
2741 
2742  path.setup = [&] { guest_ldtr_access_rights::type::set(2U); };
2743  path.throws_exception = false;
2744  cfg.push_back(path);
2745 }
2746 
2747 static void
2748 setup_check_guest_ldtr_must_be_a_system_descriptor_paths(std::vector<struct control_flow_path> &cfg)
2749 {
2750  path.setup = [&] { make_unusable(guest_ldtr_access_rights::addr); };
2751  path.throws_exception = false;
2752  cfg.push_back(path);
2753 
2754  path.setup = [&]
2755  {
2756  make_usable(guest_ldtr_access_rights::addr);
2758  };
2759  path.throws_exception = true;
2760  path.exception = ""_ut_lee;
2761  cfg.push_back(path);
2762 
2763  path.setup = [&] { guest_ldtr_access_rights::s::set(0U); };
2764  path.throws_exception = false;
2765  cfg.push_back(path);
2766 }
2767 
2768 static void
2769 setup_check_guest_ldtr_must_be_present_paths(std::vector<struct control_flow_path> &cfg)
2770 {
2771  path.setup = [&] { make_unusable(guest_ldtr_access_rights::addr); };
2772  path.throws_exception = false;
2773  cfg.push_back(path);
2774 
2775  path.setup = [&]
2776  {
2777  make_usable(guest_ldtr_access_rights::addr);
2779  };
2780  path.throws_exception = true;
2781  path.exception = ""_ut_lee;
2782  cfg.push_back(path);
2783 
2784  path.setup = [&] { guest_ldtr_access_rights::present::set(1U); };
2785  path.throws_exception = false;
2786  cfg.push_back(path);
2787 }
2788 
2789 static void
2790 setup_check_guest_ldtr_access_rights_reserved_must_be_0_paths(std::vector<struct control_flow_path> &cfg)
2791 {
2792  path.setup = [&] { make_unusable(guest_ldtr_access_rights::addr); };
2793  path.throws_exception = false;
2794  cfg.push_back(path);
2795 
2796  path.setup = [&]
2797  {
2798  make_usable(guest_ldtr_access_rights::addr);
2800  };
2801  path.throws_exception = true;
2802  path.exception = ""_ut_lee;
2803  cfg.push_back(path);
2804 
2805  path.setup = [&] { guest_ldtr_access_rights::reserved::set(0x0UL); };
2806  path.throws_exception = false;
2807  cfg.push_back(path);
2808 }
2809 
2810 static void
2811 setup_check_guest_ldtr_granularity_paths(std::vector<struct control_flow_path> &cfg)
2812 {
2813  path.setup = [&] { enable_v8086(); };
2814  path.throws_exception = false;
2815  cfg.push_back(path);
2816 
2817  path.setup = [&]
2818  {
2819  disable_v8086();
2820  make_unusable(guest_ldtr_access_rights::addr);
2821  };
2822  path.throws_exception = false;
2823  cfg.push_back(path);
2824 
2825  path.setup = [&]
2826  {
2827  make_usable(guest_ldtr_access_rights::addr);
2830  };
2831  path.throws_exception = true;
2832  path.exception = ""_ut_lee;
2833  cfg.push_back(path);
2834 
2836  path.throws_exception = false;
2837  cfg.push_back(path);
2838 
2839  path.setup = [&] { guest_ldtr_limit::set(0xf000000U); };
2840  path.throws_exception = true;
2841  path.exception = ""_ut_lee;
2842  cfg.push_back(path);
2843 }
2844 
2845 static void
2846 setup_check_guest_ldtr_access_rights_remaining_reserved_bit_0_paths(std::vector<struct control_flow_path> &cfg)
2847 {
2848  path.setup = [&] { make_unusable(guest_ldtr_access_rights::addr); };
2849  path.throws_exception = false;
2850  cfg.push_back(path);
2851 
2852  path.setup = [&]
2853  {
2854  make_usable(guest_ldtr_access_rights::addr);
2856  };
2857  path.throws_exception = true;
2858  path.exception = ""_ut_lee;
2859  cfg.push_back(path);
2860 
2861  path.setup = [&] { guest_ldtr_access_rights::reserved::set(0x0U); };
2862  path.throws_exception = false;
2863  cfg.push_back(path);
2864 }
2865 
2866 static void
2867 setup_check_guest_gdtr_base_must_be_canonical_paths(std::vector<struct control_flow_path> &cfg)
2868 {
2869  path.setup = [&] { guest_gdtr_base::set(0x800000000000U); };
2870  path.throws_exception = true;
2871  path.exception = ""_ut_lee;
2872  cfg.push_back(path);
2873 
2874  path.setup = [&] { guest_gdtr_base::set(0U); };
2875  path.throws_exception = false;
2876  cfg.push_back(path);
2877 }
2878 
2879 static void
2880 setup_check_guest_idtr_base_must_be_canonical_paths(std::vector<struct control_flow_path> &cfg)
2881 {
2882  path.setup = [&] { guest_idtr_base::set(0x800000000000U); };
2883  path.throws_exception = true;
2884  path.exception = ""_ut_lee;
2885  cfg.push_back(path);
2886 
2887  path.setup = [&] { guest_idtr_base::set(0U); };
2888  path.throws_exception = false;
2889  cfg.push_back(path);
2890 }
2891 
2892 static void
2893 setup_check_guest_gdtr_limit_reserved_bits_paths(std::vector<struct control_flow_path> &cfg)
2894 {
2895  path.setup = [&] { guest_gdtr_limit::set(0xf0000U); };
2896  path.throws_exception = true;
2897  path.exception = ""_ut_lee;
2898  cfg.push_back(path);
2899 
2900  path.setup = [&] { guest_gdtr_limit::set(1U); };
2901  path.throws_exception = false;
2902  cfg.push_back(path);
2903 }
2904 
2905 static void
2906 setup_check_guest_idtr_limit_reserved_bits_paths(std::vector<struct control_flow_path> &cfg)
2907 {
2908  path.setup = [&] { guest_idtr_limit::set(0xf0000U); };
2909  path.throws_exception = true;
2910  path.exception = ""_ut_lee;
2911  cfg.push_back(path);
2912 
2913  path.setup = [&] { guest_idtr_limit::set(1U); };
2914  path.throws_exception = false;
2915  cfg.push_back(path);
2916 }
2917 
2918 static void
2919 setup_check_guest_rip_upper_bits_paths(std::vector<struct control_flow_path> &cfg)
2920 {
2921  path.setup = [&]
2922  {
2926  };
2927  path.throws_exception = false;
2928  cfg.push_back(path);
2929 
2930  path.setup = [&]
2931  {
2934  guest_rip::set(0xf00000000U);
2935  };
2936  path.throws_exception = true;
2937  path.exception = ""_ut_lee;
2938  cfg.push_back(path);
2939 
2940  path.setup = [&] { guest_rip::set(0U); };
2941  path.throws_exception = false;
2942  cfg.push_back(path);
2943 }
2944 
2945 static void
2946 setup_check_guest_rip_valid_addr_paths(std::vector<struct control_flow_path> &cfg)
2947 {
2948  path.setup = [&]
2949  {
2952  };
2953  path.throws_exception = false;
2954  cfg.push_back(path);
2955 
2956  path.setup = [&]
2957  {
2961  };
2962  path.throws_exception = false;
2963  cfg.push_back(path);
2964 
2965  path.setup = [&]
2966  {
2968  guest_rip::set(0x800000000000U);
2969  };
2970  path.throws_exception = true;
2971  path.exception = ""_ut_lee;
2972  cfg.push_back(path);
2973 
2974  path.setup = [&] { guest_rip::set(0U); };
2975  path.throws_exception = false;
2976  cfg.push_back(path);
2977 }
2978 
2979 static void
2980 setup_check_guest_rflags_reserved_bits_paths(std::vector<struct control_flow_path> &cfg)
2981 {
2982  path.setup = [&] { guest_rflags::reserved::set(0xffffffffU); };
2983  path.throws_exception = true;
2984  path.exception = ""_ut_lee;
2985  cfg.push_back(path);
2986 
2987  path.setup = [&] { guest_rflags::set(0x0U); };
2988  path.throws_exception = true;
2989  path.exception = ""_ut_lee;
2990  cfg.push_back(path);
2991 
2992  path.setup = [&] { guest_rflags::set(2U); };
2993  path.throws_exception = false;
2994  cfg.push_back(path);
2995 }
2996 
2997 static void
2998 setup_check_guest_rflags_vm_bit_paths(std::vector<struct control_flow_path> &cfg)
2999 {
3000  path.setup = [&]
3001  {
3005  };
3006  path.throws_exception = false;
3007  cfg.push_back(path);
3008 
3009  path.setup = [&]
3010  {
3013  };
3014  path.throws_exception = true;
3015  path.exception = ""_ut_lee;
3016  cfg.push_back(path);
3017 
3018  path.setup = [&] { guest_rflags::set(0U); };
3019  path.throws_exception = false;
3020  cfg.push_back(path);
3021 }
3022 
3023 static void
3024 setup_check_guest_rflag_interrupt_enable_paths(std::vector<struct control_flow_path> &cfg)
3025 {
3026  using namespace vm_entry_interruption_information_field;
3027 
3028  path.setup = [&] { valid_bit::disable(); };
3029  path.throws_exception = false;
3030  cfg.push_back(path);
3031 
3032  path.setup = [&]
3033  {
3036  };
3037  path.throws_exception = false;
3038  cfg.push_back(path);
3039 
3040  path.setup = [&]
3041  {
3044  };
3045  path.throws_exception = true;
3046  path.exception = ""_ut_lee;
3047  cfg.push_back(path);
3048 
3050  path.throws_exception = false;
3051  cfg.push_back(path);
3052 }
3053 
3054 static void
3055 setup_check_guest_valid_activity_state_paths(std::vector<struct control_flow_path> &cfg)
3056 {
3057  path.setup = [&] { guest_activity_state::set(4U); };
3058  path.throws_exception = true;
3059  path.exception = ""_ut_lee;
3060  cfg.push_back(path);
3061 
3062  path.setup = [&] { guest_activity_state::set(3U); };
3063  path.throws_exception = false;
3064  cfg.push_back(path);
3065 }
3066 
3067 static void
3068 setup_check_guest_activity_state_not_hlt_when_dpl_not_0_paths(std::vector<struct control_flow_path> &cfg)
3069 {
3071  path.throws_exception = false;
3072  cfg.push_back(path);
3073 
3074  path.setup = [&]
3075  {
3078  };
3079  path.throws_exception = true;
3080  path.exception = ""_ut_lee;
3081  cfg.push_back(path);
3082 
3083  path.setup = [&] { guest_ss_access_rights::set(0U); };
3084  path.throws_exception = false;
3085  cfg.push_back(path);
3086 }
3087 
3088 static void
3089 setup_check_guest_must_be_active_if_injecting_blocking_state_paths(std::vector<struct control_flow_path> &cfg)
3090 {
3092  path.throws_exception = false;
3093  cfg.push_back(path);
3094 
3095  path.setup = [&]
3096  {
3099  };
3100  path.throws_exception = true;
3101  path.exception = ""_ut_lee;
3102  cfg.push_back(path);
3103 
3104  path.setup = [&]
3105  {
3108  };
3109  path.throws_exception = true;
3110  path.exception = ""_ut_lee;
3111  cfg.push_back(path);
3112 
3113  path.setup = [&] { guest_interruptibility_state::set(0U); };
3114  path.throws_exception = false;
3115  cfg.push_back(path);
3116 }
3117 
3118 static void
3119 setup_check_guest_hlt_valid_interrupts_paths(std::vector<struct control_flow_path> &cfg)
3120 {
3121  using namespace vm_entry_interruption_information_field;
3122 
3123  path.setup = [&] { valid_bit::disable(); };
3124  path.throws_exception = false;
3125  cfg.push_back(path);
3126 
3127  path.setup = [&]
3128  {
3131  };
3132  path.throws_exception = false;
3133  cfg.push_back(path);
3134 
3135  path.setup = [&]
3136  {
3139  };
3140  path.throws_exception = false;
3141  cfg.push_back(path);
3142 
3143  path.setup = [&]
3144  {
3147  };
3148  path.throws_exception = false;
3149  cfg.push_back(path);
3150 
3152  path.throws_exception = false;
3153  cfg.push_back(path);
3154 
3156  path.throws_exception = true;
3157  path.exception = ""_ut_lee;
3158  cfg.push_back(path);
3159 
3160  path.setup = [&]
3161  {
3164  };
3165  path.throws_exception = false;
3166  cfg.push_back(path);
3167 
3169  path.throws_exception = true;
3170  path.exception = ""_ut_lee;
3171  cfg.push_back(path);
3172 
3174  path.throws_exception = true;
3175  path.exception = ""_ut_lee;
3176  cfg.push_back(path);
3177 }
3178 
3179 static void
3180 setup_check_guest_shutdown_valid_interrupts_paths(std::vector<struct control_flow_path> &cfg)
3181 {
3182  using namespace vm_entry_interruption_information_field;
3183 
3184  path.setup = [&] { valid_bit::disable(); };
3185  path.throws_exception = false;
3186  cfg.push_back(path);
3187 
3188  path.setup = [&]
3189  {
3192  };
3193  path.throws_exception = false;
3194  cfg.push_back(path);
3195 
3196  path.setup = [&]
3197  {
3200  };
3201  path.throws_exception = false;
3202  cfg.push_back(path);
3203 
3204  path.setup = [&]
3205  {
3208  };
3209  path.throws_exception = false;
3210  cfg.push_back(path);
3211 
3213  path.throws_exception = true;
3214  path.exception = ""_ut_lee;
3215  cfg.push_back(path);
3216 
3218  path.throws_exception = true;
3219  path.exception = ""_ut_lee;
3220  cfg.push_back(path);
3221 }
3222 
3223 static void
3224 setup_check_guest_sipi_valid_interrupts_paths(std::vector<struct control_flow_path> &cfg)
3225 {
3226  using namespace vm_entry_interruption_information_field;
3227 
3228  path.setup = [&] { valid_bit::disable(); };
3229  path.throws_exception = false;
3230  cfg.push_back(path);
3231 
3232  path.setup = [&]
3233  {
3236  };
3237  path.throws_exception = false;
3238  cfg.push_back(path);
3239 
3241  path.throws_exception = true;
3242  path.exception = ""_ut_lee;
3243  cfg.push_back(path);
3244 }
3245 
3246 static void
3247 setup_check_guest_valid_activity_state_and_smm_paths(std::vector<struct control_flow_path> &cfg)
3248 {
3249  path.setup = [&]
3250  {
3253  };
3254  path.throws_exception = false;
3255  cfg.push_back(path);
3256 
3257  path.setup = [&]
3258  {
3262  };
3263  path.throws_exception = false;
3264  cfg.push_back(path);
3265 
3267  path.throws_exception = true;
3268  path.exception = ""_ut_lee;
3269  cfg.push_back(path);
3270 }
3271 
3272 static void
3273 setup_check_guest_interruptibility_state_reserved_paths(std::vector<struct control_flow_path> &cfg)
3274 {
3275  path.setup = [&] { guest_interruptibility_state::reserved::set(0xe0U); };
3276  path.throws_exception = true;
3277  path.exception = ""_ut_lee;
3278  cfg.push_back(path);
3279 
3281  path.throws_exception = false;
3282  cfg.push_back(path);
3283 }
3284 
3285 static void
3286 setup_check_guest_interruptibility_state_sti_mov_ss_paths(std::vector<struct control_flow_path> &cfg)
3287 {
3288  path.setup = [&] { guest_interruptibility_state::set(0U); };
3289  path.throws_exception = false;
3290  cfg.push_back(path);
3291 
3292  path.setup = [&]
3293  {
3296  };
3297  path.throws_exception = true;
3298  path.exception = ""_ut_lee;
3299  cfg.push_back(path);
3300 }
3301 
3302 static void
3303 setup_check_guest_interruptibility_state_sti_paths(std::vector<struct control_flow_path> &cfg)
3304 {
3306  path.throws_exception = false;
3307  cfg.push_back(path);
3308 
3309  path.setup = [&]
3310  {
3313  };
3314  path.throws_exception = true;
3315  path.exception = ""_ut_lee;
3316  cfg.push_back(path);
3317 
3319  path.throws_exception = false;
3320  cfg.push_back(path);
3321 }
3322 
3323 static void
3324 setup_check_guest_interruptibility_state_external_interrupt_paths(std::vector<struct control_flow_path> &cfg)
3325 {
3326  using namespace vm_entry_interruption_information_field;
3327 
3328  path.setup = [&] { valid_bit::disable(); };
3329  path.throws_exception = false;
3330  cfg.push_back(path);
3331 
3332  path.setup = [&]
3333  {
3336  };
3337  path.throws_exception = false;
3338  cfg.push_back(path);
3339 
3340  path.setup = [&]
3341  {
3344  };
3345  path.throws_exception = true;
3346  path.exception = ""_ut_lee;
3347  cfg.push_back(path);
3348 
3349  path.setup = [&]
3350  {
3353  };
3354  path.throws_exception = true;
3355  path.exception = ""_ut_lee;
3356  cfg.push_back(path);
3357 
3359  path.throws_exception = false;
3360  cfg.push_back(path);
3361 }
3362 
3363 static void
3364 setup_check_guest_interruptibility_state_nmi_paths(std::vector<struct control_flow_path> &cfg)
3365 {
3366  using namespace vm_entry_interruption_information_field;
3367 
3368  path.setup = [&] { valid_bit::disable(); };
3369  path.throws_exception = false;
3370  cfg.push_back(path);
3371 
3372  path.setup = [&]
3373  {
3376  };
3377  path.throws_exception = false;
3378  cfg.push_back(path);
3379 
3380  path.setup = [&]
3381  {
3384  };
3385  path.throws_exception = true;
3386  path.exception = ""_ut_lee;
3387  cfg.push_back(path);
3388 
3390  path.throws_exception = false;
3391  cfg.push_back(path);
3392 }
3393 
3394 static void
3395 setup_check_guest_interruptibility_not_in_smm_paths(std::vector<struct control_flow_path> &cfg)
3396 {
3397  (void) cfg;
3398 }
3399 
3400 static void
3401 setup_check_guest_interruptibility_entry_to_smm_paths(std::vector<struct control_flow_path> &cfg)
3402 {
3403  path.setup = [&]
3404  {
3407  };
3408  path.throws_exception = false;
3409  cfg.push_back(path);
3410 
3411  path.setup = [&]
3412  {
3416  };
3417  path.throws_exception = true;
3418  path.exception = ""_ut_lee;
3419  cfg.push_back(path);
3420 
3422  path.throws_exception = false;
3423  cfg.push_back(path);
3424 }
3425 
3426 static void
3427 setup_check_guest_interruptibility_state_sti_and_nmi_paths(std::vector<struct control_flow_path> &cfg)
3428 {
3429  using namespace vm_entry_interruption_information_field;
3430 
3431  path.setup = [&] { valid_bit::disable(); };
3432  path.throws_exception = false;
3433  cfg.push_back(path);
3434 
3435  path.setup = [&]
3436  {
3439  };
3440  path.throws_exception = false;
3441  cfg.push_back(path);
3442 
3443  path.setup = [&]
3444  {
3447  };
3448  path.throws_exception = true;
3449  path.exception = ""_ut_lee;
3450  cfg.push_back(path);
3451 
3453  path.throws_exception = false;
3454  cfg.push_back(path);
3455 }
3456 
3457 static void
3458 setup_check_guest_interruptibility_state_virtual_nmi_paths(std::vector<struct control_flow_path> &cfg)
3459 {
3460  using namespace vm_entry_interruption_information_field;
3461 
3462  path.setup = [&]
3463  {
3466  };
3467  path.throws_exception = false;
3468  cfg.push_back(path);
3469 
3470  path.setup = [&]
3471  {
3475  };
3476  path.throws_exception = false;
3477  cfg.push_back(path);
3478 
3479  path.setup = [&]
3480  {
3483  };
3484  path.throws_exception = false;
3485  cfg.push_back(path);
3486 
3487  path.setup = [&]
3488  {
3491  };
3492  path.throws_exception = true;
3493  path.exception = ""_ut_lee;
3494  cfg.push_back(path);
3495 
3497  path.throws_exception = false;
3498  cfg.push_back(path);
3499 }
3500 
3501 static void
3502 setup_check_guest_interruptibility_state_enclave_interrupt_paths(std::vector<struct control_flow_path> &cfg)
3503 {
3505  path.throws_exception = false;
3506  cfg.push_back(path);
3507 
3508  path.setup = [&]
3509  {
3512  };
3513  path.throws_exception = true;
3514  path.exception = ""_ut_lee;
3515  cfg.push_back(path);
3516 
3517  path.setup = [&]
3518  {
3520  g_cpuid_regs.ebx = 0U;
3521  };
3522  path.throws_exception = true;
3523  path.exception = ""_ut_lee;
3524  cfg.push_back(path);
3525 
3527  path.throws_exception = false;
3528  cfg.push_back(path);
3529 }
3530 
3531 static void
3532 setup_check_guest_pending_debug_exceptions_reserved_paths(std::vector<struct control_flow_path> &cfg)
3533 {
3534  path.setup = [&] { guest_pending_debug_exceptions::set(0xf0U); };
3535  path.throws_exception = true;
3536  path.exception = ""_ut_lee;
3537  cfg.push_back(path);
3538 
3539  path.setup = [&] { guest_pending_debug_exceptions::set(0U); };
3540  path.throws_exception = false;
3541  cfg.push_back(path);
3542 }
3543 
3544 static void
3545 setup_check_guest_pending_debug_exceptions_dbg_ctl_paths(std::vector<struct control_flow_path> &cfg)
3546 {
3547  path.setup = [&]
3548  {
3551  };
3552  path.throws_exception = false;
3553  cfg.push_back(path);
3554 
3555  path.setup = [&]
3556  {
3561  };
3562  path.throws_exception = true;
3563  path.exception = ""_ut_lee;
3564  cfg.push_back(path);
3565 
3566  path.setup = [&]
3567  {
3571  };
3572  path.throws_exception = true;
3573  path.exception = ""_ut_lee;
3574  cfg.push_back(path);
3575 
3576  path.setup = [&] { guest_pending_debug_exceptions::set(0U); };
3577  path.throws_exception = false;
3578  cfg.push_back(path);
3579 }
3580 
3581 static void
3582 setup_check_guest_pending_debug_exceptions_rtm_paths(std::vector<struct control_flow_path> &cfg)
3583 {
3585  path.throws_exception = false;
3586  cfg.push_back(path);
3587 
3588  path.setup = [&]
3589  {
3592  };
3593  path.throws_exception = true;
3594  path.exception = ""_ut_lee;
3595  cfg.push_back(path);
3596 
3597  path.setup = [&]
3598  {
3605  };
3606  path.throws_exception = true;
3607  path.exception = ""_ut_lee;
3608  cfg.push_back(path);
3609 
3610  path.setup = [&]
3611  {
3613  g_cpuid_regs.ebx = 0U;
3614  };
3615  path.throws_exception = true;
3616  path.exception = ""_ut_lee;
3617  cfg.push_back(path);
3618 
3619  path.setup = [&]
3620  {
3623  };
3624  path.throws_exception = true;
3625  path.exception = ""_ut_lee;
3626  cfg.push_back(path);
3627 
3629  path.throws_exception = false;
3630  cfg.push_back(path);
3631 }
3632 
3633 static void
3634 setup_check_guest_vmcs_link_pointer_bits_11_0_paths(std::vector<struct control_flow_path> &cfg)
3635 {
3636  path.setup = [&] { vmcs_link_pointer::set(0xffffffffffffffffU); };
3637  path.throws_exception = false;
3638  cfg.push_back(path);
3639 
3640  path.setup = [&] { vmcs_link_pointer::set(0xfU); };
3641  path.throws_exception = true;
3642  path.exception = ""_ut_lee;
3643  cfg.push_back(path);
3644 
3645  path.setup = [&] { vmcs_link_pointer::set(0U); };
3646  path.throws_exception = false;
3647  cfg.push_back(path);
3648 }
3649 
3650 static void
3651 setup_check_guest_vmcs_link_pointer_valid_addr_paths(std::vector<struct control_flow_path> &cfg)
3652 {
3653  path.setup = [&] { vmcs_link_pointer::set(0xffffffffffffffffU); };
3654  path.throws_exception = false;
3655  cfg.push_back(path);
3656 
3657  path.setup = [&] { vmcs_link_pointer::set(0xf000000000000000U); };
3658  path.throws_exception = true;
3659  path.exception = ""_ut_lee;
3660  cfg.push_back(path);
3661 
3662  path.setup = [&] { vmcs_link_pointer::set(0U); };
3663  path.throws_exception = false;
3664  cfg.push_back(path);
3665 }
3666 
3667 static void
3668 setup_check_guest_vmcs_link_pointer_first_word_paths(std::vector<struct control_flow_path> &cfg)
3669 {
3670  path.setup = [&] { vmcs_link_pointer::set(0xffffffffffffffffU); };
3671  path.throws_exception = false;
3672  cfg.push_back(path);
3673 
3674  path.setup = [&]
3675  {
3676  vmcs_link_pointer::set(0x10U);
3678  };
3679  path.throws_exception = true;
3680  path.exception = ""_ut_lee;
3681  cfg.push_back(path);
3682 
3683  path.setup = [&]
3684  {
3688  };
3689  path.throws_exception = true;
3690  path.exception = ""_ut_lee;
3691  cfg.push_back(path);
3692 
3693  path.setup = [&]
3694  {
3698  };
3699  path.throws_exception = false;
3700  cfg.push_back(path);
3701 
3702  path.setup = [&]
3703  {
3708  };
3709  path.throws_exception = false;
3710  cfg.push_back(path);
3711 
3712  path.setup = [&]
3713  {
3716  };
3717  path.throws_exception = true;
3718  path.exception = ""_ut_lee;
3719  cfg.push_back(path);
3720 
3721  path.setup = [&] { g_vmcs_link_mem[0] = 0x80000000U; };
3722  path.throws_exception = false;
3723  cfg.push_back(path);
3724 }
3725 
3726 static void
3727 setup_check_guest_valid_pdpte_with_ept_disabled_paths(std::vector<struct control_flow_path> &cfg)
3728 {
3729  path.setup = [&] { guest_cr0::paging::disable(); };
3730  path.throws_exception = false;
3731  cfg.push_back(path);
3732 
3733  path.setup = [&]
3734  {
3737  };
3738  path.throws_exception = false;
3739  cfg.push_back(path);
3740 
3741  path.setup = [&]
3742  {
3746  };
3747  path.throws_exception = false;
3748  cfg.push_back(path);
3749 
3750  path.setup = [&]
3751  {
3758  };
3759  path.throws_exception = false;
3760  cfg.push_back(path);
3761 
3762  path.setup = [&]
3763  {
3768  };
3769  path.throws_exception = true;
3770  path.exception = ""_ut_lee;
3771  cfg.push_back(path);
3772 
3773  path.setup = [&]
3774  {
3779  };
3780  path.throws_exception = true;
3781  path.exception = ""_ut_lee;
3782  cfg.push_back(path);
3783 
3784  path.setup = [&]
3785  {
3786  g_pdpt_mem[0] = 0x0U;
3788  };
3789  path.throws_exception = true;
3790  path.exception = ""_ut_lee;
3791  cfg.push_back(path);
3792 
3793  path.setup = [&]
3794  {
3795  g_pdpt_mem[1] = 0x0U;
3797  };
3798  path.throws_exception = true;
3799  path.exception = ""_ut_lee;
3800  cfg.push_back(path);
3801 
3802  path.setup = [&]
3803  {
3804  g_pdpt_mem[2] = 0x0U;
3806  };
3807  path.throws_exception = true;
3808  path.exception = ""_ut_lee;
3809  cfg.push_back(path);
3810 
3811  path.setup = [&] { g_pdpt_mem[3] = 0x0U; };
3812  path.throws_exception = false;
3813  cfg.push_back(path);
3814 }
3815 
3816 static void
3817 setup_check_guest_valid_pdpte_with_ept_enabled_paths(std::vector<struct control_flow_path> &cfg)
3818 {
3819  path.setup = [&] { guest_cr0::paging::disable(); };
3820  path.throws_exception = false;
3821  cfg.push_back(path);
3822 
3823  path.setup = [&]
3824  {
3827  };
3828  path.throws_exception = false;
3829  cfg.push_back(path);
3830 
3831  path.setup = [&]
3832  {
3836  };
3837  path.throws_exception = false;
3838  cfg.push_back(path);
3839 
3840  path.setup = [&]
3841  {
3846  };
3847  path.throws_exception = false;
3848  cfg.push_back(path);
3849 
3850  path.setup = [&]
3851  {
3856  };
3857  path.throws_exception = false;
3858  cfg.push_back(path);
3859 
3860  path.setup = [&]
3861  {
3866  };
3867  path.throws_exception = true;
3868  path.exception = ""_ut_lee;
3869  cfg.push_back(path);
3870 
3871  path.setup = [&]
3872  {
3875  };
3876  path.throws_exception = true;
3877  path.exception = ""_ut_lee;
3878  cfg.push_back(path);
3879 
3880  path.setup = [&]
3881  {
3884  };
3885  path.throws_exception = true;
3886  path.exception = ""_ut_lee;
3887  cfg.push_back(path);
3888 
3889  path.setup = [&]
3890  {
3893  };
3894  path.throws_exception = true;
3895  path.exception = ""_ut_lee;
3896  cfg.push_back(path);
3897 
3898  path.setup = [&] { guest_pdpte3::reserved::set(0U); };
3899  path.throws_exception = false;
3900  cfg.push_back(path);
3901 }
3902 
3903 void
3904 vmcs_ut::test_check_guest_state_all()
3905 {
3906  std::vector<struct control_flow_path> cfg;
3908 
3910 }
3911 
3912 void
3913 vmcs_ut::test_check_guest_control_registers_debug_registers_and_msrs_all()
3914 {
3915  std::vector<struct control_flow_path> cfg;
3916  setup_check_guest_control_registers_debug_registers_and_msrs_all_paths(cfg);
3917 
3919 }
3920 
3921 void
3922 vmcs_ut::test_check_guest_segment_registers_all()
3923 {
3924  std::vector<struct control_flow_path> cfg;
3925  setup_check_guest_segment_registers_all_paths(cfg);
3926 
3928 }
3929 
3930 void
3931 vmcs_ut::test_check_guest_descriptor_table_registers_all()
3932 {
3933  std::vector<struct control_flow_path> cfg;
3934  setup_check_guest_descriptor_table_registers_all_paths(cfg);
3935 
3937 }
3938 
3939 void
3940 vmcs_ut::test_check_guest_rip_and_rflags_all()
3941 {
3942  std::vector<struct control_flow_path> cfg;
3943  setup_check_guest_rip_and_rflags_all_paths(cfg);
3944 
3946 }
3947 
3948 void
3949 vmcs_ut::test_check_guest_non_register_state_all()
3950 {
3951  std::vector<struct control_flow_path> cfg;
3952  setup_check_guest_non_register_state_all_paths(cfg);
3953 
3955 }
3956 
3957 void
3958 vmcs_ut::test_check_guest_pdptes_all()
3959 {
3960  std::vector<struct control_flow_path> cfg;
3961  setup_check_guest_pdptes_all_paths(cfg);
3962 
3964 }
3965 
3966 void
3967 vmcs_ut::test_check_guest_cr0_for_unsupported_bits()
3968 {
3969  std::vector<struct control_flow_path> cfg;
3970  setup_check_guest_cr0_for_unsupported_bits_paths(cfg);
3971 
3973 }
3974 
3975 void
3976 vmcs_ut::test_check_guest_cr0_verify_paging_enabled()
3977 {
3978  std::vector<struct control_flow_path> cfg;
3979  setup_check_guest_cr0_verify_paging_enabled_paths(cfg);
3980 
3982 }
3983 
3984 void
3985 vmcs_ut::test_check_guest_cr4_for_unsupported_bits()
3986 {
3987  std::vector<struct control_flow_path> cfg;
3988  setup_check_guest_cr4_for_unsupported_bits_paths(cfg);
3989 
3991 }
3992 
3993 void
3994 vmcs_ut::test_check_guest_load_debug_controls_verify_reserved()
3995 {
3996 
3997  std::vector<struct control_flow_path> cfg;
3998  setup_check_guest_load_debug_controls_verify_reserved_paths(cfg);
3999 
4001 }
4002 
4003 void
4004 vmcs_ut::test_check_guest_verify_ia_32e_mode_enabled()
4005 {
4006  std::vector<struct control_flow_path> cfg;
4007  setup_check_guest_verify_ia_32e_mode_enabled_paths(cfg);
4008 
4010 }
4011 
4012 void
4013 vmcs_ut::test_check_guest_verify_ia_32e_mode_disabled()
4014 {
4015  std::vector<struct control_flow_path> cfg;
4016  setup_check_guest_verify_ia_32e_mode_disabled_paths(cfg);
4017 
4019 }
4020 
4021 void
4022 vmcs_ut::test_check_guest_cr3_for_unsupported_bits()
4023 {
4024  std::vector<struct control_flow_path> cfg;
4025  setup_check_guest_cr3_for_unsupported_bits_paths(cfg);
4026 
4028 }
4029 
4030 void
4031 vmcs_ut::test_check_guest_load_debug_controls_verify_dr7()
4032 {
4033  std::vector<struct control_flow_path> cfg;
4034  setup_check_guest_load_debug_controls_verify_dr7_paths(cfg);
4035 
4037 }
4038 
4039 void
4040 vmcs_ut::test_check_guest_ia32_sysenter_esp_canonical_address()
4041 {
4042  std::vector<struct control_flow_path> cfg;
4043  setup_check_guest_ia32_sysenter_esp_canonical_address_paths(cfg);
4044 
4046 }
4047 
4048 void
4049 vmcs_ut::test_check_guest_ia32_sysenter_eip_canonical_address()
4050 {
4051  std::vector<struct control_flow_path> cfg;
4052  setup_check_guest_ia32_sysenter_eip_canonical_address_paths(cfg);
4053 
4055 }
4056 
4057 void
4058 vmcs_ut::test_check_guest_verify_load_ia32_perf_global_ctrl()
4059 {
4060  std::vector<struct control_flow_path> cfg;
4061  setup_check_guest_verify_load_ia32_perf_global_ctrl_paths(cfg);
4062 
4064 }
4065 
4066 void
4067 vmcs_ut::test_check_guest_verify_load_ia32_pat()
4068 {
4069  std::vector<struct control_flow_path> cfg;
4070  setup_check_guest_verify_load_ia32_pat_paths(cfg);
4071 
4073 }
4074 
4075 void
4076 vmcs_ut::test_check_guest_verify_load_ia32_efer()
4077 {
4078  std::vector<struct control_flow_path> cfg;
4079  setup_check_guest_verify_load_ia32_efer_paths(cfg);
4080 
4082 }
4083 
4084 void
4085 vmcs_ut::test_check_guest_verify_load_ia32_bndcfgs()
4086 {
4087  std::vector<struct control_flow_path> cfg;
4088  setup_check_guest_verify_load_ia32_bndcfgs_paths(cfg);
4089 
4091 }
4092 
4093 void
4094 vmcs_ut::test_check_guest_tr_ti_bit_equals_0()
4095 {
4096  std::vector<struct control_flow_path> cfg;
4097  setup_check_guest_tr_ti_bit_equals_0_paths(cfg);
4098 
4100 }
4101 
4102 void
4103 vmcs_ut::test_check_guest_ldtr_ti_bit_equals_0()
4104 {
4105  std::vector<struct control_flow_path> cfg;
4106  setup_check_guest_ldtr_ti_bit_equals_0_paths(cfg);
4107 
4109 }
4110 
4111 void
4112 vmcs_ut::test_check_guest_ss_and_cs_rpl_are_the_same()
4113 {
4114  std::vector<struct control_flow_path> cfg;
4115  setup_check_guest_ss_and_cs_rpl_are_the_same_paths(cfg);
4116 
4118 }
4119 
4120 void
4121 vmcs_ut::test_check_guest_cs_base_is_shifted()
4122 {
4123  std::vector<struct control_flow_path> cfg;
4124  setup_check_guest_cs_base_is_shifted_paths(cfg);
4125 
4127 }
4128 
4129 void
4130 vmcs_ut::test_check_guest_ss_base_is_shifted()
4131 {
4132  std::vector<struct control_flow_path> cfg;
4133  setup_check_guest_ss_base_is_shifted_paths(cfg);
4134 
4136 }
4137 
4138 void
4139 vmcs_ut::test_check_guest_ds_base_is_shifted()
4140 {
4141  std::vector<struct control_flow_path> cfg;
4142  setup_check_guest_ds_base_is_shifted_paths(cfg);
4143 
4145 }
4146 
4147 void
4148 vmcs_ut::test_check_guest_es_base_is_shifted()
4149 {
4150  std::vector<struct control_flow_path> cfg;
4151  setup_check_guest_es_base_is_shifted_paths(cfg);
4152 
4154 }
4155 
4156 void
4157 vmcs_ut::test_check_guest_fs_base_is_shifted()
4158 {
4159  std::vector<struct control_flow_path> cfg;
4160  setup_check_guest_fs_base_is_shifted_paths(cfg);
4161 
4163 }
4164 
4165 void
4166 vmcs_ut::test_check_guest_gs_base_is_shifted()
4167 {
4168  std::vector<struct control_flow_path> cfg;
4169  setup_check_guest_gs_base_is_shifted_paths(cfg);
4170 
4172 }
4173 
4174 void
4175 vmcs_ut::test_check_guest_tr_base_is_canonical()
4176 {
4177  std::vector<struct control_flow_path> cfg;
4178  setup_check_guest_tr_base_is_canonical_paths(cfg);
4179 
4181 }
4182 
4183 void
4184 vmcs_ut::test_check_guest_fs_base_is_canonical()
4185 {
4186  std::vector<struct control_flow_path> cfg;
4187  setup_check_guest_fs_base_is_canonical_paths(cfg);
4188 
4190 }
4191 
4192 void
4193 vmcs_ut::test_check_guest_gs_base_is_canonical()
4194 {
4195  std::vector<struct control_flow_path> cfg;
4196  setup_check_guest_gs_base_is_canonical_paths(cfg);
4197 
4199 }
4200 
4201 void
4202 vmcs_ut::test_check_guest_ldtr_base_is_canonical()
4203 {
4204  std::vector<struct control_flow_path> cfg;
4205  setup_check_guest_ldtr_base_is_canonical_paths(cfg);
4206 
4208 }
4209 
4210 void
4211 vmcs_ut::test_check_guest_cs_base_upper_dword_0()
4212 {
4213  std::vector<struct control_flow_path> cfg;
4214  setup_check_guest_cs_base_upper_dword_0_paths(cfg);
4215 
4217 }
4218 
4219 void
4220 vmcs_ut::test_check_guest_ss_base_upper_dword_0()
4221 {
4222  std::vector<struct control_flow_path> cfg;
4223  setup_check_guest_ss_base_upper_dword_0_paths(cfg);
4224 
4226 }
4227 
4228 void
4229 vmcs_ut::test_check_guest_ds_base_upper_dword_0()
4230 {
4231  std::vector<struct control_flow_path> cfg;
4232  setup_check_guest_ds_base_upper_dword_0_paths(cfg);
4233 
4235 }
4236 
4237 void
4238 vmcs_ut::test_check_guest_es_base_upper_dword_0()
4239 {
4240  std::vector<struct control_flow_path> cfg;
4241  setup_check_guest_es_base_upper_dword_0_paths(cfg);
4242 
4244 }
4245 
4246 void
4247 vmcs_ut::test_check_guest_cs_limit()
4248 {
4249  std::vector<struct control_flow_path> cfg;
4250  setup_check_guest_cs_limit_paths(cfg);
4251 
4253 }
4254 
4255 void
4256 vmcs_ut::test_check_guest_ss_limit()
4257 {
4258  std::vector<struct control_flow_path> cfg;
4259  setup_check_guest_ss_limit_paths(cfg);
4260 
4262 }
4263 
4264 void
4265 vmcs_ut::test_check_guest_ds_limit()
4266 {
4267  std::vector<struct control_flow_path> cfg;
4268  setup_check_guest_ds_limit_paths(cfg);
4269 
4271 }
4272 
4273 void
4274 vmcs_ut::test_check_guest_es_limit()
4275 {
4276  std::vector<struct control_flow_path> cfg;
4277  setup_check_guest_es_limit_paths(cfg);
4278 
4280 }
4281 
4282 void
4283 vmcs_ut::test_check_guest_gs_limit()
4284 {
4285  std::vector<struct control_flow_path> cfg;
4286  setup_check_guest_gs_limit_paths(cfg);
4287 
4289 }
4290 
4291 void
4292 vmcs_ut::test_check_guest_fs_limit()
4293 {
4294  std::vector<struct control_flow_path> cfg;
4295  setup_check_guest_fs_limit_paths(cfg);
4296 
4298 }
4299 
4300 void
4301 vmcs_ut::test_check_guest_v8086_cs_access_rights()
4302 {
4303  std::vector<struct control_flow_path> cfg;
4304  setup_check_guest_v8086_cs_access_rights_paths(cfg);
4305 
4307 }
4308 
4309 void
4310 vmcs_ut::test_check_guest_v8086_ss_access_rights()
4311 {
4312  std::vector<struct control_flow_path> cfg;
4313  setup_check_guest_v8086_ss_access_rights_paths(cfg);
4314 
4316 }
4317 
4318 void
4319 vmcs_ut::test_check_guest_v8086_ds_access_rights()
4320 {
4321  std::vector<struct control_flow_path> cfg;
4322  setup_check_guest_v8086_ds_access_rights_paths(cfg);
4323 
4325 }
4326 
4327 void
4328 vmcs_ut::test_check_guest_v8086_es_access_rights()
4329 {
4330  std::vector<struct control_flow_path> cfg;
4331  setup_check_guest_v8086_es_access_rights_paths(cfg);
4332 
4334 }
4335 
4336 void
4337 vmcs_ut::test_check_guest_v8086_fs_access_rights()
4338 {
4339  std::vector<struct control_flow_path> cfg;
4340  setup_check_guest_v8086_fs_access_rights_paths(cfg);
4341 
4343 }
4344 
4345 void
4346 vmcs_ut::test_check_guest_v8086_gs_access_rights()
4347 {
4348  std::vector<struct control_flow_path> cfg;
4349  setup_check_guest_v8086_gs_access_rights_paths(cfg);
4350 
4352 }
4353 
4354 
4355 void
4356 vmcs_ut::test_check_guest_cs_access_rights_type()
4357 {
4358  std::vector<struct control_flow_path> cfg;
4359  setup_check_guest_cs_access_rights_type_paths(cfg);
4360 
4362 }
4363 
4364 void
4365 vmcs_ut::test_check_guest_ss_access_rights_type()
4366 {
4367  std::vector<struct control_flow_path> cfg;
4368  setup_check_guest_ss_access_rights_type_paths(cfg);
4369 
4371 }
4372 
4373 void
4374 vmcs_ut::test_check_guest_ds_access_rights_type()
4375 {
4376  std::vector<struct control_flow_path> cfg;
4377  setup_check_guest_ds_access_rights_type_paths(cfg);
4378 
4380 }
4381 
4382 void
4383 vmcs_ut::test_check_guest_es_access_rights_type()
4384 {
4385  std::vector<struct control_flow_path> cfg;
4386  setup_check_guest_es_access_rights_type_paths(cfg);
4387 
4389 }
4390 
4391 void
4392 vmcs_ut::test_check_guest_fs_access_rights_type()
4393 {
4394  std::vector<struct control_flow_path> cfg;
4395  setup_check_guest_fs_access_rights_type_paths(cfg);
4396 
4398 }
4399 
4400 void
4401 vmcs_ut::test_check_guest_gs_access_rights_type()
4402 {
4403  std::vector<struct control_flow_path> cfg;
4404  setup_check_guest_gs_access_rights_type_paths(cfg);
4405 
4407 }
4408 
4409 void
4410 vmcs_ut::test_check_guest_cs_is_not_a_system_descriptor()
4411 {
4412  std::vector<struct control_flow_path> cfg;
4413  setup_check_guest_cs_is_not_a_system_descriptor_paths(cfg);
4414 
4416 }
4417 
4418 void
4419 vmcs_ut::test_check_guest_ss_is_not_a_system_descriptor()
4420 {
4421  std::vector<struct control_flow_path> cfg;
4422  setup_check_guest_ss_is_not_a_system_descriptor_paths(cfg);
4423 
4425 }
4426 
4427 void
4428 vmcs_ut::test_check_guest_ds_is_not_a_system_descriptor()
4429 {
4430  std::vector<struct control_flow_path> cfg;
4431  setup_check_guest_ds_is_not_a_system_descriptor_paths(cfg);
4432 
4434 }
4435 
4436 void
4437 vmcs_ut::test_check_guest_es_is_not_a_system_descriptor()
4438 {
4439  std::vector<struct control_flow_path> cfg;
4440  setup_check_guest_es_is_not_a_system_descriptor_paths(cfg);
4441 
4443 }
4444 
4445 void
4446 vmcs_ut::test_check_guest_fs_is_not_a_system_descriptor()
4447 {
4448  std::vector<struct control_flow_path> cfg;
4449  setup_check_guest_fs_is_not_a_system_descriptor_paths(cfg);
4450 
4452 }
4453 
4454 void
4455 vmcs_ut::test_check_guest_gs_is_not_a_system_descriptor()
4456 {
4457  std::vector<struct control_flow_path> cfg;
4458  setup_check_guest_gs_is_not_a_system_descriptor_paths(cfg);
4459 
4461 }
4462 
4463 void
4464 vmcs_ut::test_check_guest_cs_type_not_equal_3()
4465 {
4466  std::vector<struct control_flow_path> cfg;
4467  setup_check_guest_cs_type_not_equal_3_paths(cfg);
4468 
4470 }
4471 
4472 void
4473 vmcs_ut::test_check_guest_cs_dpl_adheres_to_ss_dpl()
4474 {
4475  std::vector<struct control_flow_path> cfg;
4476  setup_check_guest_cs_dpl_adheres_to_ss_dpl_paths(cfg);
4477 
4479 }
4480 
4481 void
4482 vmcs_ut::test_check_guest_ss_dpl_must_equal_rpl()
4483 {
4484  std::vector<struct control_flow_path> cfg;
4485  setup_check_guest_ss_dpl_must_equal_rpl_paths(cfg);
4486 
4488 }
4489 
4490 void
4491 vmcs_ut::test_check_guest_ss_dpl_must_equal_zero()
4492 {
4493  std::vector<struct control_flow_path> cfg;
4494  setup_check_guest_ss_dpl_must_equal_zero_paths(cfg);
4495 
4497 }
4498 
4499 void
4500 vmcs_ut::test_check_guest_ds_dpl()
4501 {
4502  std::vector<struct control_flow_path> cfg;
4503  setup_check_guest_ds_dpl_paths(cfg);
4504 
4506 }
4507 
4508 void
4509 vmcs_ut::test_check_guest_es_dpl()
4510 {
4511  std::vector<struct control_flow_path> cfg;
4512  setup_check_guest_es_dpl_paths(cfg);
4513 
4515 }
4516 
4517 void
4518 vmcs_ut::test_check_guest_fs_dpl()
4519 {
4520  std::vector<struct control_flow_path> cfg;
4521  setup_check_guest_fs_dpl_paths(cfg);
4522 
4524 }
4525 
4526 void
4527 vmcs_ut::test_check_guest_gs_dpl()
4528 {
4529  std::vector<struct control_flow_path> cfg;
4530  setup_check_guest_gs_dpl_paths(cfg);
4531 
4533 }
4534 
4535 void
4536 vmcs_ut::test_check_guest_cs_must_be_present()
4537 {
4538  std::vector<struct control_flow_path> cfg;
4539  setup_check_guest_cs_must_be_present_paths(cfg);
4540 
4542 }
4543 
4544 void
4545 vmcs_ut::test_check_guest_ss_must_be_present_if_usable()
4546 {
4547  std::vector<struct control_flow_path> cfg;
4548  setup_check_guest_ss_must_be_present_if_usable_paths(cfg);
4549 
4551 }
4552 
4553 void
4554 vmcs_ut::test_check_guest_ds_must_be_present_if_usable()
4555 {
4556  std::vector<struct control_flow_path> cfg;
4557  setup_check_guest_ds_must_be_present_if_usable_paths(cfg);
4558 
4560 }
4561 
4562 void
4563 vmcs_ut::test_check_guest_es_must_be_present_if_usable()
4564 {
4565  std::vector<struct control_flow_path> cfg;
4566  setup_check_guest_es_must_be_present_if_usable_paths(cfg);
4567 
4569 }
4570 
4571 void
4572 vmcs_ut::test_check_guest_fs_must_be_present_if_usable()
4573 {
4574  std::vector<struct control_flow_path> cfg;
4575  setup_check_guest_fs_must_be_present_if_usable_paths(cfg);
4576 
4578 }
4579 
4580 void
4581 vmcs_ut::test_check_guest_gs_must_be_present_if_usable()
4582 {
4583  std::vector<struct control_flow_path> cfg;
4584  setup_check_guest_gs_must_be_present_if_usable_paths(cfg);
4585 
4587 }
4588 
4589 void
4590 vmcs_ut::test_check_guest_cs_access_rights_reserved_must_be_0()
4591 {
4592  std::vector<struct control_flow_path> cfg;
4593  setup_check_guest_cs_access_rights_reserved_must_be_0_paths(cfg);
4594 
4596 }
4597 
4598 void
4599 vmcs_ut::test_check_guest_ss_access_rights_reserved_must_be_0()
4600 {
4601  std::vector<struct control_flow_path> cfg;
4602  setup_check_guest_ss_access_rights_reserved_must_be_0_paths(cfg);
4603 
4605 }
4606 
4607 void
4608 vmcs_ut::test_check_guest_ds_access_rights_reserved_must_be_0()
4609 {
4610  std::vector<struct control_flow_path> cfg;
4611  setup_check_guest_ds_access_rights_reserved_must_be_0_paths(cfg);
4612 
4614 }
4615 
4616 void
4617 vmcs_ut::test_check_guest_es_access_rights_reserved_must_be_0()
4618 {
4619  std::vector<struct control_flow_path> cfg;
4620  setup_check_guest_es_access_rights_reserved_must_be_0_paths(cfg);
4621 
4623 }
4624 
4625 void
4626 vmcs_ut::test_check_guest_fs_access_rights_reserved_must_be_0()
4627 {
4628  std::vector<struct control_flow_path> cfg;
4629  setup_check_guest_fs_access_rights_reserved_must_be_0_paths(cfg);
4630 
4632 }
4633 
4634 void
4635 vmcs_ut::test_check_guest_gs_access_rights_reserved_must_be_0()
4636 {
4637  std::vector<struct control_flow_path> cfg;
4638  setup_check_guest_gs_access_rights_reserved_must_be_0_paths(cfg);
4639 
4641 }
4642 
4643 void
4644 vmcs_ut::test_check_guest_cs_db_must_be_0_if_l_equals_1()
4645 {
4646  std::vector<struct control_flow_path> cfg;
4647  setup_check_guest_cs_db_must_be_0_if_l_equals_1_paths(cfg);
4648 
4650 }
4651 
4652 void
4653 vmcs_ut::test_check_guest_cs_granularity()
4654 {
4655  std::vector<struct control_flow_path> cfg;
4656  setup_check_guest_cs_granularity_paths(cfg);
4657 
4659 }
4660 
4661 void
4662 vmcs_ut::test_check_guest_ss_granularity()
4663 {
4664  std::vector<struct control_flow_path> cfg;
4665  setup_check_guest_ss_granularity_paths(cfg);
4666 
4668 }
4669 
4670 void
4671 vmcs_ut::test_check_guest_ds_granularity()
4672 {
4673  std::vector<struct control_flow_path> cfg;
4674  setup_check_guest_ds_granularity_paths(cfg);
4675 
4677 }
4678 
4679 void
4680 vmcs_ut::test_check_guest_es_granularity()
4681 {
4682  std::vector<struct control_flow_path> cfg;
4683  setup_check_guest_es_granularity_paths(cfg);
4684 
4686 }
4687 
4688 void
4689 vmcs_ut::test_check_guest_fs_granularity()
4690 {
4691  std::vector<struct control_flow_path> cfg;
4692  setup_check_guest_fs_granularity_paths(cfg);
4693 
4695 }
4696 
4697 void
4698 vmcs_ut::test_check_guest_gs_granularity()
4699 {
4700  std::vector<struct control_flow_path> cfg;
4701  setup_check_guest_gs_granularity_paths(cfg);
4702 
4704 }
4705 
4706 void
4707 vmcs_ut::test_check_guest_cs_access_rights_remaining_reserved_bit_0()
4708 {
4709  std::vector<struct control_flow_path> cfg;
4710  setup_check_guest_cs_access_rights_remaining_reserved_bit_0_paths(cfg);
4711 
4713 }
4714 
4715 void
4716 vmcs_ut::test_check_guest_ss_access_rights_remaining_reserved_bit_0()
4717 {
4718  std::vector<struct control_flow_path> cfg;
4719  setup_check_guest_ss_access_rights_remaining_reserved_bit_0_paths(cfg);
4720 
4722 }
4723 
4724 void
4725 vmcs_ut::test_check_guest_ds_access_rights_remaining_reserved_bit_0()
4726 {
4727  std::vector<struct control_flow_path> cfg;
4728  setup_check_guest_ds_access_rights_remaining_reserved_bit_0_paths(cfg);
4729 
4731 }
4732 
4733 void
4734 vmcs_ut::test_check_guest_es_access_rights_remaining_reserved_bit_0()
4735 {
4736  std::vector<struct control_flow_path> cfg;
4737  setup_check_guest_es_access_rights_remaining_reserved_bit_0_paths(cfg);
4738 
4740 }
4741 
4742 void
4743 vmcs_ut::test_check_guest_fs_access_rights_remaining_reserved_bit_0()
4744 {
4745  std::vector<struct control_flow_path> cfg;
4746  setup_check_guest_fs_access_rights_remaining_reserved_bit_0_paths(cfg);
4747 
4749 }
4750 
4751 void
4752 vmcs_ut::test_check_guest_gs_access_rights_remaining_reserved_bit_0()
4753 {
4754  std::vector<struct control_flow_path> cfg;
4755  setup_check_guest_gs_access_rights_remaining_reserved_bit_0_paths(cfg);
4756 
4758 }
4759 
4760 void
4761 vmcs_ut::test_check_guest_tr_type_must_be_11()
4762 {
4763  std::vector<struct control_flow_path> cfg;
4764  setup_check_guest_tr_type_must_be_11_paths(cfg);
4765 
4767 }
4768 
4769 void
4770 vmcs_ut::test_check_guest_tr_must_be_a_system_descriptor()
4771 {
4772  std::vector<struct control_flow_path> cfg;
4773  setup_check_guest_tr_must_be_a_system_descriptor_paths(cfg);
4774 
4776 }
4777 
4778 void
4779 vmcs_ut::test_check_guest_tr_must_be_present()
4780 {
4781  std::vector<struct control_flow_path> cfg;
4782  setup_check_guest_tr_must_be_present_paths(cfg);
4783 
4785 }
4786 
4787 void
4788 vmcs_ut::test_check_guest_tr_access_rights_reserved_must_be_0()
4789 {
4790  std::vector<struct control_flow_path> cfg;
4791  setup_check_guest_tr_access_rights_reserved_must_be_0_paths(cfg);
4792 
4794 }
4795 
4796 void
4797 vmcs_ut::test_check_guest_tr_granularity()
4798 {
4799  std::vector<struct control_flow_path> cfg;
4800  setup_check_guest_tr_granularity_paths(cfg);
4801 
4803 }
4804 
4805 void
4806 vmcs_ut::test_check_guest_tr_must_be_usable()
4807 {
4808  std::vector<struct control_flow_path> cfg;
4809  setup_check_guest_tr_must_be_usable_paths(cfg);
4810 
4812 }
4813 
4814 void
4815 vmcs_ut::test_check_guest_tr_access_rights_remaining_reserved_bit_0()
4816 {
4817  std::vector<struct control_flow_path> cfg;
4818  setup_check_guest_tr_access_rights_remaining_reserved_bit_0_paths(cfg);
4819 
4821 }
4822 
4823 void
4824 vmcs_ut::test_check_guest_ldtr_type_must_be_2()
4825 {
4826  std::vector<struct control_flow_path> cfg;
4827  setup_check_guest_ldtr_type_must_be_2_paths(cfg);
4828 
4830 }
4831 
4832 void
4833 vmcs_ut::test_check_guest_ldtr_must_be_a_system_descriptor()
4834 {
4835  std::vector<struct control_flow_path> cfg;
4836  setup_check_guest_ldtr_must_be_a_system_descriptor_paths(cfg);
4837 
4839 }
4840 
4841 void
4842 vmcs_ut::test_check_guest_ldtr_must_be_present()
4843 {
4844  std::vector<struct control_flow_path> cfg;
4845  setup_check_guest_ldtr_must_be_present_paths(cfg);
4846 
4848 }
4849 
4850 void
4851 vmcs_ut::test_check_guest_ldtr_access_rights_reserved_must_be_0()
4852 {
4853  std::vector<struct control_flow_path> cfg;
4854  setup_check_guest_ldtr_access_rights_reserved_must_be_0_paths(cfg);
4855 
4857 }
4858 
4859 void
4860 vmcs_ut::test_check_guest_ldtr_granularity()
4861 {
4862  std::vector<struct control_flow_path> cfg;
4863  setup_check_guest_ldtr_granularity_paths(cfg);
4864 
4866 }
4867 
4868 void
4869 vmcs_ut::test_check_guest_ldtr_access_rights_remaining_reserved_bit_0()
4870 {
4871  std::vector<struct control_flow_path> cfg;
4872  setup_check_guest_ldtr_access_rights_remaining_reserved_bit_0_paths(cfg);
4873 
4875 }
4876 
4877 void
4878 vmcs_ut::test_check_guest_gdtr_base_must_be_canonical()
4879 {
4880  std::vector<struct control_flow_path> cfg;
4881  setup_check_guest_gdtr_base_must_be_canonical_paths(cfg);
4882 
4884 }
4885 
4886 void
4887 vmcs_ut::test_check_guest_idtr_base_must_be_canonical()
4888 {
4889  std::vector<struct control_flow_path> cfg;
4890  setup_check_guest_idtr_base_must_be_canonical_paths(cfg);
4891 
4893 }
4894 
4895 void
4896 vmcs_ut::test_check_guest_gdtr_limit_reserved_bits()
4897 {
4898  std::vector<struct control_flow_path> cfg;
4899  setup_check_guest_gdtr_limit_reserved_bits_paths(cfg);
4900 
4902 }
4903 
4904 void
4905 vmcs_ut::test_check_guest_idtr_limit_reserved_bits()
4906 {
4907  std::vector<struct control_flow_path> cfg;
4908  setup_check_guest_idtr_limit_reserved_bits_paths(cfg);
4909 
4911 }
4912 
4913 void
4914 vmcs_ut::test_check_guest_rip_upper_bits()
4915 {
4916  std::vector<struct control_flow_path> cfg;
4917  setup_check_guest_rip_upper_bits_paths(cfg);
4918 
4920 }
4921 
4922 void
4923 vmcs_ut::test_check_guest_rip_valid_addr()
4924 {
4925  std::vector<struct control_flow_path> cfg;
4926  setup_check_guest_rip_valid_addr_paths(cfg);
4927 
4929 }
4930 
4931 void
4932 vmcs_ut::test_check_guest_rflags_reserved_bits()
4933 {
4934  std::vector<struct control_flow_path> cfg;
4935  setup_check_guest_rflags_reserved_bits_paths(cfg);
4936 
4938 }
4939 
4940 void
4941 vmcs_ut::test_check_guest_rflags_vm_bit()
4942 {
4943  std::vector<struct control_flow_path> cfg;
4944  setup_check_guest_rflags_vm_bit_paths(cfg);
4945 
4947 }
4948 
4949 void
4950 vmcs_ut::test_check_guest_rflag_interrupt_enable()
4951 {
4952  std::vector<struct control_flow_path> cfg;
4953  setup_check_guest_rflag_interrupt_enable_paths(cfg);
4954 
4956 }
4957 
4958 void
4959 vmcs_ut::test_check_guest_valid_activity_state()
4960 {
4961  std::vector<struct control_flow_path> cfg;
4962  setup_check_guest_valid_activity_state_paths(cfg);
4963 
4965 }
4966 
4967 void
4968 vmcs_ut::test_check_guest_activity_state_not_hlt_when_dpl_not_0()
4969 {
4970  std::vector<struct control_flow_path> cfg;
4971  setup_check_guest_activity_state_not_hlt_when_dpl_not_0_paths(cfg);
4972 
4974 }
4975 
4976 void
4977 vmcs_ut::test_check_guest_must_be_active_if_injecting_blocking_state()
4978 {
4979  std::vector<struct control_flow_path> cfg;
4980  setup_check_guest_must_be_active_if_injecting_blocking_state_paths(cfg);
4981 
4983 }
4984 
4985 void
4986 vmcs_ut::test_check_guest_hlt_valid_interrupts()
4987 {
4988  std::vector<struct control_flow_path> cfg;
4989  setup_check_guest_hlt_valid_interrupts_paths(cfg);
4990 
4992 }
4993 
4994 void
4995 vmcs_ut::test_check_guest_shutdown_valid_interrupts()
4996 {
4997  std::vector<struct control_flow_path> cfg;
4998  setup_check_guest_shutdown_valid_interrupts_paths(cfg);
4999 
5001 }
5002 
5003 void
5004 vmcs_ut::test_check_guest_sipi_valid_interrupts()
5005 {
5006  std::vector<struct control_flow_path> cfg;
5007  setup_check_guest_sipi_valid_interrupts_paths(cfg);
5008 
5010 }
5011 
5012 void
5013 vmcs_ut::test_check_guest_valid_activity_state_and_smm()
5014 {
5015  std::vector<struct control_flow_path> cfg;
5016  setup_check_guest_valid_activity_state_and_smm_paths(cfg);
5017 
5019 }
5020 
5021 void
5022 vmcs_ut::test_check_guest_interruptibility_state_reserved()
5023 {
5024  std::vector<struct control_flow_path> cfg;
5025  setup_check_guest_interruptibility_state_reserved_paths(cfg);
5026 
5028 }
5029 
5030 void
5031 vmcs_ut::test_check_guest_interruptibility_state_sti_mov_ss()
5032 {
5033  std::vector<struct control_flow_path> cfg;
5034  setup_check_guest_interruptibility_state_sti_mov_ss_paths(cfg);
5035 
5037 }
5038 
5039 void
5040 vmcs_ut::test_check_guest_interruptibility_state_sti()
5041 {
5042  std::vector<struct control_flow_path> cfg;
5043  setup_check_guest_interruptibility_state_sti_paths(cfg);
5044 
5046 }
5047 
5048 void
5049 vmcs_ut::test_check_guest_interruptibility_state_external_interrupt()
5050 {
5051  std::vector<struct control_flow_path> cfg;
5052  setup_check_guest_interruptibility_state_external_interrupt_paths(cfg);
5053 
5055 }
5056 
5057 void
5058 vmcs_ut::test_check_guest_interruptibility_state_nmi()
5059 {
5060  std::vector<struct control_flow_path> cfg;
5061  setup_check_guest_interruptibility_state_nmi_paths(cfg);
5062 
5064 }
5065 
5066 void
5067 vmcs_ut::test_check_guest_interruptibility_not_in_smm()
5068 {
5069  std::vector<struct control_flow_path> cfg;
5070  setup_check_guest_interruptibility_not_in_smm_paths(cfg);
5071 
5073 }
5074 
5075 void
5076 vmcs_ut::test_check_guest_interruptibility_entry_to_smm()
5077 {
5078  std::vector<struct control_flow_path> cfg;
5079  setup_check_guest_interruptibility_entry_to_smm_paths(cfg);
5080 
5082 }
5083 
5084 void
5085 vmcs_ut::test_check_guest_interruptibility_state_sti_and_nmi()
5086 {
5087  std::vector<struct control_flow_path> cfg;
5088  setup_check_guest_interruptibility_state_sti_and_nmi_paths(cfg);
5089 
5091 }
5092 
5093 void
5094 vmcs_ut::test_check_guest_interruptibility_state_virtual_nmi()
5095 {
5096  std::vector<struct control_flow_path> cfg;
5097  setup_check_guest_interruptibility_state_virtual_nmi_paths(cfg);
5098 
5100 }
5101 
5102 void
5103 vmcs_ut::test_check_guest_interruptibility_state_enclave_interrupt()
5104 {
5105  std::vector<struct control_flow_path> cfg;
5106  setup_check_guest_interruptibility_state_enclave_interrupt_paths(cfg);
5107 
5109 }
5110 
5111 void
5112 vmcs_ut::test_check_guest_pending_debug_exceptions_reserved()
5113 {
5114  std::vector<struct control_flow_path> cfg;
5115  setup_check_guest_pending_debug_exceptions_reserved_paths(cfg);
5116 
5118 }
5119 
5120 void
5121 vmcs_ut::test_check_guest_pending_debug_exceptions_dbg_ctl()
5122 {
5123  std::vector<struct control_flow_path> cfg;
5124  setup_check_guest_pending_debug_exceptions_dbg_ctl_paths(cfg);
5125 
5127 }
5128 
5129 void
5130 vmcs_ut::test_check_guest_pending_debug_exceptions_rtm()
5131 {
5132  std::vector<struct control_flow_path> cfg;
5133  setup_check_guest_pending_debug_exceptions_rtm_paths(cfg);
5134 
5136 }
5137 
5138 void
5139 vmcs_ut::test_check_guest_vmcs_link_pointer_bits_11_0()
5140 {
5141  std::vector<struct control_flow_path> cfg;
5142  setup_check_guest_vmcs_link_pointer_bits_11_0_paths(cfg);
5143 
5145 }
5146 
5147 void
5148 vmcs_ut::test_check_guest_vmcs_link_pointer_valid_addr()
5149 {
5150  std::vector<struct control_flow_path> cfg;
5151  setup_check_guest_vmcs_link_pointer_valid_addr_paths(cfg);
5152 
5154 }
5155 
5156 void
5157 vmcs_ut::test_check_guest_vmcs_link_pointer_first_word()
5158 {
5159  std::vector<struct control_flow_path> cfg;
5160  setup_check_guest_vmcs_link_pointer_first_word_paths(cfg);
5161 
5163 }
5164 
5165 void
5166 vmcs_ut::test_check_guest_valid_pdpte_with_ept_disabled()
5167 {
5168  std::vector<struct control_flow_path> cfg;
5169  setup_check_guest_valid_pdpte_with_ept_disabled_paths(cfg);
5170 
5172 }
5173 
5174 void
5175 vmcs_ut::test_check_guest_valid_pdpte_with_ept_enabled()
5176 {
5177  std::vector<struct control_flow_path> cfg;
5178  setup_check_guest_valid_pdpte_with_ept_enabled_paths(cfg);
5179 
5181 }
constexpr const auto mask
uint64_t g_pdpt_mem[4]
Definition: test.cpp:51
void entry_ctl_allow1(uint64_t mask)
Definition: test.cpp:110
void proc_ctl2_allow0(uint64_t mask)
Definition: test.cpp:86
auto mask() noexcept
Definition: pdpte_x64.h:48
#define test_vmcs_check(cfg,...)
Definition: test.h:36
constexpr const auto double_fault
Definition: x64.h:103
void pin_ctl_allow1(uint64_t mask)
Definition: test.cpp:94
std::map< uint64_t, uint64_t > g_vmcs_fields
Definition: test.cpp:32
constexpr const auto external_interrupt
constexpr const auto mask
bool throws_exception
Definition: test.h:44
bool g_phys_to_virt_return_nullptr
Definition: test.cpp:41
constexpr const auto read_execute_accessed
Definition: x64.h:69
uint64_t g_test_addr
Definition: test.cpp:43
void entry_ctl_allow0(uint64_t mask)
Definition: test.cpp:114
constexpr const auto unusable
Definition: x64.h:90
constexpr const auto other_event
void setup_check_guest_state_all_paths(std::vector< struct control_flow_path > &cfg)
constexpr const auto hardware_exception
constexpr const auto mask
constexpr const auto addr
Definition: cpuid_x64.h:80
std::map< msrs::field_type, msrs::value_type > g_msrs
std::map< cpuid::field_type, cpuid::value_type > g_eax_cpuid
constexpr const auto software_exception
constexpr const auto mask
constexpr const auto debug_exception
Definition: x64.h:96
uint64_t g_pdpt_addr
Definition: test.cpp:50
struct cpuid_regs g_cpuid_regs
Definition: test.cpp:35
constexpr const auto non_maskable_interrupt
std::shared_ptr< std::exception > exception
Definition: test.h:43
constexpr const auto mask
constexpr const auto mask
void pin_ctl_allow0(uint64_t mask)
Definition: test.cpp:98
constexpr const auto mask
constexpr const auto machine_check
Definition: x64.h:112
void proc_ctl2_allow1(uint64_t mask)
Definition: test.cpp:82
void proc_ctl_allow1(uint64_t mask)
Definition: test.cpp:70
constexpr const auto mask
constexpr const auto addr
uint64_t g_vmcs_link_addr
Definition: test.cpp:47
constexpr const auto divide_error
Definition: x64.h:95
void proc_ctl_allow0(uint64_t mask)
Definition: test.cpp:74
void set(T val) noexcept
Definition: crs_intel_x64.h:52
uint32_t g_vmcs_link_mem[1]
Definition: test.cpp:48
Definition: cache_x64.h:31
constexpr const auto tss_busy
Definition: x64.h:54
constexpr const auto read_execute_conforming
Definition: x64.h:72
std::function< void()> setup
Definition: test.h:42