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

[Xen-devel] RE: [PATCH] x86: check if desc->action is NULL when unbindin

To: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] RE: [PATCH] x86: check if desc->action is NULL when unbinding guest pirq
From: "Cui, Dexuan" <dexuan.cui@xxxxxxxxx>
Date: Fri, 29 Jan 2010 10:55:43 +0800
Accept-language: zh-CN, en-US
Acceptlanguage: zh-CN, en-US
Cc:
Delivery-date: Thu, 28 Jan 2010 18:58:41 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <C784C169.7772%keir.fraser@xxxxxxxxxxxxx>
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>
References: <ED3036A092A28F4C91B0B4360DD128EA35C4D5A1@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx> <C784C169.7772%keir.fraser@xxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcqbOSOeIu67pGcuT8Gh3oiBq6xZlwDZx9rVAHt4sbA=
Thread-topic: [PATCH] x86: check if desc->action is NULL when unbinding guest pirq
Keir Fraser wrote:
> On 22/01/2010 08:01, "Cui, Dexuan" <dexuan.cui@xxxxxxxxx> wrote:
> 
>> Before igb PF driver is unloaded, dom0 doesn't unload igbvf driver
>> automatically. When igb drver is unloaded, it invokes the
>> PHYSDEVOP_manage_pci_remove hypercall to remove the VFs and xen
>> frees the msi irqs by pci_cleanup_msi() -> ... ->
>> dynamic_irq_cleanup() and sets the desc->action to NULL. igbvf
>> driver knows the VF is disappearing via a hook ndo_stop() in
>> dev_close() and tries to unbind the pirq and xen would crash as the
>> desc->action  
>> is NULL now.
>> The patch adds the checking for this.
> 
> Although I checked this in as c/s 20844, I now wonder what the
> 'desc->status|IRQ_DISABLED' is included for? (e.g., see below
> extract:) 
> 
> + if (unlikely((desc->status | IRQ_DISABLED) && (desc->action ==
> NULL))) 
> 
> Looks pointless: should this just be 'if(desc->action==NULL)'?
(Sorry for the late reply as I was out for several days.)
Yes, I think so. Please improve it. :-)

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

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