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] [RFC][PATCH] Emulate instructions in vm86 mode

To: <Keir.Fraser@xxxxxxxxxxxx>,<xen-devel@xxxxxxxxxxxxxxxxxxx>, <bastian@xxxxxxxxxxxx>
Subject: Re: [Xen-devel] [RFC][PATCH] Emulate instructions in vm86 mode
From: "Jan Beulich" <jbeulich@xxxxxxxxxx>
Date: Fri, 08 Sep 2006 18:00:25 +0100
Delivery-date: Fri, 08 Sep 2006 10:01:14 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
>>> Keir Fraser <Keir.Fraser@xxxxxxxxxxxx> 09/07/06 2:42 PM >>>
>On 7/9/06 10:51, "Bastian Blank" <bastian@xxxxxxxxxxxx> wrote:
>
>> This patch fixes the emulation of instructions in vm86 mode. It fetches
>> them using cs and eip instead of only eip. This makes it at least
>> possible to use the i945GM vesa bios from the running system.
>> 
>> I'm not sure if this is the correct fix or if we should call the gpf
>> handler of the running system. At least the support in linux reports
>> traps back to the userspace caller which is not possible if emulated in
>> xen.
>
>There are also data operands of some instructions that may need fixing
>(INS/OUTS). What happens if you just bail to the guest's GPF handler if in
>vm86 mode? I think the libint10 library in userspace will emulate all these
>instructions itself.

If the vm86 code isn't running with an i/o bitmap permitting access (which
supposedly libint10 doesn't do), all i/o related faults should alread be
reflected back to the guest, shouldn't they? If otoh there was permission
granted from the kernel, then we shouldn't assume that code is prepared
to deal with gp faults from respective port accesses.

However, the original patch would, if to be integrated, in my opinion need
quite a bit of additional work - it should honor non-zero segment bases
generally, and it should do proper limit checking for non-flat segments.

Jan

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