[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v3 2/6] x86/msr: add VMX MSRs into struct msr_domain_policy
On 13/10/17 13:35, Sergey Dyasli wrote: > @@ -210,6 +375,255 @@ struct msr_domain_policy > bool available; /* This MSR is non-architectural */ > bool cpuid_faulting; > } plaform_info; > + > + /* 0x00000480 MSR_IA32_VMX_BASIC */ > + struct { > + bool available; We don't need available bits for any of these MSRs. Their availability is cpuid->basic.vmx, and we don't want (let alone need) to duplicate information like this. The PLATFORM_INFO and MISC_FEATURES_ENABLE are special, because they have no architecturally defined indication of availability. > + union { > + uint64_t raw; > + struct { > + uint32_t vmcs_revision_id:31; > + bool mbz:1; /* 31 always zero */ > + uint32_t vmcs_region_size:13; > + uint32_t :3; /* 45:47 reserved */ > + bool addresses_32bit:1; > + bool dual_monitor:1; > + uint32_t memory_type:4; > + bool ins_out_info:1; > + bool default1_zero:1; > + uint32_t :8; /* 56:63 reserved */ > + }; > + } u; The code will be rather shorter if you drop this .u and make the union anonymous. ~Andrew _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |