From: Xin Li <xin@zytor.com>
To: Dave Hansen <dave.hansen@intel.com>,
Andrew Cooper <andrew.cooper3@citrix.com>,
linux-kernel@vger.kernel.org
Cc: tglx@linutronix.de, mingo@redhat.com, bp@alien8.de,
dave.hansen@linux.intel.com, x86@kernel.org, hpa@zytor.com
Subject: Re: [PATCH v1 1/1] x86/fred: Fix the FRED RSP0 MSR out of sync with its per CPU cache
Date: Wed, 8 Jan 2025 15:32:58 -0800 [thread overview]
Message-ID: <2402fe84-a511-4178-94a3-28f926a96c7c@zytor.com> (raw)
In-Reply-To: <45d4edfd-d3d9-4115-9ec3-947630b06ce0@intel.com>
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!
next prev parent reply other threads:[~2025-01-08 23:33 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-08 2:36 Xin Li (Intel)
2025-01-08 3:27 ` H. Peter Anvin
2025-01-08 20:14 ` Dave Hansen
2025-01-08 21:10 ` Andrew Cooper
2025-01-08 22:31 ` Dave Hansen
2025-01-08 23:32 ` Xin Li [this message]
2025-01-09 9:46 ` H. Peter Anvin
2025-01-09 18:48 ` Xin Li
2025-01-08 23:04 ` Dave Hansen
2025-01-08 23:32 ` Xin Li
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=2402fe84-a511-4178-94a3-28f926a96c7c@zytor.com \
--to=xin@zytor.com \
--cc=andrew.cooper3@citrix.com \
--cc=bp@alien8.de \
--cc=dave.hansen@intel.com \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--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®