Re: [PATCH] x86: Fix override new_cpu_data.x86 with 486

2013-06-28 Thread Borislav Petkov
On Fri, Jun 28, 2013 at 08:56:42AM +0800, Wang YanQing wrote: > > Right, so this patch is correct and it fixes the small window where we > > run with family == 4 before cpu_detect but the commit message needs a > > bit massaging before it gets applied. > > I think it fixes the window where we run

Re: [PATCH] x86: Fix override new_cpu_data.x86 with 486

2013-06-27 Thread Wang YanQing
On Thu, Jun 27, 2013 at 12:54:35PM +0200, Borislav Petkov wrote: > On Thu, Jun 27, 2013 at 12:26:40AM +0800, Wang YanQing wrote: > > > > We should set X86 to 486 before use cpuid > > to detect the cpu type, if we set X86 to 486 > > after cpuid, then we will get 486 for ever. > > So not "for ever"

Re: [PATCH] x86: Fix override new_cpu_data.x86 with 486

2013-06-27 Thread Borislav Petkov
On Thu, Jun 27, 2013 at 12:26:40AM +0800, Wang YanQing wrote: > > We should set X86 to 486 before use cpuid > to detect the cpu type, if we set X86 to 486 > after cpuid, then we will get 486 for ever. So not "for ever" but until cpu_detect runs. > > Yes, we will correct this in early_cpu_init,

Re: [PATCH] x86: Fix override new_cpu_data.x86 with 486

2013-06-26 Thread Borislav Petkov
On Thu, Jun 27, 2013 at 12:26:40AM +0800, Wang YanQing wrote: > > We should set X86 to 486 before use cpuid > to detect the cpu type, if we set X86 to 486 > after cpuid, then we will get 486 for ever. Yep, that should be fixed, AFAICT. But it is too late for me in the day to actually stare at asm

[PATCH] x86: Fix override new_cpu_data.x86 with 486

2013-06-26 Thread Wang YanQing
We should set X86 to 486 before use cpuid to detect the cpu type, if we set X86 to 486 after cpuid, then we will get 486 for ever. Yes, we will correct this in early_cpu_init, but it is still a wrong behavior, right? So just fix it. I also find maybe we can delete the new_cpu_data, because we wi