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:46:54 +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:45:18 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <4664841A.8040802@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> <200706042305.05340.ak@xxxxxxx> <4664841A.8040802@xxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: KMail/1.9.1
On Monday 04 June 2007 23:28, Jeremy Fitzhardinge wrote:

> The cli/sti instructions don't control the event mask, so they're
> effectively expensive no-ops (they trap into the hypervisor, are
> emulated as no-ops). But if you mean cli as a general term for
> "events/interrupts masked", then they can't remain masked when you
> return to usermode.   iret normally sets the current eflags IF state
> from the on-stack IF, but that's irrelevent to Xen; we need to extract
> eflags.IF from the on-stack eflags, and put that into the vcpu's event
> mask.  That's inherently non-atomic with respect to iret.

Ah I assumed the hypervisor would just check IF in ring 1 too.
It would certainly make this easier, but then the additional trap
of setting it would be also somewhat expensive agreed.

I must say I still hate the patch; it has all the signs of something that
will be very nasty to maintain later.

-Andi

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