linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Borislav Petkov <bp@alien8.de>
To: Usama Arif <usama.arif@bytedance.com>
Cc: dwmw2@infradead.org, tglx@linutronix.de, kim.phillips@amd.com,
	brgerst@gmail.com, piotrgorski@cachyos.org,
	oleksandr@natalenko.name, arjan@linux.intel.com,
	mingo@redhat.com, dave.hansen@linux.intel.com, hpa@zytor.com,
	x86@kernel.org, pbonzini@redhat.com, paulmck@kernel.org,
	linux-kernel@vger.kernel.org, kvm@vger.kernel.org,
	rcu@vger.kernel.org, mimoja@mimoja.de, hewenliang4@huawei.com,
	thomas.lendacky@amd.com, seanjc@google.com,
	pmenzel@molgen.mpg.de, fam.zheng@bytedance.com,
	punit.agrawal@bytedance.com, simon.evans@bytedance.com,
	liangma@liangbit.com, gpiccoli@igalia.com,
	David Woodhouse <dwmw@amazon.co.uk>,
	Sabin Rapan <sabrapan@amazon.com>
Subject: Re: [PATCH v17 8/8] x86/smpboot: Allow parallel bringup for SEV-ES
Date: Tue, 28 Mar 2023 22:07:25 +0200	[thread overview]
Message-ID: <20230328200725.GHZCNI/dHoUMwhsfiC@fat_crate.local> (raw)
In-Reply-To: <20230328195758.1049469-9-usama.arif@bytedance.com>

On Tue, Mar 28, 2023 at 08:57:58PM +0100, Usama Arif wrote:
> From: David Woodhouse <dwmw@amazon.co.uk>
> 
> Enable parallel bringup for SEV-ES guests. The APs can't actually
> execute the CPUID instruction directly during early startup, but they
> can make the GHCB call directly instead, just as the VC trap handler
> would do.
> 
> Thanks to Sabin for talking me through the way this works.
> 
> Suggested-by: Sabin Rapan <sabrapan@amazon.com>
> Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
> Signed-off-by: Usama Arif <usama.arif@bytedance.com>
> Reviewed-by: Tom Lendacky <thomas.lendacky@amd.com>
> ---
>  arch/x86/coco/core.c              |  5 ++++
>  arch/x86/include/asm/coco.h       |  1 +
>  arch/x86/include/asm/sev-common.h |  3 +++
>  arch/x86/include/asm/smp.h        |  5 +++-
>  arch/x86/kernel/head_64.S         | 30 ++++++++++++++++++++++++
>  arch/x86/kernel/smpboot.c         | 39 ++++++++++++++++++++++++++-----
>  6 files changed, 76 insertions(+), 7 deletions(-)
> 
> diff --git a/arch/x86/coco/core.c b/arch/x86/coco/core.c
> index 49b44f881484..0bab38efb15a 100644
> --- a/arch/x86/coco/core.c
> +++ b/arch/x86/coco/core.c
> @@ -129,6 +129,11 @@ u64 cc_mkdec(u64 val)
>  }
>  EXPORT_SYMBOL_GPL(cc_mkdec);
>  
> +enum cc_vendor cc_get_vendor(void)
> +{
> +	return vendor;
> +}
> +
>  __init void cc_set_vendor(enum cc_vendor v)
>  {
>  	vendor = v;
> diff --git a/arch/x86/include/asm/coco.h b/arch/x86/include/asm/coco.h
> index 3d98c3a60d34..0428d9712c96 100644
> --- a/arch/x86/include/asm/coco.h
> +++ b/arch/x86/include/asm/coco.h
> @@ -12,6 +12,7 @@ enum cc_vendor {
>  };
>  
>  void cc_set_vendor(enum cc_vendor v);
> +enum cc_vendor cc_get_vendor(void);
>  void cc_set_mask(u64 mask);
>  
>  #ifdef CONFIG_ARCH_HAS_CC_PLATFORM

You don't need those hunks adding cc_set_vendor() anymore:

https://git.kernel.org/tip/5ae57743f578725a5dadb6f31d7798ee55e6e967

-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette

  reply	other threads:[~2023-03-28 20:07 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-28 19:57 [PATCH v17 0/8] Parallel CPU bringup for x86_64 Usama Arif
2023-03-28 19:57 ` [PATCH v17 1/8] cpu/hotplug: Move idle_thread_get() to <linux/smpboot.h> Usama Arif
2023-03-28 19:57 ` [PATCH v17 2/8] cpu/hotplug: Reset task stack state in _cpu_up() Usama Arif
2023-03-29 11:09   ` Usama Arif
2023-03-28 19:57 ` [PATCH v17 3/8] cpu/hotplug: Add CPUHP_BP_PARALLEL_STARTUP state before CPUHP_BRINGUP_CPU Usama Arif
2023-03-28 19:57 ` [PATCH v17 4/8] x86/smpboot: Split up native_cpu_up into separate phases and document them Usama Arif
2023-03-28 19:57 ` [PATCH v17 5/8] x86/smpboot: Support parallel startup of secondary CPUs Usama Arif
2023-03-28 19:57 ` [PATCH v17 6/8] x86/smpboot: Send INIT/SIPI/SIPI to secondary CPUs in parallel Usama Arif
2023-03-30 16:46   ` Thomas Gleixner
2023-03-30 17:05     ` Borislav Petkov
2023-03-30 18:17       ` Thomas Gleixner
2023-03-31 11:40         ` [External] " Usama Arif
2023-03-28 19:57 ` [PATCH v17 7/8] x86/smpboot: Serialize topology updates for secondary bringup Usama Arif
2023-03-28 19:57 ` [PATCH v17 8/8] x86/smpboot: Allow parallel bringup for SEV-ES Usama Arif
2023-03-28 20:07   ` Borislav Petkov [this message]
2023-03-30  0:10     ` Thomas Gleixner
2023-03-30  7:51       ` Borislav Petkov
2023-03-30  8:15       ` Thomas Gleixner

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=20230328200725.GHZCNI/dHoUMwhsfiC@fat_crate.local \
    --to=bp@alien8.de \
    --cc=arjan@linux.intel.com \
    --cc=brgerst@gmail.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=dwmw2@infradead.org \
    --cc=dwmw@amazon.co.uk \
    --cc=fam.zheng@bytedance.com \
    --cc=gpiccoli@igalia.com \
    --cc=hewenliang4@huawei.com \
    --cc=hpa@zytor.com \
    --cc=kim.phillips@amd.com \
    --cc=kvm@vger.kernel.org \
    --cc=liangma@liangbit.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mimoja@mimoja.de \
    --cc=mingo@redhat.com \
    --cc=oleksandr@natalenko.name \
    --cc=paulmck@kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=piotrgorski@cachyos.org \
    --cc=pmenzel@molgen.mpg.de \
    --cc=punit.agrawal@bytedance.com \
    --cc=rcu@vger.kernel.org \
    --cc=sabrapan@amazon.com \
    --cc=seanjc@google.com \
    --cc=simon.evans@bytedance.com \
    --cc=tglx@linutronix.de \
    --cc=thomas.lendacky@amd.com \
    --cc=usama.arif@bytedance.com \
    --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;
as well as URLs for NNTP newsgroup(s).