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] question: trap handler query....

To: mukesh.rathor@xxxxxxxxxx
Subject: Re: [Xen-devel] question: trap handler query....
From: Daniel Stodden <stodden@xxxxxxxxxx>
Date: Tue, 22 Jan 2008 22:13:10 +0100
Cc: Xen Developers <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Tue, 22 Jan 2008 13:13:26 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <479654B7.3040200@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>
Organization: Fakultät für Informatik I10, Technische Universität München
References: <479654B7.3040200@xxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Tue, 2008-01-22 at 12:40 -0800, Mukesh Rathor wrote:
> Hi all,
>   I've a question. how would a cpu know from an IPI, if it's on a trap 
> handler 
> underneath. Looking at entry.S, I see that trap handlers push entry vector on 
> stack, so I suppose one could walk down the frames (there's prob a better 
> way). 

the better way is to check the interrupted privilege level in the pushed
CS register (bits 1-0). if it's zero, it's been in xen when it happened.

> Moreover, what if the IPI comes right before the entry vector is pushed? 

exception entry by itself is atomic. either you get a complete stack
frame (as pushed by the cpu, i.e. up to rip/error_code, i.e. not
including the SAVE_ALL macros) or remain at the instruction yet to cause
the trap. nowhere in between.

> Does x86 disable upon trap?

..interrupts you mean? typically no. only on interrupt gates.

regards,
daniel

-- 
Daniel Stodden
LRR     -      Lehrstuhl für Rechnertechnik und Rechnerorganisation
Institut für Informatik der TU München             D-85748 Garching
http://www.lrr.in.tum.de/~stodden         mailto:stodden@xxxxxxxxxx
PGP Fingerprint: F5A4 1575 4C56 E26A 0B33  3D80 457E 82AE B0D8 735B



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

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