[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <463B55F6.5030306@zytor.com>
Date: Fri, 04 May 2007 08:49:10 -0700
From: "H. Peter Anvin" <hpa@...or.com>
To: Rusty Russell <rusty@...tcorp.com.au>
CC: "Eric W. Biederman" <ebiederm@...ssion.com>,
Andi Kleen <ak@...e.de>, Chris Wright <chrisw@...s-sol.org>,
Jeremy Fitzhardinge <jeremy@...p.org>,
Zachary Amsden <zach@...are.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Linus Torvalds <torvalds@...ux-foundation.org>,
lkml - Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [RFC PATCH 3/3] boot bzImages under paravirt
Rusty Russell wrote:
>
> It was a PITA because we can't just load $0x18 into %ss: it has to be
> $0x19. I started doing it (read %cs, mask off bottom 2 bits, orl
> __BOOT_DS), but between that extra code and the extra code to then
> change segments back... well, we have to skip the cli anyway so it was
> easy to skip them all.
>
> I think Jeremy said Xen doesn't start on the boot descriptors either. I
> have to wonder why we don't just run on the boot descriptors forever
> (#define __KERNEL_DS __BOOT_DS etc)?
>
You can't do that once you define your own layout, or you introduce a
nasty intermodule dependency which shouldn't exist.
The rule should be:
- You MUST NOT reload segments before LGDT.
(One can possibly get away with declaring that DS = CS+8 by
protocol and load dynamic values, but that's not a good thing.)
- After LGDT, you MUST load your own segment values.
Anything else is just broken.
-hpa
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists