Re: [patch 6/6] x86/smp: Put CPUs into INIT on shutdown if possible

From: Ashok Raj
Date: Sat Jun 03 2023 - 16:59:18 EST


On Sat, Jun 03, 2023 at 10:07:04PM +0200, Thomas Gleixner wrote:
> Parking CPUs in a HLT loop is not completely safe vs. kexec() as HLT can
> resume execution due to NMI, SMI and MCE, which has the same issue as the
> MWAIT loop.
>
> Kicking the secondary CPUs into INIT makes this safe against NMI and SMI.
>
> A broadcast MCE will take the machine down, but a broadcast MCE which makes
> HLT resume and execute overwritten text, pagetables or data will end up in
> a disaster too.
>
> So chose the lesser of two evils and kick the secondary CPUs into INIT
> unless the system has installed special wakeup mechanisms which are not
> using INIT.
>
> Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxxxxx>

For the whole series.

Reviewed-by: Ashok Raj <ashok.raj@xxxxxxxxx>