From: "Jan Beulich" <JBeulich@suse.com>
To: "Mukesh Rathor" <mukesh.rathor@oracle.com>
Cc: "xen-devel" <xen-devel@lists.xen.org>, <konrad.wilk@oracle.com>,
<linux-kernel@vger.kernel.org>
Subject: Re: [Xen-devel] [PATCH] PVH: vcpu info placement, load selectors, and remove debug printk.
Date: Tue, 04 Jun 2013 09:27:03 +0100 [thread overview]
Message-ID: <51ADC0F702000078000DAF5A@nat28.tlf.novell.com> (raw)
In-Reply-To: <1370306612-12984-1-git-send-email-mukesh.rathor@oracle.com>
>>> On 04.06.13 at 02:43, Mukesh Rathor <mukesh.rathor@oracle.com> wrote:
> @@ -1327,6 +1329,18 @@ static void __init xen_setup_stackprotector(void)
> /* PVH TBD/FIXME: investigate setup_stack_canary_segment */
> if (xen_feature(XENFEAT_auto_translated_physmap)) {
> switch_to_new_gdt(0);
> +
> + /* xen started us with null selectors. load them now */
> + __asm__ __volatile__ (
> + "movl %0,%%ds\n"
> + "movl %0,%%ss\n"
> + "pushq %%rax\n"
> + "leaq 1f(%%rip),%%rax\n"
> + "pushq %%rax\n"
> + "retfq\n"
> + "1:\n"
> + : : "r" (__KERNEL_DS), "a" (__KERNEL_CS) : "memory");
> +
I can see why you want CS to be reloaded (and CS, other than the
comment says, clearly hasn't been holding a null selector up to here.
I can't immediately see why you'd need SS to be other than null, and
it completely escapes me why you'd need to DS (but not ES) to be
non-null.
Furthermore, is there any reason why you use "retfq" (Intel syntax)
when all assembly code otherwise uses AT&T syntax (the proper
equivalent here would be "lretq")?
And finally, please consistently use %<number> (which, once
fixed, will make clear that the second constraint really can be "r"),
and avoid using suffixes on moves to/from selector registers
(which, once fixed, will make clear that at least the first constraint
really can be relaxed to "rm").
Jan
next prev parent reply other threads:[~2013-06-04 8:27 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-04 0:43 Mukesh Rathor
2013-06-04 8:27 ` Jan Beulich [this message]
2013-06-04 21:53 ` [Xen-devel] " Mukesh Rathor
2013-06-05 7:03 ` Jan Beulich
2013-06-05 19:17 ` Mukesh Rathor
2013-06-06 6:35 ` Jan Beulich
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=51ADC0F702000078000DAF5A@nat28.tlf.novell.com \
--to=jbeulich@suse.com \
--cc=konrad.wilk@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mukesh.rathor@oracle.com \
--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
all inboxes | Powered by JetHome®