From: "Huang, Kai" <kai.huang@intel.com>
To: "tglx@linutronix.de" <tglx@linutronix.de>,
"x86@kernel.org" <x86@kernel.org>,
"khaliidcaliy@gmail.com" <khaliidcaliy@gmail.com>,
"mingo@redhat.com" <mingo@redhat.com>,
"bp@alien8.de" <bp@alien8.de>,
"dave.hansen@linux.intel.com" <dave.hansen@linux.intel.com>
Cc: "hpa@zytor.com" <hpa@zytor.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v4] x86/boot: Don't return encryption mask from __startup_64()
Date: Mon, 23 Jun 2025 11:26:14 +0000 [thread overview]
Message-ID: <f81447e67af13eb211ddb97511657931cd95f2f4.camel@intel.com> (raw)
In-Reply-To: <20250619073652.719-1-khaliidcaliy@gmail.com>
On Thu, 2025-06-19 at 07:36 +0000, Khalid Ali wrote:
> Avoid returning the SME encryption mask from __startup_64(), and instead
> let the function handle encryption directly as needed.
>
Some nits below:
"the function" here is confusing, since it sounds like you are referring to
__startup_64(), but I think you actually meant its caller.
So, "the function" -> "the caller".
> The encryption
> mask is already available to callers and can be accessed via
"callers" -> "users", since only functions can have callers?
Or just:
The encryption mask is already available after sme_enable() and ...
?
> sme_get_me_mask() in C code, or directly through the sme_me_mask symbol
> in assembly, if CONFIG_AMD_MEM_ENCRYPT is enabled.
>
> This change aligns with how secondary_startup_64_no_verify handles SME
> and keeps the behavior consistent. For Intel CPUs, SME is not relevant,
> so there is no need to retrieve the mask unless CONFIG_AMD_MEM_ENCRYPT
> is enabled.
>
> Signed-off-by: Khalid Ali <khaliidcaliy@gmail.com>
Overall I think this patch makes code logic clearer, so:
Acked-by: Kai Huang <kai.huang@intel.com>
next prev parent reply other threads:[~2025-06-23 11:26 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-19 7:36 Khalid Ali
2025-06-23 11:26 ` Huang, Kai [this message]
2025-06-25 6:40 ` kernel test robot
2025-06-25 10:55 ` Huang, Kai
2025-06-25 12:34 ` Khalid Ali
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=f81447e67af13eb211ddb97511657931cd95f2f4.camel@intel.com \
--to=kai.huang@intel.com \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.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®