[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a6090023-29d7-a190-d118-56b8e7acffc6@bytedance.com>
Date: Wed, 8 Mar 2023 14:10:05 +0000
From: Usama Arif <usama.arif@...edance.com>
To: David Woodhouse <dwmw2@...radead.org>,
Tom Lendacky <thomas.lendacky@....com>,
"tglx@...utronix.de" <tglx@...utronix.de>,
"Phillips, Kim" <kim.phillips@....com>,
"brgerst@...il.com" <brgerst@...il.com>,
"Rapan, Sabin" <sabrapan@...zon.com>
Cc: "piotrgorski@...hyos.org" <piotrgorski@...hyos.org>,
"oleksandr@...alenko.name" <oleksandr@...alenko.name>,
"arjan@...ux.intel.com" <arjan@...ux.intel.com>,
"mingo@...hat.com" <mingo@...hat.com>,
"bp@...en8.de" <bp@...en8.de>,
"dave.hansen@...ux.intel.com" <dave.hansen@...ux.intel.com>,
"hpa@...or.com" <hpa@...or.com>, "x86@...nel.org" <x86@...nel.org>,
"pbonzini@...hat.com" <pbonzini@...hat.com>,
"paulmck@...nel.org" <paulmck@...nel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"kvm@...r.kernel.org" <kvm@...r.kernel.org>,
"rcu@...r.kernel.org" <rcu@...r.kernel.org>,
"mimoja@...oja.de" <mimoja@...oja.de>,
"hewenliang4@...wei.com" <hewenliang4@...wei.com>,
"seanjc@...gle.com" <seanjc@...gle.com>,
"pmenzel@...gen.mpg.de" <pmenzel@...gen.mpg.de>,
"fam.zheng@...edance.com" <fam.zheng@...edance.com>,
"punit.agrawal@...edance.com" <punit.agrawal@...edance.com>,
"simon.evans@...edance.com" <simon.evans@...edance.com>,
"liangma@...ngbit.com" <liangma@...ngbit.com>
Subject: Re: [External] Re: [PATCH v13 00/11] Parallel CPU bringup for x86_64
> static bool prepare_parallel_bringup(void)
> {
> bool has_sev_es = IS_ENABLED(CONFIG_AMD_MEM_ENCRYPT) &&
> static_branch_unlikely(&sev_es_enable_key);
sev_es_enable_key is only defined when CONFIG_AMD_MEM_ENCRYPT is
enabled, so it gives a build error when AMD_MEM_ENCRYPT is disabled.
maybe below is better?
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
index 282cca020777..e7df41436cfe 100644
--- a/arch/x86/kernel/smpboot.c
+++ b/arch/x86/kernel/smpboot.c
@@ -1519,8 +1519,12 @@ void __init smp_prepare_cpus_common(void)
*/
static bool prepare_parallel_bringup(void)
{
- bool has_sev_es = IS_ENABLED(CONFIG_AMD_MEM_ENCRYPT) &&
- static_branch_unlikely(&sev_es_enable_key);
+ bool has_sev_es;
+#ifdef CONFIG_AMD_MEM_ENCRYPT
+ has_sev_es = static_branch_unlikely(&sev_es_enable_key);
+#else
+ has_sev_es = 0;
+#endif
if (IS_ENABLED(CONFIG_X86_32))
return false;
Powered by blists - more mailing lists