On Tue, Mar 28, 2023 at 08:57:58PM +0100, Usama Arif wrote: > From: David Woodhouse <dwmw@xxxxxxxxxxxx> > > 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@xxxxxxxxxx> > Signed-off-by: David Woodhouse <dwmw@xxxxxxxxxxxx> > Signed-off-by: Usama Arif <usama.arif@xxxxxxxxxxxxx> > Reviewed-by: Tom Lendacky <thomas.lendacky@xxxxxxx> > --- > 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