From: "Jan Beulich" <JBeulich@suse.com>
To: Feng Wu <feng.wu@intel.com>
Cc: "ian.campbell@citrix.com" <ian.campbell@citrix.com>,
"andrew.cooper3@citrix.com" <andrew.cooper3@citrix.com>,
"tim@xen.org" <tim@xen.org>,
"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>,
"keir.xen@gmail.com" <keir.xen@gmail.com>,
"stefano.stabellini@citrix.com" <stefano.stabellini@citrix.com>,
"boris.ostrovsky@oracle.com" <boris.ostrovsky@oracle.com>
Subject: Re: [PATCH v3 4/5] x86: Port the basic alternative mechanism from Linux to Xen
Date: Tue, 03 Jun 2014 14:10:22 +0100 [thread overview]
Message-ID: <538DE55E0200007800017603@mail.emea.novell.com> (raw)
In-Reply-To: <E959C4978C3B6342920538CF579893F001FE55D4@SHSMSX104.ccr.corp.intel.com>
>>> On 03.06.14 at 15:05, <feng.wu@intel.com> wrote:
>
>> -----Original Message-----
>> From: Jan Beulich [mailto:JBeulich@suse.com]
>> Sent: Tuesday, June 03, 2014 6:00 PM
>> To: Wu, Feng
>> Cc: andrew.cooper3@citrix.com; ian.campbell@citrix.com;
>> stefano.stabellini@citrix.com; keir.xen@gmail.com; xen-devel@lists.xen.org;
>> boris.ostrovsky@oracle.com; tim@xen.org
>> 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@intel.com> 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
next prev parent reply other threads:[~2014-06-03 13:10 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-30 8:56 [PATCH v3 0/5] x86: Use alternative mechanism to define CLAC/STAC Feng Wu
2014-05-30 8:56 ` [PATCH v3 1/5] Use __stringify() as the only method for performing preprocessor stringificaion Feng Wu
2014-05-30 11:35 ` Jan Beulich
2014-06-03 0:42 ` Wu, Feng
2014-06-03 12:37 ` Wu, Feng
2014-06-03 13:05 ` Jan Beulich
2014-06-03 13:13 ` Wu, Feng
2014-05-30 8:56 ` [PATCH v3 2/5] x86: Add definitions for NOP operation Feng Wu
2014-05-30 8:56 ` [PATCH v3 3/5] x86: Make set_nmi_callback return the old nmi callback Feng Wu
2014-05-30 8:56 ` [PATCH v3 4/5] x86: Port the basic alternative mechanism from Linux to Xen Feng Wu
2014-06-03 10:00 ` Jan Beulich
2014-06-03 10:13 ` Wu, Feng
2014-06-03 10:25 ` Jan Beulich
2014-06-03 10:35 ` Wu, Feng
2014-06-03 10:51 ` Jan Beulich
2014-06-03 11:42 ` Wu, Feng
2014-06-03 11:59 ` Jan Beulich
2014-06-03 13:05 ` Wu, Feng
2014-06-03 13:10 ` Jan Beulich [this message]
2014-06-03 13:27 ` Wu, Feng
2014-05-30 8:56 ` [PATCH v3 5/5] x86: Use alternative mechanism to define CLAC/STAC Feng Wu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=538DE55E0200007800017603@mail.emea.novell.com \
--to=jbeulich@suse.com \
--cc=andrew.cooper3@citrix.com \
--cc=boris.ostrovsky@oracle.com \
--cc=feng.wu@intel.com \
--cc=ian.campbell@citrix.com \
--cc=keir.xen@gmail.com \
--cc=stefano.stabellini@citrix.com \
--cc=tim@xen.org \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).