Skip to contentSkip to conversation

BUG Report: "config KVM" selects PREEMPT_NOTIFIERS, but it should also select PREEMPT (Vanilla Kernel 2.6.30)

DISCUSSION Walther Maldonado 2 participants 3 messages Jun 29, 2009 – Jul 1, 2009 KVM

lore
Share & tools
lore
#0 lore raw

Good day,

Today when attempting to compile and install the KVM module (kernel 2.6.30), inserting the module would error with a number of unresolved symbols such as preempt_notifier_register() not found.

Some code-browsing revealed that, even though the kvm KConfig setting "KVM" does select PREEMPT_NOTIFIERS, in include/linux/preempt.h, said define will not cause the expected functions to be defined unless CONFIG_PREEMPT is also selected.

But I don't have CONFIG_PREEMPT (Preemptible Kernel), my kernel was configured with CONFIG_PREEMPT_VOLUNTARY (Voluntary Kernel Preemption). Since the define CONFIG_PREEMPT_NOTIFIERS is used in other files other than preempt.h, the bug might be in KVM's Kconfig file (in my case, arch/x86/kConfig) not selecting/depending on the right config parameters.

Cheers,
Walther

PS: If there is a need to reply, please do so directly as I am not subscribed to the mailing list.

#1 lore raw
Quoted 7 lines · Walther Maldonado

Good day,

Today when attempting to compile and install the KVM module (kernel 2.6.30), inserting the module would error with a number of unresolved symbols such as preempt_notifier_register() not found.

Some code-browsing revealed that, even though the kvm KConfig setting "KVM" does select PREEMPT_NOTIFIERS, in include/linux/preempt.h, said define will not cause the expected functions to be defined unless CONFIG_PREEMPT is also selected.

Not in my copy of v2.6.30. preempt.h only guards the preempt notifier symbols with CONFIG_PREEMPT_NOTIFIER.

I built sched.o with CONFIG_PREEMPT_NONE=y and see:

[avi@cleopatra linux-2.6 (v2.6.30)]$ nm kernel/sched.o | grep preempt_notifier 00000000c559bf4c A __crc_preempt_notifier_register 000000008be61cbb A __crc_preempt_notifier_unregister 0000000000000028 r __kcrctab_preempt_notifier_register 0000000000000020 r __kcrctab_preempt_notifier_unregister 0000000000000232 r __kstrtab_preempt_notifier_register 0000000000000216 r __kstrtab_preempt_notifier_unregister 0000000000000050 r __ksymtab_preempt_notifier_register 0000000000000040 r __ksymtab_preempt_notifier_unregister 0000000000000c77 T preempt_notifier_register
0000000000000caf T preempt_notifier_unregister

Perhaps you have a stale kernel installed? Try reinstalling the kernel and modules and rebooting.

Signature · 1 line
error compiling committee.c: too many arguments to function
#2 lore raw

Good day,

Alright, my bad. After closer studying I realized I had misread where the defines were delimiting each function. :/ Sorry for the invalid report (and yes, I had other issues setting up and running the modules, but I was pretty sure the missing symbols were caused because of the define, which turned out to be false).

Cheers~
Walther.

Quoted 33 lines · On Wed, 1 Jul 2009 11:41:38 +0200 Avi Kivity <[email protected]> wrote:
Quoted 7 lines · Walther Maldonado

Good day,

Today when attempting to compile and install the KVM module (kernel 2.6.30), inserting the module would error with a number of unresolved symbols such as preempt_notifier_register() not found.

Some code-browsing revealed that, even though the kvm KConfig setting "KVM" does select PREEMPT_NOTIFIERS, in include/linux/preempt.h, said define will not cause the expected functions to be defined unless CONFIG_PREEMPT is also selected.

Not in my copy of v2.6.30. preempt.h only guards the preempt notifier symbols with CONFIG_PREEMPT_NOTIFIER.

I built sched.o with CONFIG_PREEMPT_NONE=y and see:

[avi@cleopatra linux-2.6 (v2.6.30)]$ nm kernel/sched.o | grep preempt_notifier
00000000c559bf4c A __crc_preempt_notifier_register 000000008be61cbb A __crc_preempt_notifier_unregister 0000000000000028 r __kcrctab_preempt_notifier_register 0000000000000020 r __kcrctab_preempt_notifier_unregister 0000000000000232 r __kstrtab_preempt_notifier_register 0000000000000216 r __kstrtab_preempt_notifier_unregister 0000000000000050 r __ksymtab_preempt_notifier_register 0000000000000040 r __ksymtab_preempt_notifier_unregister 0000000000000c77 T preempt_notifier_register 0000000000000caf T preempt_notifier_unregister

Perhaps you have a stale kernel installed? Try reinstalling the kernel and modules and rebooting.

Signature · 1 line
error compiling committee.c: too many arguments to function