Re: [PATCH] x86/smpboot: check if CLFLUSH is actually necessary

2015-02-12 Thread Borislav Petkov
On Wed, Feb 11, 2015 at 04:10:12PM -0700, Scotty Bauer wrote: > Do you get the same effect? Sure, but is the previous way the right > way to do it? In my opinion no, but I'm not the one merging code > its up to someone more experienced to determine if the change is > warranted. The change is slight

Re: [PATCH] x86/smpboot: check if CLFLUSH is actually necessary

2015-02-11 Thread Scotty Bauer
On 02/11/2015 02:55 PM, H. Peter Anvin wrote: > On 01/30/2015 01:26 PM, Scotty Bauer wrote: >> mwait_play_dead previously issued a CLFLUSH to work around a bug on >> some xeon processors. We can now determine if the CPU is a buggy CPU. >> This patch checks if if we're on a buggy CPU which allows n

Re: [PATCH] x86/smpboot: check if CLFLUSH is actually necessary

2015-02-11 Thread H. Peter Anvin
On 01/30/2015 01:26 PM, Scotty Bauer wrote: > mwait_play_dead previously issued a CLFLUSH to work around a bug on > some xeon processors. We can now determine if the CPU is a buggy CPU. > This patch checks if if we're on a buggy CPU which allows non-buggy > cpu's to eliminate the CLFLUSH. Here is

Re: [PATCH] x86/smpboot: check if CLFLUSH is actually necessary

2015-02-11 Thread H. Peter Anvin
On 01/30/2015 01:26 PM, Scotty Bauer wrote: > mwait_play_dead previously issued a CLFLUSH to work around a bug on > some xeon processors. We can now determine if the CPU is a buggy CPU. > This patch checks if if we're on a buggy CPU which allows non-buggy > cpu's to eliminate the CLFLUSH. Here is

Re: [PATCH] x86/smpboot: check if CLFLUSH is actually necessary

2015-02-06 Thread Borislav Petkov
On Sat, Jan 31, 2015 at 12:31:42AM +0100, Borislav Petkov wrote: > asm volatile(ALTERNATIVE(ASM_NOP3, "clflush %[p]", > X86_BUG_CLFLUSH_MONITOR) > : [p] "+m" (*mwait_ptr)); > > Totally untested though - it is supposed to show the idea only. Yeah, here's a working diff,

Re: [PATCH] x86/smpboot: check if CLFLUSH is actually necessary

2015-01-30 Thread Borislav Petkov
On Fri, Jan 30, 2015 at 02:26:17PM -0700, Scotty Bauer wrote: > mwait_play_dead previously issued a CLFLUSH to work around a bug on some xeon > processors. We can now determine if the CPU is a buggy CPU. This patch checks > if if we're on a buggy CPU which allows non-buggy cpu's to eliminate the

[PATCH] x86/smpboot: check if CLFLUSH is actually necessary

2015-01-30 Thread Scotty Bauer
mwait_play_dead previously issued a CLFLUSH to work around a bug on some xeon processors. We can now determine if the CPU is a buggy CPU. This patch checks if if we're on a buggy CPU which allows non-buggy cpu's to eliminate the CLFLUSH. >From 3da1be5c998a8d51f98fdba09b3cb477526c5ff3 Mon Se