From patchwork Fri Apr 10 07:23:06 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Gleixner X-Patchwork-Id: 17576 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n3A7PLfS024203 for ; Fri, 10 Apr 2009 07:25:21 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S938403AbZDJHXf (ORCPT ); Fri, 10 Apr 2009 03:23:35 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S938100AbZDJHXe (ORCPT ); Fri, 10 Apr 2009 03:23:34 -0400 Received: from www.tglx.de ([62.245.132.106]:59603 "EHLO www.tglx.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S938065AbZDJHXb (ORCPT ); Fri, 10 Apr 2009 03:23:31 -0400 Received: from localhost (www.tglx.de [127.0.0.1]) by www.tglx.de (8.13.8/8.13.8/TGLX-2007100201) with ESMTP id n3A7N5vg027870 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 10 Apr 2009 09:23:06 +0200 Date: Fri, 10 Apr 2009 09:23:06 +0200 (CEST) From: Thomas Gleixner To: Carsten Emde cc: Jan Blunck , rt-users , kvm@vger.kernel.org, Marcelo Tosatti Subject: Re: [patch 0/3] Patches for KVM & RT In-Reply-To: <49DE6C4C.3070308@osadl.org> Message-ID: References: <20090407235853.309888494@suse.de> <49DE6C4C.3070308@osadl.org> User-Agent: Alpine 2.00 (LFD 1167 2008-08-23) MIME-Version: 1.0 X-Virus-Scanned: ClamAV 0.93.2/9219/Thu Apr 9 17:11:17 2009 on www.tglx.de X-Virus-Status: Clean X-Spam-Status: No, score=-1.4 required=5.0 tests=ALL_TRUSTED,AWL autolearn=failed version=3.2.4 X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on www.tglx.de Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org On Thu, 9 Apr 2009, Carsten Emde wrote: > Jan, > > > Here are some patches that are necessary to get KVM running with the -rt4 > > patchset. > Thanks a lot. > > Unfortunaately, there is still a last one at kernel/smp.c:288 > /* Can deadlock when called with interrupts disabled */ > WARN_ON_ONCE(irqs_disabled() && !oops_in_progress); > > Do we get another fix? I think I have seen that before. Just remembered that I fixed that with Avi last year. Patch got dropped in the 26->29 move. Thanks, tglx ---- From: Thomas Gleixner Date: Mon, 14 Jan 2008 14:02:44 +0200 Subject: CFS: enable irqs in fire_sched_in_preempt_notifier KVM expects the notifier call with irqs enabled. It's necessary due to a possible IPI call. Make the preempt-rt version behave the same way as mainline. Signed-off-by: Thomas Gleixner --- kernel/sched.c | 9 +++++++++ 1 file changed, 9 insertions(+) -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Index: linux-2.6.24.7-rt27/kernel/sched.c =================================================================== --- linux-2.6.24.7-rt27.orig/kernel/sched.c 2009-02-08 00:01:16.000000000 -0500 +++ linux-2.6.24.7-rt27/kernel/sched.c 2009-02-08 00:01:22.000000000 -0500 @@ -1821,8 +1821,17 @@ static void fire_sched_in_preempt_notifi struct preempt_notifier *notifier; struct hlist_node *node; + if (hlist_empty(&curr->preempt_notifiers)) + return; + + /* + * The KVM sched in notifier expects to be called with + * interrupts enabled. + */ + local_irq_enable(); hlist_for_each_entry(notifier, node, &curr->preempt_notifiers, link) notifier->ops->sched_in(notifier, raw_smp_processor_id()); + local_irq_disable(); } static void