* [PATCH 3.8-rc4-nohz3] kvm: Add missing EXPORT_SYMBOL when CONFIG_KVM=m
@ 2013-01-23 13:15 Sedat Dilek
2013-01-23 13:17 ` devendra.aaru
0 siblings, 1 reply; 15+ messages in thread
From: Sedat Dilek @ 2013-01-23 13:15 UTC (permalink / raw)
To: Frederic Weisbecker, Paul E. McKenney, Steven Rostedt, linux-kernel
Cc: Sedat Dilek
With CONFIG_KVM=m my build with 3.8-rc4-nohz3 breaks like this:
ERROR: "guest_enter" [arch/x86/kvm/kvm.ko] undefined!
ERROR: "guest_exit" [arch/x86/kvm/kvm.ko] undefined!
Fix this by adding the missing EXPORT_SYMBOL for guest_enter() and
guest_exit() in kernel/context_tracking.c as suggested by Frederic.
This issue was introduced with commit 8eebafe9be58 ("kvm: Prepare to
add generic guest entry/exit callbacks").
Signed-off-by: Sedat Dilek <sedat.dilek@gmail.com>
---
kernel/context_tracking.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/kernel/context_tracking.c b/kernel/context_tracking.c
index bbb2c2c..950f30a 100644
--- a/kernel/context_tracking.c
+++ b/kernel/context_tracking.c
@@ -111,14 +111,16 @@ void guest_enter(void)
else
__guest_enter();
}
+EXPORT_SYMBOL(guest_enter);
void guest_exit(void)
-{
+{i
if (vtime_accounting_enabled())
vtime_guest_exit(current);
else
__guest_exit();
}
+EXPORT_SYMBOL(guest_exit);
#endif
--
1.8.1.1
^ permalink raw reply [flat|nested] 15+ messages in thread* Re: [PATCH 3.8-rc4-nohz3] kvm: Add missing EXPORT_SYMBOL when CONFIG_KVM=m 2013-01-23 13:15 [PATCH 3.8-rc4-nohz3] kvm: Add missing EXPORT_SYMBOL when CONFIG_KVM=m Sedat Dilek @ 2013-01-23 13:17 ` devendra.aaru 2013-01-23 13:33 ` Sedat Dilek 0 siblings, 1 reply; 15+ messages in thread From: devendra.aaru @ 2013-01-23 13:17 UTC (permalink / raw) To: Sedat Dilek Cc: Frederic Weisbecker, Paul E. McKenney, Steven Rostedt, linux-kernel On Wed, Jan 23, 2013 at 8:15 AM, Sedat Dilek <sedat.dilek@gmail.com> wrote: > With CONFIG_KVM=m my build with 3.8-rc4-nohz3 breaks like this: > > ERROR: "guest_enter" [arch/x86/kvm/kvm.ko] undefined! > ERROR: "guest_exit" [arch/x86/kvm/kvm.ko] undefined! > > Fix this by adding the missing EXPORT_SYMBOL for guest_enter() and > guest_exit() in kernel/context_tracking.c as suggested by Frederic. > > This issue was introduced with commit 8eebafe9be58 ("kvm: Prepare to > add generic guest entry/exit callbacks"). > > Signed-off-by: Sedat Dilek <sedat.dilek@gmail.com> > --- > kernel/context_tracking.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/kernel/context_tracking.c b/kernel/context_tracking.c > index bbb2c2c..950f30a 100644 > --- a/kernel/context_tracking.c > +++ b/kernel/context_tracking.c > @@ -111,14 +111,16 @@ void guest_enter(void) > else > __guest_enter(); > } > +EXPORT_SYMBOL(guest_enter); > > void guest_exit(void) > -{ > +{i compilation fails with that? > if (vtime_accounting_enabled()) > vtime_guest_exit(current); > else > __guest_exit(); > } > +EXPORT_SYMBOL(guest_exit); > #endif > > > -- > 1.8.1.1 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > Please read the FAQ at http://www.tux.org/lkml/ ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 3.8-rc4-nohz3] kvm: Add missing EXPORT_SYMBOL when CONFIG_KVM=m 2013-01-23 13:17 ` devendra.aaru @ 2013-01-23 13:33 ` Sedat Dilek 2013-01-23 13:46 ` Frederic Weisbecker 0 siblings, 1 reply; 15+ messages in thread From: Sedat Dilek @ 2013-01-23 13:33 UTC (permalink / raw) To: devendra.aaru Cc: Frederic Weisbecker, Paul E. McKenney, Steven Rostedt, linux-kernel On Wed, Jan 23, 2013 at 2:17 PM, devendra.aaru <devendra.aaru@gmail.com> wrote: > On Wed, Jan 23, 2013 at 8:15 AM, Sedat Dilek <sedat.dilek@gmail.com> wrote: >> With CONFIG_KVM=m my build with 3.8-rc4-nohz3 breaks like this: >> >> ERROR: "guest_enter" [arch/x86/kvm/kvm.ko] undefined! >> ERROR: "guest_exit" [arch/x86/kvm/kvm.ko] undefined! >> >> Fix this by adding the missing EXPORT_SYMBOL for guest_enter() and >> guest_exit() in kernel/context_tracking.c as suggested by Frederic. >> >> This issue was introduced with commit 8eebafe9be58 ("kvm: Prepare to >> add generic guest entry/exit callbacks"). >> >> Signed-off-by: Sedat Dilek <sedat.dilek@gmail.com> >> --- >> kernel/context_tracking.c | 4 +++- >> 1 file changed, 3 insertions(+), 1 deletion(-) >> >> diff --git a/kernel/context_tracking.c b/kernel/context_tracking.c >> index bbb2c2c..950f30a 100644 >> --- a/kernel/context_tracking.c >> +++ b/kernel/context_tracking.c >> @@ -111,14 +111,16 @@ void guest_enter(void) >> else >> __guest_enter(); >> } >> +EXPORT_SYMBOL(guest_enter); >> >> void guest_exit(void) >> -{ >> +{i > > compilation fails with that? > Hmmm, yes, but why, clueless, CONFIG_KVM=y as a workaround! - Sedat - > >> if (vtime_accounting_enabled()) >> vtime_guest_exit(current); >> else >> __guest_exit(); >> } >> +EXPORT_SYMBOL(guest_exit); >> #endif >> >> >> -- >> 1.8.1.1 >> >> -- >> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in >> the body of a message to majordomo@vger.kernel.org >> More majordomo info at http://vger.kernel.org/majordomo-info.html >> Please read the FAQ at http://www.tux.org/lkml/ ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 3.8-rc4-nohz3] kvm: Add missing EXPORT_SYMBOL when CONFIG_KVM=m 2013-01-23 13:33 ` Sedat Dilek @ 2013-01-23 13:46 ` Frederic Weisbecker 2013-01-23 13:53 ` Steven Rostedt 0 siblings, 1 reply; 15+ messages in thread From: Frederic Weisbecker @ 2013-01-23 13:46 UTC (permalink / raw) To: sedat.dilek; +Cc: devendra.aaru, Paul E. McKenney, Steven Rostedt, linux-kernel 2013/1/23 Sedat Dilek <sedat.dilek@gmail.com>: > On Wed, Jan 23, 2013 at 2:17 PM, devendra.aaru <devendra.aaru@gmail.com> wrote: >> On Wed, Jan 23, 2013 at 8:15 AM, Sedat Dilek <sedat.dilek@gmail.com> wrote: >>> With CONFIG_KVM=m my build with 3.8-rc4-nohz3 breaks like this: >>> >>> ERROR: "guest_enter" [arch/x86/kvm/kvm.ko] undefined! >>> ERROR: "guest_exit" [arch/x86/kvm/kvm.ko] undefined! >>> >>> Fix this by adding the missing EXPORT_SYMBOL for guest_enter() and >>> guest_exit() in kernel/context_tracking.c as suggested by Frederic. >>> >>> This issue was introduced with commit 8eebafe9be58 ("kvm: Prepare to >>> add generic guest entry/exit callbacks"). >>> >>> Signed-off-by: Sedat Dilek <sedat.dilek@gmail.com> >>> --- >>> kernel/context_tracking.c | 4 +++- >>> 1 file changed, 3 insertions(+), 1 deletion(-) >>> >>> diff --git a/kernel/context_tracking.c b/kernel/context_tracking.c >>> index bbb2c2c..950f30a 100644 >>> --- a/kernel/context_tracking.c >>> +++ b/kernel/context_tracking.c >>> @@ -111,14 +111,16 @@ void guest_enter(void) >>> else >>> __guest_enter(); >>> } >>> +EXPORT_SYMBOL(guest_enter); >>> >>> void guest_exit(void) >>> -{ >>> +{i >> >> compilation fails with that? >> > > Hmmm, yes, but why, clueless, CONFIG_KVM=y as a workaround! I believe he pointed out the "{i" to you. Typing mistake? ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 3.8-rc4-nohz3] kvm: Add missing EXPORT_SYMBOL when CONFIG_KVM=m 2013-01-23 13:46 ` Frederic Weisbecker @ 2013-01-23 13:53 ` Steven Rostedt 2013-01-23 14:02 ` Frederic Weisbecker 0 siblings, 1 reply; 15+ messages in thread From: Steven Rostedt @ 2013-01-23 13:53 UTC (permalink / raw) To: Frederic Weisbecker Cc: sedat.dilek, devendra.aaru, Paul E. McKenney, linux-kernel On Wed, 2013-01-23 at 14:46 +0100, Frederic Weisbecker wrote: > > Hmmm, yes, but why, clueless, CONFIG_KVM=y as a workaround! > > I believe he pointed out the "{i" to you. Typing mistake? In which case the CONFIG_KVM=y is a work around if that {i is within a #ifndef CONFIG_KVM ;-) -- Steve ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 3.8-rc4-nohz3] kvm: Add missing EXPORT_SYMBOL when CONFIG_KVM=m 2013-01-23 13:53 ` Steven Rostedt @ 2013-01-23 14:02 ` Frederic Weisbecker 2013-01-23 14:16 ` Sedat Dilek ` (2 more replies) 0 siblings, 3 replies; 15+ messages in thread From: Frederic Weisbecker @ 2013-01-23 14:02 UTC (permalink / raw) To: Steven Rostedt; +Cc: sedat.dilek, devendra.aaru, Paul E. McKenney, linux-kernel 2013/1/23 Steven Rostedt <rostedt@goodmis.org>: > On Wed, 2013-01-23 at 14:46 +0100, Frederic Weisbecker wrote: > >> > Hmmm, yes, but why, clueless, CONFIG_KVM=y as a workaround! >> >> I believe he pointed out the "{i" to you. Typing mistake? > > In which case the CONFIG_KVM=y is a work around if that {i is within a > #ifndef CONFIG_KVM ;-) No it's in #ifdef CONFIG_KVM so the right fix is: diff --git a/kernel/context_tracking.c b/kernel/context_tracking.c index bbb2c2c..a13b8a3 100644 --- a/kernel/context_tracking.c +++ b/kernel/context_tracking.c @@ -111,14 +111,19 @@ void guest_enter(void) else __guest_enter(); } +EXPORT_SYMBOL_GPL(guest_enter); void guest_exit(void) { +#ifndef CONFIG_KVM +i +#endif if (vtime_accounting_enabled()) vtime_guest_exit(current); else __guest_exit(); } +EXPORT_SYMBOL_GPL(guest_exit); #endif ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 3.8-rc4-nohz3] kvm: Add missing EXPORT_SYMBOL when CONFIG_KVM=m 2013-01-23 14:02 ` Frederic Weisbecker @ 2013-01-23 14:16 ` Sedat Dilek 2013-01-23 14:52 ` Sedat Dilek 2013-01-23 15:04 ` Steven Rostedt 2 siblings, 0 replies; 15+ messages in thread From: Sedat Dilek @ 2013-01-23 14:16 UTC (permalink / raw) To: Frederic Weisbecker Cc: Steven Rostedt, devendra.aaru, Paul E. McKenney, linux-kernel On Wed, Jan 23, 2013 at 3:02 PM, Frederic Weisbecker <fweisbec@gmail.com> wrote: > 2013/1/23 Steven Rostedt <rostedt@goodmis.org>: >> On Wed, 2013-01-23 at 14:46 +0100, Frederic Weisbecker wrote: >> >>> > Hmmm, yes, but why, clueless, CONFIG_KVM=y as a workaround! >>> >>> I believe he pointed out the "{i" to you. Typing mistake? >> >> In which case the CONFIG_KVM=y is a work around if that {i is within a >> #ifndef CONFIG_KVM ;-) > > No it's in #ifdef CONFIG_KVM so the right fix is: > > diff --git a/kernel/context_tracking.c b/kernel/context_tracking.c > index bbb2c2c..a13b8a3 100644 > --- a/kernel/context_tracking.c > +++ b/kernel/context_tracking.c > @@ -111,14 +111,19 @@ void guest_enter(void) > else > __guest_enter(); > } > +EXPORT_SYMBOL_GPL(guest_enter); > > void guest_exit(void) > { > +#ifndef CONFIG_KVM > +i > +#endif > if (vtime_accounting_enabled()) > vtime_guest_exit(current); > else > __guest_exit(); > } > +EXPORT_SYMBOL_GPL(guest_exit); > #endif With and without the magic "i" hack the warning still remains! Dropped the coffee on my t-shirt, damn Frederic. - Sedat - ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 3.8-rc4-nohz3] kvm: Add missing EXPORT_SYMBOL when CONFIG_KVM=m 2013-01-23 14:02 ` Frederic Weisbecker 2013-01-23 14:16 ` Sedat Dilek @ 2013-01-23 14:52 ` Sedat Dilek 2013-01-23 15:03 ` Frederic Weisbecker 2013-01-23 15:04 ` Steven Rostedt 2 siblings, 1 reply; 15+ messages in thread From: Sedat Dilek @ 2013-01-23 14:52 UTC (permalink / raw) To: Frederic Weisbecker Cc: Steven Rostedt, devendra.aaru, Paul E. McKenney, linux-kernel On Wed, Jan 23, 2013 at 3:02 PM, Frederic Weisbecker <fweisbec@gmail.com> wrote: > 2013/1/23 Steven Rostedt <rostedt@goodmis.org>: >> On Wed, 2013-01-23 at 14:46 +0100, Frederic Weisbecker wrote: >> >>> > Hmmm, yes, but why, clueless, CONFIG_KVM=y as a workaround! >>> >>> I believe he pointed out the "{i" to you. Typing mistake? >> >> In which case the CONFIG_KVM=y is a work around if that {i is within a >> #ifndef CONFIG_KVM ;-) > > No it's in #ifdef CONFIG_KVM so the right fix is: > > diff --git a/kernel/context_tracking.c b/kernel/context_tracking.c > index bbb2c2c..a13b8a3 100644 > --- a/kernel/context_tracking.c > +++ b/kernel/context_tracking.c > @@ -111,14 +111,19 @@ void guest_enter(void) > else > __guest_enter(); > } > +EXPORT_SYMBOL_GPL(guest_enter); > > void guest_exit(void) > { > +#ifndef CONFIG_KVM > +i > +#endif > if (vtime_accounting_enabled()) > vtime_guest_exit(current); > else > __guest_exit(); > } > +EXPORT_SYMBOL_GPL(guest_exit); > #endif So, what's the real fix for this issue? - Sedat - ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 3.8-rc4-nohz3] kvm: Add missing EXPORT_SYMBOL when CONFIG_KVM=m 2013-01-23 14:52 ` Sedat Dilek @ 2013-01-23 15:03 ` Frederic Weisbecker 2013-01-23 15:20 ` Sedat Dilek 0 siblings, 1 reply; 15+ messages in thread From: Frederic Weisbecker @ 2013-01-23 15:03 UTC (permalink / raw) To: sedat.dilek; +Cc: Steven Rostedt, devendra.aaru, Paul E. McKenney, linux-kernel 2013/1/23 Sedat Dilek <sedat.dilek@gmail.com>: > On Wed, Jan 23, 2013 at 3:02 PM, Frederic Weisbecker <fweisbec@gmail.com> wrote: >> 2013/1/23 Steven Rostedt <rostedt@goodmis.org>: >>> On Wed, 2013-01-23 at 14:46 +0100, Frederic Weisbecker wrote: >>> >>>> > Hmmm, yes, but why, clueless, CONFIG_KVM=y as a workaround! >>>> >>>> I believe he pointed out the "{i" to you. Typing mistake? >>> >>> In which case the CONFIG_KVM=y is a work around if that {i is within a >>> #ifndef CONFIG_KVM ;-) >> >> No it's in #ifdef CONFIG_KVM so the right fix is: >> >> diff --git a/kernel/context_tracking.c b/kernel/context_tracking.c >> index bbb2c2c..a13b8a3 100644 >> --- a/kernel/context_tracking.c >> +++ b/kernel/context_tracking.c >> @@ -111,14 +111,19 @@ void guest_enter(void) >> else >> __guest_enter(); >> } >> +EXPORT_SYMBOL_GPL(guest_enter); >> >> void guest_exit(void) >> { >> +#ifndef CONFIG_KVM >> +i >> +#endif >> if (vtime_accounting_enabled()) >> vtime_guest_exit(current); >> else >> __guest_exit(); >> } >> +EXPORT_SYMBOL_GPL(guest_exit); >> #endif > > So, what's the real fix for this issue? So CONFIG_SOMETHING doesn't work when it's a module. Hence we need to remove the ifdef CONFIG_KVM around guest_enter(), guest_exit(), vtime_guest_enter() and vtime_guest_exit(). Also it seems we need <linux/export.h> in context_tracking.c ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 3.8-rc4-nohz3] kvm: Add missing EXPORT_SYMBOL when CONFIG_KVM=m 2013-01-23 15:03 ` Frederic Weisbecker @ 2013-01-23 15:20 ` Sedat Dilek 2013-01-23 15:25 ` Sedat Dilek 2013-01-23 15:52 ` Frederic Weisbecker 0 siblings, 2 replies; 15+ messages in thread From: Sedat Dilek @ 2013-01-23 15:20 UTC (permalink / raw) To: Frederic Weisbecker Cc: Steven Rostedt, devendra.aaru, Paul E. McKenney, linux-kernel [-- Attachment #1: Type: text/plain, Size: 1583 bytes --] On Wed, Jan 23, 2013 at 4:03 PM, Frederic Weisbecker <fweisbec@gmail.com> wrote: > 2013/1/23 Sedat Dilek <sedat.dilek@gmail.com>: >> On Wed, Jan 23, 2013 at 3:02 PM, Frederic Weisbecker <fweisbec@gmail.com> wrote: >>> 2013/1/23 Steven Rostedt <rostedt@goodmis.org>: >>>> On Wed, 2013-01-23 at 14:46 +0100, Frederic Weisbecker wrote: >>>> >>>>> > Hmmm, yes, but why, clueless, CONFIG_KVM=y as a workaround! >>>>> >>>>> I believe he pointed out the "{i" to you. Typing mistake? >>>> >>>> In which case the CONFIG_KVM=y is a work around if that {i is within a >>>> #ifndef CONFIG_KVM ;-) >>> >>> No it's in #ifdef CONFIG_KVM so the right fix is: >>> >>> diff --git a/kernel/context_tracking.c b/kernel/context_tracking.c >>> index bbb2c2c..a13b8a3 100644 >>> --- a/kernel/context_tracking.c >>> +++ b/kernel/context_tracking.c >>> @@ -111,14 +111,19 @@ void guest_enter(void) >>> else >>> __guest_enter(); >>> } >>> +EXPORT_SYMBOL_GPL(guest_enter); >>> >>> void guest_exit(void) >>> { >>> +#ifndef CONFIG_KVM >>> +i >>> +#endif >>> if (vtime_accounting_enabled()) >>> vtime_guest_exit(current); >>> else >>> __guest_exit(); >>> } >>> +EXPORT_SYMBOL_GPL(guest_exit); >>> #endif >> >> So, what's the real fix for this issue? > > So CONFIG_SOMETHING doesn't work when it's a module. Hence we need to > remove the ifdef CONFIG_KVM around guest_enter(), guest_exit(), > vtime_guest_enter() and vtime_guest_exit(). Also it seems we need > <linux/export.h> in context_tracking.c You mean sth. like this? - Sedat - [-- Attachment #2: kvm-Fix-missing-EXPORT_SYMBOL_GPL.diff --] [-- Type: application/octet-stream, Size: 1717 bytes --] diff --git a/kernel/context_tracking.c b/kernel/context_tracking.c index bbb2c2c..8802a66 100644 --- a/kernel/context_tracking.c +++ b/kernel/context_tracking.c @@ -19,7 +19,7 @@ #include <linux/rcupdate.h> #include <linux/sched.h> #include <linux/hardirq.h> - +#include <linux/export.h> DEFINE_PER_CPU(struct context_tracking, context_tracking) = { #ifdef CONFIG_CONTEXT_TRACKING_FORCE @@ -103,7 +103,6 @@ void user_exit(void) local_irq_restore(flags); } -#ifdef CONFIG_KVM void guest_enter(void) { if (vtime_accounting_enabled()) @@ -111,6 +110,7 @@ void guest_enter(void) else __guest_enter(); } +EXPORT_SYMBOL_GPL(guest_enter); void guest_exit(void) { @@ -119,8 +119,7 @@ void guest_exit(void) else __guest_exit(); } -#endif - +EXPORT_SYMBOL_GPL(guest_exit); /** * context_tracking_task_switch - context switch the syscall callbacks diff --git a/kernel/sched/cputime.c b/kernel/sched/cputime.c index 5500a81..dc66cba 100644 --- a/kernel/sched/cputime.c +++ b/kernel/sched/cputime.c @@ -677,7 +677,6 @@ void vtime_user_enter(struct task_struct *tsk) write_sequnlock(&tsk->vtime_seqlock); } -#ifdef CONFIG_KVM void vtime_guest_enter(struct task_struct *tsk) { write_seqlock(&tsk->vtime_seqlock); @@ -685,6 +684,7 @@ void vtime_guest_enter(struct task_struct *tsk) current->flags |= PF_VCPU; write_sequnlock(&tsk->vtime_seqlock); } +EXPORT_SYMBOL_GPL(vtime_guest_enter); void vtime_guest_exit(struct task_struct *tsk) { @@ -693,7 +693,7 @@ void vtime_guest_exit(struct task_struct *tsk) current->flags &= ~PF_VCPU; write_sequnlock(&tsk->vtime_seqlock); } -#endif +EXPORT_SYMBOL_GPL(vtime_guest_exit); void vtime_account_idle(struct task_struct *tsk) { ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 3.8-rc4-nohz3] kvm: Add missing EXPORT_SYMBOL when CONFIG_KVM=m 2013-01-23 15:20 ` Sedat Dilek @ 2013-01-23 15:25 ` Sedat Dilek 2013-01-23 15:53 ` Frederic Weisbecker 2013-01-23 15:52 ` Frederic Weisbecker 1 sibling, 1 reply; 15+ messages in thread From: Sedat Dilek @ 2013-01-23 15:25 UTC (permalink / raw) To: Frederic Weisbecker Cc: Steven Rostedt, devendra.aaru, Paul E. McKenney, linux-kernel On Wed, Jan 23, 2013 at 4:20 PM, Sedat Dilek <sedat.dilek@gmail.com> wrote: > On Wed, Jan 23, 2013 at 4:03 PM, Frederic Weisbecker <fweisbec@gmail.com> wrote: >> 2013/1/23 Sedat Dilek <sedat.dilek@gmail.com>: >>> On Wed, Jan 23, 2013 at 3:02 PM, Frederic Weisbecker <fweisbec@gmail.com> wrote: >>>> 2013/1/23 Steven Rostedt <rostedt@goodmis.org>: >>>>> On Wed, 2013-01-23 at 14:46 +0100, Frederic Weisbecker wrote: >>>>> >>>>>> > Hmmm, yes, but why, clueless, CONFIG_KVM=y as a workaround! >>>>>> >>>>>> I believe he pointed out the "{i" to you. Typing mistake? >>>>> >>>>> In which case the CONFIG_KVM=y is a work around if that {i is within a >>>>> #ifndef CONFIG_KVM ;-) >>>> >>>> No it's in #ifdef CONFIG_KVM so the right fix is: >>>> >>>> diff --git a/kernel/context_tracking.c b/kernel/context_tracking.c >>>> index bbb2c2c..a13b8a3 100644 >>>> --- a/kernel/context_tracking.c >>>> +++ b/kernel/context_tracking.c >>>> @@ -111,14 +111,19 @@ void guest_enter(void) >>>> else >>>> __guest_enter(); >>>> } >>>> +EXPORT_SYMBOL_GPL(guest_enter); >>>> >>>> void guest_exit(void) >>>> { >>>> +#ifndef CONFIG_KVM >>>> +i >>>> +#endif >>>> if (vtime_accounting_enabled()) >>>> vtime_guest_exit(current); >>>> else >>>> __guest_exit(); >>>> } >>>> +EXPORT_SYMBOL_GPL(guest_exit); >>>> #endif >>> >>> So, what's the real fix for this issue? >> >> So CONFIG_SOMETHING doesn't work when it's a module. Hence we need to >> remove the ifdef CONFIG_KVM around guest_enter(), guest_exit(), >> vtime_guest_enter() and vtime_guest_exit(). Also it seems we need >> <linux/export.h> in context_tracking.c > > You mean sth. like this? > Isn't vtime.h missing in kvm_host.h as an include? - Sedat - > - Sedat - ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 3.8-rc4-nohz3] kvm: Add missing EXPORT_SYMBOL when CONFIG_KVM=m 2013-01-23 15:25 ` Sedat Dilek @ 2013-01-23 15:53 ` Frederic Weisbecker 0 siblings, 0 replies; 15+ messages in thread From: Frederic Weisbecker @ 2013-01-23 15:53 UTC (permalink / raw) To: sedat.dilek; +Cc: Steven Rostedt, devendra.aaru, Paul E. McKenney, linux-kernel 2013/1/23 Sedat Dilek <sedat.dilek@gmail.com>: > Isn't vtime.h missing in kvm_host.h as an include? No, vtime_guest_enter/exit() are only referenced by context_tracking.c ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 3.8-rc4-nohz3] kvm: Add missing EXPORT_SYMBOL when CONFIG_KVM=m 2013-01-23 15:20 ` Sedat Dilek 2013-01-23 15:25 ` Sedat Dilek @ 2013-01-23 15:52 ` Frederic Weisbecker 1 sibling, 0 replies; 15+ messages in thread From: Frederic Weisbecker @ 2013-01-23 15:52 UTC (permalink / raw) To: sedat.dilek; +Cc: Steven Rostedt, devendra.aaru, Paul E. McKenney, linux-kernel 2013/1/23 Sedat Dilek <sedat.dilek@gmail.com>: >> So CONFIG_SOMETHING doesn't work when it's a module. Hence we need to >> remove the ifdef CONFIG_KVM around guest_enter(), guest_exit(), >> vtime_guest_enter() and vtime_guest_exit(). Also it seems we need >> <linux/export.h> in context_tracking.c > > You mean sth. like this? Almost. vtime_guest_enter/exit don't need to be exported because they are not referenced by module code: guest_enter/exit are builtin code. ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 3.8-rc4-nohz3] kvm: Add missing EXPORT_SYMBOL when CONFIG_KVM=m 2013-01-23 14:02 ` Frederic Weisbecker 2013-01-23 14:16 ` Sedat Dilek 2013-01-23 14:52 ` Sedat Dilek @ 2013-01-23 15:04 ` Steven Rostedt 2013-01-23 15:17 ` Frederic Weisbecker 2 siblings, 1 reply; 15+ messages in thread From: Steven Rostedt @ 2013-01-23 15:04 UTC (permalink / raw) To: Frederic Weisbecker Cc: sedat.dilek, devendra.aaru, Paul E. McKenney, linux-kernel On Wed, 2013-01-23 at 15:02 +0100, Frederic Weisbecker wrote: > diff --git a/kernel/context_tracking.c b/kernel/context_tracking.c > index bbb2c2c..a13b8a3 100644 > --- a/kernel/context_tracking.c > +++ b/kernel/context_tracking.c > @@ -111,14 +111,19 @@ void guest_enter(void) > else > __guest_enter(); > } > +EXPORT_SYMBOL_GPL(guest_enter); > > void guest_exit(void) > { > +#ifndef CONFIG_KVM > +i > +#endif I don't like #ifdefs in .c files. They belong in headers. Could you convert this to be: include/linux/context_tracking.h: #ifdef CONFIG_KVM #define add_vi_i_typo() #else #define add_vi_i_typo() i #endif and then in context_tracking.c: void guest_exit(void) { add_vi_typo(); [...] -- Steve > if (vtime_accounting_enabled()) > vtime_guest_exit(current); > else > __guest_exit(); > } > +EXPORT_SYMBOL_GPL(guest_exit); > #endif ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 3.8-rc4-nohz3] kvm: Add missing EXPORT_SYMBOL when CONFIG_KVM=m 2013-01-23 15:04 ` Steven Rostedt @ 2013-01-23 15:17 ` Frederic Weisbecker 0 siblings, 0 replies; 15+ messages in thread From: Frederic Weisbecker @ 2013-01-23 15:17 UTC (permalink / raw) To: Steven Rostedt; +Cc: sedat.dilek, devendra.aaru, Paul E. McKenney, linux-kernel 2013/1/23 Steven Rostedt <rostedt@goodmis.org>: > On Wed, 2013-01-23 at 15:02 +0100, Frederic Weisbecker wrote: > >> diff --git a/kernel/context_tracking.c b/kernel/context_tracking.c >> index bbb2c2c..a13b8a3 100644 >> --- a/kernel/context_tracking.c >> +++ b/kernel/context_tracking.c >> @@ -111,14 +111,19 @@ void guest_enter(void) >> else >> __guest_enter(); >> } >> +EXPORT_SYMBOL_GPL(guest_enter); >> >> void guest_exit(void) >> { >> +#ifndef CONFIG_KVM >> +i >> +#endif > > I don't like #ifdefs in .c files. They belong in headers. Could you > convert this to be: > > include/linux/context_tracking.h: > > #ifdef CONFIG_KVM > #define add_vi_i_typo() > #else > #define add_vi_i_typo() i > #endif > > and then in context_tracking.c: > > void guest_exit(void) > { > add_vi_typo(); > > [...] Much cleaner indeed! And this way it's more generally available for further users. Will do the change, thanks! ^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2013-01-23 15:53 UTC | newest] Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2013-01-23 13:15 [PATCH 3.8-rc4-nohz3] kvm: Add missing EXPORT_SYMBOL when CONFIG_KVM=m Sedat Dilek 2013-01-23 13:17 ` devendra.aaru 2013-01-23 13:33 ` Sedat Dilek 2013-01-23 13:46 ` Frederic Weisbecker 2013-01-23 13:53 ` Steven Rostedt 2013-01-23 14:02 ` Frederic Weisbecker 2013-01-23 14:16 ` Sedat Dilek 2013-01-23 14:52 ` Sedat Dilek 2013-01-23 15:03 ` Frederic Weisbecker 2013-01-23 15:20 ` Sedat Dilek 2013-01-23 15:25 ` Sedat Dilek 2013-01-23 15:53 ` Frederic Weisbecker 2013-01-23 15:52 ` Frederic Weisbecker 2013-01-23 15:04 ` Steven Rostedt 2013-01-23 15:17 ` Frederic Weisbecker
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®