From: Dave Hansen <dave.hansen@intel.com>
To: Juergen Gross <jgross@suse.com>,
linux-kernel@vger.kernel.org, x86@kernel.org
Cc: "Thomas Gleixner" <tglx@linutronix.de>,
"Ingo Molnar" <mingo@redhat.com>,
"Borislav Petkov" <bp@alien8.de>,
"Dave Hansen" <dave.hansen@linux.intel.com>,
"H. Peter Anvin" <hpa@zytor.com>,
"Andy Lutomirski" <luto@kernel.org>,
"Peter Zijlstra" <peterz@infradead.org>,
"Petr Vaněk" <arkamar@atlas.cz>,
stable@vger.kernel.org
Subject: Re: [PATCH] x86/mm: fix _pgd_alloc() for Xen PV mode
Date: Thu, 17 Apr 2025 08:15:21 -0700 [thread overview]
Message-ID: <7950cbd5-d254-4e67-81fa-ab2194f9dbc4@intel.com> (raw)
In-Reply-To: <20250417144808.22589-1-jgross@suse.com>
On 4/17/25 07:48, Juergen Gross wrote:
> -#define PGD_ALLOCATION_ORDER 1
> +#define PGD_ALLOCATION_ORDER pgd_allocation_order
> +extern unsigned int pgd_allocation_order;
> #else
> #define PGD_ALLOCATION_ORDER 0
> #endif
Instead of hiding a variable behind a macro-looking name and a bunch of
#ifdefs, can we please fix this properly?
static inline pgd_allocation_order(void)
{
if (cpu_feature_enabled(X86_FEATURE_PTI))
return 1;
return 0;
}
and then s/PGD_ALLOCATION_ORDER/pgd_allocation_order()/.
Wouldn't that be a billion times better?
next prev parent reply other threads:[~2025-04-17 15:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-17 14:48 Juergen Gross
2025-04-17 15:15 ` Dave Hansen [this message]
2025-04-18 17:46 ` Petr Vaněk
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=7950cbd5-d254-4e67-81fa-ab2194f9dbc4@intel.com \
--to=dave.hansen@intel.com \
--cc=arkamar@atlas.cz \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=jgross@suse.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=stable@vger.kernel.org \
--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®