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] xen irq unmask bug brainstroming

To: Jeremy Fitzhardinge <jeremy@xxxxxxxx>
Subject: [Xen-devel] xen irq unmask bug brainstroming
From: "Zhang, Fengzhe" <fengzhe.zhang@xxxxxxxxx>
Date: Tue, 15 Feb 2011 14:28:38 +0800
Accept-language: en-US
Acceptlanguage: en-US
Cc: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, "Dong, Eddie" <eddie.dong@xxxxxxxxx>, "Li, Xin" <xin.li@xxxxxxxxx>
Delivery-date: Mon, 14 Feb 2011 22:30:58 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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: AcvM2ZTujt8rvPiVTkSeHHLljh1sDw==
Thread-topic: xen irq unmask bug brainstroming
Hi, we found a bug related to xen spin unlock ipi. Looking forward to 
brainstorming for a clean fixup.

How the bug happens:
1. Dom0 poweroff.
2. CPU0 takes down other CPUs.
3. IRQs are unmasked in function fixup_irqs on other CPUs.
4. IPI IRQ for "lock_kicker_irq" is unmasked (which should never happen).
5. Other CPUs receives lock_kicker_irq and dummy_handler (handler for ipi 
XEN_SPIN_UNLOCK_VECTOR) is invoked.
6. Dummy_handler reports bug and crashes Dom0.

Main cause:
Function fixup_irqs masks and then unmasks each irq when taking cpus down. And 
Xen irq_chip structure does not distinguish disable_ops from mask_ops. So when 
the lock_kicker_irq is unmasked, it is effectively re-enabled.

A possible fixup:
Provide a dedicated disable_ops for xen irq_chip structure. Prevent unmask_ops 
to enable irqs that are disabled.

-Fengzhe Zhang


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

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