[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <481bce9d04e5e36303cf14dffdf46f844aefd11a.camel@infradead.org>
Date: Fri, 24 Feb 2023 15:46:27 +0000
From: David Woodhouse <dwmw2@...radead.org>
To: Yuan Yao <yuan.yao@...ux.intel.com>,
Usama Arif <usama.arif@...edance.com>
Cc: tglx@...utronix.de, kim.phillips@....com, piotrgorski@...hyos.org,
oleksandr@...alenko.name, arjan@...ux.intel.com, mingo@...hat.com,
bp@...en8.de, dave.hansen@...ux.intel.com, hpa@...or.com,
x86@...nel.org, pbonzini@...hat.com, paulmck@...nel.org,
linux-kernel@...r.kernel.org, kvm@...r.kernel.org,
rcu@...r.kernel.org, mimoja@...oja.de, hewenliang4@...wei.com,
thomas.lendacky@....com, seanjc@...gle.com, pmenzel@...gen.mpg.de,
fam.zheng@...edance.com, punit.agrawal@...edance.com,
simon.evans@...edance.com, liangma@...ngbit.com
Subject: Re: [PATCH v10 6/8] x86/smpboot: Support parallel startup of
secondary CPUs
On Fri, 2023-02-24 at 13:59 +0800, Yuan Yao wrote:
>
> > + * Make sure only one CPU fiddles with the realmode stack
> > + */
> > +.Llock_rm:
> > + btl $0, tr_lock
> > + jnc 2f
> > + pause
> > + jmp .Llock_rm
> > +2:
> > + lock
> > + btsl $0, tr_lock
> > + jc .Llock_rm
> > +
>
> Looks these changes should be applied to trampoline_start64()
> yet, which is used for boot up APs when apic->wakeup_secondary_cpu_64
> is available, e.g when ACPI_MADT_TYPE_MULTIPROC_WAKEUP is available.
>
> One case I know is the INTEL TD guest, which using the MADT wakeup
> for AP wake up now.
Yeah.
I think we could probably pull that all out into a separate asm
"load_realmode_esp" function which takes the lock and actually does the
'movl $rm_stack_end, %esp'.
Then we call it from all the places which currently use $rm_stack_end,
including sev_es_trampoline_start (even though we currently disable
parallel startup there because CPUID doesn't work that early).
Oh... except of course it can't be a function because we haven't got a
stack, have we? It's a macro.
Usama, are you happy using .macro in gas?
Download attachment "smime.p7s" of type "application/pkcs7-signature" (5965 bytes)
Powered by blists - more mailing lists