vmcs_intel_x64_natural_width_guest_state_fields.h
Go to the documentation of this file.
1 //
2 // Bareflank Hypervisor
3 //
4 // Copyright (C) 2015 Assured Information Security, Inc.
5 // Author: Rian Quinn <quinnr@ainfosec.com>
6 // Author: Brendan Kerrigan <kerriganb@ainfosec.com>
7 //
8 // This library is free software; you can redistribute it and/or
9 // modify it under the terms of the GNU Lesser General Public
10 // License as published by the Free Software Foundation; either
11 // version 2.1 of the License, or (at your option) any later version.
12 //
13 // This library is distributed in the hope that it will be useful,
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 // Lesser General Public License for more details.
17 //
18 // You should have received a copy of the GNU Lesser General Public
19 // License along with this library; if not, write to the Free Software
20 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21 
22 #ifndef VMCS_INTEL_X64_NATURAL_WIDTH_GUEST_STATE_FIELDS_H
23 #define VMCS_INTEL_X64_NATURAL_WIDTH_GUEST_STATE_FIELDS_H
24 
25 #include <memory>
26 #include <bitmanip.h>
27 #include <vmcs/vmcs_intel_x64.h>
30 
33 
40 
41 // *INDENT-OFF*
42 
43 namespace intel_x64
44 {
45 namespace vmcs
46 {
47 
48 namespace guest_cr0
49 {
50  constexpr const auto addr = 0x0000000000006800UL;
51  constexpr const auto name = "guest_cr0";
52 
53  inline auto exists()
54  { return true; }
55 
56  inline auto get()
57  { return get_vmcs_field(addr, name, exists()); }
58 
59  inline auto get_if_exists(bool verbose = false) noexcept
60  { return get_vmcs_field_if_exists(addr, name, verbose, exists()); }
61 
62  template<class T, class = typename std::enable_if<std::is_integral<T>::value>::type>
63  void set(T val) { set_vmcs_field(val, addr, name, exists()); }
64 
65  template<class T, class = typename std::enable_if<std::is_integral<T>::value>::type>
66  void set_if_exists(T val, bool verbose = false)
67  { set_vmcs_field_if_exists(val, addr, name, verbose, exists()); }
68 
69  namespace protection_enable
70  {
71  constexpr const auto mask = 0x0000000000000001UL;
72  constexpr const auto from = 0;
73  constexpr const auto name = "protection_enable";
74 
75  inline auto is_enabled()
76  { return is_bit_set(get_vmcs_field(addr, name, exists()), from); }
77 
78  inline auto is_enabled_if_exists(bool verbose = false) noexcept
79  { return is_bit_set(get_vmcs_field_if_exists(addr, name, verbose, exists()), from); }
80 
81  inline auto is_disabled()
82  { return is_bit_cleared(get_vmcs_field(addr, name, exists()), from); }
83 
84  inline auto is_disabled_if_exists(bool verbose = false) noexcept
85  { return is_bit_cleared(get_vmcs_field_if_exists(addr, name, verbose, exists()), from); }
86 
87  inline void enable()
88  {
89  auto&& field = get_vmcs_field(addr, name, exists());
90  set_vmcs_field(set_bit(field, from), addr, name, exists());
91  }
92 
93  inline void enable_if_exists(bool verbose = false) noexcept
94  {
95  auto&& field = get_vmcs_field_if_exists(addr, name, verbose, exists());
96  set_vmcs_field_if_exists(set_bit(field, from), addr, name, verbose, exists());
97  }
98 
99  inline void disable()
100  {
101  auto&& field = get_vmcs_field(addr, name, exists());
102  set_vmcs_field(clear_bit(field, from), addr, name, exists());
103  }
104 
105  inline void disable_if_exists(bool verbose = false) noexcept
106  {
107  auto&& field = get_vmcs_field_if_exists(addr, name, verbose, exists());
108  set_vmcs_field_if_exists(clear_bit(field, from), addr, name, verbose, exists());
109  }
110  }
111 
112  namespace monitor_coprocessor
113  {
114  constexpr const auto mask = 0x0000000000000002UL;
115  constexpr const auto from = 1;
116  constexpr const auto name = "monitor_coprocessor";
117 
118  inline auto is_enabled()
119  { return is_bit_set(get_vmcs_field(addr, name, exists()), from); }
120 
121  inline auto is_enabled_if_exists(bool verbose = false) noexcept
122  { return is_bit_set(get_vmcs_field_if_exists(addr, name, verbose, exists()), from); }
123 
124  inline auto is_disabled()
125  { return is_bit_cleared(get_vmcs_field(addr, name, exists()), from); }
126 
127  inline auto is_disabled_if_exists(bool verbose = false) noexcept
128  { return is_bit_cleared(get_vmcs_field_if_exists(addr, name, verbose, exists()), from); }
129 
130  inline void enable()
131  {
132  auto&& field = get_vmcs_field(addr, name, exists());
133  set_vmcs_field(set_bit(field, from), addr, name, exists());
134  }
135 
136  inline void enable_if_exists(bool verbose = false) noexcept
137  {
138  auto&& field = get_vmcs_field_if_exists(addr, name, verbose, exists());
139  set_vmcs_field_if_exists(set_bit(field, from), addr, name, verbose, exists());
140  }
141 
142  inline void disable()
143  {
144  auto&& field = get_vmcs_field(addr, name, exists());
145  set_vmcs_field(clear_bit(field, from), addr, name, exists());
146  }
147 
148  inline void disable_if_exists(bool verbose = false) noexcept
149  {
150  auto&& field = get_vmcs_field_if_exists(addr, name, verbose, exists());
151  set_vmcs_field_if_exists(clear_bit(field, from), addr, name, verbose, exists());
152  }
153  }
154 
155  namespace emulation
156  {
157  constexpr const auto mask = 0x0000000000000004UL;
158  constexpr const auto from = 2;
159  constexpr const auto name = "emulation";
160 
161  inline auto is_enabled()
162  { return is_bit_set(get_vmcs_field(addr, name, exists()), from); }
163 
164  inline auto is_enabled_if_exists(bool verbose = false) noexcept
165  { return is_bit_set(get_vmcs_field_if_exists(addr, name, verbose, exists()), from); }
166 
167  inline auto is_disabled()
168  { return is_bit_cleared(get_vmcs_field(addr, name, exists()), from); }
169 
170  inline auto is_disabled_if_exists(bool verbose = false) noexcept
171  { return is_bit_cleared(get_vmcs_field_if_exists(addr, name, verbose, exists()), from); }
172 
173  inline void enable()
174  {
175  auto&& field = get_vmcs_field(addr, name, exists());
176  set_vmcs_field(set_bit(field, from), addr, name, exists());
177  }
178 
179  inline void enable_if_exists(bool verbose = false) noexcept
180  {
181  auto&& field = get_vmcs_field_if_exists(addr, name, verbose, exists());
182  set_vmcs_field_if_exists(set_bit(field, from), addr, name, verbose, exists());
183  }
184 
185  inline void disable()
186  {
187  auto&& field = get_vmcs_field(addr, name, exists());
188  set_vmcs_field(clear_bit(field, from), addr, name, exists());
189  }
190 
191  inline void disable_if_exists(bool verbose = false) noexcept
192  {
193  auto&& field = get_vmcs_field_if_exists(addr, name, verbose, exists());
194  set_vmcs_field_if_exists(clear_bit(field, from), addr, name, verbose, exists());
195  }
196  }
197 
198  namespace task_switched
199  {
200  constexpr const auto mask = 0x0000000000000008UL;
201  constexpr const auto from = 3;
202  constexpr const auto name = "task_switched";
203 
204  inline auto is_enabled()
205  { return is_bit_set(get_vmcs_field(addr, name, exists()), from); }
206 
207  inline auto is_enabled_if_exists(bool verbose = false) noexcept
208  { return is_bit_set(get_vmcs_field_if_exists(addr, name, verbose, exists()), from); }
209 
210  inline auto is_disabled()
211  { return is_bit_cleared(get_vmcs_field(addr, name, exists()), from); }
212 
213  inline auto is_disabled_if_exists(bool verbose = false) noexcept
214  { return is_bit_cleared(get_vmcs_field_if_exists(addr, name, verbose, exists()), from); }
215 
216  inline void enable()
217  {
218  auto&& field = get_vmcs_field(addr, name, exists());
219  set_vmcs_field(set_bit(field, from), addr, name, exists());
220  }
221 
222  inline void enable_if_exists(bool verbose = false) noexcept
223  {
224  auto&& field = get_vmcs_field_if_exists(addr, name, verbose, exists());
225  set_vmcs_field_if_exists(set_bit(field, from), addr, name, verbose, exists());
226  }
227 
228  inline void disable()
229  {
230  auto&& field = get_vmcs_field(addr, name, exists());
231  set_vmcs_field(clear_bit(field, from), addr, name, exists());
232  }
233 
234  inline void disable_if_exists(bool verbose = false) noexcept
235  {
236  auto&& field = get_vmcs_field_if_exists(addr, name, verbose, exists());
237  set_vmcs_field_if_exists(clear_bit(field, from), addr, name, verbose, exists());
238  }
239  }
240 
241  namespace extension_type
242  {
243  constexpr const auto mask = 0x0000000000000010UL;
244  constexpr const auto from = 4;
245  constexpr const auto name = "extension_type";
246 
247  inline auto is_enabled()
248  { return is_bit_set(get_vmcs_field(addr, name, exists()), from); }
249 
250  inline auto is_enabled_if_exists(bool verbose = false) noexcept
251  { return is_bit_set(get_vmcs_field_if_exists(addr, name, verbose, exists()), from); }
252 
253  inline auto is_disabled()
254  { return is_bit_cleared(get_vmcs_field(addr, name, exists()), from); }
255 
256  inline auto is_disabled_if_exists(bool verbose = false) noexcept
257  { return is_bit_cleared(get_vmcs_field_if_exists(addr, name, verbose, exists()), from); }
258 
259  inline void enable()
260  {
261  auto&& field = get_vmcs_field(addr, name, exists());
262  set_vmcs_field(set_bit(field, from), addr, name, exists());
263  }
264 
265  inline void enable_if_exists(bool verbose = false) noexcept
266  {
267  auto&& field = get_vmcs_field_if_exists(addr, name, verbose, exists());
268  set_vmcs_field_if_exists(set_bit(field, from), addr, name, verbose, exists());
269  }
270 
271  inline void disable()
272  {
273  auto&& field = get_vmcs_field(addr, name, exists());
274  set_vmcs_field(clear_bit(field, from), addr, name, exists());
275  }
276 
277  inline void disable_if_exists(bool verbose = false) noexcept
278  {
279  auto&& field = get_vmcs_field_if_exists(addr, name, verbose, exists());
280  set_vmcs_field_if_exists(clear_bit(field, from), addr, name, verbose, exists());
281  }
282  }
283 
284  namespace numeric_error
285  {
286  constexpr const auto mask = 0x0000000000000020UL;
287  constexpr const auto from = 5;
288  constexpr const auto name = "numeric_error";
289 
290  inline auto is_enabled()
291  { return is_bit_set(get_vmcs_field(addr, name, exists()), from); }
292 
293  inline auto is_enabled_if_exists(bool verbose = false) noexcept
294  { return is_bit_set(get_vmcs_field_if_exists(addr, name, verbose, exists()), from); }
295 
296  inline auto is_disabled()
297  { return is_bit_cleared(get_vmcs_field(addr, name, exists()), from); }
298 
299  inline auto is_disabled_if_exists(bool verbose = false) noexcept
300  { return is_bit_cleared(get_vmcs_field_if_exists(addr, name, verbose, exists()), from); }
301 
302  inline void enable()
303  {
304  auto&& field = get_vmcs_field(addr, name, exists());
305  set_vmcs_field(set_bit(field, from), addr, name, exists());
306  }
307 
308  inline void enable_if_exists(bool verbose = false) noexcept
309  {
310  auto&& field = get_vmcs_field_if_exists(addr, name, verbose, exists());
311  set_vmcs_field_if_exists(set_bit(field, from), addr, name, verbose, exists());
312  }
313 
314  inline void disable()
315  {
316  auto&& field = get_vmcs_field(addr, name, exists());
317  set_vmcs_field(clear_bit(field, from), addr, name, exists());
318  }
319 
320  inline void disable_if_exists(bool verbose = false) noexcept
321  {
322  auto&& field = get_vmcs_field_if_exists(addr, name, verbose, exists());
323  set_vmcs_field_if_exists(clear_bit(field, from), addr, name, verbose, exists());
324  }
325  }
326 
327  namespace write_protect
328  {
329  constexpr const auto mask = 0x0000000000010000UL;
330  constexpr const auto from = 16;
331  constexpr const auto name = "write_protect";
332 
333  inline auto is_enabled()
334  { return is_bit_set(get_vmcs_field(addr, name, exists()), from); }
335 
336  inline auto is_enabled_if_exists(bool verbose = false) noexcept
337  { return is_bit_set(get_vmcs_field_if_exists(addr, name, verbose, exists()), from); }
338 
339  inline auto is_disabled()
340  { return is_bit_cleared(get_vmcs_field(addr, name, exists()), from); }
341 
342  inline auto is_disabled_if_exists(bool verbose = false) noexcept
343  { return is_bit_cleared(get_vmcs_field_if_exists(addr, name, verbose, exists()), from); }
344 
345  inline void enable()
346  {
347  auto&& field = get_vmcs_field(addr, name, exists());
348  set_vmcs_field(set_bit(field, from), addr, name, exists());
349  }
350 
351  inline void enable_if_exists(bool verbose = false) noexcept
352  {
353  auto&& field = get_vmcs_field_if_exists(addr, name, verbose, exists());
354  set_vmcs_field_if_exists(set_bit(field, from), addr, name, verbose, exists());
355  }
356 
357  inline void disable()
358  {
359  auto&& field = get_vmcs_field(addr, name, exists());
360  set_vmcs_field(clear_bit(field, from), addr, name, exists());
361  }
362 
363  inline void disable_if_exists(bool verbose = false) noexcept
364  {
365  auto&& field = get_vmcs_field_if_exists(addr, name, verbose, exists());
366  set_vmcs_field_if_exists(clear_bit(field, from), addr, name, verbose, exists());
367  }
368  }
369 
370  namespace alignment_mask
371  {
372  constexpr const auto mask = 0x0000000000040000UL;
373  constexpr const auto from = 18;
374  constexpr const auto name = "alignment_mask";
375 
376  inline auto is_enabled()
377  { return is_bit_set(get_vmcs_field(addr, name, exists()), from); }
378 
379  inline auto is_enabled_if_exists(bool verbose = false) noexcept
380  { return is_bit_set(get_vmcs_field_if_exists(addr, name, verbose, exists()), from); }
381 
382  inline auto is_disabled()
383  { return is_bit_cleared(get_vmcs_field(addr, name, exists()), from); }
384 
385  inline auto is_disabled_if_exists(bool verbose = false) noexcept
386  { return is_bit_cleared(get_vmcs_field_if_exists(addr, name, verbose, exists()), from); }
387 
388  inline void enable()
389  {
390  auto&& field = get_vmcs_field(addr, name, exists());
391  set_vmcs_field(set_bit(field, from), addr, name, exists());
392  }
393 
394  inline void enable_if_exists(bool verbose = false) noexcept
395  {
396  auto&& field = get_vmcs_field_if_exists(addr, name, verbose, exists());
397  set_vmcs_field_if_exists(set_bit(field, from), addr, name, verbose, exists());
398  }
399 
400  inline void disable()
401  {
402  auto&& field = get_vmcs_field(addr, name, exists());
403  set_vmcs_field(clear_bit(field, from), addr, name, exists());
404  }
405 
406  inline void disable_if_exists(bool verbose = false) noexcept
407  {
408  auto&& field = get_vmcs_field_if_exists(addr, name, verbose, exists());
409  set_vmcs_field_if_exists(clear_bit(field, from), addr, name, verbose, exists());
410  }
411  }
412 
413  namespace not_write_through
414  {
415  constexpr const auto mask = 0x0000000020000000UL;
416  constexpr const auto from = 29;
417  constexpr const auto name = "not_write_through";
418 
419  inline auto is_enabled()
420  { return is_bit_set(get_vmcs_field(addr, name, exists()), from); }
421 
422  inline auto is_enabled_if_exists(bool verbose = false) noexcept
423  { return is_bit_set(get_vmcs_field_if_exists(addr, name, verbose, exists()), from); }
424 
425  inline auto is_disabled()
426  { return is_bit_cleared(get_vmcs_field(addr, name, exists()), from); }
427 
428  inline auto is_disabled_if_exists(bool verbose = false) noexcept
429  { return is_bit_cleared(get_vmcs_field_if_exists(addr, name, verbose, exists()), from); }
430 
431  inline void enable()
432  {
433  auto&& field = get_vmcs_field(addr, name, exists());
434  set_vmcs_field(set_bit(field, from), addr, name, exists());
435  }
436 
437  inline void enable_if_exists(bool verbose = false) noexcept
438  {
439  auto&& field = get_vmcs_field_if_exists(addr, name, verbose, exists());
440  set_vmcs_field_if_exists(set_bit(field, from), addr, name, verbose, exists());
441  }
442 
443  inline void disable()
444  {
445  auto&& field = get_vmcs_field(addr, name, exists());
446  set_vmcs_field(clear_bit(field, from), addr, name, exists());
447  }
448 
449  inline void disable_if_exists(bool verbose = false) noexcept
450  {
451  auto&& field = get_vmcs_field_if_exists(addr, name, verbose, exists());
452  set_vmcs_field_if_exists(clear_bit(field, from), addr, name, verbose, exists());
453  }
454  }
455 
456  namespace cache_disable
457  {
458  constexpr const auto mask = 0x0000000040000000UL;
459  constexpr const auto from = 30;
460  constexpr const auto name = "cache_disable";
461 
462  inline auto is_enabled()
463  { return is_bit_set(get_vmcs_field(addr, name, exists()), from); }
464 
465  inline auto is_enabled_if_exists(bool verbose = false) noexcept
466  { return is_bit_set(get_vmcs_field_if_exists(addr, name, verbose, exists()), from); }
467 
468  inline auto is_disabled()
469  { return is_bit_cleared(get_vmcs_field(addr, name, exists()), from); }
470 
471  inline auto is_disabled_if_exists(bool verbose = false) noexcept
472  { return is_bit_cleared(get_vmcs_field_if_exists(addr, name, verbose, exists()), from); }
473 
474  inline void enable()
475  {
476  auto&& field = get_vmcs_field(addr, name, exists());
477  set_vmcs_field(set_bit(field, from), addr, name, exists());
478  }
479 
480  inline void enable_if_exists(bool verbose = false) noexcept
481  {
482  auto&& field = get_vmcs_field_if_exists(addr, name, verbose, exists());
483  set_vmcs_field_if_exists(set_bit(field, from), addr, name, verbose, exists());
484  }
485 
486  inline void disable()
487  {
488  auto&& field = get_vmcs_field(addr, name, exists());
489  set_vmcs_field(clear_bit(field, from), addr, name, exists());
490  }
491 
492  inline void disable_if_exists(bool verbose = false) noexcept
493  {
494  auto&& field = get_vmcs_field_if_exists(addr, name, verbose, exists());
495  set_vmcs_field_if_exists(clear_bit(field, from), addr, name, verbose, exists());
496  }
497  }
498 
499  namespace paging
500  {
501  constexpr const auto mask = 0x0000000080000000UL;
502  constexpr const auto from = 31;
503  constexpr const auto name = "paging";
504 
505  inline auto is_enabled()
506  { return is_bit_set(get_vmcs_field(addr, name, exists()), from); }
507 
508  inline auto is_enabled_if_exists(bool verbose = false) noexcept
509  { return is_bit_set(get_vmcs_field_if_exists(addr, name, verbose, exists()), from); }
510 
511  inline auto is_disabled()
512  { return is_bit_cleared(get_vmcs_field(addr, name, exists()), from); }
513 
514  inline auto is_disabled_if_exists(bool verbose = false) noexcept
515  { return is_bit_cleared(get_vmcs_field_if_exists(addr, name, verbose, exists()), from); }
516 
517  inline void enable()
518  {
519  auto&& field = get_vmcs_field(addr, name, exists());
520  set_vmcs_field(set_bit(field, from), addr, name, exists());
521  }
522 
523  inline void enable_if_exists(bool verbose = false) noexcept
524  {
525  auto&& field = get_vmcs_field_if_exists(addr, name, verbose, exists());
526  set_vmcs_field_if_exists(set_bit(field, from), addr, name, verbose, exists());
527  }
528 
529  inline void disable()
530  {
531  auto&& field = get_vmcs_field(addr, name, exists());
532  set_vmcs_field(clear_bit(field, from), addr, name, exists());
533  }
534 
535  inline void disable_if_exists(bool verbose = false) noexcept
536  {
537  auto&& field = get_vmcs_field_if_exists(addr, name, verbose, exists());
538  set_vmcs_field_if_exists(clear_bit(field, from), addr, name, verbose, exists());
539  }
540  }
541 
542  inline void dump() noexcept
543  {
544  bfdebug << "guest cr0 enabled flags:" << bfendl;
545 
547  bfdebug << " - protection_enable" << bfendl;
548 
550  bfdebug << " - monitor_coprocessor" << bfendl;
551 
552  if (emulation::is_enabled())
553  bfdebug << " - emulation" << bfendl;
554 
556  bfdebug << " - task_switched" << bfendl;
557 
559  bfdebug << " - extension_type" << bfendl;
560 
562  bfdebug << " - numeric_error" << bfendl;
563 
565  bfdebug << " - write_protect" << bfendl;
566 
568  bfdebug << " - alignment_mask" << bfendl;
569 
571  bfdebug << " - not_write_through" << bfendl;
572 
574  bfdebug << " - cache_disable" << bfendl;
575 
576  if (paging::is_enabled())
577  bfdebug << " - paging" << bfendl;
578  }
579 }
580 
581 namespace guest_cr3
582 {
583  constexpr const auto addr = 0x0000000000006802UL;
584  constexpr const auto name = "guest_cr3";
585 
586  inline bool exists() noexcept
587  { return true; }
588 
589  inline auto get()
590  { return get_vmcs_field(addr, name, exists()); }
591 
592  inline auto get_if_exists(bool verbose = false) noexcept
593  { return get_vmcs_field_if_exists(addr, name, verbose, exists()); }
594 
595  template<class T, class = typename std::enable_if<std::is_integral<T>::value>::type>
596  void set(T val) { set_vmcs_field(val, addr, name, exists()); }
597 
598  template<class T, class = typename std::enable_if<std::is_integral<T>::value>::type>
599  void set_if_exists(T val, bool verbose = false) noexcept
600  { set_vmcs_field_if_exists(val, addr, name, verbose, exists()); }
601 }
602 
603 namespace guest_cr4
604 {
605  constexpr const auto addr = 0x0000000000006804UL;
606  constexpr const auto name = "guest_cr4";
607 
608  inline bool exists() noexcept
609  { return true; }
610 
611  inline auto get()
612  { return get_vmcs_field(addr, name, exists()); }
613 
614  inline auto get_if_exists(bool verbose = false) noexcept
615  { return get_vmcs_field_if_exists(addr, name, verbose, exists()); }
616 
617  template<class T, class = typename std::enable_if<std::is_integral<T>::value>::type>
618  void set(T val) { set_vmcs_field(val, addr, name, exists()); }
619 
620  template<class T, class = typename std::enable_if<std::is_integral<T>::value>::type>
621  void set_if_exists(T val, bool verbose = false) noexcept
622  { set_vmcs_field_if_exists(val, addr, name, verbose, exists()); }
623 
624  namespace v8086_mode_extensions
625  {
626  constexpr const auto mask = 0x0000000000000001UL;
627  constexpr const auto from = 0;
628  constexpr const auto name = "v8086_mode_extensions";
629 
630  inline auto is_enabled()
631  { return is_bit_set(get_vmcs_field(addr, name, exists()), from); }
632 
633  inline auto is_enabled_if_exists(bool verbose = false) noexcept
634  { return is_bit_set(get_vmcs_field_if_exists(addr, name, verbose, exists()), from); }
635 
636  inline auto is_disabled()
637  { return is_bit_cleared(get_vmcs_field(addr, name, exists()), from); }
638 
639  inline auto is_disabled_if_exists(bool verbose = false) noexcept
640  { return is_bit_cleared(get_vmcs_field_if_exists(addr, name, verbose, exists()), from); }
641 
642  inline void enable()
643  {
644  auto&& field = get_vmcs_field(addr, name, exists());
645  set_vmcs_field(set_bit(field, from), addr, name, exists());
646  }
647 
648  inline void enable_if_exists(bool verbose = false) noexcept
649  {
650  auto&& field = get_vmcs_field_if_exists(addr, name, verbose, exists());
651  set_vmcs_field_if_exists(set_bit(field, from), addr, name, verbose, exists());
652  }
653 
654  inline void disable()
655  {
656  auto&& field = get_vmcs_field(addr, name, exists());
657  set_vmcs_field(clear_bit(field, from), addr, name, exists());
658  }
659 
660  inline void disable_if_exists(bool verbose = false) noexcept
661  {
662  auto&& field = get_vmcs_field_if_exists(addr, name, verbose, exists());
663  set_vmcs_field_if_exists(clear_bit(field, from), addr, name, verbose, exists());
664  }
665  }
666 
667  namespace protected_mode_virtual_interrupts
668  {
669  constexpr const auto mask = 0x0000000000000002UL;
670  constexpr const auto from = 1;
671  constexpr const auto name = "protected_mode_virtual_interrupts";
672 
673  inline auto is_enabled()
674  { return is_bit_set(get_vmcs_field(addr, name, exists()), from); }
675 
676  inline auto is_enabled_if_exists(bool verbose = false) noexcept
677  { return is_bit_set(get_vmcs_field_if_exists(addr, name, verbose, exists()), from); }
678 
679  inline auto is_disabled()
680  { return is_bit_cleared(get_vmcs_field(addr, name, exists()), from); }
681 
682  inline auto is_disabled_if_exists(bool verbose = false) noexcept
683  { return is_bit_cleared(get_vmcs_field_if_exists(addr, name, verbose, exists()), from); }
684 
685  inline void enable()
686  {
687  auto&& field = get_vmcs_field(addr, name, exists());
688  set_vmcs_field(set_bit(field, from), addr, name, exists());
689  }
690 
691  inline void enable_if_exists(bool verbose = false) noexcept
692  {
693  auto&& field = get_vmcs_field_if_exists(addr, name, verbose, exists());
694  set_vmcs_field_if_exists(set_bit(field, from), addr, name, verbose, exists());
695  }
696 
697  inline void disable()
698  {
699  auto&& field = get_vmcs_field(addr, name, exists());
700  set_vmcs_field(clear_bit(field, from), addr, name, exists());
701  }
702 
703  inline void disable_if_exists(bool verbose = false) noexcept
704  {
705  auto&& field = get_vmcs_field_if_exists(addr, name, verbose, exists());
706  set_vmcs_field_if_exists(clear_bit(field, from), addr, name, verbose, exists());
707  }
708  }
709 
710  namespace time_stamp_disable
711  {
712  constexpr const auto mask = 0x0000000000000004UL;
713  constexpr const auto from = 2;
714  constexpr const auto name = "time_stamp_disable";
715 
716  inline auto is_enabled()
717  { return is_bit_set(get_vmcs_field(addr, name, exists()), from); }
718 
719  inline auto is_enabled_if_exists(bool verbose = false) noexcept
720  { return is_bit_set(get_vmcs_field_if_exists(addr, name, verbose, exists()), from); }
721 
722  inline auto is_disabled()
723  { return is_bit_cleared(get_vmcs_field(addr, name, exists()), from); }
724 
725  inline auto is_disabled_if_exists(bool verbose = false) noexcept
726  { return is_bit_cleared(get_vmcs_field_if_exists(addr, name, verbose, exists()), from); }
727 
728  inline void enable()
729  {
730  auto&& field = get_vmcs_field(addr, name, exists());
731  set_vmcs_field(set_bit(field, from), addr, name, exists());
732  }
733 
734  inline void enable_if_exists(bool verbose = false) noexcept
735  {
736  auto&& field = get_vmcs_field_if_exists(addr, name, verbose, exists());
737  set_vmcs_field_if_exists(set_bit(field, from), addr, name, verbose, exists());
738  }
739 
740  inline void disable()
741  {
742  auto&& field = get_vmcs_field(addr, name, exists());
743  set_vmcs_field(clear_bit(field, from), addr, name, exists());
744  }
745 
746  inline void disable_if_exists(bool verbose = false) noexcept
747  {
748  auto&& field = get_vmcs_field_if_exists(addr, name, verbose, exists());
749  set_vmcs_field_if_exists(clear_bit(field, from), addr, name, verbose, exists());
750  }
751  }
752 
753  namespace debugging_extensions
754  {
755  constexpr const auto mask = 0x0000000000000008UL;
756  constexpr const auto from = 3;
757  constexpr const auto name = "debugging_extensions";
758 
759  inline auto is_enabled()
760  { return is_bit_set(get_vmcs_field(addr, name, exists()), from); }
761 
762  inline auto is_enabled_if_exists(bool verbose = false) noexcept
763  { return is_bit_set(get_vmcs_field_if_exists(addr, name, verbose, exists()), from); }
764 
765  inline auto is_disabled()
766  { return is_bit_cleared(get_vmcs_field(addr, name, exists()), from); }
767 
768  inline auto is_disabled_if_exists(bool verbose = false) noexcept
769  { return is_bit_cleared(get_vmcs_field_if_exists(addr, name, verbose, exists()), from); }
770 
771  inline void enable()
772  {
773  auto&& field = get_vmcs_field(addr, name, exists());
774  set_vmcs_field(set_bit(field, from), addr, name, exists());
775  }
776 
777  inline void enable_if_exists(bool verbose = false) noexcept
778  {
779  auto&& field = get_vmcs_field_if_exists(addr, name, verbose, exists());
780  set_vmcs_field_if_exists(set_bit(field, from), addr, name, verbose, exists());
781  }
782 
783  inline void disable()
784  {
785  auto&& field = get_vmcs_field(addr, name, exists());
786  set_vmcs_field(clear_bit(field, from), addr, name, exists());
787  }
788 
789  inline void disable_if_exists(bool verbose = false) noexcept
790  {
791  auto&& field = get_vmcs_field_if_exists(addr, name, verbose, exists());
792  set_vmcs_field_if_exists(clear_bit(field, from), addr, name, verbose, exists());
793  }
794  }
795 
796  namespace page_size_extensions
797  {
798  constexpr const auto mask = 0x0000000000000010UL;
799  constexpr const auto from = 4;
800  constexpr const auto name = "page_size_extensions";
801 
802  inline auto is_enabled()
803  { return is_bit_set(get_vmcs_field(addr, name, exists()), from); }
804 
805  inline auto is_enabled_if_exists(bool verbose = false) noexcept
806  { return is_bit_set(get_vmcs_field_if_exists(addr, name, verbose, exists()), from); }
807 
808  inline auto is_disabled()
809  { return is_bit_cleared(get_vmcs_field(addr, name, exists()), from); }
810 
811  inline auto is_disabled_if_exists(bool verbose = false) noexcept
812  { return is_bit_cleared(get_vmcs_field_if_exists(addr, name, verbose, exists()), from); }
813 
814  inline void enable()
815  {
816  auto&& field = get_vmcs_field(addr, name, exists());
817  set_vmcs_field(set_bit(field, from), addr, name, exists());
818  }
819 
820  inline void enable_if_exists(bool verbose = false) noexcept
821  {
822  auto&& field = get_vmcs_field_if_exists(addr, name, verbose, exists());
823  set_vmcs_field_if_exists(set_bit(field, from), addr, name, verbose, exists());
824  }
825 
826  inline void disable()
827  {
828  auto&& field = get_vmcs_field(addr, name, exists());
829  set_vmcs_field(clear_bit(field, from), addr, name, exists());
830  }
831 
832  inline void disable_if_exists(bool verbose = false) noexcept
833  {
834  auto&& field = get_vmcs_field_if_exists(addr, name, verbose, exists());
835  set_vmcs_field_if_exists(clear_bit(field, from), addr, name, verbose, exists());
836  }
837  }
838 
839  namespace physical_address_extensions
840  {
841  constexpr const auto mask = 0x0000000000000020UL;
842  constexpr const auto from = 5;
843  constexpr const auto name = "physical_address_extensions";
844 
845  inline auto is_enabled()
846  { return is_bit_set(get_vmcs_field(addr, name, exists()), from); }
847 
848  inline auto is_enabled_if_exists(bool verbose = false) noexcept
849  { return is_bit_set(get_vmcs_field_if_exists(addr, name, verbose, exists()), from); }
850 
851  inline auto is_disabled()
852  { return is_bit_cleared(get_vmcs_field(addr, name, exists()), from); }
853 
854  inline auto is_disabled_if_exists(bool verbose = false) noexcept
855  { return is_bit_cleared(get_vmcs_field_if_exists(addr, name, verbose, exists()), from); }
856 
857  inline void enable()
858  {
859  auto&& field = get_vmcs_field(addr, name, exists());
860  set_vmcs_field(set_bit(field, from), addr, name, exists());
861  }
862 
863  inline void enable_if_exists(bool verbose = false) noexcept
864  {
865  auto&& field = get_vmcs_field_if_exists(addr, name, verbose, exists());
866  set_vmcs_field_if_exists(set_bit(field, from), addr, name, verbose, exists());
867  }
868 
869  inline void disable()
870  {
871  auto&& field = get_vmcs_field(addr, name, exists());
872  set_vmcs_field(clear_bit(field, from), addr, name, exists());
873  }
874 
875  inline void disable_if_exists(bool verbose = false) noexcept
876  {
877  auto&& field = get_vmcs_field_if_exists(addr, name, verbose, exists());
878  set_vmcs_field_if_exists(clear_bit(field, from), addr, name, verbose, exists());
879  }
880  }
881 
882  namespace machine_check_enable
883  {
884  constexpr const auto mask = 0x0000000000000040UL;
885  constexpr const auto from = 6;
886  constexpr const auto name = "machine_check_enable";
887 
888  inline auto is_enabled()
889  { return is_bit_set(get_vmcs_field(addr, name, exists()), from); }
890 
891  inline auto is_enabled_if_exists(bool verbose = false) noexcept
892  { return is_bit_set(get_vmcs_field_if_exists(addr, name, verbose, exists()), from); }
893 
894  inline auto is_disabled()
895  { return is_bit_cleared(get_vmcs_field(addr, name, exists()), from); }
896 
897  inline auto is_disabled_if_exists(bool verbose = false) noexcept
898  { return is_bit_cleared(get_vmcs_field_if_exists(addr, name, verbose, exists()), from); }
899 
900  inline void enable()
901  {
902  auto&& field = get_vmcs_field(addr, name, exists());
903  set_vmcs_field(set_bit(field, from), addr, name, exists());
904  }
905 
906  inline void enable_if_exists(bool verbose = false) noexcept
907  {
908  auto&& field = get_vmcs_field_if_exists(addr, name, verbose, exists());
909  set_vmcs_field_if_exists(set_bit(field, from), addr, name, verbose, exists());
910  }
911 
912  inline void disable()
913  {
914  auto&& field = get_vmcs_field(addr, name, exists());
915  set_vmcs_field(clear_bit(field, from), addr, name, exists());
916  }
917 
918  inline void disable_if_exists(bool verbose = false) noexcept
919  {
920  auto&& field = get_vmcs_field_if_exists(addr, name, verbose, exists());
921  set_vmcs_field_if_exists(clear_bit(field, from), addr, name, verbose, exists());
922  }
923  }
924 
925  namespace page_global_enable
926  {
927  constexpr const auto mask = 0x0000000000000080UL;
928  constexpr const auto from = 7;
929  constexpr const auto name = "page_global_enable";
930 
931  inline auto is_enabled()
932  { return is_bit_set(get_vmcs_field(addr, name, exists()), from); }
933 
934  inline auto is_enabled_if_exists(bool verbose = false) noexcept
935  { return is_bit_set(get_vmcs_field_if_exists(addr, name, verbose, exists()), from); }
936 
937  inline auto is_disabled()
938  { return is_bit_cleared(get_vmcs_field(addr, name, exists()), from); }
939 
940  inline auto is_disabled_if_exists(bool verbose = false) noexcept
941  { return is_bit_cleared(get_vmcs_field_if_exists(addr, name, verbose, exists()), from); }
942 
943  inline void enable()
944  {
945  auto&& field = get_vmcs_field(addr, name, exists());
946  set_vmcs_field(set_bit(field, from), addr, name, exists());
947  }
948 
949  inline void enable_if_exists(bool verbose = false) noexcept
950  {
951  auto&& field = get_vmcs_field_if_exists(addr, name, verbose, exists());
952  set_vmcs_field_if_exists(set_bit(field, from), addr, name, verbose, exists());
953  }
954 
955  inline void disable()
956  {
957  auto&& field = get_vmcs_field(addr, name, exists());
958  set_vmcs_field(clear_bit(field, from), addr, name, exists());
959  }
960 
961  inline void disable_if_exists(bool verbose = false) noexcept
962  {
963  auto&& field = get_vmcs_field_if_exists(addr, name, verbose, exists());
964  set_vmcs_field_if_exists(clear_bit(field, from), addr, name, verbose, exists());
965  }
966  }
967 
968  namespace performance_monitor_counter_enable
969  {
970  constexpr const auto mask = 0x0000000000000100UL;
971  constexpr const auto from = 8;
972  constexpr const auto name = "performance_monitor_counter_enable";
973 
974  inline auto is_enabled()
975  { return is_bit_set(get_vmcs_field(addr, name, exists()), from); }
976 
977  inline auto is_enabled_if_exists(bool verbose = false) noexcept
978  { return is_bit_set(get_vmcs_field_if_exists(addr, name, verbose, exists()), from); }
979 
980  inline auto is_disabled()
981  { return is_bit_cleared(get_vmcs_field(addr, name, exists()), from); }
982 
983  inline auto is_disabled_if_exists(bool verbose = false) noexcept
984  { return is_bit_cleared(get_vmcs_field_if_exists(addr, name, verbose, exists()), from); }
985 
986  inline void enable()
987  {
988  auto&& field = get_vmcs_field(addr, name, exists());
989  set_vmcs_field(set_bit(field, from), addr, name, exists());
990  }
991 
992  inline void enable_if_exists(bool verbose = false) noexcept
993  {
994  auto&& field = get_vmcs_field_if_exists(addr, name, verbose, exists());
995  set_vmcs_field_if_exists(set_bit(field, from), addr, name, verbose, exists());
996  }
997 
998  inline void disable()
999  {
1000  auto&& field = get_vmcs_field(addr, name, exists());
1001  set_vmcs_field(clear_bit(field, from), addr, name, exists());
1002  }
1003 
1004  inline void disable_if_exists(bool verbose = false) noexcept
1005  {
1006  auto&& field = get_vmcs_field_if_exists(addr, name, verbose, exists());
1007  set_vmcs_field_if_exists(clear_bit(field, from), addr, name, verbose, exists());
1008  }
1009  }
1010 
1011  namespace osfxsr
1012  {
1013  constexpr const auto mask = 0x0000000000000200UL;
1014  constexpr const auto from = 9;
1015  constexpr const auto name = "osfxsr";
1016 
1017  inline auto is_enabled()
1018  { return is_bit_set(get_vmcs_field(addr, name, exists()), from); }
1019 
1020  inline auto is_enabled_if_exists(bool verbose = false) noexcept
1021  { return is_bit_set(get_vmcs_field_if_exists(addr, name, verbose, exists()), from); }
1022 
1023  inline auto is_disabled()
1024  { return is_bit_cleared(get_vmcs_field(addr, name, exists()), from); }
1025 
1026  inline auto is_disabled_if_exists(bool verbose = false) noexcept
1027  { return is_bit_cleared(get_vmcs_field_if_exists(addr, name, verbose, exists()), from); }
1028 
1029  inline void enable()
1030  {
1031  auto&& field = get_vmcs_field(addr, name, exists());
1032  set_vmcs_field(set_bit(field, from), addr, name, exists());
1033  }
1034 
1035  inline void enable_if_exists(bool verbose = false) noexcept
1036  {
1037  auto&& field = get_vmcs_field_if_exists(addr, name, verbose, exists());
1038  set_vmcs_field_if_exists(set_bit(field, from), addr, name, verbose, exists());
1039  }
1040 
1041  inline void disable()
1042  {
1043  auto&& field = get_vmcs_field(addr, name, exists());
1044  set_vmcs_field(clear_bit(field, from), addr, name, exists());
1045  }
1046 
1047  inline void disable_if_exists(bool verbose = false) noexcept
1048  {
1049  auto&& field = get_vmcs_field_if_exists(addr, name, verbose, exists());
1050  set_vmcs_field_if_exists(clear_bit(field, from), addr, name, verbose, exists());
1051  }
1052  }
1053 
1054  namespace osxmmexcpt
1055  {
1056  constexpr const auto mask = 0x0000000000000400UL;
1057  constexpr const auto from = 10;
1058  constexpr const auto name = "osxmmexcpt";
1059 
1060  inline auto is_enabled()
1061  { return is_bit_set(get_vmcs_field(addr, name, exists()), from); }
1062 
1063  inline auto is_enabled_if_exists(bool verbose = false) noexcept
1064  { return is_bit_set(get_vmcs_field_if_exists(addr, name, verbose, exists()), from); }
1065 
1066  inline auto is_disabled()
1067  { return is_bit_cleared(get_vmcs_field(addr, name, exists()), from); }
1068 
1069  inline auto is_disabled_if_exists(bool verbose = false) noexcept
1070  { return is_bit_cleared(get_vmcs_field_if_exists(addr, name, verbose, exists()), from); }
1071 
1072  inline void enable()
1073  {
1074  auto&& field = get_vmcs_field(addr, name, exists());
1075  set_vmcs_field(set_bit(field, from), addr, name, exists());
1076  }
1077 
1078  inline void enable_if_exists(bool verbose = false) noexcept
1079  {
1080  auto&& field = get_vmcs_field_if_exists(addr, name, verbose, exists());
1081  set_vmcs_field_if_exists(set_bit(field, from), addr, name, verbose, exists());
1082  }
1083 
1084  inline void disable()
1085  {
1086  auto&& field = get_vmcs_field(addr, name, exists());
1087  set_vmcs_field(clear_bit(field, from), addr, name, exists());
1088  }
1089 
1090  inline void disable_if_exists(bool verbose = false) noexcept
1091  {
1092  auto&& field = get_vmcs_field_if_exists(addr, name, verbose, exists());
1093  set_vmcs_field_if_exists(clear_bit(field, from), addr, name, verbose, exists());
1094  }
1095  }
1096 
1097  namespace vmx_enable_bit
1098  {
1099  constexpr const auto mask = 0x0000000000002000UL;
1100  constexpr const auto from = 13;
1101  constexpr const auto name = "vmx_enable_bit";
1102 
1103  inline auto is_enabled()
1104  { return is_bit_set(get_vmcs_field(addr, name, exists()), from); }
1105 
1106  inline auto is_enabled_if_exists(bool verbose = false) noexcept
1107  { return is_bit_set(get_vmcs_field_if_exists(addr, name, verbose, exists()), from); }
1108 
1109  inline auto is_disabled()
1110  { return is_bit_cleared(get_vmcs_field(addr, name, exists()), from); }
1111 
1112  inline auto is_disabled_if_exists(bool verbose = false) noexcept
1113  { return is_bit_cleared(get_vmcs_field_if_exists(addr, name, verbose, exists()), from); }
1114 
1115  inline void enable()
1116  {
1117  auto&& field = get_vmcs_field(addr, name, exists());
1118  set_vmcs_field(set_bit(field, from), addr, name, exists());
1119  }
1120 
1121  inline void enable_if_exists(bool verbose = false) noexcept
1122  {
1123  auto&& field = get_vmcs_field_if_exists(addr, name, verbose, exists());
1124  set_vmcs_field_if_exists(set_bit(field, from), addr, name, verbose, exists());
1125  }
1126 
1127  inline void disable()
1128  {
1129  auto&& field = get_vmcs_field(addr, name, exists());
1130  set_vmcs_field(clear_bit(field, from), addr, name, exists());
1131  }
1132 
1133  inline void disable_if_exists(bool verbose = false) noexcept
1134  {
1135  auto&& field = get_vmcs_field_if_exists(addr, name, verbose, exists());
1136  set_vmcs_field_if_exists(clear_bit(field, from), addr, name, verbose, exists());
1137  }
1138  }
1139 
1140  namespace smx_enable_bit
1141  {
1142  constexpr const auto mask = 0x0000000000004000UL;
1143  constexpr const auto from = 14;
1144  constexpr const auto name = "smx_enable_bit";
1145 
1146  inline auto is_enabled()
1147  { return is_bit_set(get_vmcs_field(addr, name, exists()), from); }
1148 
1149  inline auto is_enabled_if_exists(bool verbose = false) noexcept
1150  { return is_bit_set(get_vmcs_field_if_exists(addr, name, verbose, exists()), from); }
1151 
1152  inline auto is_disabled()
1153  { return is_bit_cleared(get_vmcs_field(addr, name, exists()), from); }
1154 
1155  inline auto is_disabled_if_exists(bool verbose = false) noexcept
1156  { return is_bit_cleared(get_vmcs_field_if_exists(addr, name, verbose, exists()), from); }
1157 
1158  inline void enable()
1159  {
1160  auto&& field = get_vmcs_field(addr, name, exists());
1161  set_vmcs_field(set_bit(field, from), addr, name, exists());
1162  }
1163 
1164  inline void enable_if_exists(bool verbose = false) noexcept
1165  {
1166  auto&& field = get_vmcs_field_if_exists(addr, name, verbose, exists());
1167  set_vmcs_field_if_exists(set_bit(field, from), addr, name, verbose, exists());
1168  }
1169 
1170  inline void disable()
1171  {
1172  auto&& field = get_vmcs_field(addr, name, exists());
1173  set_vmcs_field(clear_bit(field, from), addr, name, exists());
1174  }
1175 
1176  inline void disable_if_exists(bool verbose = false) noexcept
1177  {
1178  auto&& field = get_vmcs_field_if_exists(addr, name, verbose, exists());
1179  set_vmcs_field_if_exists(clear_bit(field, from), addr, name, verbose, exists());
1180  }
1181  }
1182 
1183  namespace fsgsbase_enable_bit
1184  {
1185  constexpr const auto mask = 0x0000000000010000UL;
1186  constexpr const auto from = 16;
1187  constexpr const auto name = "fsgsbase_enable_bit";
1188 
1189  inline auto is_enabled()
1190  { return is_bit_set(get_vmcs_field(addr, name, exists()), from); }
1191 
1192  inline auto is_enabled_if_exists(bool verbose = false) noexcept
1193  { return is_bit_set(get_vmcs_field_if_exists(addr, name, verbose, exists()), from); }
1194 
1195  inline auto is_disabled()
1196  { return is_bit_cleared(get_vmcs_field(addr, name, exists()), from); }
1197 
1198  inline auto is_disabled_if_exists(bool verbose = false) noexcept
1199  { return is_bit_cleared(get_vmcs_field_if_exists(addr, name, verbose, exists()), from); }
1200 
1201  inline void enable()
1202  {
1203  auto&& field = get_vmcs_field(addr, name, exists());
1204  set_vmcs_field(set_bit(field, from), addr, name, exists());
1205  }
1206 
1207  inline void enable_if_exists(bool verbose = false) noexcept
1208  {
1209  auto&& field = get_vmcs_field_if_exists(addr, name, verbose, exists());
1210  set_vmcs_field_if_exists(set_bit(field, from), addr, name, verbose, exists());
1211  }
1212 
1213  inline void disable()
1214  {
1215  auto&& field = get_vmcs_field(addr, name, exists());
1216  set_vmcs_field(clear_bit(field, from), addr, name, exists());
1217  }
1218 
1219  inline void disable_if_exists(bool verbose = false) noexcept
1220  {
1221  auto&& field = get_vmcs_field_if_exists(addr, name, verbose, exists());
1222  set_vmcs_field_if_exists(clear_bit(field, from), addr, name, verbose, exists());
1223  }
1224  }
1225 
1226  namespace pcid_enable_bit
1227  {
1228  constexpr const auto mask = 0x0000000000020000UL;
1229  constexpr const auto from = 17;
1230  constexpr const auto name = "pcid_enable_bit";
1231 
1232  inline auto is_enabled()
1233  { return is_bit_set(get_vmcs_field(addr, name, exists()), from); }
1234 
1235  inline auto is_enabled_if_exists(bool verbose = false) noexcept
1236  { return is_bit_set(get_vmcs_field_if_exists(addr, name, verbose, exists()), from); }
1237 
1238  inline auto is_disabled()
1239  { return is_bit_cleared(get_vmcs_field(addr, name, exists()), from); }
1240 
1241  inline auto is_disabled_if_exists(bool verbose = false) noexcept
1242  { return is_bit_cleared(get_vmcs_field_if_exists(addr, name, verbose, exists()), from); }
1243 
1244  inline void enable()
1245  {
1246  auto&& field = get_vmcs_field(addr, name, exists());
1247  set_vmcs_field(set_bit(field, from), addr, name, exists());
1248  }
1249 
1250  inline void enable_if_exists(bool verbose = false) noexcept
1251  {
1252  auto&& field = get_vmcs_field_if_exists(addr, name, verbose, exists());
1253  set_vmcs_field_if_exists(set_bit(field, from), addr, name, verbose, exists());
1254  }
1255 
1256  inline void disable()
1257  {
1258  auto&& field = get_vmcs_field(addr, name, exists());
1259  set_vmcs_field(clear_bit(field, from), addr, name, exists());
1260  }
1261 
1262  inline void disable_if_exists(bool verbose = false) noexcept
1263  {
1264  auto&& field = get_vmcs_field_if_exists(addr, name, verbose, exists());
1265  set_vmcs_field_if_exists(clear_bit(field, from), addr, name, verbose, exists());
1266  }
1267  }
1268 
1269  namespace osxsave
1270  {
1271  constexpr const auto mask = 0x0000000000040000UL;
1272  constexpr const auto from = 18;
1273  constexpr const auto name = "osxsave";
1274 
1275  inline auto is_enabled()
1276  { return is_bit_set(get_vmcs_field(addr, name, exists()), from); }
1277 
1278  inline auto is_enabled_if_exists(bool verbose = false) noexcept
1279  { return is_bit_set(get_vmcs_field_if_exists(addr, name, verbose, exists()), from); }
1280 
1281  inline auto is_disabled()
1282  { return is_bit_cleared(get_vmcs_field(addr, name, exists()), from); }
1283 
1284  inline auto is_disabled_if_exists(bool verbose = false) noexcept
1285  { return is_bit_cleared(get_vmcs_field_if_exists(addr, name, verbose, exists()), from); }
1286 
1287  inline void enable()
1288  {
1289  auto&& field = get_vmcs_field(addr, name, exists());
1290  set_vmcs_field(set_bit(field, from), addr, name, exists());
1291  }
1292 
1293  inline void enable_if_exists(bool verbose = false) noexcept
1294  {
1295  auto&& field = get_vmcs_field_if_exists(addr, name, verbose, exists());
1296  set_vmcs_field_if_exists(set_bit(field, from), addr, name, verbose, exists());
1297  }
1298 
1299  inline void disable()
1300  {
1301  auto&& field = get_vmcs_field(addr, name, exists());
1302  set_vmcs_field(clear_bit(field, from), addr, name, exists());
1303  }
1304 
1305  inline void disable_if_exists(bool verbose = false) noexcept
1306  {
1307  auto&& field = get_vmcs_field_if_exists(addr, name, verbose, exists());
1308  set_vmcs_field_if_exists(clear_bit(field, from), addr, name, verbose, exists());
1309  }
1310  }
1311 
1312  namespace smep_enable_bit
1313  {
1314  constexpr const auto mask = 0x0000000000100000UL;
1315  constexpr const auto from = 20;
1316  constexpr const auto name = "smep_enable_bit";
1317 
1318  inline auto is_enabled()
1319  { return is_bit_set(get_vmcs_field(addr, name, exists()), from); }
1320 
1321  inline auto is_enabled_if_exists(bool verbose = false) noexcept
1322  { return is_bit_set(get_vmcs_field_if_exists(addr, name, verbose, exists()), from); }
1323 
1324  inline auto is_disabled()
1325  { return is_bit_cleared(get_vmcs_field(addr, name, exists()), from); }
1326 
1327  inline auto is_disabled_if_exists(bool verbose = false) noexcept
1328  { return is_bit_cleared(get_vmcs_field_if_exists(addr, name, verbose, exists()), from); }
1329 
1330  inline void enable()
1331  {
1332  auto&& field = get_vmcs_field(addr, name, exists());
1333  set_vmcs_field(set_bit(field, from), addr, name, exists());
1334  }
1335 
1336  inline void enable_if_exists(bool verbose = false) noexcept
1337  {
1338  auto&& field = get_vmcs_field_if_exists(addr, name, verbose, exists());
1339  set_vmcs_field_if_exists(set_bit(field, from), addr, name, verbose, exists());
1340  }
1341 
1342  inline void disable()
1343  {
1344  auto&& field = get_vmcs_field(addr, name, exists());
1345  set_vmcs_field(clear_bit(field, from), addr, name, exists());
1346  }
1347 
1348  inline void disable_if_exists(bool verbose = false) noexcept
1349  {
1350  auto&& field = get_vmcs_field_if_exists(addr, name, verbose, exists());
1351  set_vmcs_field_if_exists(clear_bit(field, from), addr, name, verbose, exists());
1352  }
1353  }
1354 
1355  namespace smap_enable_bit
1356  {
1357  constexpr const auto mask = 0x0000000000200000UL;
1358  constexpr const auto from = 21;
1359  constexpr const auto name = "smap_enable_bit";
1360 
1361  inline auto is_enabled()
1362  { return is_bit_set(get_vmcs_field(addr, name, exists()), from); }
1363 
1364  inline auto is_enabled_if_exists(bool verbose = false) noexcept
1365  { return is_bit_set(get_vmcs_field_if_exists(addr, name, verbose, exists()), from); }
1366 
1367  inline auto is_disabled()
1368  { return is_bit_cleared(get_vmcs_field(addr, name, exists()), from); }
1369 
1370  inline auto is_disabled_if_exists(bool verbose = false) noexcept
1371  { return is_bit_cleared(get_vmcs_field_if_exists(addr, name, verbose, exists()), from); }
1372 
1373  inline void enable()
1374  {
1375  auto&& field = get_vmcs_field(addr, name, exists());
1376  set_vmcs_field(set_bit(field, from), addr, name, exists());
1377  }
1378 
1379  inline void enable_if_exists(bool verbose = false) noexcept
1380  {
1381  auto&& field = get_vmcs_field_if_exists(addr, name, verbose, exists());
1382  set_vmcs_field_if_exists(set_bit(field, from), addr, name, verbose, exists());
1383  }
1384 
1385  inline void disable()
1386  {
1387  auto&& field = get_vmcs_field(addr, name, exists());
1388  set_vmcs_field(clear_bit(field, from), addr, name, exists());
1389  }
1390 
1391  inline void disable_if_exists(bool verbose = false) noexcept
1392  {
1393  auto&& field = get_vmcs_field_if_exists(addr, name, verbose, exists());
1394  set_vmcs_field_if_exists(clear_bit(field, from), addr, name, verbose, exists());
1395  }
1396  }
1397 
1398  namespace protection_key_enable_bit
1399  {
1400  constexpr const auto mask = 0x0000000000400000UL;
1401  constexpr const auto from = 22;
1402  constexpr const auto name = "protection_key_enable_bit";
1403 
1404  inline auto is_enabled()
1405  { return is_bit_set(get_vmcs_field(addr, name, exists()), from); }
1406 
1407  inline auto is_enabled_if_exists(bool verbose = false) noexcept
1408  { return is_bit_set(get_vmcs_field_if_exists(addr, name, verbose, exists()), from); }
1409 
1410  inline auto is_disabled()
1411  { return is_bit_cleared(get_vmcs_field(addr, name, exists()), from); }
1412 
1413  inline auto is_disabled_if_exists(bool verbose = false) noexcept
1414  { return is_bit_cleared(get_vmcs_field_if_exists(addr, name, verbose, exists()), from); }
1415 
1416  inline void enable()
1417  {
1418  auto&& field = get_vmcs_field(addr, name, exists());
1419  set_vmcs_field(set_bit(field, from), addr, name, exists());
1420  }
1421 
1422  inline void enable_if_exists(bool verbose = false) noexcept
1423  {
1424  auto&& field = get_vmcs_field_if_exists(addr, name, verbose, exists());
1425  set_vmcs_field_if_exists(set_bit(field, from), addr, name, verbose, exists());
1426  }
1427 
1428  inline void disable()
1429  {
1430  auto&& field = get_vmcs_field(addr, name, exists());
1431  set_vmcs_field(clear_bit(field, from), addr, name, exists());
1432  }
1433 
1434  inline void disable_if_exists(bool verbose = false) noexcept
1435  {
1436  auto&& field = get_vmcs_field_if_exists(addr, name, verbose, exists());
1437  set_vmcs_field_if_exists(clear_bit(field, from), addr, name, verbose, exists());
1438  }
1439  }
1440 
1441  inline void dump() noexcept
1442  {
1443  bfdebug << "guest cr4 enabled flags:" << bfendl;
1444 
1446  bfdebug << " - v8086_mode_extensions" << bfendl;
1447 
1449  bfdebug << " - protected_mode_virtual_interrupts" << bfendl;
1450 
1452  bfdebug << " - time_stamp_disable" << bfendl;
1453 
1455  bfdebug << " - debugging_extensions" << bfendl;
1456 
1458  bfdebug << " - page_size_extensions" << bfendl;
1459 
1461  bfdebug << " - physical_address_extensions" << bfendl;
1462 
1464  bfdebug << " - machine_check_enable" << bfendl;
1465 
1467  bfdebug << " - page_global_enable" << bfendl;
1468 
1470  bfdebug << " - performance_monitor_counter_enable" << bfendl;
1471 
1472  if (osfxsr::is_enabled())
1473  bfdebug << " - osfxsr" << bfendl;
1474 
1475  if (osxmmexcpt::is_enabled())
1476  bfdebug << " - osxmmexcpt" << bfendl;
1477 
1479  bfdebug << " - vmx_enable_bit" << bfendl;
1480 
1482  bfdebug << " - smx_enable_bit" << bfendl;
1483 
1485  bfdebug << " - smx_enable_bit" << bfendl;
1486 
1488  bfdebug << " - fsgsbase_enable_bit" << bfendl;
1489 
1491  bfdebug << " - pcid_enable_bit" << bfendl;
1492 
1493  if (osxsave::is_enabled())
1494  bfdebug << " - osxsave" << bfendl;
1495 
1497  bfdebug << " - smep_enable_bit" << bfendl;
1498 
1500  bfdebug << " - smap_enable_bit" << bfendl;
1501 
1503  bfdebug << " - protection_key_enable_bit" << bfendl;
1504  }
1505 }
1506 
1507 namespace guest_es_base
1508 {
1509  constexpr const auto addr = 0x0000000000006806UL;
1510  constexpr const auto name = "guest_es_base";
1511 
1512  inline bool exists() noexcept
1513  { return true; }
1514 
1515  inline auto get()
1516  { return get_vmcs_field(addr, name, exists()); }
1517 
1518  inline auto get_if_exists(bool verbose = false) noexcept
1519  { return get_vmcs_field_if_exists(addr, name, verbose, exists()); }
1520 
1521  template<class T, class = typename std::enable_if<std::is_integral<T>::value>::type>
1522  void set(T val) { set_vmcs_field(val, addr, name, exists()); }
1523 
1524  template<class T, class = typename std::enable_if<std::is_integral<T>::value>::type>
1525  void set_if_exists(T val, bool verbose = false) noexcept
1526  { set_vmcs_field_if_exists(val, addr, name, verbose, exists()); }
1527 }
1528 
1529 namespace guest_cs_base
1530 {
1531  constexpr const auto addr = 0x0000000000006808UL;
1532  constexpr const auto name = "guest_cs_base";
1533 
1534  inline bool exists() noexcept
1535  { return true; }
1536 
1537  inline auto get()
1538  { return get_vmcs_field(addr, name, exists()); }
1539 
1540  inline auto get_if_exists(bool verbose = false) noexcept
1541  { return get_vmcs_field_if_exists(addr, name, verbose, exists()); }
1542 
1543  template<class T, class = typename std::enable_if<std::is_integral<T>::value>::type>
1544  void set(T val) { set_vmcs_field(val, addr, name, exists()); }
1545 
1546  template<class T, class = typename std::enable_if<std::is_integral<T>::value>::type>
1547  void set_if_exists(T val, bool verbose = false) noexcept
1548  { set_vmcs_field_if_exists(val, addr, name, verbose, exists()); }
1549 }
1550 
1551 namespace guest_ss_base
1552 {
1553  constexpr const auto addr = 0x000000000000680AUL;
1554  constexpr const auto name = "guest_ss_base";
1555 
1556  inline bool exists() noexcept
1557  { return true; }
1558 
1559  inline auto get()
1560  { return get_vmcs_field(addr, name, exists()); }
1561 
1562  inline auto get_if_exists(bool verbose = false) noexcept
1563  { return get_vmcs_field_if_exists(addr, name, verbose, exists()); }
1564 
1565  template<class T, class = typename std::enable_if<std::is_integral<T>::value>::type>
1566  void set(T val) { set_vmcs_field(val, addr, name, exists()); }
1567 
1568  template<class T, class = typename std::enable_if<std::is_integral<T>::value>::type>
1569  void set_if_exists(T val, bool verbose = false) noexcept
1570  { set_vmcs_field_if_exists(val, addr, name, verbose, exists()); }
1571 }
1572 
1573 namespace guest_ds_base
1574 {
1575  constexpr const auto addr = 0x000000000000680CUL;
1576  constexpr const auto name = "guest_ds_base";
1577 
1578  inline bool exists() noexcept
1579  { return true; }
1580 
1581  inline auto get()
1582  { return get_vmcs_field(addr, name, exists()); }
1583 
1584  inline auto get_if_exists(bool verbose = false) noexcept
1585  { return get_vmcs_field_if_exists(addr, name, verbose, exists()); }
1586 
1587  template<class T, class = typename std::enable_if<std::is_integral<T>::value>::type>
1588  void set(T val) { set_vmcs_field(val, addr, name, exists()); }
1589 
1590  template<class T, class = typename std::enable_if<std::is_integral<T>::value>::type>
1591  void set_if_exists(T val, bool verbose = false) noexcept
1592  { set_vmcs_field_if_exists(val, addr, name, verbose, exists()); }
1593 }
1594 
1595 namespace guest_fs_base
1596 {
1597  constexpr const auto addr = 0x000000000000680EUL;
1598  constexpr const auto name = "guest_fs_base";
1599 
1600  inline bool exists() noexcept
1601  { return true; }
1602 
1603  inline auto get()
1604  { return get_vmcs_field(addr, name, exists()); }
1605 
1606  inline auto get_if_exists(bool verbose = false) noexcept
1607  { return get_vmcs_field_if_exists(addr, name, verbose, exists()); }
1608 
1609  template<class T, class = typename std::enable_if<std::is_integral<T>::value>::type>
1610  void set(T val) { set_vmcs_field(val, addr, name, exists()); }
1611 
1612  template<class T, class = typename std::enable_if<std::is_integral<T>::value>::type>
1613  void set_if_exists(T val, bool verbose = false) noexcept
1614  { set_vmcs_field_if_exists(val, addr, name, verbose, exists()); }
1615 }
1616 
1617 namespace guest_gs_base
1618 {
1619  constexpr const auto addr = 0x0000000000006810UL;
1620  constexpr const auto name = "guest_gs_base";
1621 
1622  inline bool exists() noexcept
1623  { return true; }
1624 
1625  inline auto get()
1626  { return get_vmcs_field(addr, name, exists()); }
1627 
1628  inline auto get_if_exists(bool verbose = false) noexcept
1629  { return get_vmcs_field_if_exists(addr, name, verbose, exists()); }
1630 
1631  template<class T, class = typename std::enable_if<std::is_integral<T>::value>::type>
1632  void set(T val) { set_vmcs_field(val, addr, name, exists()); }
1633 
1634  template<class T, class = typename std::enable_if<std::is_integral<T>::value>::type>
1635  void set_if_exists(T val, bool verbose = false) noexcept
1636  { set_vmcs_field_if_exists(val, addr, name, verbose, exists()); }
1637 }
1638 
1639 namespace guest_ldtr_base
1640 {
1641  constexpr const auto addr = 0x0000000000006812UL;
1642  constexpr const auto name = "guest_ldtr_base";
1643 
1644  inline bool exists() noexcept
1645  { return true; }
1646 
1647  inline auto get()
1648  { return get_vmcs_field(addr, name, exists()); }
1649 
1650  inline auto get_if_exists(bool verbose = false) noexcept
1651  { return get_vmcs_field_if_exists(addr, name, verbose, exists()); }
1652 
1653  template<class T, class = typename std::enable_if<std::is_integral<T>::value>::type>
1654  void set(T val) { set_vmcs_field(val, addr, name, exists()); }
1655 
1656  template<class T, class = typename std::enable_if<std::is_integral<T>::value>::type>
1657  void set_if_exists(T val, bool verbose = false) noexcept
1658  { set_vmcs_field_if_exists(val, addr, name, verbose, exists()); }
1659 }
1660 
1661 namespace guest_tr_base
1662 {
1663  constexpr const auto addr = 0x0000000000006814UL;
1664  constexpr const auto name = "guest_tr_base";
1665 
1666  inline bool exists() noexcept
1667  { return true; }
1668 
1669  inline auto get()
1670  { return get_vmcs_field(addr, name, exists()); }
1671 
1672  inline auto get_if_exists(bool verbose = false) noexcept
1673  { return get_vmcs_field_if_exists(addr, name, verbose, exists()); }
1674 
1675  template<class T, class = typename std::enable_if<std::is_integral<T>::value>::type>
1676  void set(T val) { set_vmcs_field(val, addr, name, exists()); }
1677 
1678  template<class T, class = typename std::enable_if<std::is_integral<T>::value>::type>
1679  void set_if_exists(T val, bool verbose = false) noexcept
1680  { set_vmcs_field_if_exists(val, addr, name, verbose, exists()); }
1681 }
1682 
1683 namespace guest_gdtr_base
1684 {
1685  constexpr const auto addr = 0x0000000000006816UL;
1686  constexpr const auto name = "guest_gdtr_base";
1687 
1688  inline bool exists() noexcept
1689  { return true; }
1690 
1691  inline auto get()
1692  { return get_vmcs_field(addr, name, exists()); }
1693 
1694  inline auto get_if_exists(bool verbose = false) noexcept
1695  { return get_vmcs_field_if_exists(addr, name, verbose, exists()); }
1696 
1697  template<class T, class = typename std::enable_if<std::is_integral<T>::value>::type>
1698  void set(T val) { set_vmcs_field(val, addr, name, exists()); }
1699 
1700  template<class T, class = typename std::enable_if<std::is_integral<T>::value>::type>
1701  void set_if_exists(T val, bool verbose = false) noexcept
1702  { set_vmcs_field_if_exists(val, addr, name, verbose, exists()); }
1703 }
1704 
1705 namespace guest_idtr_base
1706 {
1707  constexpr const auto addr = 0x0000000000006818UL;
1708  constexpr const auto name = "guest_idtr_base";
1709 
1710  inline bool exists() noexcept
1711  { return true; }
1712 
1713  inline auto get()
1714  { return get_vmcs_field(addr, name, exists()); }
1715 
1716  inline auto get_if_exists(bool verbose = false) noexcept
1717  { return get_vmcs_field_if_exists(addr, name, verbose, exists()); }
1718 
1719  template<class T, class = typename std::enable_if<std::is_integral<T>::value>::type>
1720  void set(T val) { set_vmcs_field(val, addr, name, exists()); }
1721 
1722  template<class T, class = typename std::enable_if<std::is_integral<T>::value>::type>
1723  void set_if_exists(T val, bool verbose = false) noexcept
1724  { set_vmcs_field_if_exists(val, addr, name, verbose, exists()); }
1725 }
1726 
1727 namespace guest_dr7
1728 {
1729  constexpr const auto addr = 0x000000000000681AUL;
1730  constexpr const auto name = "guest_dr7";
1731 
1732  inline bool exists() noexcept
1733  { return true; }
1734 
1735  inline auto get()
1736  { return get_vmcs_field(addr, name, exists()); }
1737 
1738  inline auto get_if_exists(bool verbose = false) noexcept
1739  { return get_vmcs_field_if_exists(addr, name, verbose, exists()); }
1740 
1741  template<class T, class = typename std::enable_if<std::is_integral<T>::value>::type>
1742  void set(T val) { set_vmcs_field(val, addr, name, exists()); }
1743 
1744  template<class T, class = typename std::enable_if<std::is_integral<T>::value>::type>
1745  void set_if_exists(T val, bool verbose = false) noexcept
1746  { set_vmcs_field_if_exists(val, addr, name, verbose, exists()); }
1747 }
1748 
1749 namespace guest_rsp
1750 {
1751  constexpr const auto addr = 0x000000000000681CUL;
1752  constexpr const auto name = "guest_rsp";
1753 
1754  inline bool exists() noexcept
1755  { return true; }
1756 
1757  inline auto get()
1758  { return get_vmcs_field(addr, name, exists()); }
1759 
1760  inline auto get_if_exists(bool verbose = false) noexcept
1761  { return get_vmcs_field_if_exists(addr, name, verbose, exists()); }
1762 
1763  template<class T, class = typename std::enable_if<std::is_integral<T>::value>::type>
1764  void set(T val) { set_vmcs_field(val, addr, name, exists()); }
1765 
1766  template<class T, class = typename std::enable_if<std::is_integral<T>::value>::type>
1767  void set_if_exists(T val, bool verbose = false) noexcept
1768  { set_vmcs_field_if_exists(val, addr, name, verbose, exists()); }
1769 }
1770 
1771 namespace guest_rip
1772 {
1773  constexpr const auto addr = 0x000000000000681EUL;
1774  constexpr const auto name = "guest_rip";
1775 
1776  inline bool exists() noexcept
1777  { return true; }
1778 
1779  inline auto get()
1780  { return get_vmcs_field(addr, name, exists()); }
1781 
1782  inline auto get_if_exists(bool verbose = false) noexcept
1783  { return get_vmcs_field_if_exists(addr, name, verbose, exists()); }
1784 
1785  template<class T, class = typename std::enable_if<std::is_integral<T>::value>::type>
1786  void set(T val) { set_vmcs_field(val, addr, name, exists()); }
1787 
1788  template<class T, class = typename std::enable_if<std::is_integral<T>::value>::type>
1789  void set_if_exists(T val, bool verbose = false) noexcept
1790  { set_vmcs_field_if_exists(val, addr, name, verbose, exists()); }
1791 }
1792 
1793 namespace guest_rflags
1794 {
1795  constexpr const auto addr = 0x0000000000006820UL;
1796  constexpr const auto name = "guest_rflags";
1797 
1798  inline bool exists() noexcept
1799  { return true; }
1800 
1801  inline auto get()
1802  { return get_vmcs_field(addr, name, exists()); }
1803 
1804  inline auto get_if_exists(bool verbose = false) noexcept
1805  { return get_vmcs_field_if_exists(addr, name, verbose, exists()); }
1806 
1807  template<class T, class = typename std::enable_if<std::is_integral<T>::value>::type>
1808  void set(T val) { set_vmcs_field(val, addr, name, exists()); }
1809 
1810  template<class T, class = typename std::enable_if<std::is_integral<T>::value>::type>
1811  void set_if_exists(T val, bool verbose = false) noexcept
1812  { set_vmcs_field_if_exists(val, addr, name, verbose, exists()); }
1813 
1814  namespace carry_flag
1815  {
1816  constexpr const auto mask = 0x0000000000000001UL;
1817  constexpr const auto from = 0;
1818  constexpr const auto name = "carry_flag";
1819 
1820  inline auto is_enabled()
1821  { return is_bit_set(get_vmcs_field(addr, name, exists()), from); }
1822 
1823  inline auto is_enabled_if_exists(bool verbose = false) noexcept
1824  { return is_bit_set(get_vmcs_field_if_exists(addr, name, verbose, exists()), from); }
1825 
1826  inline auto is_disabled()
1827  { return is_bit_cleared(get_vmcs_field(addr, name, exists()), from); }
1828 
1829  inline auto is_disabled_if_exists(bool verbose = false) noexcept
1830  { return is_bit_cleared(get_vmcs_field_if_exists(addr, name, verbose, exists()), from); }
1831 
1832  inline void enable()
1833  {
1834  auto&& field = get_vmcs_field(addr, name, exists());
1835  set_vmcs_field(set_bit(field, from), addr, name, exists());
1836  }
1837 
1838  inline void enable_if_exists(bool verbose = false) noexcept
1839  {
1840  auto&& field = get_vmcs_field_if_exists(addr, name, verbose, exists());
1841  set_vmcs_field_if_exists(set_bit(field, from), addr, name, verbose, exists());
1842  }
1843 
1844  inline void disable()
1845  {
1846  auto&& field = get_vmcs_field(addr, name, exists());
1847  set_vmcs_field(clear_bit(field, from), addr, name, exists());
1848  }
1849 
1850  inline void disable_if_exists(bool verbose = false) noexcept
1851  {
1852  auto&& field = get_vmcs_field_if_exists(addr, name, verbose, exists());
1853  set_vmcs_field_if_exists(clear_bit(field, from), addr, name, verbose, exists());
1854  }
1855  }
1856 
1857  namespace parity_flag
1858  {
1859  constexpr const auto mask = 0x0000000000000004UL;
1860  constexpr const auto from = 2;
1861  constexpr const auto name = "parity_flag";
1862 
1863  inline auto is_enabled()
1864  { return is_bit_set(get_vmcs_field(addr, name, exists()), from); }
1865 
1866  inline auto is_enabled_if_exists(bool verbose = false) noexcept
1867  { return is_bit_set(get_vmcs_field_if_exists(addr, name, verbose, exists()), from); }
1868 
1869  inline auto is_disabled()
1870  { return is_bit_cleared(get_vmcs_field(addr, name, exists()), from); }
1871 
1872  inline auto is_disabled_if_exists(bool verbose = false) noexcept
1873  { return is_bit_cleared(get_vmcs_field_if_exists(addr, name, verbose, exists()), from); }
1874 
1875  inline void enable()
1876  {
1877  auto&& field = get_vmcs_field(addr, name, exists());
1878  set_vmcs_field(set_bit(field, from), addr, name, exists());
1879  }
1880 
1881  inline void enable_if_exists(bool verbose = false) noexcept
1882  {
1883  auto&& field = get_vmcs_field_if_exists(addr, name, verbose, exists());
1884  set_vmcs_field_if_exists(set_bit(field, from), addr, name, verbose, exists());
1885  }
1886 
1887  inline void disable()
1888  {
1889  auto&& field = get_vmcs_field(addr, name, exists());
1890  set_vmcs_field(clear_bit(field, from), addr, name, exists());
1891  }
1892 
1893  inline void disable_if_exists(bool verbose = false) noexcept
1894  {
1895  auto&& field = get_vmcs_field_if_exists(addr, name, verbose, exists());
1896  set_vmcs_field_if_exists(clear_bit(field, from), addr, name, verbose, exists());
1897  }
1898  }
1899 
1900  namespace auxiliary_carry_flag
1901  {
1902  constexpr const auto mask = 0x0000000000000010UL;
1903  constexpr const auto from = 4;
1904  constexpr const auto name = "auxiliary_carry_flag";
1905 
1906  inline auto is_enabled()
1907  { return is_bit_set(get_vmcs_field(addr, name, exists()), from); }
1908 
1909  inline auto is_enabled_if_exists(bool verbose = false) noexcept
1910  { return is_bit_set(get_vmcs_field_if_exists(addr, name, verbose, exists()), from); }
1911 
1912  inline auto is_disabled()
1913  { return is_bit_cleared(get_vmcs_field(addr, name, exists()), from); }
1914 
1915  inline auto is_disabled_if_exists(bool verbose = false) noexcept
1916  { return is_bit_cleared(get_vmcs_field_if_exists(addr, name, verbose, exists()), from); }
1917 
1918  inline void enable()
1919  {
1920  auto&& field = get_vmcs_field(addr, name, exists());
1921  set_vmcs_field(set_bit(field, from), addr, name, exists());
1922  }
1923 
1924  inline void enable_if_exists(bool verbose = false) noexcept
1925  {
1926  auto&& field = get_vmcs_field_if_exists(addr, name, verbose, exists());
1927  set_vmcs_field_if_exists(set_bit(field, from), addr, name, verbose, exists());
1928  }
1929 
1930  inline void disable()
1931  {
1932  auto&& field = get_vmcs_field(addr, name, exists());
1933  set_vmcs_field(clear_bit(field, from), addr, name, exists());
1934  }
1935 
1936  inline void disable_if_exists(bool verbose = false) noexcept
1937  {
1938  auto&& field = get_vmcs_field_if_exists(addr, name, verbose, exists());
1939  set_vmcs_field_if_exists(clear_bit(field, from), addr, name, verbose, exists());
1940  }
1941  }
1942 
1943  namespace zero_flag
1944  {
1945  constexpr const auto mask = 0x0000000000000040UL;
1946  constexpr const auto from = 6;
1947  constexpr const auto name = "zero_flag";
1948 
1949  inline auto is_enabled()
1950  { return is_bit_set(get_vmcs_field(addr, name, exists()), from); }
1951 
1952  inline auto is_enabled_if_exists(bool verbose = false) noexcept
1953  { return is_bit_set(get_vmcs_field_if_exists(addr, name, verbose, exists()), from); }
1954 
1955  inline auto is_disabled()
1956  { return is_bit_cleared(get_vmcs_field(addr, name, exists()), from); }
1957 
1958  inline auto is_disabled_if_exists(bool verbose = false) noexcept
1959  { return is_bit_cleared(get_vmcs_field_if_exists(addr, name, verbose, exists()), from); }
1960 
1961  inline void enable()
1962  {
1963  auto&& field = get_vmcs_field(addr, name, exists());
1964  set_vmcs_field(set_bit(field, from), addr, name, exists());
1965  }
1966 
1967  inline void enable_if_exists(bool verbose = false) noexcept
1968  {
1969  auto&& field = get_vmcs_field_if_exists(addr, name, verbose, exists());
1970  set_vmcs_field_if_exists(set_bit(field, from), addr, name, verbose, exists());
1971  }
1972 
1973  inline void disable()
1974  {
1975  auto&& field = get_vmcs_field(addr, name, exists());
1976  set_vmcs_field(clear_bit(field, from), addr, name, exists());
1977  }
1978 
1979  inline void disable_if_exists(bool verbose = false) noexcept
1980  {
1981  auto&& field = get_vmcs_field_if_exists(addr, name, verbose, exists());
1982  set_vmcs_field_if_exists(clear_bit(field, from), addr, name, verbose, exists());
1983  }
1984  }
1985 
1986  namespace sign_flag
1987  {
1988  constexpr const auto mask = 0x0000000000000080UL;
1989  constexpr const auto from = 7;
1990  constexpr const auto name = "sign_flag";
1991 
1992  inline auto is_enabled()
1993  { return is_bit_set(get_vmcs_field(addr, name, exists()), from); }
1994 
1995  inline auto is_enabled_if_exists(bool verbose = false) noexcept
1996  { return is_bit_set(get_vmcs_field_if_exists(addr, name, verbose, exists()), from); }
1997 
1998  inline auto is_disabled()
1999  { return is_bit_cleared(get_vmcs_field(addr, name, exists()), from); }
2000 
2001  inline auto is_disabled_if_exists(bool verbose = false) noexcept
2002  { return is_bit_cleared(get_vmcs_field_if_exists(addr, name, verbose, exists()), from); }
2003 
2004  inline void enable()
2005  {
2006  auto&& field = get_vmcs_field(addr, name, exists());
2007  set_vmcs_field(set_bit(field, from), addr, name, exists());
2008  }
2009 
2010  inline void enable_if_exists(bool verbose = false) noexcept
2011  {
2012  auto&& field = get_vmcs_field_if_exists(addr, name, verbose, exists());
2013  set_vmcs_field_if_exists(set_bit(field, from), addr, name, verbose, exists());
2014  }
2015 
2016  inline void disable()
2017  {
2018  auto&& field = get_vmcs_field(addr, name, exists());
2019  set_vmcs_field(clear_bit(field, from), addr, name, exists());
2020  }
2021 
2022  inline void disable_if_exists(bool verbose = false) noexcept
2023  {
2024  auto&& field = get_vmcs_field_if_exists(addr, name, verbose, exists());
2025  set_vmcs_field_if_exists(clear_bit(field, from), addr, name, verbose, exists());
2026  }
2027  }
2028 
2029  namespace trap_flag
2030  {
2031  constexpr const auto mask = 0x0000000000000100UL;
2032  constexpr const auto from = 8;
2033  constexpr const auto name = "trap_flag";
2034 
2035  inline auto is_enabled()
2036  { return is_bit_set(get_vmcs_field(addr, name, exists()), from); }
2037 
2038  inline auto is_enabled_if_exists(bool verbose = false) noexcept
2039  { return is_bit_set(get_vmcs_field_if_exists(addr, name, verbose, exists()), from); }
2040 
2041  inline auto is_disabled()
2042  { return is_bit_cleared(get_vmcs_field(addr, name, exists()), from); }
2043 
2044  inline auto is_disabled_if_exists(bool verbose = false) noexcept
2045  { return is_bit_cleared(get_vmcs_field_if_exists(addr, name, verbose, exists()), from); }
2046 
2047  inline void enable()
2048  {
2049  auto&& field = get_vmcs_field(addr, name, exists());
2050  set_vmcs_field(set_bit(field, from), addr, name, exists());
2051  }
2052 
2053  inline void enable_if_exists(bool verbose = false) noexcept
2054  {
2055  auto&& field = get_vmcs_field_if_exists(addr, name, verbose, exists());
2056  set_vmcs_field_if_exists(set_bit(field, from), addr, name, verbose, exists());
2057  }
2058 
2059  inline void disable()
2060  {
2061  auto&& field = get_vmcs_field(addr, name, exists());
2062  set_vmcs_field(clear_bit(field, from), addr, name, exists());
2063  }
2064 
2065  inline void disable_if_exists(bool verbose = false) noexcept
2066  {
2067  auto&& field = get_vmcs_field_if_exists(addr, name, verbose, exists());
2068  set_vmcs_field_if_exists(clear_bit(field, from), addr, name, verbose, exists());
2069  }
2070  }
2071 
2072  namespace interrupt_enable_flag
2073  {
2074  constexpr const auto mask = 0x0000000000000200UL;
2075  constexpr const auto from = 9;
2076  constexpr const auto name = "interrupt_enable_flag";
2077 
2078  inline auto is_enabled()
2079  { return is_bit_set(get_vmcs_field(addr, name, exists()), from); }
2080 
2081  inline auto is_enabled_if_exists(bool verbose = false) noexcept
2082  { return is_bit_set(get_vmcs_field_if_exists(addr, name, verbose, exists()), from); }
2083 
2084  inline auto is_disabled()
2085  { return is_bit_cleared(get_vmcs_field(addr, name, exists()), from); }
2086 
2087  inline auto is_disabled_if_exists(bool verbose = false) noexcept
2088  { return is_bit_cleared(get_vmcs_field_if_exists(addr, name, verbose, exists()), from); }
2089 
2090  inline void enable()
2091  {
2092  auto&& field = get_vmcs_field(addr, name, exists());
2093  set_vmcs_field(set_bit(field, from), addr, name, exists());
2094  }
2095 
2096  inline void enable_if_exists(bool verbose = false) noexcept
2097  {
2098  auto&& field = get_vmcs_field_if_exists(addr, name, verbose, exists());
2099  set_vmcs_field_if_exists(set_bit(field, from), addr, name, verbose, exists());
2100  }
2101 
2102  inline void disable()
2103  {
2104  auto&& field = get_vmcs_field(addr, name, exists());
2105  set_vmcs_field(clear_bit(field, from), addr, name, exists());
2106  }
2107 
2108  inline void disable_if_exists(bool verbose = false) noexcept
2109  {
2110  auto&& field = get_vmcs_field_if_exists(addr, name, verbose, exists());
2111  set_vmcs_field_if_exists(clear_bit(field, from), addr, name, verbose, exists());
2112  }
2113  }
2114 
2115  namespace direction_flag
2116  {
2117  constexpr const auto mask = 0x0000000000000400UL;
2118  constexpr const auto from = 10;
2119  constexpr const auto name = "direction_flag";
2120 
2121  inline auto is_enabled()
2122  { return is_bit_set(get_vmcs_field(addr, name, exists()), from); }
2123 
2124  inline auto is_enabled_if_exists(bool verbose = false) noexcept
2125  { return is_bit_set(get_vmcs_field_if_exists(addr, name, verbose, exists()), from); }
2126 
2127  inline auto is_disabled()
2128  { return is_bit_cleared(get_vmcs_field(addr, name, exists()), from); }
2129 
2130  inline auto is_disabled_if_exists(bool verbose = false) noexcept
2131  { return is_bit_cleared(get_vmcs_field_if_exists(addr, name, verbose, exists()), from); }
2132 
2133  inline void enable()
2134  {
2135  auto&& field = get_vmcs_field(addr, name, exists());
2136  set_vmcs_field(set_bit(field, from), addr, name, exists());
2137  }
2138 
2139  inline void enable_if_exists(bool verbose = false) noexcept
2140  {
2141  auto&& field = get_vmcs_field_if_exists(addr, name, verbose, exists());
2142  set_vmcs_field_if_exists(set_bit(field, from), addr, name, verbose, exists());
2143  }
2144 
2145  inline void disable()
2146  {
2147  auto&& field = get_vmcs_field(addr, name, exists());
2148  set_vmcs_field(clear_bit(field, from), addr, name, exists());
2149  }
2150 
2151  inline void disable_if_exists(bool verbose = false) noexcept
2152  {
2153  auto&& field = get_vmcs_field_if_exists(addr, name, verbose, exists());
2154  set_vmcs_field_if_exists(clear_bit(field, from), addr, name, verbose, exists());
2155  }
2156  }
2157 
2158  namespace overflow_flag
2159  {
2160  constexpr const auto mask = 0x0000000000000800UL;
2161  constexpr const auto from = 11;
2162  constexpr const auto name = "overflow_flag";
2163 
2164  inline auto is_enabled()
2165  { return is_bit_set(get_vmcs_field(addr, name, exists()), from); }
2166 
2167  inline auto is_enabled_if_exists(bool verbose = false) noexcept
2168  { return is_bit_set(get_vmcs_field_if_exists(addr, name, verbose, exists()), from); }
2169 
2170  inline auto is_disabled()
2171  { return is_bit_cleared(get_vmcs_field(addr, name, exists()), from); }
2172 
2173  inline auto is_disabled_if_exists(bool verbose = false) noexcept
2174  { return is_bit_cleared(get_vmcs_field_if_exists(addr, name, verbose, exists()), from); }
2175 
2176  inline void enable()
2177  {
2178  auto&& field = get_vmcs_field(addr, name, exists());
2179  set_vmcs_field(set_bit(field, from), addr, name, exists());
2180  }
2181 
2182  inline void enable_if_exists(bool verbose = false) noexcept
2183  {
2184  auto&& field = get_vmcs_field_if_exists(addr, name, verbose, exists());
2185  set_vmcs_field_if_exists(set_bit(field, from), addr, name, verbose, exists());
2186  }
2187 
2188  inline void disable()
2189  {
2190  auto&& field = get_vmcs_field(addr, name, exists());
2191  set_vmcs_field(clear_bit(field, from), addr, name, exists());
2192  }
2193 
2194  inline void disable_if_exists(bool verbose = false) noexcept
2195  {
2196  auto&& field = get_vmcs_field_if_exists(addr, name, verbose, exists());
2197  set_vmcs_field_if_exists(clear_bit(field, from), addr, name, verbose, exists());
2198  }
2199  }
2200 
2201  namespace privilege_level
2202  {
2203  constexpr const auto mask = 0x0000000000003000UL;
2204  constexpr const auto from = 12;
2205  constexpr const auto name = "privilege_level";
2206 
2207  inline auto get()
2208  { return get_bits(get_vmcs_field(addr, name, exists()), mask) >> from; }
2209 
2210  inline auto get_if_exists(bool verbose = false) noexcept
2211  { return get_bits(get_vmcs_field_if_exists(addr, name, verbose, exists()), mask) >> from; }
2212 
2213  template<class T, class = typename std::enable_if<std::is_integral<T>::value>::type>
2214  void set(T val)
2215  {
2216  auto&& field = get_vmcs_field(addr, name, exists());
2217  set_vmcs_field(set_bits(field, mask, (val << from)), addr, name, exists());
2218  }
2219 
2220  template<class T, class = typename std::enable_if<std::is_integral<T>::value>::type>
2221  void set_if_exists(T val, bool verbose = false) noexcept
2222  {
2223  auto&& field = get_vmcs_field_if_exists(addr, name, verbose, exists());
2224  set_vmcs_field_if_exists(set_bits(field, mask, (val << from)), addr, name, verbose, exists());
2225  }
2226  }
2227 
2228  namespace nested_task
2229  {
2230  constexpr const auto mask = 0x0000000000004000UL;
2231  constexpr const auto from = 14;
2232  constexpr const auto name = "nested_task";
2233 
2234  inline auto is_enabled()
2235  { return is_bit_set(get_vmcs_field(addr, name, exists()), from); }
2236 
2237  inline auto is_enabled_if_exists(bool verbose = false) noexcept
2238  { return is_bit_set(get_vmcs_field_if_exists(addr, name, verbose, exists()), from); }
2239 
2240  inline auto is_disabled()
2241  { return is_bit_cleared(get_vmcs_field(addr, name, exists()), from); }
2242 
2243  inline auto is_disabled_if_exists(bool verbose = false) noexcept
2244  { return is_bit_cleared(get_vmcs_field_if_exists(addr, name, verbose, exists()), from); }
2245 
2246  inline void enable()
2247  {
2248  auto&& field = get_vmcs_field(addr, name, exists());
2249  set_vmcs_field(set_bit(field, from), addr, name, exists());
2250  }
2251 
2252  inline void enable_if_exists(bool verbose = false) noexcept
2253  {
2254  auto&& field = get_vmcs_field_if_exists(addr, name, verbose, exists());
2255  set_vmcs_field_if_exists(set_bit(field, from), addr, name, verbose, exists());
2256  }
2257 
2258  inline void disable()
2259  {
2260  auto&& field = get_vmcs_field(addr, name, exists());
2261  set_vmcs_field(clear_bit(field, from), addr, name, exists());
2262  }
2263 
2264  inline void disable_if_exists(bool verbose = false) noexcept
2265  {
2266  auto&& field = get_vmcs_field_if_exists(addr, name, verbose, exists());
2267  set_vmcs_field_if_exists(clear_bit(field, from), addr, name, verbose, exists());
2268  }
2269  }
2270 
2271  namespace resume_flag
2272  {
2273  constexpr const auto mask = 0x0000000000010000UL;
2274  constexpr const auto from = 16;
2275  constexpr const auto name = "resume_flag";
2276 
2277  inline auto is_enabled()
2278  { return is_bit_set(get_vmcs_field(addr, name, exists()), from); }
2279 
2280  inline auto is_enabled_if_exists(bool verbose = false) noexcept
2281  { return is_bit_set(get_vmcs_field_if_exists(addr, name, verbose, exists()), from); }
2282 
2283  inline auto is_disabled()
2284  { return is_bit_cleared(get_vmcs_field(addr, name, exists()), from); }
2285 
2286  inline auto is_disabled_if_exists(bool verbose = false) noexcept
2287  { return is_bit_cleared(get_vmcs_field_if_exists(addr, name, verbose, exists()), from); }
2288 
2289  inline void enable()
2290  {
2291  auto&& field = get_vmcs_field(addr, name, exists());
2292  set_vmcs_field(set_bit(field, from), addr, name, exists());
2293  }
2294 
2295  inline void enable_if_exists(bool verbose = false) noexcept
2296  {
2297  auto&& field = get_vmcs_field_if_exists(addr, name, verbose, exists());
2298  set_vmcs_field_if_exists(set_bit(field, from), addr, name, verbose, exists());
2299  }
2300 
2301  inline void disable()
2302  {
2303  auto&& field = get_vmcs_field(addr, name, exists());
2304  set_vmcs_field(clear_bit(field, from), addr, name, exists());
2305  }
2306 
2307  inline void disable_if_exists(bool verbose = false) noexcept
2308  {
2309  auto&& field = get_vmcs_field_if_exists(addr, name, verbose, exists());
2310  set_vmcs_field_if_exists(clear_bit(field, from), addr, name, verbose, exists());
2311  }
2312  }
2313 
2314  namespace virtual_8086_mode
2315  {
2316  constexpr const auto mask = 0x0000000000020000UL;
2317  constexpr const auto from = 17;
2318  constexpr const auto name = "virtual_8086_mode";
2319 
2320  inline auto is_enabled()
2321  { return is_bit_set(get_vmcs_field(addr, name, exists()), from); }
2322 
2323  inline auto is_enabled_if_exists(bool verbose = false) noexcept
2324  { return is_bit_set(get_vmcs_field_if_exists(addr, name, verbose, exists()), from); }
2325 
2326  inline auto is_disabled()
2327  { return is_bit_cleared(get_vmcs_field(addr, name, exists()), from); }
2328 
2329  inline auto is_disabled_if_exists(bool verbose = false) noexcept
2330  { return is_bit_cleared(get_vmcs_field_if_exists(addr, name, verbose, exists()), from); }
2331 
2332  inline void enable()
2333  {
2334  auto&& field = get_vmcs_field(addr, name, exists());
2335  set_vmcs_field(set_bit(field, from), addr, name, exists());
2336  }
2337 
2338  inline void enable_if_exists(bool verbose = false) noexcept
2339  {
2340  auto&& field = get_vmcs_field_if_exists(addr, name, verbose, exists());
2341  set_vmcs_field_if_exists(set_bit(field, from), addr, name, verbose, exists());
2342  }
2343 
2344  inline void disable()
2345  {
2346  auto&& field = get_vmcs_field(addr, name, exists());
2347  set_vmcs_field(clear_bit(field, from), addr, name, exists());
2348  }
2349 
2350  inline void disable_if_exists(bool verbose = false) noexcept
2351  {
2352  auto&& field = get_vmcs_field_if_exists(addr, name, verbose, exists());
2353  set_vmcs_field_if_exists(clear_bit(field, from), addr, name, verbose, exists());
2354  }
2355  }
2356 
2357  namespace alignment_check_access_control
2358  {
2359  constexpr const auto mask = 0x0000000000040000UL;
2360  constexpr const auto from = 18;
2361  constexpr const auto name = "alignment_check_access_control";
2362 
2363  inline auto is_enabled()
2364  { return is_bit_set(get_vmcs_field(addr, name, exists()), from); }
2365 
2366  inline auto is_enabled_if_exists(bool verbose = false) noexcept
2367  { return is_bit_set(get_vmcs_field_if_exists(addr, name, verbose, exists()), from); }
2368 
2369  inline auto is_disabled()
2370  { return is_bit_cleared(get_vmcs_field(addr, name, exists()), from); }
2371 
2372  inline auto is_disabled_if_exists(bool verbose = false) noexcept
2373  { return is_bit_cleared(get_vmcs_field_if_exists(addr, name, verbose, exists()), from); }
2374 
2375  inline void enable()
2376  {
2377  auto&& field = get_vmcs_field(addr, name, exists());
2378  set_vmcs_field(set_bit(field, from), addr, name, exists());
2379  }
2380 
2381  inline void enable_if_exists(bool verbose = false) noexcept
2382  {
2383  auto&& field = get_vmcs_field_if_exists(addr, name, verbose, exists());
2384  set_vmcs_field_if_exists(set_bit(field, from), addr, name, verbose, exists());
2385  }
2386 
2387  inline void disable()
2388  {
2389  auto&& field = get_vmcs_field(addr, name, exists());
2390  set_vmcs_field(clear_bit(field, from), addr, name, exists());
2391  }
2392 
2393  inline void disable_if_exists(bool verbose = false) noexcept
2394  {
2395  auto&& field = get_vmcs_field_if_exists(addr, name, verbose, exists());
2396  set_vmcs_field_if_exists(clear_bit(field, from), addr, name, verbose, exists());
2397  }
2398  }
2399 
2400  namespace virtual_interrupt_flag
2401  {
2402  constexpr const auto mask = 0x0000000000080000UL;
2403  constexpr const auto from = 19;
2404  constexpr const auto name = "virtual_interrupt_flag";
2405 
2406  inline auto is_enabled()
2407  { return is_bit_set(get_vmcs_field(addr, name, exists()), from); }
2408 
2409  inline auto is_enabled_if_exists(bool verbose = false) noexcept
2410  { return is_bit_set(get_vmcs_field_if_exists(addr, name, verbose, exists()), from); }
2411 
2412  inline auto is_disabled()
2413  { return is_bit_cleared(get_vmcs_field(addr, name, exists()), from); }
2414 
2415  inline auto is_disabled_if_exists(bool verbose = false) noexcept
2416  { return is_bit_cleared(get_vmcs_field_if_exists(addr, name, verbose, exists()), from); }
2417 
2418  inline void enable()
2419  {
2420  auto&& field = get_vmcs_field(addr, name, exists());
2421  set_vmcs_field(set_bit(field, from), addr, name, exists());
2422  }
2423 
2424  inline void enable_if_exists(bool verbose = false) noexcept
2425  {
2426  auto&& field = get_vmcs_field_if_exists(addr, name, verbose, exists());
2427  set_vmcs_field_if_exists(set_bit(field, from), addr, name, verbose, exists());
2428  }
2429 
2430  inline void disable()
2431  {
2432  auto&& field = get_vmcs_field(addr, name, exists());
2433  set_vmcs_field(clear_bit(field, from), addr, name, exists());
2434  }
2435 
2436  inline void disable_if_exists(bool verbose = false) noexcept
2437  {
2438  auto&& field = get_vmcs_field_if_exists(addr, name, verbose, exists());
2439  set_vmcs_field_if_exists(clear_bit(field, from), addr, name, verbose, exists());
2440  }
2441  }
2442 
2443  namespace virtual_interrupt_pending
2444  {
2445  constexpr const auto mask = 0x0000000000100000UL;
2446  constexpr const auto from = 20;
2447  constexpr const auto name = "virtual_interrupt_pending";
2448 
2449  inline auto is_enabled()
2450  { return is_bit_set(get_vmcs_field(addr, name, exists()), from); }
2451 
2452  inline auto is_enabled_if_exists(bool verbose = false) noexcept
2453  { return is_bit_set(get_vmcs_field_if_exists(addr, name, verbose, exists()), from); }
2454 
2455  inline auto is_disabled()
2456  { return is_bit_cleared(get_vmcs_field(addr, name, exists()), from); }
2457 
2458  inline auto is_disabled_if_exists(bool verbose = false) noexcept
2459  { return is_bit_cleared(get_vmcs_field_if_exists(addr, name, verbose, exists()), from); }
2460 
2461  inline void enable()
2462  {
2463  auto&& field = get_vmcs_field(addr, name, exists());
2464  set_vmcs_field(set_bit(field, from), addr, name, exists());
2465  }
2466 
2467  inline void enable_if_exists(bool verbose = false) noexcept
2468  {
2469  auto&& field = get_vmcs_field_if_exists(addr, name, verbose, exists());
2470  set_vmcs_field_if_exists(set_bit(field, from), addr, name, verbose, exists());
2471  }
2472 
2473  inline void disable()
2474  {
2475  auto&& field = get_vmcs_field(addr, name, exists());
2476  set_vmcs_field(clear_bit(field, from), addr, name, exists());
2477  }
2478 
2479  inline void disable_if_exists(bool verbose = false) noexcept
2480  {
2481  auto&& field = get_vmcs_field_if_exists(addr, name, verbose, exists());
2482  set_vmcs_field_if_exists(clear_bit(field, from), addr, name, verbose, exists());
2483  }
2484  }
2485 
2486  namespace id_flag
2487  {
2488  constexpr const auto mask = 0x0000000000200000UL;
2489  constexpr const auto from = 21;
2490  constexpr const auto name = "id_flag";
2491 
2492  inline auto is_enabled()
2493  { return is_bit_set(get_vmcs_field(addr, name, exists()), from); }
2494 
2495  inline auto is_enabled_if_exists(bool verbose = false) noexcept
2496  { return is_bit_set(get_vmcs_field_if_exists(addr, name, verbose, exists()), from); }
2497 
2498  inline auto is_disabled()
2499  { return is_bit_cleared(get_vmcs_field(addr, name, exists()), from); }
2500 
2501  inline auto is_disabled_if_exists(bool verbose = false) noexcept
2502  { return is_bit_cleared(get_vmcs_field_if_exists(addr, name, verbose, exists()), from); }
2503 
2504  inline void enable()
2505  {
2506  auto&& field = get_vmcs_field(addr, name, exists());
2507  set_vmcs_field(set_bit(field, from), addr, name, exists());
2508  }
2509 
2510  inline void enable_if_exists(bool verbose = false) noexcept
2511  {
2512  auto&& field = get_vmcs_field_if_exists(addr, name, verbose, exists());
2513  set_vmcs_field_if_exists(set_bit(field, from), addr, name, verbose, exists());
2514  }
2515 
2516  inline void disable()
2517  {
2518  auto&& field = get_vmcs_field(addr, name, exists());
2519  set_vmcs_field(clear_bit(field, from), addr, name, exists());
2520  }
2521 
2522  inline void disable_if_exists(bool verbose = false) noexcept
2523  {
2524  auto&& field = get_vmcs_field_if_exists(addr, name, verbose, exists());
2525  set_vmcs_field_if_exists(clear_bit(field, from), addr, name, verbose, exists());
2526  }
2527  }
2528 
2529  namespace reserved
2530  {
2531  constexpr const auto mask = 0xFFFFFFFFFFC08028UL;
2532  constexpr const auto from = 0;
2533  constexpr const auto name = "reserved";
2534 
2535  inline auto get()
2536  { return get_bits(get_vmcs_field(addr, name, exists()), mask) >> from; }
2537 
2538  inline auto get_if_exists(bool verbose = false) noexcept
2539  { return get_bits(get_vmcs_field_if_exists(addr, name, verbose, exists()), mask) >> from; }
2540 
2541  template<class T, class = typename std::enable_if<std::is_integral<T>::value>::type>
2542  void set(T val)
2543  {
2544  auto&& field = get_vmcs_field(addr, name, exists());
2545  set_vmcs_field(set_bits(field, mask, (val << from)), addr, name, exists());
2546  }
2547 
2548  template<class T, class = typename std::enable_if<std::is_integral<T>::value>::type>
2549  void set_if_exists(T val, bool verbose = false) noexcept
2550  {
2551  auto&& field = get_vmcs_field_if_exists(addr, name, verbose, exists());
2552  set_vmcs_field_if_exists(set_bits(field, mask, (val << from)), addr, name, verbose, exists());
2553  }
2554  }
2555 
2556  namespace always_disabled
2557  {
2558  constexpr const auto mask = 0xFFFFFFFFFFC08028UL;
2559  constexpr const auto from = 0;
2560  constexpr const auto name = "always_disabled";
2561 
2562  inline auto get()
2563  { return get_bits(get_vmcs_field(addr, name, exists()), mask) >> from; }
2564 
2565  inline auto get_if_exists(bool verbose = false) noexcept
2566  { return get_bits(get_vmcs_field_if_exists(addr, name, verbose, exists()), mask) >> from; }
2567 
2568  template<class T, class = typename std::enable_if<std::is_integral<T>::value>::type>
2569  void set(T val)
2570  {
2571  auto&& field = get_vmcs_field(addr, name, exists());
2572  set_vmcs_field(set_bits(field, mask, (val << from)), addr, name, exists());
2573  }
2574 
2575  template<class T, class = typename std::enable_if<std::is_integral<T>::value>::type>
2576  void set_if_exists(T val, bool verbose = false) noexcept
2577  {
2578  auto&& field = get_vmcs_field_if_exists(addr, name, verbose, exists());
2579  set_vmcs_field_if_exists(set_bits(field, mask, (val << from)), addr, name, verbose, exists());
2580  }
2581  }
2582 
2583  namespace always_enabled
2584  {
2585  constexpr const auto mask = 0x0000000000000002UL;
2586  constexpr const auto from = 0;
2587  constexpr const auto name = "always_enabled";
2588 
2589  inline auto get()
2590  { return get_bits(get_vmcs_field(addr, name, exists()), mask) >> from; }
2591 
2592  inline auto get_if_exists(bool verbose = false) noexcept
2593  { return get_bits(get_vmcs_field_if_exists(addr, name, verbose, exists()), mask) >> from; }
2594 
2595  template<class T, class = typename std::enable_if<std::is_integral<T>::value>::type>
2596  void set(T val)
2597  {
2598  auto&& field = get_vmcs_field(addr, name, exists());
2599  set_vmcs_field(set_bits(field, mask, (val << from)), addr, name, exists());
2600  }
2601 
2602  template<class T, class = typename std::enable_if<std::is_integral<T>::value>::type>
2603  void set_if_exists(T val, bool verbose = false) noexcept
2604  {
2605  auto&& field = get_vmcs_field_if_exists(addr, name, verbose, exists());
2606  set_vmcs_field_if_exists(set_bits(field, mask, (val << from)), addr, name, verbose, exists());
2607  }
2608  }
2609 }
2610 
2611 namespace guest_pending_debug_exceptions
2612 {
2613  constexpr const auto addr = 0x0000000000006822UL;
2614  constexpr const auto name = "guest_pending_debug_exceptions";
2615 
2616  inline bool exists() noexcept
2617  { return true; }
2618 
2619  inline auto get()
2620  { return get_vmcs_field(addr, name, exists()); }
2621 
2622  inline auto get_if_exists(bool verbose = false) noexcept
2623  { return get_vmcs_field_if_exists(addr, name, verbose, exists()); }
2624 
2625  template<class T, class = typename std::enable_if<std::is_integral<T>::value>::type>
2626  void set(T val) { set_vmcs_field(val, addr, name, exists()); }
2627 
2628  template<class T, class = typename std::enable_if<std::is_integral<T>::value>::type>
2629  void set_if_exists(T val, bool verbose = false) noexcept
2630  { set_vmcs_field_if_exists(val, addr, name, verbose, exists()); }
2631 
2632  namespace b0
2633  {
2634  constexpr const auto mask = 0x0000000000000001UL;
2635  constexpr const auto from = 0;
2636  constexpr const auto name = "b0";
2637 
2638  inline auto is_enabled()
2639  { return is_bit_set(get_vmcs_field(addr, name, exists()), from); }
2640 
2641  inline auto is_enabled_if_exists(bool verbose = false) noexcept
2642  { return is_bit_set(get_vmcs_field_if_exists(addr, name, verbose, exists()), from); }
2643 
2644  inline auto is_disabled()
2645  { return is_bit_cleared(get_vmcs_field(addr, name, exists()), from); }
2646 
2647  inline auto is_disabled_if_exists(bool verbose = false) noexcept
2648  { return is_bit_cleared(get_vmcs_field_if_exists(addr, name, verbose, exists()), from); }
2649 
2650  inline void enable()
2651  {
2652  auto&& field = get_vmcs_field(addr, name, exists());
2653  set_vmcs_field(set_bit(field, from), addr, name, exists());
2654  }
2655 
2656  inline void enable_if_exists(bool verbose = false) noexcept
2657  {
2658  auto&& field = get_vmcs_field_if_exists(addr, name, verbose, exists());
2659  set_vmcs_field_if_exists(set_bit(field, from), addr, name, verbose, exists());
2660  }
2661 
2662  inline void disable()
2663  {
2664  auto&& field = get_vmcs_field(addr, name, exists());
2665  set_vmcs_field(clear_bit(field, from), addr, name, exists());
2666  }
2667 
2668  inline void disable_if_exists(bool verbose = false) noexcept
2669  {
2670  auto&& field = get_vmcs_field_if_exists(addr, name, verbose, exists());
2671  set_vmcs_field_if_exists(clear_bit(field, from), addr, name, verbose, exists());
2672  }
2673  }
2674 
2675  namespace b1
2676  {
2677  constexpr const auto mask = 0x0000000000000002UL;
2678  constexpr const auto from = 1;
2679  constexpr const auto name = "b1";
2680 
2681  inline auto is_enabled()
2682  { return is_bit_set(get_vmcs_field(addr, name, exists()), from); }
2683 
2684  inline auto is_enabled_if_exists(bool verbose = false) noexcept
2685  { return is_bit_set(get_vmcs_field_if_exists(addr, name, verbose, exists()), from); }
2686 
2687  inline auto is_disabled()
2688  { return is_bit_cleared(get_vmcs_field(addr, name, exists()), from); }
2689 
2690  inline auto is_disabled_if_exists(bool verbose = false) noexcept
2691  { return is_bit_cleared(get_vmcs_field_if_exists(addr, name, verbose, exists()), from); }
2692 
2693  inline void enable()
2694  {
2695  auto&& field = get_vmcs_field(addr, name, exists());
2696  set_vmcs_field(set_bit(field, from), addr, name, exists());
2697  }
2698 
2699  inline void enable_if_exists(bool verbose = false) noexcept
2700  {
2701  auto&& field = get_vmcs_field_if_exists(addr, name, verbose, exists());
2702  set_vmcs_field_if_exists(set_bit(field, from), addr, name, verbose, exists());
2703  }
2704 
2705  inline void disable()
2706  {
2707  auto&& field = get_vmcs_field(addr, name, exists());
2708  set_vmcs_field(clear_bit(field, from), addr, name, exists());
2709  }
2710 
2711  inline void disable_if_exists(bool verbose = false) noexcept
2712  {
2713  auto&& field = get_vmcs_field_if_exists(addr, name, verbose, exists());
2714  set_vmcs_field_if_exists(clear_bit(field, from), addr, name, verbose, exists());
2715  }
2716  }
2717 
2718  namespace b2
2719  {
2720  constexpr const auto mask = 0x0000000000000004UL;
2721  constexpr const auto from = 2;
2722  constexpr const auto name = "b2";
2723 
2724  inline auto is_enabled()
2725  { return is_bit_set(get_vmcs_field(addr, name, exists()), from); }
2726 
2727  inline auto is_enabled_if_exists(bool verbose = false) noexcept
2728  { return is_bit_set(get_vmcs_field_if_exists(addr, name, verbose, exists()), from); }
2729 
2730  inline auto is_disabled()
2731  { return is_bit_cleared(get_vmcs_field(addr, name, exists()), from); }
2732 
2733  inline auto is_disabled_if_exists(bool verbose = false) noexcept
2734  { return is_bit_cleared(get_vmcs_field_if_exists(addr, name, verbose, exists()), from); }
2735 
2736  inline void enable()
2737  {
2738  auto&& field = get_vmcs_field(addr, name, exists());
2739  set_vmcs_field(set_bit(field, from), addr, name, exists());
2740  }
2741 
2742  inline void enable_if_exists(bool verbose = false) noexcept
2743  {
2744  auto&& field = get_vmcs_field_if_exists(addr, name, verbose, exists());
2745  set_vmcs_field_if_exists(set_bit(field, from), addr, name, verbose, exists());
2746  }
2747 
2748  inline void disable()
2749  {
2750  auto&& field = get_vmcs_field(addr, name, exists());
2751  set_vmcs_field(clear_bit(field, from), addr, name, exists());
2752  }
2753 
2754  inline void disable_if_exists(bool verbose = false) noexcept
2755  {
2756  auto&& field = get_vmcs_field_if_exists(addr, name, verbose, exists());
2757  set_vmcs_field_if_exists(clear_bit(field, from), addr, name, verbose, exists());
2758  }
2759  }
2760 
2761  namespace b3
2762  {
2763  constexpr const auto mask = 0x0000000000000008UL;
2764  constexpr const auto from = 3;
2765  constexpr const auto name = "b3";
2766 
2767  inline auto is_enabled()
2768  { return is_bit_set(get_vmcs_field(addr, name, exists()), from); }
2769 
2770  inline auto is_enabled_if_exists(bool verbose = false) noexcept
2771  { return is_bit_set(get_vmcs_field_if_exists(addr, name, verbose, exists()), from); }
2772 
2773  inline auto is_disabled()
2774  { return is_bit_cleared(get_vmcs_field(addr, name, exists()), from); }
2775 
2776  inline auto is_disabled_if_exists(bool verbose = false) noexcept
2777  { return is_bit_cleared(get_vmcs_field_if_exists(addr, name, verbose, exists()), from); }
2778 
2779  inline void enable()
2780  {
2781  auto&& field = get_vmcs_field(addr, name, exists());
2782  set_vmcs_field(set_bit(field, from), addr, name, exists());
2783  }
2784 
2785  inline void enable_if_exists(bool verbose = false) noexcept
2786  {
2787  auto&& field = get_vmcs_field_if_exists(addr, name, verbose, exists());
2788  set_vmcs_field_if_exists(set_bit(field, from), addr, name, verbose, exists());
2789  }
2790 
2791  inline void disable()
2792  {
2793  auto&& field = get_vmcs_field(addr, name, exists());
2794  set_vmcs_field(clear_bit(field, from), addr, name, exists());
2795  }
2796 
2797  inline void disable_if_exists(bool verbose = false) noexcept
2798  {
2799  auto&& field = get_vmcs_field_if_exists(addr, name, verbose, exists());
2800  set_vmcs_field_if_exists(clear_bit(field, from), addr, name, verbose, exists());
2801  }
2802  }
2803 
2804  namespace reserved
2805  {
2806  constexpr const auto mask = 0xFFFFFFFFFFFEAFF0UL;
2807  constexpr const auto from = 0;
2808  constexpr const auto name = "reserved";
2809 
2810  inline auto get()
2811  { return get_bits(get_vmcs_field(addr, name, exists()), mask) >> from; }
2812 
2813  inline auto get_if_exists(bool verbose = false) noexcept
2814  { return get_bits(get_vmcs_field_if_exists(addr, name, verbose, exists()), mask) >> from; }
2815 
2816  template<class T, class = typename std::enable_if<std::is_integral<T>::value>::type>
2817  void set(T val)
2818  {
2819  auto&& field = get_vmcs_field(addr, name, exists());
2820  set_vmcs_field(set_bits(field, mask, (val << from)), addr, name, exists());
2821  }
2822 
2823  template<class T, class = typename std::enable_if<std::is_integral<T>::value>::type>
2824  void set_if_exists(T val, bool verbose = false) noexcept
2825  {
2826  auto&& field = get_vmcs_field_if_exists(addr, name, verbose, exists());
2827  set_vmcs_field_if_exists(set_bits(field, mask, (val << from)), addr, name, verbose, exists());
2828  }
2829  }
2830 
2831  namespace enabled_breakpoint
2832  {
2833  constexpr const auto mask = 0x0000000000001000UL;
2834  constexpr const auto from = 12;
2835  constexpr const auto name = "enabled_breakpoint";
2836 
2837  inline auto is_enabled()
2838  { return is_bit_set(get_vmcs_field(addr, name, exists()), from); }
2839 
2840  inline auto is_enabled_if_exists(bool verbose = false) noexcept
2841  { return is_bit_set(get_vmcs_field_if_exists(addr, name, verbose, exists()), from); }
2842 
2843  inline auto is_disabled()
2844  { return is_bit_cleared(get_vmcs_field(addr, name, exists()), from); }
2845 
2846  inline auto is_disabled_if_exists(bool verbose = false) noexcept
2847  { return is_bit_cleared(get_vmcs_field_if_exists(addr, name, verbose, exists()), from); }
2848 
2849  inline void enable()
2850  {
2851  auto&& field = get_vmcs_field(addr, name, exists());
2852  set_vmcs_field(set_bit(field, from), addr, name, exists());
2853  }
2854 
2855  inline void enable_if_exists(bool verbose = false) noexcept
2856  {
2857  auto&& field = get_vmcs_field_if_exists(addr, name, verbose, exists());
2858  set_vmcs_field_if_exists(set_bit(field, from), addr, name, verbose, exists());
2859  }
2860 
2861  inline void disable()
2862  {
2863  auto&& field = get_vmcs_field(addr, name, exists());
2864  set_vmcs_field(clear_bit(field, from), addr, name, exists());
2865  }
2866 
2867  inline void disable_if_exists(bool verbose = false) noexcept
2868  {
2869  auto&& field = get_vmcs_field_if_exists(addr, name, verbose, exists());
2870  set_vmcs_field_if_exists(clear_bit(field, from), addr, name, verbose, exists());
2871  }
2872  }
2873 
2874  namespace bs
2875  {
2876  constexpr const auto mask = 0x0000000000004000UL;
2877  constexpr const auto from = 14;
2878  constexpr const auto name = "bs";
2879 
2880  inline auto is_enabled()
2881  { return is_bit_set(get_vmcs_field(addr, name, exists()), from); }
2882 
2883  inline auto is_enabled_if_exists(bool verbose = false) noexcept
2884  { return is_bit_set(get_vmcs_field_if_exists(addr, name, verbose, exists()), from); }
2885 
2886  inline auto is_disabled()
2887  { return is_bit_cleared(get_vmcs_field(addr, name, exists()), from); }
2888 
2889  inline auto is_disabled_if_exists(bool verbose = false) noexcept
2890  { return is_bit_cleared(get_vmcs_field_if_exists(addr, name, verbose, exists()), from); }
2891 
2892  inline void enable()
2893  {
2894  auto&& field = get_vmcs_field(addr, name, exists());
2895  set_vmcs_field(set_bit(field, from), addr, name, exists());
2896  }
2897 
2898  inline void enable_if_exists(bool verbose = false) noexcept
2899  {
2900  auto&& field = get_vmcs_field_if_exists(addr, name, verbose, exists());
2901  set_vmcs_field_if_exists(set_bit(field, from), addr, name, verbose, exists());
2902  }
2903 
2904  inline void disable()
2905  {
2906  auto&& field = get_vmcs_field(addr, name, exists());
2907  set_vmcs_field(clear_bit(field, from), addr, name, exists());
2908  }
2909 
2910  inline void disable_if_exists(bool verbose = false) noexcept
2911  {
2912  auto&& field = get_vmcs_field_if_exists(addr, name, verbose, exists());
2913  set_vmcs_field_if_exists(clear_bit(field, from), addr, name, verbose, exists());
2914  }
2915  }
2916 
2917  namespace rtm
2918  {
2919  constexpr const auto mask = 0x0000000000010000UL;
2920  constexpr const auto from = 16;
2921  constexpr const auto name = "rtm";
2922 
2923  inline auto is_enabled()
2924  { return is_bit_set(get_vmcs_field(addr, name, exists()), from); }
2925 
2926  inline auto is_enabled_if_exists(bool verbose = false) noexcept
2927  { return is_bit_set(get_vmcs_field_if_exists(addr, name, verbose, exists()), from); }
2928 
2929  inline auto is_disabled()
2930  { return is_bit_cleared(get_vmcs_field(addr, name, exists()), from); }
2931 
2932  inline auto is_disabled_if_exists(bool verbose = false) noexcept
2933  { return is_bit_cleared(get_vmcs_field_if_exists(addr, name, verbose, exists()), from); }
2934 
2935  inline void enable()
2936  {
2937  auto&& field = get_vmcs_field(addr, name, exists());
2938  set_vmcs_field(set_bit(field, from), addr, name, exists());
2939  }
2940 
2941  inline void enable_if_exists(bool verbose = false) noexcept
2942  {
2943  auto&& field = get_vmcs_field_if_exists(addr, name, verbose, exists());
2944  set_vmcs_field_if_exists(set_bit(field, from), addr, name, verbose, exists());
2945  }
2946 
2947  inline void disable()
2948  {
2949  auto&& field = get_vmcs_field(addr, name, exists());
2950  set_vmcs_field(clear_bit(field, from), addr, name, exists());
2951  }
2952 
2953  inline void disable_if_exists(bool verbose = false) noexcept
2954  {
2955  auto&& field = get_vmcs_field_if_exists(addr, name, verbose, exists());
2956  set_vmcs_field_if_exists(clear_bit(field, from), addr, name, verbose, exists());
2957  }
2958  }
2959 }
2960 
2961 namespace guest_ia32_sysenter_esp
2962 {
2963  constexpr const auto addr = 0x0000000000006824UL;
2964  constexpr const auto name = "guest_ia32_sysenter_esp";
2965 
2966  inline bool exists() noexcept
2967  { return true; }
2968 
2969  inline auto get()
2970  { return get_vmcs_field(addr, name, exists()); }
2971 
2972  inline auto get_if_exists(bool verbose = false) noexcept
2973  { return get_vmcs_field_if_exists(addr, name, verbose, exists()); }
2974 
2975  template<class T, class = typename std::enable_if<std::is_integral<T>::value>::type>
2976  void set(T val) { set_vmcs_field(val, addr, name, exists()); }
2977 
2978  template<class T, class = typename std::enable_if<std::is_integral<T>::value>::type>
2979  void set_if_exists(T val, bool verbose = false) noexcept
2980  { set_vmcs_field_if_exists(val, addr, name, verbose, exists()); }
2981 }
2982 
2983 namespace guest_ia32_sysenter_eip
2984 {
2985  constexpr const auto addr = 0x0000000000006826UL;
2986  constexpr const auto name = "guest_ia32_sysenter_eip";
2987 
2988  inline bool exists() noexcept
2989  { return true; }
2990 
2991  inline auto get()
2992  { return get_vmcs_field(addr, name, exists()); }
2993 
2994  inline auto get_if_exists(bool verbose = false) noexcept
2995  { return get_vmcs_field_if_exists(addr, name, verbose, exists()); }
2996 
2997  template<class T, class = typename std::enable_if<std::is_integral<T>::value>::type>
2998  void set(T val) { set_vmcs_field(val, addr, name, exists()); }
2999 
3000  template<class T, class = typename std::enable_if<std::is_integral<T>::value>::type>
3001  void set_if_exists(T val, bool verbose = false) noexcept
3002  { set_vmcs_field_if_exists(val, addr, name, verbose, exists()); }
3003 }
3004 
3005 }
3006 }
3007 
3008 // *INDENT-ON*
3009 
3010 #endif
auto get_vmcs_field_if_exists(T addr, const char *name, bool verbose, bool exists)
void set_if_exists(T val, bool verbose=false) noexcept
void set_if_exists(T val, bool verbose=false) noexcept
void set_if_exists(T val, bool verbose=false) noexcept
void set_if_exists(T val, bool verbose=false) noexcept
auto set_vmcs_field_if_exists(V val, A addr, const char *name, bool verbose, bool exists) noexcept
void uint64_t uint64_t uint64_t *rdx noexcept
void set_if_exists(T val, bool verbose=false) noexcept
void set_if_exists(T val, bool verbose=false) noexcept
auto is_bit_cleared(T t, B b) noexcept
Definition: bitmanip.h:54
void set_if_exists(T val, bool verbose=false) noexcept
void set_if_exists(T val, bool verbose=false) noexcept
auto clear_bit(T t, B b) noexcept
Definition: bitmanip.h:36
constexpr const auto reserved
Definition: vcpuid.h:33
void set_if_exists(T val, bool verbose=false) noexcept
auto set_vmcs_field(V val, A addr, const char *name, bool exists)
auto set_bit(T t, B b) noexcept
Definition: bitmanip.h:30
auto get_bits(T t, M m) noexcept
Definition: bitmanip.h:65
void set_if_exists(T val, bool verbose=false) noexcept
auto get_vmcs_field(T addr, const char *name, bool exists)
void set_if_exists(T val, bool verbose=false) noexcept
void set_if_exists(T val, bool verbose=false) noexcept
auto is_bit_set(T t, B b) noexcept
Definition: bitmanip.h:48
auto set_bits(T t, M m, V v) noexcept
Definition: bitmanip.h:72
void set_if_exists(T val, bool verbose=false) noexcept