Hi Arjan, > -----Original Message----- > From: Van De Ven, Arjan [mailto:arjan.van.de....@intel.com] > Sent: Saturday, January 13, 2018 10:16 PM > To: David Woodhouse <dw...@infradead.org>; Kumar, Venkataramanan > <venkataramanan.ku...@amd.com>; H.J. Lu <hjl.to...@gmail.com>; Jeff > Law <l...@redhat.com>; Paul Turner <p...@google.com>; Mallick, Asit K > <asit.k.mall...@intel.com> > Cc: Nagarajan, Muthu kumar raj <muthukumarraj.nagara...@amd.com>; > GCC Patches <gcc-patches@gcc.gnu.org>; Martin Jambor > <mjam...@suse.cz>; Uros Bizjak (ubiz...@gmail.com) > <ubiz...@gmail.com>; Jan Hubicka <j...@suse.de>; Dharmakan, Rohit arul raj > <rohitarulraj.dharma...@amd.com> > Subject: RE: [PATCH 2/5] x86: Add -mindirect-branch-loop= > > > > If everyone is ok, my suggestion is to use "lfence" as the default > > > loop filler for retpoline. > > can we do BOTH a pause and lfence. > (that way on cpu's where pause is the power stop, it works, and on cpus > where it's a fallthrough (AMD) it goes to the lfence) >
I checked with our Architect. Having just "pause" is the concern. It should also be fine for AMD to use "pause" followed by "lfence" in the loop of retpoline. Regards, Venkat.