From: "Jan Beulich" Subject: Re: [PATCH v3 4/5] x86: Port the basic alternative mechanism from Linux to Xen Date: Tue, 03 Jun 2014 11:00:11 +0100 Message-ID: <538DB8CB02000078000173D7@mail.emea.novell.com> References: <1401440185-11266-1-git-send-email-feng.wu@intel.com> <1401440185-11266-5-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: <1401440185-11266-5-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: ian.campbell@citrix.com, andrew.cooper3@citrix.com, tim@xen.org, xen-devel@lists.xen.org, keir.xen@gmail.com, stefano.stabellini@citrix.com, boris.ostrovsky@oracle.com List-Id: xen-devel@lists.xenproject.org >>> On 30.05.14 at 10:56, wrote: > +#ifdef K8_NOP1 > +static const unsigned char k8nops[] __initconst = { > + K8_NOP1, > + K8_NOP2, > + K8_NOP3, > + K8_NOP4, > + K8_NOP5, > + K8_NOP6, > + K8_NOP7, > + K8_NOP8 > +}; > +static const unsigned char * const k8_nops[ASM_NOP_MAX+1] __initconst = { > + NULL, > + k8nops, > + k8nops + 1, > + k8nops + 1 + 2, > + k8nops + 1 + 2 + 3, > + k8nops + 1 + 2 + 3 + 4, > + k8nops + 1 + 2 + 3 + 4 + 5, > + k8nops + 1 + 2 + 3 + 4 + 5 + 6, > + k8nops + 1 + 2 + 3 + 4 + 5 + 6 + 7 > +}; > +#endif > + > +#ifdef P6_NOP1 > +static const unsigned char p6nops[] __initconst = { > + P6_NOP1, > + P6_NOP2, > + P6_NOP3, > + P6_NOP4, > + P6_NOP5, > + P6_NOP6, > + P6_NOP7, > + P6_NOP8 > +}; > +static const unsigned char * const p6_nops[ASM_NOP_MAX+1] __initconst = { > + NULL, > + p6nops, > + p6nops + 1, > + p6nops + 1 + 2, > + p6nops + 1 + 2 + 3, > + p6nops + 1 + 2 + 3 + 4, > + p6nops + 1 + 2 + 3 + 4 + 5, > + p6nops + 1 + 2 + 3 + 4 + 5 + 6, > + p6nops + 1 + 2 + 3 + 4 + 5 + 6 + 7 > +}; > +#endif The uses of __initconst together with -fPIC cause build problems on older gcc. I fixed this up in a temporary way, but put a work item on my todo list to deal with this properly while at once converting alternative.o to alternative.init.o (as the file consists of only init code and data). Jan