[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v2 2/6] x86/cpuid: Introduce recalculate_xstate()



>>> On 17.01.17 at 16:15, <andrew.cooper3@xxxxxxxxxx> wrote:
> On 17/01/17 12:52, Jan Beulich wrote:
>>>>> On 17.01.17 at 12:27, <andrew.cooper3@xxxxxxxxxx> wrote:
>>> @@ -154,6 +152,13 @@ struct cpuid_policy
>>>              };
>>>              uint32_t /* b */:32, xss_low, xss_high;
>>>          };
>>> +
>>> +        /* Per-component common state.  Valid for i >= 2. */
>>> +        struct {
>>> +            uint32_t size, offset;
>>> +            bool xss:1, align:1;
>>> +            uint32_t _res_d;
>> I see you've decided against an inner union. Should be fine of
>> course, at least until we have a need to access the full ECX value
>> by name.
> 
> Oh - I misinterpreted what you meant then.
> 
> Did you mean
> 
> struct {
>     uint32_t size, offset;
>     union {
>         struct {
>             bool xss:1, align:1;
>         };
>         uint32_t c;
>     };
>     uint32_t /* d */:32;
> };
> 
> Then?

Yes. But in the end it's up to you which variant to use.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.