[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <42770941-dfdf-628b-3fe8-6ee5a871b1b4@intel.com>
Date: Wed, 18 Mar 2020 20:57:58 +0800
From: Xiaoyao Li <xiaoyao.li@...el.com>
To: Borislav Petkov <bp@...en8.de>
Cc: Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>,
"H. Peter Anvin" <hpa@...or.com>, x86@...nel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] x86/cpufeatures: make bits in cpu_caps_cleared[] and
cpu_cpus_set[] exclusive
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.
>
Powered by blists - more mailing lists