From mboxrd@z Thu Jan 1 00:00:00 1970 From: Keir Fraser Subject: Re: Xen crash on dom0 shutdown Date: Tue, 23 Sep 2008 12:27:45 +0100 Message-ID: References: <48D8E23D.76E4.0078.0@novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <48D8E23D.76E4.0078.0@novell.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: Jan Beulich , xen-devel@lists.xensource.com Cc: "Jiang, Yunhong" , "Shan, Haitao" List-Id: xen-devel@lists.xenproject.org On 23/9/08 11:34, "Jan Beulich" wrote: > Simply removing the BUG_ON() seems inappropriate, though. But I'm > uncertain whether it would be reasonable to call pirq_guest_unbind() > instead of the BUG_ON(), and if so, how to properly deal with > irq_desc[vector].lock (the immediate idea would be to factor out the > locking into a wrapper function, but an alternative would be to use > recursive locks, and perhaps there are other possibilities). Well, this hypercall doesn't do pirq_guest_unbind() on IO-APIC-routed interrupts either, so I think the problem is wider ranging than just MSI interrupts. Consider unmap_irq() followed by pirq_guest_unbind() later. We'll BUG_ON(vector == 0) in the latter function. Looks a bit of a mess to me. I would say that if there are bindings remaining we should re-direct the event-channel to a 'no-op' pirq (e.g., -1) and indeed call pirq_guest_unbind() or similar. -- Keir