Re: [patch 0/3] Patches for KVM & RT
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(+) 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.0 -0500 +++ linux-2.6.24.7-rt27/kernel/sched.c 2009-02-08 00:01:22.0 -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 -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [patch 0/3] Patches for KVM & RT
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? Carsten. Apr 9 22:57:55 deliv1 kernel: [ cut here ] Apr 9 22:57:55 deliv1 kernel: WARNING: at kernel/smp.c:289 smp_call_function_single+0x5a/0x11c() Apr 9 22:57:55 deliv1 kernel: Hardware name: SD37V10 Apr 9 22:57:55 deliv1 kernel: Modules linked in: tun fuse radeon drm nfsd lockd nfs_acl auth_rpcgss exportfs sco bridge stp bnep l2cap bluetooth coretemp it87 hwmon_vid hwmon sunrpc zd1211rw mac80211 cfg80211 ipt_MASQUERADE iptable_nat nf_nat ipt_REJECT ipt_LOG nf_conntrack_ipv4 nf_defrag_ipv4 iptable_filter ip_tables nf_conntrack_netbios_ns ip6t_REJECT xt_tcpudp nf_conntrack_ipv6 xt_state nf_conntrack ip6table_filter ip6_tables x_tables ipv6 cpufreq_ondemand acpi_cpufreq dm_mirror dm_region_hash dm_log dm_multipath scsi_dh dm_mod kvm_intel kvm uinput snd_hda_codec_realtek snd_hda_intel snd_hda_codec snd_usb_audio snd_usb_lib snd_rawmidi snd_hwdep snd_seq_dummy snd_seq_oss snd_seq_midi_event snd_seq snd_seq_device snd_pcm_oss snd_mixer_oss snd_pcm snd_timer snd soundcore iTCO_wdt i2c_i801 tg3 i82975x_edac ohci1394 snd_page_alloc iTCO_vendor_support i2c_core libphy edac_core ieee1394 auerswald sr_mod sg button cdrom pcspkr ata_generic pata_acpi ata_piix libata sd_mod scsi_mod raid456 async_xor async_memcpy async Apr 9 22:57:55 deliv1 kernel: _tx xor raid1 ext3 jbd mbcache uhci_hcd ohci_hcd ehci_hcd [last unloaded: microcode] Apr 9 22:57:55 deliv1 kernel: Pid: 4085, comm: qemu-kvm Not tainted 2.6.29.1-rt5-32bit #39 Apr 9 22:57:55 deliv1 kernel: Call Trace: Apr 9 22:57:55 deliv1 kernel: [] warn_slowpath+0x76/0xad Apr 9 22:57:55 deliv1 kernel: [] ? sub_preempt_count+0x94/0xa3 Apr 9 22:57:55 deliv1 kernel: [] ? set_spte+0xe/0x5dd [kvm] Apr 9 22:57:55 deliv1 kernel: [] ? __schedule+0x9b0/0x9f9 Apr 9 22:57:55 deliv1 kernel: [] ? unalias_gfn+0xe/0x54 [kvm] Apr 9 22:57:55 deliv1 kernel: [] ? __rcu_read_unlock+0x6e/0x7d Apr 9 22:57:55 deliv1 kernel: [] ? cpuacct_charge+0x52/0x58 Apr 9 22:57:55 deliv1 kernel: [] ? update_curr+0x136/0x177 Apr 9 22:57:55 deliv1 kernel: [] ? sched_clock+0x44/0x64 Apr 9 22:57:55 deliv1 kernel: [] ? __rcu_read_unlock+0x6e/0x7d Apr 9 22:57:55 deliv1 kernel: [] ? cpuacct_charge+0x52/0x58 Apr 9 22:57:55 deliv1 kernel: [] smp_call_function_single+0x5a/0x11c Apr 9 22:57:55 deliv1 kernel: [] ? __vcpu_clear+0x0/0xbc [kvm_intel] Apr 9 22:57:55 deliv1 kernel: [] vmx_vcpu_load+0x46/0x191 [kvm_intel] Apr 9 22:57:55 deliv1 kernel: [] ? __spin_unlock+0x14/0x28 Apr 9 22:57:55 deliv1 kernel: [] kvm_arch_vcpu_load+0x14/0x1e [kvm] Apr 9 22:57:55 deliv1 kernel: [] kvm_sched_in+0x10/0x12 [kvm] Apr 9 22:57:55 deliv1 kernel: [] finish_task_switch+0x97/0xe6 Apr 9 22:57:55 deliv1 kernel: [] __schedule+0x9a1/0x9f9 Apr 9 22:57:55 deliv1 kernel: [] ? hrtimer_interrupt+0x18a/0x192 Apr 9 22:57:55 deliv1 kernel: [] ? restore_nocheck_notrace+0x0/0xe Apr 9 22:57:55 deliv1 kernel: [] ? kvm_arch_vcpu_ioctl_run+0x406/0x634 [kvm] Apr 9 22:57:55 deliv1 kernel: [] ? preempt_schedule+0x3e/0x67 Apr 9 22:57:55 deliv1 kernel: [] preempt_schedule+0x4d/0x67 Apr 9 22:57:55 deliv1 kernel: [] kvm_arch_vcpu_ioctl_run+0x406/0x634 [kvm] Apr 9 22:57:55 deliv1 kernel: [] kvm_vcpu_ioctl+0xf4/0x659 [kvm] Apr 9 22:57:55 deliv1 kernel: [] ? __schedule+0x9b0/0x9f9 Apr 9 22:57:55 deliv1 kernel: [] ? tick_dev_program_event+0x2d/0x9a Apr 9 22:57:55 deliv1 kernel: [] ? kvm_vcpu_ioctl+0x0/0x659 [kvm] Apr 9 22:57:55 deliv1 kernel: [] vfs_ioctl+0x27/0x6e Apr 9 22:57:55 deliv1 kernel: [] do_vfs_ioctl+0x49b/0x4d4 Apr 9 22:57:55 deliv1 kernel: [] ? trace_hardirqs_on_thunk+0xc/0x10 Apr 9 22:57:55 deliv1 kernel: [] ? fget_light+0x85/0x9a Apr 9 22:57:55 deliv1 kernel: [] sys_ioctl+0x45/0x5f Apr 9 22:57:55 deliv1 kernel: [] sysenter_do_call+0x12/0x27 Apr 9 22:57:55 deliv1 kernel: ---[ end trace ea071060aeca7fc5 ]---
[patch 0/3] Patches for KVM & RT
Here are some patches that are necessary to get KVM running with the -rt4 patchset. Cheers, Jan -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html