From: Keir Fraser Subject: Re: Re: Xen 3.2 and Big Real Mode support? Date: Wed, 06 Feb 2008 08:32:23 +0000 Message-ID: References: <20080206092030.6ec099c9@frecb000711> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20080206092030.6ec099c9@frecb000711> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Guillaume Thouvenin , xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org On 6/2/08 08:20, "Guillaume Thouvenin" wrote: >> By the way, this is now fixed with tip of the xen-unstable tree (changeset >> 16980), obtainable from http://xenbits.xensource.com/staging/xen-unstable.hg > > Waow. I don't understand everything (and especially how you find that > the problem was here) but it works now. I found the bug because I tracked down the real-mode -> protected-mode transition code in the SuSE bootloader and it did something like this at start of protected mode: mov %ss,%eax shl $4,%eax add %eax,%esp mov ,%bx mov %bx,%ss ..... The problem was that the bottom bits of %ss got cleared on exit from real mode, to satisfy vmenter checks that the processor does. But this deliberate corruption of state can of course affect program execution and in this case we end up with a bad stack pointer! So the fix had to be to emulate far enough into protected mode that %cs and %ss both get reloaded with valid protected-mode segment data. -- Keir