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

Re: [Xen-devel] [PATCH v8 02/13] x86: detect and initialize Intel CAT feature



>>> On 29.05.15 at 04:40, <chao.p.peng@xxxxxxxxxxxxxxx> wrote:
> On Thu, May 28, 2015 at 01:54:39PM +0100, Jan Beulich wrote:
>> >>> On 21.05.15 at 10:41, <chao.p.peng@xxxxxxxxxxxxxxx> wrote:
>> > +
>> > +    if ( !cpu_has(c, X86_FEATURE_CAT) )
>> > +        return;
>> > +
>> > +    socket = cpu_to_socket(cpu);
>> > +    if ( test_bit(socket, cat_socket_enable) )
>> > +        return;
>> > +
>> > +    cpuid_count(PSR_CPUID_LEVEL_CAT, 0, &eax, &ebx, &ecx, &edx);
>> 
>> While one would hope that X86_FEATURE_CAT implies the respective
>> CPUID leaf being available, I think explicitly checking this should still
>> be done just like is the case elsewhere.
> 
> Against cpuid_level?

Of course.

>> > +static void __init init_psr_cat(void)
>> > +{
>> > +    if ( opt_cos_max < 1 )
>> > +    {
>> > +        printk(XENLOG_INFO "CAT: disabled, cos_max is too small\n");
>> > +        return;
>> > +    }
>> 
>> Is opt_cos_max == 1 really useful for anything?
> 
> That means two COSes are available. cos=0 is reserved and cos=1 can
> still be used anyway.

Ah, sorry, this is _max_, not _count_.

Jan


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


 


Rackspace

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