From: Ingo Molnar <mingo@kernel.org>
To: Ard Biesheuvel <ardb@kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
Ard Biesheuvel <ardb+git@google.com>,
linux-kernel@vger.kernel.org, x86@kernel.org
Subject: Re: [RFC PATCH 3/3] x86/boot: Use alternatives based selector for 5-level paging constants
Date: Tue, 6 May 2025 19:39:35 +0200 [thread overview]
Message-ID: <aBpJV7fJNyfb7tSx@gmail.com> (raw)
In-Reply-To: <CAMj1kXGwYXXpjPgDwjKMEZJkuGJ8ZuCpMpc7fTvo58PNtu-czA@mail.gmail.com>
* Ard Biesheuvel <ardb@kernel.org> wrote:
> > All of those change depending on
> > whether we do 5-level page tables or not, so the whole argument that
> > "pgtable_l5_enabled() is special" is just wrong to begin with.
> >
>
> In my original patch, which is the one Ingo objected to,
> pgtable_l5_enabled() is unambiguously based on whether CR4.LA57 is
> set.
So I didn't really object to the simplification aspect - I was
criticizing the current state of LA57 handling, regardless of your
patch. In fact in that thread I supported the simplification aspect:
> > Anyway, I'm not against Ard's simplification patch as a first step, and
> > any optimizations can be layered on top of that.
But in hindsight I can see how my first reply came away as
disagreement...
> In the light of the above, care to comment on the previous approach?
>
> https://lore.kernel.org/all/20250504095230.2932860-28-ardb+git@google.com/
>
> That also uses the ALTERNATIVE_TERNARY() so the CR4 access gets
> patched away, and I'm happy to take suggestions how to improve that.
I still think we should introduce a LA57_ENABLED synthethic cpufeature
flag or so for the MM constants and all the late facilities, and go
from there.
Thanks,
Ingo
next prev parent reply other threads:[~2025-05-06 17:39 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-06 15:45 [RFC PATCH 0/3] x86: Robustify pgtable_l5_enabled() Ard Biesheuvel
2025-05-06 15:45 ` [RFC PATCH 1/3] x86/boot: Use a single source of truth for pgtable_l5_enabled() Ard Biesheuvel
2025-05-06 15:45 ` [RFC PATCH 2/3] x86/boot: Set __pgtable_l5_enabled correctly before calling into C code Ard Biesheuvel
2025-05-10 13:54 ` David Laight
2025-05-10 14:51 ` Ard Biesheuvel
2025-05-06 15:45 ` [RFC PATCH 3/3] x86/boot: Use alternatives based selector for 5-level paging constants Ard Biesheuvel
2025-05-06 16:23 ` Linus Torvalds
2025-05-06 16:34 ` Ard Biesheuvel
2025-05-06 17:03 ` Linus Torvalds
2025-05-06 17:25 ` Ard Biesheuvel
2025-05-06 17:39 ` Ingo Molnar [this message]
2025-05-06 17:47 ` Ard Biesheuvel
2025-05-06 17:43 ` Linus Torvalds
2025-05-06 17:52 ` Ard Biesheuvel
2025-05-06 18:17 ` Linus Torvalds
2025-05-06 18:39 ` Linus Torvalds
2025-05-06 19:14 ` Ard Biesheuvel
2025-05-06 19:41 ` Linus Torvalds
2025-05-06 19:50 ` Ard Biesheuvel
2025-05-07 13:51 ` Ard Biesheuvel
2025-05-06 16:50 ` Ingo Molnar
2025-05-06 16:58 ` Ard Biesheuvel
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=aBpJV7fJNyfb7tSx@gmail.com \
--to=mingo@kernel.org \
--cc=ardb+git@google.com \
--cc=ardb@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
--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
Powered by JetHome