]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/xen.git/commitdiff
x86: correct {a,m}perf check in generic_identify()
authorAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 3 Nov 2015 17:15:39 +0000 (18:15 +0100)
committerJan Beulich <jbeulich@suse.com>
Tue, 3 Nov 2015 17:15:39 +0000 (18:15 +0100)
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
xen/arch/x86/cpu/common.c

index 653b052196fe12ee6a2a35d74c364bba9ba3563a..02f25046fd1e2a4d2cb39b59307a2da54532fff8 100644 (file)
@@ -239,7 +239,7 @@ static void __cpuinit generic_identify(struct cpuinfo_x86 *c)
        if ( cpu_has(c, X86_FEATURE_CLFLSH) )
                c->x86_clflush_size = ((ebx >> 8) & 0xff) * 8;
 
-       if ( (c->cpuid_level > CPUID_PM_LEAF) &&
+       if ( (c->cpuid_level >= CPUID_PM_LEAF) &&
             (cpuid_ecx(CPUID_PM_LEAF) & CPUID6_ECX_APERFMPERF_CAPABILITY) )
                set_bit(X86_FEATURE_APERFMPERF, c->x86_capability);