mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Brian Gerst <brgerst@gmail.com>
To: Cyrill Gorcunov <gorcunov@gmail.com>
Cc: Christian Kujau <lists@nerdbynature.de>,
	"H. Peter Anvin" <hpa@zytor.com>,
	Jeremy Fitzhardinge <jeremy@goop.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: 2.6.33-rc2: Xen/Guest switching to user mode with no user page  tables
Date: Sat, 9 Jan 2010 20:50:04 -0500	[thread overview]
Message-ID: <73c1f2161001091750y67a852dfk7539021dcc82fa1f@mail.gmail.com> (raw)
In-Reply-To: <20100108215039.GD4967@lenovo>

On Fri, Jan 8, 2010 at 4:50 PM, Cyrill Gorcunov <gorcunov@gmail.com> wrote:
> On Thu, Jan 07, 2010 at 11:30:46AM -0800, Christian Kujau wrote:
>> On Thu, 7 Jan 2010 at 11:19, H. Peter Anvin wrote:
>> > The big difference between the code before and after this commit is that
>> > before, kernel_thread() would initialize the pt_regs structure with
>> > whatever state happened to be passed into it by the caller, whereas
>> > afterwards it is initialized to zero.
>>
>> To be honest, bisection was kinda hazy in the last step (see my previous
>> mails), but from looking at the bisection log, it's definitely one of
>> your/Brians commit (sorry!), so it may be 3bd95dfb in combination with the
>> other 4 changes. However, only with 3bd95dfb applied, the DomU wouldn't
>> start at all. With the only other patches applied, the DomU would start,
>> and then die with a GPF.
>>
>> Christian.
>> --
>> BOFH excuse #191:
>>
>> Just type 'mv * /dev/null'.
>>
>
> OK, perhaps the patch below is not _that_ stupid so I
> would like to get it reviewed and tested if possible.
> Just a thought. Wonder if it help but definitely it will
> not harm anyway :)
>
>        -- Cyrill
> ---
> x86: kernel_thread -- initialize SS to a known state
>
> Before the kernel_thread was converted into "C" we had
> pt_regs::ss set to __KERNEL_DS (by SAVE_ALL asm macro).
>
> Though I must admit I didn't find any *explicit* load of
> %ss from this structure the better to be on a safe side
> and set it to a known value.

It shouldn't make any difference, but maybe Xen is doing something
subtle.  In 64-bit mode the %ss segment register is supposed to be
ignored, which is why it is left set to zero.  It works properly on
real hardware.  It can't hurt anything to put __KERNEL_DS back in, but
I'd just like to know why Xen requires it if this does fix it.

--
Brian Gerst

  parent reply	other threads:[~2010-01-10  1:50 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-06  1:03 Christian Kujau
2010-01-06  3:38 ` Jeremy Fitzhardinge
2010-01-06  3:48   ` Christian Kujau
2010-01-06  5:14     ` Jeremy Fitzhardinge
2010-01-06 11:06   ` Christian Kujau
2010-01-06 11:21     ` Cyrill Gorcunov
2010-01-06 12:43       ` Christian Kujau
2010-01-07 19:06         ` Christian Kujau
2010-01-07 19:20           ` Cyrill Gorcunov
2010-01-07 19:31             ` Christian Kujau
2010-01-07 19:34               ` Cyrill Gorcunov
2010-01-07 19:19         ` H. Peter Anvin
2010-01-07 19:30           ` Christian Kujau
2010-01-08 21:50             ` Cyrill Gorcunov
2010-01-09 23:55               ` Christian Kujau
2010-01-10  1:50               ` Brian Gerst [this message]
2010-01-10  8:09                 ` Cyrill Gorcunov
2010-01-10 12:59                   ` Ian Campbell
2010-01-10 13:36                     ` Cyrill Gorcunov
2010-01-10 13:49                       ` Cyrill Gorcunov
2010-01-10 14:05                         ` Ian Campbell
2010-01-15  8:36                     ` Christian Kujau
2010-01-15 11:29                       ` Ian Campbell
2010-01-15 12:03                         ` Cyrill Gorcunov
2010-01-15 12:00                       ` Cyrill Gorcunov

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=73c1f2161001091750y67a852dfk7539021dcc82fa1f@mail.gmail.com \
    --to=brgerst@gmail.com \
    --cc=gorcunov@gmail.com \
    --cc=hpa@zytor.com \
    --cc=jeremy@goop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lists@nerdbynature.de \
    /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®