From: Avi Kivity <avi@qumranet.com>
To: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: Sasa Ostrouska <casaxa@gmail.com>,
linux-kernel@vger.kernel.org,
KVM <kvm-devel@lists.sourceforge.net>,
kvm-devel <kvm-devel@lists.sourceforge.net>
Subject: Re: KVM-AMD OOPS
Date: Mon, 09 Jul 2007 15:02:57 +0300 [thread overview]
Message-ID: <469223F1.8000904@qumranet.com> (raw)
In-Reply-To: <4691DEE3.5050305@argo.co.il>
Avi Kivity wrote:
> Jeremy Fitzhardinge wrote:
>
>> Sasa Ostrouska wrote:
>>
>>> root@rcserver:~# modprobe kvm-amd
>>> int3: 0000 [1] PREEMPT SMP
>>> CPU 1
>>> Modules linked in: kvm_amd snd_seq_dummy snd_seq_oss
>>> snd_seq_midi_event snd_seq snd_seq_device snd_pcm_oss snd_mixer_oss
>>> nls_iso8859_1 ntfs nls_base usb_storage libusual capability commoncap
>>> lp psmouse snd_hda_intel snd_hda_codec snd_pcm snd_timer ohci_hcd
>>> ehci_hcd 8139too rtc_cmos snd soundcore snd_page_alloc usbcore k8temp
>>> mii rtc_core rtc_lib i2c_nforce2 parport_pc parport
>>> Pid: 2898, comm: modprobe Tainted: P 2.6.21.5 #1
>>> RIP: 0010:[<ffffffff80572364>] [<ffffffff80572364>]
>>> register_cpu_notifier+0x1/0x31
>>> RSP: 0000:ffff81006e34df40 EFLAGS: 00000246
>>> RAX: 0000000000000000 RBX: 0000000000000000 RCX: 00000000c0010117
>>> RDX: 000000000000ffff RSI: ffff81006e219640 RDI: ffffffff80536510
>>> RBP: ffffffff880d8840 R08: 0000000000000000 R09: 000000000006b5f4
>>> R10: 0000000000000000 R11: 0000000000000000 R12: 00000000005296b0
>>> R13: 00007fff51fe55c0 R14: 0000000000000000 R15: 0000000000000000
>>> FS: 00002b4e58e18b00(0000) GS:ffff810002e794c0(0000)
>>> knlGS:0000000000000000
>>> CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b
>>> CR2: 000000000050df64 CR3: 000000007a0f3000 CR4: 00000000000006e0
>>> Process modprobe (pid: 2898, threadinfo ffff81006e34c000, task
>>> ffff81007bc48400)
>>> Stack: ffffffff8039e024 ffff81006e34c000 ffffffff880d8840
>>> 0000000000005e19
>>> ffffffff8024537c 0000000000000000 00007fff51fe50c0 00000000004142d0
>>> ffffffff8020967e 0000000000000206 00000000005230e0 000000000052f4c9
>>> Call Trace:
>>> [<ffffffff8039e024>] kvm_init_arch+0x90/0x145
>>> [<ffffffff8024537c>] sys_init_module+0xad/0x168
>>> [<ffffffff8020967e>] system_call+0x7e/0x83
>>>
>>>
>>> Code: cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc
>>>
>> This is the init section poison pattern. Looks like an init function
>> was used after the code was freed.
>>
>
> Indeed, the function is register_cpu_notifier which is declared
> __cpuinit, which, without hotplug compiled in, is simply __init.
>
> I'll prepare a patch for this. Meanwhile, you can work around it by
> enabling CONFIG_HOTPLUG_CPU.
>
>
Well, this nice patch (in 2.6.21) ought to have fixed it:
commit 47e627bc8c9a70392d2049e6af5bd55fae61fe53
Author: Avi Kivity <avi@qumranet.com>
Date: Mon Feb 12 00:54:43 2007 -0800
[PATCH] hotplug: Allow modules to use the cpu hotplug notifiers even if !CONFIG_HOTPLUG_CPU
The following patchset allows a host with running virtual machines to be
suspended and, on at least a subset of the machines tested, resumed. Note
that this is orthogonal to suspending and resuming an individual guest to a
file.
A side effect of implementing suspend/resume is that cpu hotplug is now
supported. This should please the owners of big iron.
This patch:
KVM wants the cpu hotplug notifications, both for cpu hotplug itself, but more
commonly for host suspend/resume.
In order to avoid extensive #ifdefs, provide stubs when CONFIG_CPU_HOTPLUG is
not defined.
In all, we have four cases:
- UP: register and unregister stubbed out
- SMP+hotplug: full register and unregister
- SMP, no hotplug, core: register as __init, unregister stubbed
(cpus are brought up during core initialization)
- SMP, no hotplug, module: register and unregister stubbed out
(cpus cannot be brought up during module lifetime)
Signed-off-by: Avi Kivity <avi@qumranet.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Oleg Nesterov <oleg@tv-sign.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
diff --git a/include/linux/cpu.h b/include/linux/cpu.h
index bfb5202..769ddc6 100644
--- a/include/linux/cpu.h
+++ b/include/linux/cpu.h
@@ -49,10 +49,20 @@ struct notifier_block;
#ifdef CONFIG_SMP
/* Need to know about CPUs going up/down? */
-extern int register_cpu_notifier(struct notifier_block *nb);
#ifdef CONFIG_HOTPLUG_CPU
+extern int register_cpu_notifier(struct notifier_block *nb);
extern void unregister_cpu_notifier(struct notifier_block *nb);
#else
+
+#ifndef MODULE
+extern int register_cpu_notifier(struct notifier_block *nb);
+#else
+static inline int register_cpu_notifier(struct notifier_block *nb)
+{
+ return 0;
+}
+#endif
+
static inline void unregister_cpu_notifier(struct notifier_block *nb)
{
}
Please post your .config.
--
error compiling committee.c: too many arguments to function
WARNING: multiple messages have this Message-ID (diff)
From: Avi Kivity <avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
To: Jeremy Fitzhardinge <jeremy-TSDbQ3PG+2Y@public.gmane.org>
Cc: kvm-devel
<kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>,
Sasa Ostrouska <casaxa-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: KVM-AMD OOPS
Date: Mon, 09 Jul 2007 15:02:57 +0300 [thread overview]
Message-ID: <469223F1.8000904@qumranet.com> (raw)
In-Reply-To: <4691DEE3.5050305-7k6+44Jx4zn6gbPvEgmw2w@public.gmane.org>
Avi Kivity wrote:
> Jeremy Fitzhardinge wrote:
>
>> Sasa Ostrouska wrote:
>>
>>> root@rcserver:~# modprobe kvm-amd
>>> int3: 0000 [1] PREEMPT SMP
>>> CPU 1
>>> Modules linked in: kvm_amd snd_seq_dummy snd_seq_oss
>>> snd_seq_midi_event snd_seq snd_seq_device snd_pcm_oss snd_mixer_oss
>>> nls_iso8859_1 ntfs nls_base usb_storage libusual capability commoncap
>>> lp psmouse snd_hda_intel snd_hda_codec snd_pcm snd_timer ohci_hcd
>>> ehci_hcd 8139too rtc_cmos snd soundcore snd_page_alloc usbcore k8temp
>>> mii rtc_core rtc_lib i2c_nforce2 parport_pc parport
>>> Pid: 2898, comm: modprobe Tainted: P 2.6.21.5 #1
>>> RIP: 0010:[<ffffffff80572364>] [<ffffffff80572364>]
>>> register_cpu_notifier+0x1/0x31
>>> RSP: 0000:ffff81006e34df40 EFLAGS: 00000246
>>> RAX: 0000000000000000 RBX: 0000000000000000 RCX: 00000000c0010117
>>> RDX: 000000000000ffff RSI: ffff81006e219640 RDI: ffffffff80536510
>>> RBP: ffffffff880d8840 R08: 0000000000000000 R09: 000000000006b5f4
>>> R10: 0000000000000000 R11: 0000000000000000 R12: 00000000005296b0
>>> R13: 00007fff51fe55c0 R14: 0000000000000000 R15: 0000000000000000
>>> FS: 00002b4e58e18b00(0000) GS:ffff810002e794c0(0000)
>>> knlGS:0000000000000000
>>> CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b
>>> CR2: 000000000050df64 CR3: 000000007a0f3000 CR4: 00000000000006e0
>>> Process modprobe (pid: 2898, threadinfo ffff81006e34c000, task
>>> ffff81007bc48400)
>>> Stack: ffffffff8039e024 ffff81006e34c000 ffffffff880d8840
>>> 0000000000005e19
>>> ffffffff8024537c 0000000000000000 00007fff51fe50c0 00000000004142d0
>>> ffffffff8020967e 0000000000000206 00000000005230e0 000000000052f4c9
>>> Call Trace:
>>> [<ffffffff8039e024>] kvm_init_arch+0x90/0x145
>>> [<ffffffff8024537c>] sys_init_module+0xad/0x168
>>> [<ffffffff8020967e>] system_call+0x7e/0x83
>>>
>>>
>>> Code: cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc
>>>
>> This is the init section poison pattern. Looks like an init function
>> was used after the code was freed.
>>
>
> Indeed, the function is register_cpu_notifier which is declared
> __cpuinit, which, without hotplug compiled in, is simply __init.
>
> I'll prepare a patch for this. Meanwhile, you can work around it by
> enabling CONFIG_HOTPLUG_CPU.
>
>
Well, this nice patch (in 2.6.21) ought to have fixed it:
commit 47e627bc8c9a70392d2049e6af5bd55fae61fe53
Author: Avi Kivity <avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
Date: Mon Feb 12 00:54:43 2007 -0800
[PATCH] hotplug: Allow modules to use the cpu hotplug notifiers even if !CONFIG_HOTPLUG_CPU
The following patchset allows a host with running virtual machines to be
suspended and, on at least a subset of the machines tested, resumed. Note
that this is orthogonal to suspending and resuming an individual guest to a
file.
A side effect of implementing suspend/resume is that cpu hotplug is now
supported. This should please the owners of big iron.
This patch:
KVM wants the cpu hotplug notifications, both for cpu hotplug itself, but more
commonly for host suspend/resume.
In order to avoid extensive #ifdefs, provide stubs when CONFIG_CPU_HOTPLUG is
not defined.
In all, we have four cases:
- UP: register and unregister stubbed out
- SMP+hotplug: full register and unregister
- SMP, no hotplug, core: register as __init, unregister stubbed
(cpus are brought up during core initialization)
- SMP, no hotplug, module: register and unregister stubbed out
(cpus cannot be brought up during module lifetime)
Signed-off-by: Avi Kivity <avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
Cc: Ingo Molnar <mingo-X9Un+BFzKDI@public.gmane.org>
Cc: Rusty Russell <rusty-8n+1lVoiYb80n/F98K4Iww@public.gmane.org>
Cc: Oleg Nesterov <oleg-6lXkIZvqkOAvJsYlp49lxw@public.gmane.org>
Signed-off-by: Andrew Morton <akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>
Signed-off-by: Linus Torvalds <torvalds-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>
diff --git a/include/linux/cpu.h b/include/linux/cpu.h
index bfb5202..769ddc6 100644
--- a/include/linux/cpu.h
+++ b/include/linux/cpu.h
@@ -49,10 +49,20 @@ struct notifier_block;
#ifdef CONFIG_SMP
/* Need to know about CPUs going up/down? */
-extern int register_cpu_notifier(struct notifier_block *nb);
#ifdef CONFIG_HOTPLUG_CPU
+extern int register_cpu_notifier(struct notifier_block *nb);
extern void unregister_cpu_notifier(struct notifier_block *nb);
#else
+
+#ifndef MODULE
+extern int register_cpu_notifier(struct notifier_block *nb);
+#else
+static inline int register_cpu_notifier(struct notifier_block *nb)
+{
+ return 0;
+}
+#endif
+
static inline void unregister_cpu_notifier(struct notifier_block *nb)
{
}
Please post your .config.
--
error compiling committee.c: too many arguments to function
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
next prev parent reply other threads:[~2007-07-09 12:03 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-08 16:15 KVM-AMD OOPS Sasa Ostrouska
2007-07-08 17:41 ` Michal Piotrowski
[not found] ` <dcf706c60707081051r2ff03a7bi35307536755b42f6@mail.gmail.com>
2007-07-08 18:11 ` Sasa Ostrouska
2007-07-09 4:53 ` Jeremy Fitzhardinge
2007-07-09 7:08 ` Avi Kivity
2007-07-09 7:08 ` Avi Kivity
2007-07-09 12:02 ` Avi Kivity [this message]
2007-07-09 12:02 ` Avi Kivity
2007-07-09 12:12 ` Sasa Ostrouska
2007-07-09 12:12 ` Sasa Ostrouska
[not found] ` <dcf706c60707090510w4a1293cbw69c8e0d47640f77d@mail.gmail.com>
2007-07-09 12:14 ` Avi Kivity
2007-07-09 12:14 ` Avi Kivity
2007-07-09 7:15 ` Jiri Slaby
2007-07-09 7:15 ` Jiri Slaby
2007-07-09 12:58 ` Avi Kivity
2007-07-09 12:58 ` Avi Kivity
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=469223F1.8000904@qumranet.com \
--to=avi@qumranet.com \
--cc=casaxa@gmail.com \
--cc=jeremy@goop.org \
--cc=kvm-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.