From: "Jan Beulich" Subject: Re: [PATCH v8 2/7] x86: Clear AC bit in RFLAGS to protect Xen itself by SMAP Date: Fri, 09 May 2014 10:32:16 +0100 Message-ID: <536CBCC00200007800010D2A@mail.emea.novell.com> References: <1399613682-5411-1-git-send-email-feng.wu@intel.com> <1399613682-5411-3-git-send-email-feng.wu@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1399613682-5411-3-git-send-email-feng.wu@intel.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Feng Wu Cc: kevin.tian@intel.com, ian.campbell@citrix.com, andrew.cooper3@citrix.com, eddie.dong@intel.com, xen-devel@lists.xen.org, jun.nakajima@intel.com List-Id: xen-devel@lists.xenproject.org >>> On 09.05.14 at 07:34, wrote: > --- a/xen/include/asm-x86/asm_defns.h > +++ b/xen/include/asm-x86/asm_defns.h > @@ -190,7 +190,12 @@ static inline void stac(void) > #endif > > #ifdef __ASSEMBLY__ > -.macro SAVE_ALL > +.macro SAVE_ALL op=0 > +.if \op == CLAC > + ASM_CLAC > +.elseif \op == STAC > + ASM_STAC > +.endif If this really works with all assembler versions we support, that's of course fine; I wouldn't have thought this is being accepted by gas. Jan