[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [Patch] Fix for x86_64 boot failures due to badsegment setup for protected mode.



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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.