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/
Home Products Support Community News


Re: [Xen-devel] trap/interrupt gate for hypercall

To: "Tian, Kevin" <kevin.tian@xxxxxxxxx>, Keir Fraser <keir@xxxxxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] trap/interrupt gate for hypercall
From: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Date: Wed, 16 May 2007 07:50:31 +0100
Cc: "Liu, Jinsong" <jinsong.liu@xxxxxxxxx>
Delivery-date: Tue, 15 May 2007 23:46:53 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <D470B4E54465E3469E2ABBC5AFAC390F013B1E08@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
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
Thread-index: AceW/1gtu6fdM4mZSxqwxNTDwzvRGgAAqkSIAAAj7oAAANfAdwAYZubwAAe8x+Y=
Thread-topic: [Xen-devel] trap/interrupt gate for hypercall
User-agent: Microsoft-Entourage/
On 16/5/07 04:17, "Tian, Kevin" <kevin.tian@xxxxxxxxx> wrote:

> I saw one necessity by always using interrupt gate type, that
> restore_all_xen can be simplified without segment registers restore.
> Or else at least ds/es need be restored for restore_all_xen if interrupt
> happens at entrance of hypercall (if by trap gate type). But I'm weak
> knowledge about the reason you list. What's the ability that hypercall
> handler can do while interrupt handler can't when reload of a
> problematic segment register? Anyway interrupt can also raise from
> guest context and interrupt handle also needs to tackle fault of
> reloading. Could you kindly give an example? :-)

Enter Xen on hypercall, immediately take an interrupt, on return from
interrupt %es faults on reload. How do we propagate this bad segment
register value to the guest via the failsafe callback handler from this
context? The bad %es is not yet saved on the outer context's stack frame.

 -- Keir

Xen-devel mailing list