[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v3 4/5] x86: Port the basic alternative mechanism from Linux to Xen
> -----Original Message----- > From: Jan Beulich [mailto:JBeulich@xxxxxxxx] > Sent: Tuesday, June 03, 2014 9:10 PM > To: Wu, Feng > Cc: andrew.cooper3@xxxxxxxxxx; ian.campbell@xxxxxxxxxx; > stefano.stabellini@xxxxxxxxxx; keir.xen@xxxxxxxxx; xen-devel@xxxxxxxxxxxxx; > boris.ostrovsky@xxxxxxxxxx; tim@xxxxxxx > Subject: RE: [PATCH v3 4/5] x86: Port the basic alternative mechanism from > Linux to Xen > > >>> On 03.06.14 at 15:05, <feng.wu@xxxxxxxxx> wrote: > > > > >> -----Original Message----- > >> From: Jan Beulich [mailto:JBeulich@xxxxxxxx] > >> Sent: Tuesday, June 03, 2014 6:00 PM > >> To: Wu, Feng > >> Cc: andrew.cooper3@xxxxxxxxxx; ian.campbell@xxxxxxxxxx; > >> stefano.stabellini@xxxxxxxxxx; keir.xen@xxxxxxxxx; > xen-devel@xxxxxxxxxxxxx; > >> boris.ostrovsky@xxxxxxxxxx; tim@xxxxxxx > >> Subject: Re: [PATCH v3 4/5] x86: Port the basic alternative mechanism from > >> Linux to Xen > >> > >> >>> On 30.05.14 at 10:56, <feng.wu@xxxxxxxxx> 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). > > > > BTW, is there any difference after converting alternative.o to > > alternative.init.o, since > > everything in alternative.c has already been __init__? > > Yes, there is: String literals will also get moved to .init.*. Plus > inadvertent addition of non-init code/date would get detected at > build time. > > Jan Thanks, good to know this! Feng _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |