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

[Xen-devel] Re: Re-using the x86_emulate_memop() to perform MMIO for HVM

To: "Petersson, Mats" <Mats.Petersson@xxxxxxx>
Subject: [Xen-devel] Re: Re-using the x86_emulate_memop() to perform MMIO for HVM.
From: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Date: Thu, 4 May 2006 10:10:06 +0100
Cc: Khoa Huynh <khoa@xxxxxxxxxx>, xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Thu, 04 May 2006 02:10:20 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <907625E08839C4409CE5768403633E0BA7FC26@xxxxxxxxxxxxxxxxx>
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: <907625E08839C4409CE5768403633E0BA7FC26@xxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx

On 3 May 2006, at 15:50, Petersson, Mats wrote:

A third, easier, but less pleasing way to solve it would be retain the
current two decode/emulate code-paths, and just add everythign twice
when new scenarios are needed to be decoded - I don't quite like this
idea, but it certainly is the least amount of effort to implement!

Thoughts and comments (aside from the obvious "You should have thought
about this earlier!" ;-) would be welcome...

We need an emulator both in Xen and in the device model. The current split decode-emulate is pretty barking. My plan for now would be to copy x86_emulate.c and plumb it into qemu-dm: so we do duplicate the code but it's actually only one source file to maintain.

So, Xen would take the page fault and look up the corresponding mmio area. If it's an area corresponding to a device emulated by qemu-dm then Xen hands off the entire problem. It does not bother to decode the instruction at all. Instead it stuffs register state into the shared memory area and hands off to qemu-dm in dom0.

There are plans afoot to try using the full qemu cpu emulator. Done well, that would provide fuller and faster emulation, but there is a bigger up-front cost to getting that plumbed in correctly and even if someone runs with this plan I don't see it being completed to a high degree of robustness in the very near future.

 -- Keir


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