From: David Woodhouse <dwmw2@infradead.org>
To: Yuan Yao <yuan.yao@linux.intel.com>,
Usama Arif <usama.arif@bytedance.com>
Cc: tglx@linutronix.de, kim.phillips@amd.com,
piotrgorski@cachyos.org, oleksandr@natalenko.name,
arjan@linux.intel.com, mingo@redhat.com, bp@alien8.de,
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
Subject: Re: [PATCH v10 6/8] x86/smpboot: Support parallel startup of secondary CPUs
Date: Fri, 24 Feb 2023 15:46:27 +0000 [thread overview]
Message-ID: <481bce9d04e5e36303cf14dffdf46f844aefd11a.camel@infradead.org> (raw)
In-Reply-To: <20230224055941.fbr6wenbdsnzjf7q@yy-desk-7060>
[-- Attachment #1: Type: text/plain, Size: 1301 bytes --]
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?
[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5965 bytes --]
next prev parent reply other threads:[~2023-02-24 15:47 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-21 22:33 [PATCH v10 0/8] Parallel CPU bringup for x86_64 Usama Arif
2023-02-21 22:33 ` [PATCH v10 1/8] x86/apic/x2apic: Allow CPU cluster_mask to be populated in parallel Usama Arif
2023-02-21 22:33 ` [PATCH v10 2/8] cpu/hotplug: Move idle_thread_get() to <linux/smpboot.h> Usama Arif
2023-02-21 22:33 ` [PATCH v10 3/8] cpu/hotplug: Add dynamic parallel bringup states before CPUHP_BRINGUP_CPU Usama Arif
2023-02-21 22:33 ` [PATCH v10 4/8] x86/smpboot: Reference count on smpboot_setup_warm_reset_vector() Usama Arif
2023-02-21 22:33 ` [PATCH v10 5/8] x86/smpboot: Split up native_cpu_up into separate phases and document them Usama Arif
2023-02-21 22:33 ` [PATCH v10 6/8] x86/smpboot: Support parallel startup of secondary CPUs Usama Arif
2023-02-24 5:59 ` Yuan Yao
2023-02-24 15:46 ` David Woodhouse [this message]
2023-02-24 19:16 ` [External] " Usama Arif
2023-02-21 22:33 ` [PATCH v10 7/8] x86/smpboot: Send INIT/SIPI/SIPI to secondary CPUs in parallel Usama Arif
2023-02-21 22:33 ` [PATCH v10 8/8] x86/smpboot: Serialize topology updates for secondary bringup Usama Arif
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=481bce9d04e5e36303cf14dffdf46f844aefd11a.camel@infradead.org \
--to=dwmw2@infradead.org \
--cc=arjan@linux.intel.com \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=fam.zheng@bytedance.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=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 \
--cc=yuan.yao@linux.intel.com \
/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®