From: "H. Peter Anvin" <hpa@zytor.com>
To: Khalid Ali <khaliidcaliy@gmail.com>,
tglx@linutronix.de, mingo@redhat.com, bp@alien8.de,
dave.hansen@linux.intel.com
Cc: x86@kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] x86/kerrnel/FPU: clear MP bit of cr0
Date: Wed, 4 Jun 2025 15:42:26 -0700 [thread overview]
Message-ID: <69118db9-4394-4c65-b53a-084dca917f14@zytor.com> (raw)
In-Reply-To: <20250526082414.689-1-khaliidcaliy@gmail.com>
On 2025-05-26 01:22, Khalid Ali wrote:
> From: Khalid Ali <khaliidcaliy@gmail.com>
>
> Clear MP bit when initializing x87 FPU, since what it does
> is making WAIT/FWAIT instructions to react to setting of TS flag.
> Right now TS bit is cleared so MP should be cleared, as it is not
> needed. This should set the bit in defined state.
>
> Signed-off-by: Khalid Ali <khaliidcaliy@gmail.com>
Note also that we DO initialize all bits of CR0 elsewhere in the code
(head_32.S and head_64.S) to:
#define CR0_STATE (X86_CR0_PE | X86_CR0_MP | X86_CR0_ET | \
X86_CR0_NE | X86_CR0_WP | X86_CR0_AM | \
X86_CR0_PG)
So it is currently defined; this patch would actually *introduce* a bug.
It is a bit confusing to have the bits initialized in different places,
so I would agree with setting it explicitly, even if it is redundant.
-hpa
prev parent reply other threads:[~2025-06-04 22:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-26 8:22 Khalid Ali
2025-06-03 16:29 ` Dave Hansen
2025-06-04 22:35 ` H. Peter Anvin
2025-06-04 22:42 ` H. Peter Anvin [this message]
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=69118db9-4394-4c65-b53a-084dca917f14@zytor.com \
--to=hpa@zytor.com \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=khaliidcaliy@gmail.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®