From: "Jan Beulich" Subject: Re: [PATCH 3/3] x86: Use alternative mechanism to define CLAC/STAC Date: Tue, 27 May 2014 16:42:21 +0100 Message-ID: <5384CE7D020000780001602D@mail.emea.novell.com> References: <1401089273-16425-1-git-send-email-feng.wu@intel.com> <1401089273-16425-4-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: <1401089273-16425-4-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: keir.xen@gmail.com, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org >>> On 26.05.14 at 09:27, wrote: > -#define ASM_STAC ASM_AC(STAC) > -#define ASM_CLAC ASM_AC(CLAC) > +#define ASM_CLAC \ > + 661: ASM_NOP3; \ > + .pushsection .altinstr_replacement, "ax"; \ > + 662: __ASM_CLAC; \ > + .popsection; \ > + .pushsection .altinstructions, "a"; \ > + altinstruction_entry 661b, 662b, X86_FEATURE_SMAP, 3, 3; \ > + .popsection > + > +#define ASM_STAC \ > + 661: ASM_NOP3; \ > + .pushsection .altinstr_replacement, "ax"; \ > + 662: __ASM_STAC; \ > + .popsection; \ > + .pushsection .altinstructions, "a"; \ > + altinstruction_entry 661b, 662b, X86_FEATURE_SMAP, 3, 3; \ > + .popsection I made the same comment on your original SMAP patches already: There's no point in having all this duplication. All you want to replace if ASM_AC(). Jan