mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Xiaoyao Li <xiaoyao.li@intel.com>
To: Borislav Petkov <bp@alien8.de>
Cc: Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
	x86@kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] x86/cpufeatures: make bits in cpu_caps_cleared[] and cpu_cpus_set[] exclusive
Date: Wed, 18 Mar 2020 20:57:58 +0800	[thread overview]
Message-ID: <42770941-dfdf-628b-3fe8-6ee5a871b1b4@intel.com> (raw)
In-Reply-To: <20200318103219.GA4377@zn.tnic>

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


      reply	other threads:[~2020-03-18 12:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-18  6:16 Xiaoyao Li
2020-03-18 10:32 ` Borislav Petkov
2020-03-18 12:57   ` Xiaoyao Li [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=42770941-dfdf-628b-3fe8-6ee5a871b1b4@intel.com \
    --to=xiaoyao.li@intel.com \
    --cc=bp@alien8.de \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®