Re: [PATCH] x86/cpu: Avoid writing MSR_IA32_TSX_CTRL when writing it is not supported

From: Peter Zijlstra
Date: Tue Sep 06 2022 - 16:44:05 EST


On Tue, Sep 06, 2022 at 10:17:43PM +0200, Hans de Goede wrote:
> On an Intel Atom N2600 (and presumable other Cedar Trail models)
> MSR_IA32_TSX_CTRL can be read, causing saved_msr.valid to be set for it
> by msr_build_context().
>
> This causes restore_processor_state() to try and restore it, but writing
> this MSR is not allowed on the Intel Atom N2600 leading to:

FWIW, virt tends to do this same thing a lot. They'll allow reading
random MSRs and only fail on write.