Re: [PATCH 2/7] x86/bugs: Cache the value of MSR_IA32_ARCH_CAPABILITIES

From: Nikolay Borisov
Date: Thu Apr 11 2024 - 02:22:21 EST




On 11.04.24 г. 8:40 ч., Josh Poimboeuf wrote:
There's no need to keep reading MSR_IA32_ARCH_CAPABILITIES over and
over. It's even read in the BHI sysfs function which is a big no-no.
Just read it once and cache it.

Fixes: ec9404e40e8f ("x86/bhi: Add BHI mitigation knob")
Signed-off-by: Josh Poimboeuf <jpoimboe@xxxxxxxxxx>


Reviewed-by: Nikolay Borisov <nik.borisov@xxxxxxxx>