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

Re: [Xen-devel] [PATCH v2 04/10] x86/cpuid: Handle leaf 0x4 in guest_cpuid()



>>> On 13.03.17 at 13:51, <andrew.cooper3@xxxxxxxxxx> wrote:
> On 13/03/17 12:03, Jan Beulich wrote:
>>>>> On 10.03.17 at 17:27, <andrew.cooper3@xxxxxxxxxx> wrote:
>>> @@ -242,6 +243,25 @@ static void __init calculate_raw_policy(void)
>>>          cpuid_leaf(i, &p->basic.raw[i]);
>>>      }
>>>  
>>> +    if ( p->basic.max_leaf >= 4 )
>>> +    {
>>> +        for ( i = 0; i < ARRAY_SIZE(p->cache.raw); ++i )
>>> +        {
>>> +            cpuid_count_leaf(4, i, &p->cache.raw[i]);
>>> +
>>> +            if ( p->cache.subleaf[i].type == 0 )
>>> +                break;
>>> +        }
>>> +
>>> +        /*
>>> +         * The choice of CPUID_GUEST_NR_CACHE is arbitrary.  It is expected
>>> +         * that it will eventually need increasing for future hardware.
>>> +         */
>>> +        if ( i == ARRAY_SIZE(p->cache.raw) )
>>> +            printk(XENLOG_WARNING
>>> +                   "CPUID: Insufficient Leaf 4 space for this hardware\n");
>>> +    }
>> As expressed before (perhaps in the context of another patch),
>> the warning may be logged prematurely, which I'd prefer to be
>> avoided.
> 
> How would you like it then?  You previously indicated that it probably
> want a problem leaving it like this, which is why I did.

And I continue to be of that opinion: It's probably not a problem to
leave it as is (hence the R-b), but I'd prefer if the warning was only
issued when we actually can't fit at least one sub-leaf.

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®.