lkml.org 
[lkml]   [2018]   [Jan]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v1] x86/retpoline: Use lfence in the retpoline/RSB filling RSB macros
On Sat, 13 Jan 2018, Tom Lendacky wrote:

> On 1/13/2018 8:07 AM, Van De Ven, Arjan wrote:
> >>> The RSB filling macro is applicable to AMD, and, if software is unable to
> >>> verify that lfence is serializing on AMD (possible when running under a
> >>> hypervisor), the generic retpoline support will be used and, so, is also
> >>> applicable to AMD.  Change the use of pause to lfence.
> >>>
> >>> Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
> >>
> >> Conditionally-Acked-by: David Woodhouse <dwmw@amazon.co.uk>
> >
> >
> > pause is technically the "save me power" instruction
> >
> > how about a compromise where we do a double:
> >
> > pause
> > lfence
> > jmp <up>
> >
> > as sequence... that way if the branch recovery is fast, we get the performance of pause, but if it takes a while, on AMD you get the behavior of lfence?
>
> That should work on AMD.

I zapped the commit from tip for now until this discussion is resolved.

Thanks,

tglx
\
 
 \ /
  Last update: 2018-01-14 23:26    [W:0.062 / U:0.420 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site