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] [Patch] continue_hypercall_on_cpu rework using tasklets

To: Juergen Gross <juergen.gross@xxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [Patch] continue_hypercall_on_cpu rework using tasklets
From: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Date: Wed, 14 Apr 2010 08:35:22 +0100
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Wed, 14 Apr 2010 00:36:30 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4BC56DE5.6040405@xxxxxxxxxxxxxx>
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/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: Acrbo6f45prsuPfBTnaqSfv/TNVh5AAAWIz5
Thread-topic: [Xen-devel] [Patch] continue_hypercall_on_cpu rework using tasklets
User-agent: Microsoft-Entourage/12.24.0.100205
On 14/04/2010 08:25, "Juergen Gross" <juergen.gross@xxxxxxxxxxxxxx> wrote:

>> A tasklet also takes an arbitrary ulong parameter, which you can cast to a
>> pointer to your informational structure. The parameter is specified via
>> tasklet_init(). That should suffice.
> 
> I'm already using this. The problem is to find the original calling vcpu in
> case of a nested call of continue_hypercall_on_cpu() while not conflicting
> with concurrent calls from other vcpus which happen to address the same pcpu.

There can be only one nested invocation on any given pcpu, since a running
invocation is never preempted. Hence on entry to c_h_o_c() you can check a
per-cpu variable to see whether this invocation is nesting, or not. And if
it is, that variable can be a pointer to an info structure which includes a
pointer to the invoking vcpu.

 -- Keir



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

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