RE: [PATCH 3/5] x86, AMD: cleanup: merge common code in earlymicrocode loading

From: Yu, Fenghua
Date: Fri Aug 09 2013 - 14:38:27 EST


> From: Borislav Petkov [mailto:bp@xxxxxxxxx]
> Sent: Thursday, August 08, 2013 10:49 AM
> On Wed, Aug 07, 2013 at 11:34:01PM +0000, Yu, Fenghua wrote:
> > > This check won't work when CPU0 is hot added. So we need to find a
> > > better way to fix this.
> > >
> >
> > Maybe need to change the check as follows to take care of CPU0 hot
> add case?
> >
> > if ((cpu && system_state == SYSTEM_BOOTING) || (system_state ==
> SYSTEM_RUNNING))
> > load_ucode_ap();
>
> Ok, just for my own understanding - I haven't played with cpu hotadd
> yet
> so when you do this, is the hot-added socket containing the BSP not cpu
> 0 anymore?
>
> Or when you hot-remove the socket containing the BSP, another AP
> becomes
> the BSP and preserves its old number?

When BSP is logically hot removed/offlined, there is no BSP any more in Linux, i.e. cpu0 is not in online mask. CPU0 can be logically hot added back again.

Currently kernel doesn't support physically hot remove CPU0 yet.

Thanks.

-Fenghua
N‹§²æìr¸›yúèšØb²X¬¶ÇvØ^–)Þ{.nÇ+‰·¥Š{±‘êçzX§¶›¡Ü}©ž²ÆzÚ&j:+v‰¨¾«‘êçzZ+€Ê+zf£¢·hšˆ§~†­†Ûiÿûàz¹®w¥¢¸?™¨è­Ú&¢)ßf”ù^jÇy§m…á@A«a¶Úÿ 0¶ìh®å’i