From: Thomas Gleixner <tglx@linutronix.de>
To: Tony W Wang-oc <TonyWWang-oc@zhaoxin.com>,
mingo@redhat.com, bp@alien8.de, hpa@zytor.com, x86@kernel.org,
linux-kernel@vger.kernel.org
Cc: DavidWang@zhaoxin.com, CooperYan@zhaoxin.com,
QiyuanWang@zhaoxin.com, HerryYang@zhaoxin.com
Subject: Re: [PATCH] x86/cpu: clear X86_BUG_SPECTRE_V2 on Zhaoxin family 7 CPUs
Date: Wed, 15 Jan 2020 23:19:49 +0100 [thread overview]
Message-ID: <87h80wxsze.fsf@nanos.tec.linutronix.de> (raw)
In-Reply-To: <1579075500-7065-1-git-send-email-TonyWWang-oc@zhaoxin.com>
Tony W Wang-oc <TonyWWang-oc@zhaoxin.com> writes:
> These CPUs are not affected by spectre_v2, so clear spectre_v2 bug flag
> in their specific initialization code.
>
> if (cpu_has(c, X86_FEATURE_VMX))
> centaur_detect_vmx_virtcap(c);
> +
> + if (c->x86 == 7) {
> + setup_clear_cpu_cap(X86_BUG_SPECTRE_V2);
> + clear_bit(X86_BUG_SPECTRE_V2, (unsigned long *)cpu_caps_set);
No. Please use cpu_vuln_whitelist. It exists for exactly this
purpose. You just need to extend it with a NO_SPECTRE_V2 bit.
Thanks,
tglx
next prev parent reply other threads:[~2020-01-15 22:19 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-15 8:05 Tony W Wang-oc
2020-01-15 22:19 ` Thomas Gleixner [this message]
2020-01-16 3:51 ` Tony W Wang-oc
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=87h80wxsze.fsf@nanos.tec.linutronix.de \
--to=tglx@linutronix.de \
--cc=CooperYan@zhaoxin.com \
--cc=DavidWang@zhaoxin.com \
--cc=HerryYang@zhaoxin.com \
--cc=QiyuanWang@zhaoxin.com \
--cc=TonyWWang-oc@zhaoxin.com \
--cc=bp@alien8.de \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--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®