[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aca16663465ff579da076bb66f851ff71072ef8d.camel@intel.com>
Date: Tue, 9 Jan 2024 03:04:15 +0000
From: "Huang, Kai" <kai.huang@...el.com>
To: "kirill.shutemov@...ux.intel.com" <kirill.shutemov@...ux.intel.com>
CC: "kexec@...ts.infradead.org" <kexec@...ts.infradead.org>,
"linux-coco@...ts.linux.dev" <linux-coco@...ts.linux.dev>,
"ashish.kalra@....com" <ashish.kalra@....com>, "dave.hansen@...ux.intel.com"
<dave.hansen@...ux.intel.com>, "thomas.lendacky@....com"
<thomas.lendacky@....com>, "Hunter, Adrian" <adrian.hunter@...el.com>,
"Reshetova, Elena" <elena.reshetova@...el.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"seanjc@...gle.com" <seanjc@...gle.com>, "mingo@...hat.com"
<mingo@...hat.com>, "bhe@...hat.com" <bhe@...hat.com>, "tglx@...utronix.de"
<tglx@...utronix.de>, "Nakajima, Jun" <jun.nakajima@...el.com>,
"peterz@...radead.org" <peterz@...radead.org>, "Edgecombe, Rick P"
<rick.p.edgecombe@...el.com>, "bp@...en8.de" <bp@...en8.de>,
"rafael@...nel.org" <rafael@...nel.org>,
"sathyanarayanan.kuppuswamy@...ux.intel.com"
<sathyanarayanan.kuppuswamy@...ux.intel.com>, "x86@...nel.org"
<x86@...nel.org>
Subject: Re: [PATCHv5.1 14/16] x86/smp: Add smp_ops.stop_this_cpu() callback
> > > @@ -835,6 +835,13 @@ void __noreturn stop_this_cpu(void *dummy)
> > > */
> > > cpumask_clear_cpu(cpu, &cpus_stop_mask);
> > >
> > > +#ifdef CONFIG_SMP
> > > + if (smp_ops.stop_this_cpu) {
> > > + smp_ops.stop_this_cpu();
> > > + unreachable();
> > > + }
> > > +#endif
> >
> > If I read correctly this will result in stop_this_cpu() having different
> > behaviour for SMP and !SMP build for TDX guest. For example, AFAICT
> > machine_halt() also calls stop_this_cpu() on local cpu after it stops other
> > cpus. So for the local cpu, in SMP build it will calls into BIOS's reset vector
> > but in !SMP it will call native_halt().
>
> It doesn't make a difference in practice: both halt and giving CPU to
> BIOS will be unrecoverable operation. Both are equally acceptable for
> machine_halt().
>
OK fair enough. :-)
Powered by blists - more mailing lists