lkml.org 
[lkml]   [2020]   [Mar]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] x86/cpufeatures: make bits in cpu_caps_cleared[] and cpu_cpus_set[] exclusive
From
Date
On 3/18/2020 6:32 PM, Borislav Petkov wrote:
> On Wed, Mar 18, 2020 at 02:16:24PM +0800, Xiaoyao Li wrote:
>> In apply_forced_caps(), cpu_caps_set[] overrides cpu_caps_cleared[], so
>> that setup_clear_cpu_cap() cannot clear one cap if setup_force_cpu_cap()
>> sets the cap before it.
>
> Context pls: what is the observation, what are you trying to do,
> reproducer, etc?

Well. I use setup_force_cup_cap(XXX) to set one flag, XXX, during early
boot. And use setup_clear_cpu_cap(XXX) to clear this flag when something
wrong later. However, it turns out that the flag is still set when I use
cpu_has(c, XXX) to check when init each AP. I have to clear the flag XXX
explicitly using clear_cpu_cap(c, XXX). However, in /proc/cpuinfo, this
XXX flag still presents on every CPU.

> Thx.
>

\
 
 \ /
  Last update: 2020-03-18 13:59    [W:1.205 / U:0.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site