[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240703161705.GAZoV5gQIgtORQeHdQ@fat_crate.local>
Date: Wed, 3 Jul 2024 18:17:05 +0200
From: Borislav Petkov <bp@...en8.de>
To: "H. Peter Anvin" <hpa@...or.com>
Cc: Andrew Cooper <andrew.cooper3@...rix.com>, dave.hansen@...el.com,
xin@...or.com, linux-kernel@...r.kernel.org, tglx@...utronix.de,
mingo@...hat.com, dave.hansen@...ux.intel.com, x86@...nel.org,
peterz@...radead.org, nik.borisov@...e.com,
houwenlong.hwl@...group.com
Subject: Re: [PATCH v1 2/4] x86/fred: Write to FRED MSRs with wrmsrns()
On Wed, Jul 03, 2024 at 09:06:55AM -0700, H. Peter Anvin wrote:
> I believe tglx declared to use them unconditionally since FRED depends on
> WRMSRNS (and the kernel enforces that.)
>
> Using an alternative would make wrmsrns() a more useful construct in
> general, though.
We can't use them unconditionally and we don't need an alternative just for
that - a simple
if (cpu_feature_enabled(X86_FEATURE_WRMSRNS))
wrmsrns()
else
wrmsr()
would be perfectly fine.
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette
Powered by blists - more mailing lists