From: Daniel Stodden Subject: Re: question: trap handler query.... Date: Tue, 22 Jan 2008 22:13:10 +0100 Message-ID: <1201036390.9372.13.camel@thinkpad.localdomain> References: <479654B7.3040200@oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <479654B7.3040200@oracle.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: mukesh.rathor@oracle.com Cc: Xen Developers List-Id: xen-devel@lists.xenproject.org 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=20 > underneath. Looking at entry.S, I see that trap handlers push entry vec= tor on=20 > stack, so I suppose one could walk down the frames (there's prob a bett= er=20 > way).=20 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= ?=20 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 --=20 Daniel Stodden LRR - Lehrstuhl f=C3=BCr Rechnertechnik und Rechnerorganisation Institut f=C3=BCr Informatik der TU M=C3=BCnchen D-85748 Garc= hing http://www.lrr.in.tum.de/~stodden mailto:stodden@cs.tum.edu PGP Fingerprint: F5A4 1575 4C56 E26A 0B33 3D80 457E 82AE B0D8 735B