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

Re: [PATCH v2 2/4] x86/cpuid: Factor common parsing out of parse_xen_cpuid()



On 16/12/2021 16:41, Jan Beulich wrote:
> On 15.12.2021 23:21, Andrew Cooper wrote:
>> dom0-cpuid= is going to want to reuse the common parsing loop, so factor it
>> out into parse_cpuid().
>>
>> Irritatingly, despite being static const, the features[] array gets 
>> duplicated
>> each time parse_cpuid() is inlined.  As it is a large (and ever growing with
>> new CPU features) datastructure, move it to being file scope so all inlines
>> use the same single object.
>>
>> No functional change.
>>
>> Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
> Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>

Thanks.

>
>> We probably want to be wary of fallout from this pattern elsewhere.  I only
>> noticed it by chance.
> While that sounds at least close to a bug, there might by some subtle reason
> for why they have to do it that way.

Now I've thought about this more, probably C's "every object has a
unique address" rule.

~Andrew



 


Rackspace

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