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] Re: [PATCH] xen: use iret directly where possible

To: Jeremy Fitzhardinge <jeremy@xxxxxxxx>
Subject: Re: [Xen-devel] Re: [PATCH] xen: use iret directly where possible
From: Andi Kleen <ak@xxxxxxx>
Date: Mon, 4 Jun 2007 23:05:04 +0200
Cc: Virtualization Mailing List <virtualization@xxxxxxxxxxxxxx>, Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, Linux Kernel Mailing List <linux-kernel@xxxxxxxxxxxxxxx>
Delivery-date: Mon, 04 Jun 2007 14:19:33 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <4664772A.20602@xxxxxxxx>
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: <46646662.9020707@xxxxxxxx> <200706042145.30339.ak@xxxxxxx> <4664772A.20602@xxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: KMail/1.9.1
On Monday 04 June 2007 22:33, Jeremy Fitzhardinge wrote:

> Hm, yes, I guess so.  I'd assumed that softirq was in the WORK_NEEDED
> path of entry.S without checking; but anything which can set one of the
> WORK_NEEDED flags is an issue.

For interrupts it can be only signals or rescheduling.

> >>  - If the interrupt causes a signal to be delivered to the current
> >> process, the signal will be marked pending on the process, but it will
> >> not get delivered because we're past the point where pending signals are
> >> detected.  Again, it could be an unbounded amount of time before the
> >> signal gets delivered.
> >
> > It's still not clear to me why you can't do cli ; check again ;
> > iret-equivalent to handle this.
>
> Well, we use the real iret instruction to actually transition into
> userspace; obviously we can't do anything after that, and there's always
> going to be an open window before it because we can't do anything
> instruction-level atomic.

If you stay cli you don't need that. Why is it that it has to enable 
interrupts?

> In your sequence, the event may become pending after "check again", even
> though it won't be delivered. 

sti only takes affect one instruction after it. So if you can make 
it that small it would also work. But that might not help you.

-Andi

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