[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2402fe84-a511-4178-94a3-28f926a96c7c@zytor.com>
Date: Wed, 8 Jan 2025 15:32:58 -0800
From: Xin Li <xin@...or.com>
To: Dave Hansen <dave.hansen@...el.com>,
Andrew Cooper <andrew.cooper3@...rix.com>,
linux-kernel@...r.kernel.org
Cc: tglx@...utronix.de, mingo@...hat.com, bp@...en8.de,
dave.hansen@...ux.intel.com, x86@...nel.org, hpa@...or.com
Subject: Re: [PATCH v1 1/1] x86/fred: Fix the FRED RSP0 MSR out of sync with
its per CPU cache
On 1/8/2025 2:31 PM, Dave Hansen wrote:
> On 1/8/25 13:10, Andrew Cooper wrote:
>> On 08/01/2025 8:14 pm, Dave Hansen wrote:
>>> On 1/7/25 18:36, Xin Li (Intel) wrote:
>>>> + * Another option is to leave the FRED RSP0 MSR as-is, because the RESET
>>>> + * state of FRED MSRs is zero and INIT does not change the value of the
>>>> + * FRED MSRs in a CPU offline/online cycle. But it doesn't seem safe to
>>>> + * depend on the properties of INIT as that's way too many things that
>>>> + * could cause bugs.
>>> Wouldn't that also open us up to kexec problems? If the last kernel
>>> (maybe not even Linux) left RSP0 set, then the current kernel might
>>> eventually try to run userspace with the old kernel's RSP0 value.
>> That's why the init code needs to write every control MSR, even if it's
>> filling in 0 because it doesn't want to use the feature.
>>
>> The job of the init code is to go from an unknown state into a good
>> state, not from the INIT/#RESET state.
>
> Right, so I think the quoted "Another option..." comment needs to get
> zapped. Because it's not really another option. Discussing alternatives
> is better left for changelogs anyway, not code comments.
>
Will do!
Powered by blists - more mailing lists