From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH 02/18] xen: allow global VIRQ handlers to be delegated to other domains Date: Wed, 18 Jan 2012 10:39:01 +0000 Message-ID: <1326883141.14689.177.camel@zakaz.uk.xensource.com> References: <1326302490-19428-1-git-send-email-dgdegra@tycho.nsa.gov> <1326411330-7915-1-git-send-email-dgdegra@tycho.nsa.gov> <1326411330-7915-3-git-send-email-dgdegra@tycho.nsa.gov> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1326411330-7915-3-git-send-email-dgdegra@tycho.nsa.gov> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Daniel De Graaf Cc: Alex Zeffertt , "xen-devel@lists.xensource.com" , Diego Ongaro List-Id: xen-devel@lists.xenproject.org On Thu, 2012-01-12 at 23:35 +0000, Daniel De Graaf wrote: > > +static void clear_global_virq_handlers(struct domain *d) > +{ > + uint32_t virq; > + int put_count = 0; > + > + spin_lock(&global_virq_handlers_lock); > + > + for (virq = 0; virq < NR_VIRQS; virq++) { > + if (global_virq_handlers[virq] == d) { > + global_virq_handlers[virq] = NULL; I don't suppose we should rebind to dom0, should we? Seems like we are pretty hosed if this ever happens in a non-controlled manner anyway... > + put_count++; > + } > + } > + > + spin_unlock(&global_virq_handlers_lock); > + > + while (put_count) { > + put_domain(d); > + put_count--; > + } > +}