Re: [PATCH] smp: force all cpu to boot once under maxcpus option

2019-07-24 Thread Pingfan Liu
On Mon, Jul 22, 2019 at 11:41:29AM +0200, Thomas Gleixner wrote: > On Wed, 10 Jul 2019, Pingfan Liu wrote: > > > > +static inline bool maxcpus_allowed(unsigned int cpu) > > +{ > > + /* maxcpus only takes effect during system bootup */ > > + if (smp_boot_done) > > + return true; > >

Re: [PATCH] smp: force all cpu to boot once under maxcpus option

2019-07-22 Thread Thomas Gleixner
On Wed, 10 Jul 2019, Pingfan Liu wrote: > > +static inline bool maxcpus_allowed(unsigned int cpu) > +{ > + /* maxcpus only takes effect during system bootup */ > + if (smp_boot_done) > + return true; > + if (num_online_cpus() < setup_max_cpus) > + return true;

[PATCH] smp: force all cpu to boot once under maxcpus option

2019-07-10 Thread Pingfan Liu
On x86 it's required to boot all logical CPUs at least once so that the init code can get a chance to set CR4.MCE on each CPU. Otherwise, a broadacasted MCE observing CR4.MCE=0b on any core will shutdown the machine. The option 'nosmt' has already complied with the above rule. In the case of