3 ms·
If you're willing to use packed structs, here's a neat one when you're dealing with e.g., the entry controls in VMX. From my virtual machine work: struct vm
by Locke1689 16y ago
If you're willing to use packed structs, here's a neat one when you're dealing with e.g., the entry controls in VMX.
From my virtual machine work:
struct vmx_entry_ctrls {
union {
uint32_t value;
struct {
uint_t rsvd1 : 2;
uint_t ld_dbg_ctrls : 1;
uint_t rsvd2 : 6;
uint_t guest_ia32e : 1;
uint_t smm_entry : 1;
uint_t no_dual_monitor : 1;
uint_t rsvd3 : 1;
uint_t ld_perf_glbl_ctrl : 1;
uint_t ld_pat : 1;
uint_t ld_efer : 1;
uint_t rsvd4 : 16;
} __attribute__((packed));
} __attribute__((packed));
} __attribute__((packed));