WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [Patch] Fix for x86_64 boot failures due to badsegment s

To: "Jiang, Yunhong" <yunhong.jiang@xxxxxxxxx>
Subject: Re: [Xen-devel] [Patch] Fix for x86_64 boot failures due to badsegment setup for protected mode.
From: Steven Rostedt <srostedt@xxxxxxxxxx>
Date: Fri, 10 Nov 2006 10:26:48 -0500
Cc: "Yu, Wilfred" <wilfred.yu@xxxxxxxxx>, "Xin, Xiaohui" <xiaohui.xin@xxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx, "Li, Susie" <susie.li@xxxxxxxxx>, "Li, Xin B" <xin.b.li@xxxxxxxxx>, Herbert Xu <herbert.xu@xxxxxxxxxx>, Keir Fraser <keir@xxxxxxxxxxxxx>
Delivery-date: Fri, 10 Nov 2006 07:27:07 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <391BF3CDD2DC0848B40ACB72FA97AD596CE372@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <391BF3CDD2DC0848B40ACB72FA97AD596CE372@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 1.5.0.4 (X11/20060614)
Jiang, Yunhong wrote:
> This patch caused one problem.
> 
> If the guest change the DS/SS etc between it set cr0.PE and the jump 
> instruction.
> Considering following code:
>    mov eax, cr0
>    or eax, 0x11
>   mov cr0, eax                ---> here enable PE, and old_ctx.ds is cleard

Isn't this where the vmxassist starts emulating?

>    mov ax, 0x0020
>    mov ds, ax         -> changes the DS here

So we only need to emulate the above change.

>   jmp pword ptr [edi + 0x60]
>   mov ax, word ptr [bx + 0x00a8]
> 
> The vmxassit clear the oldctx.ds_sel when guest enable PE, and when guest 
> executed the mov ds, ax, the content on oldctx is not updated. Later when the 
> last instruction, the ds is infact 0x0, not the 0x20 as guest hoped.
> 
> This issue is in fact not caused entirely by this change, since we should 
> emulate all instructions between the set cr0.PE and the jump instruction. But 
> because the "mov ds, ax" is in fact executed by guest, not by vmxassist, it 
> do cause problem for us.

Are you sure about that? I thought vmxassist stated full software
emulation as soon as PE was set.

-- Steve


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel