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] add mov instruction decoder inprotected toreal m

To: "Jan Beulich" <jbeulich@xxxxxxxxxx>
Subject: RE: [Xen-devel] [PATCH] add mov instruction decoder inprotected toreal mode in vmxassist
From: "Li, Xin B" <xin.b.li@xxxxxxxxx>
Date: Tue, 3 Jul 2007 17:16:59 +0800
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Tue, 03 Jul 2007 02:15:26 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <468A24EC.76E4.0078.0@xxxxxxxxxx>
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: <B30DA1341B0CFA4893EF8A36B40B5C5D0155BA88@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> <468A24EC.76E4.0078.0@xxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: Ace9TBqx+yGjEvokQYSuk7yHajjabAAAL3cQ
Thread-topic: [Xen-devel] [PATCH] add mov instruction decoder inprotected toreal mode in vmxassist
>This is what I really don't like about decoder adjustments: 
>Even when changes for a certain instruction type are found necessary,
no care is 
>taken that similar instructions are also updated/added. In this case,
for 
>instance, you add the register destination/source case for opcode
0x89/0x8B, but the 
>same adjustments aren't made for opcode 0x88/0x8A. This is calling for
future 
>problems, as much as e.g. the absence of emulation of opcode 0xC7
despite 
>present emulation of 0xC6. I'm not going to continue, but I suppose you
get my point.

A complete, maybe perfect, decoder, that's also my ultimate goal :-).

>
>Also, how come that the mode/address size conditions are different for
>0x88/0x8A versus 0x89/0x8B (they were identical so far for 0x88, 0x8A,
and
>0x8B, with some extra code for 0x89)?

I don't expect 0x89/0x8B (movb) will be used in switching from protected
mode to real mode.

Intel SDM says, once software changes CR0.PE, it should *immediately*
use a long jump instruction to finish the mode switching between
real-address mode and protected mode. But this is not strictly obeyed,
and this is why I added the mov decoder here.

I will prefer to keep the VMXAssist decoder relatively small.

-Xin

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

<Prev in Thread] Current Thread [Next in Thread>