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] Fetching instructions after page-fault, near page bounda

To: "Petersson, Mats" <Mats.Petersson@xxxxxxx>
Subject: Re: [Xen-devel] Fetching instructions after page-fault, near page boundary?
From: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Date: Fri, 2 Jun 2006 19:50:34 +0100
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Fri, 02 Jun 2006 11:50:53 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <907625E08839C4409CE5768403633E0BA7FCDF@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: <907625E08839C4409CE5768403633E0BA7FCDF@xxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx

On 2 Jun 2006, at 18:20, Petersson, Mats wrote:

Just try re-executing the instruction (i.e. directly return
to the guest). If the page has become unmapped then the
processor should handle the fault on instruction fetch.

Ok, that approach makes more sense than my silly ideas of counting
instruction bytes... And hopefully the code that removed our very much
needed page will eventually let us actually emulate the instruction at
some point, without too many re-executions... ;-)

Bear in mind that we need to be able to inject page faults into the guest from the emulator anyway, for other reasons. For example, consider INSB/OUTSB -- the memory area being transferred to/from may be paged out. Current HVM MMIO code is rather lax about dealing with this (i.e., it doesn't -- it ignores error returns from gva_to_gpa(), which itself has a bogus error value anyway (0 is a valid pa)). Given we need the code, we may just want to inject faults for instruction-fetch errors too, but we do have a choice for those.

 -- Keir


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