* [PATCH 3.8-rc4-nohz3] kvm: Add missing include and EXPORT_SYMBOL_GPL
@ 2013-01-23 16:00 Sedat Dilek
0 siblings, 0 replies; 5+ messages in thread
From: Sedat Dilek @ 2013-01-23 16:00 UTC (permalink / raw)
To: Frederic Weisbecker, Steven Rostedt, Paul E. McKenney, linux-kernel
Cc: Sedat Dilek
When 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 removing the CONFIG_KVM ifdefs and adding missing
EXPORT_SYMBOL_GPL for:
+ guest_enter() and guest_exit()
+ vtime_guest_enter() and vtime_guest_exit()
Also add missing includes:
+ Add <linux/export.h> to kernel/context_tracking.c
+ Add <linux/vtime.h> to include/linux/kvm_host.h
This issue was introduced with commit 8eebafe9be58 ("kvm: Prepare to
add generic guest entry/exit callbacks").
With some help of funny X86 hackerz!
Tested on a Ubuntu/precise AMD64 with 'CONFIG_KVM=m'.
[ vUNKNOWN: Without the magic "i" hack. -dileks ]
Signed-off-by: Sedat Dilek <sedat.dilek@gmail.com>
---
include/linux/kvm_host.h | 1 +
kernel/context_tracking.c | 7 +++----
kernel/sched/cputime.c | 4 ++--
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
index b7996a7..3dd0be7 100644
--- a/include/linux/kvm_host.h
+++ b/include/linux/kvm_host.h
@@ -23,6 +23,7 @@
#include <linux/ratelimit.h>
#include <linux/err.h>
#include <linux/irqflags.h>
+#include <linux/vtime.h>
#include <asm/signal.h>
#include <linux/kvm.h>
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)
{
--
1.8.1.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 3.8-rc4-nohz3] kvm: Add missing include and EXPORT_SYMBOL_GPL
@ 2013-01-23 16:35 Sedat Dilek
0 siblings, 0 replies; 5+ messages in thread
From: Sedat Dilek @ 2013-01-23 16:35 UTC (permalink / raw)
To: Frederic Weisbecker, Paul E. McKenney, Steven Rostedt,
linux-kernel, devendra . aaru
Cc: Sedat Dilek
When 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 removing the CONFIG_KVM ifdefs and adding missing
EXPORT_SYMBOL_GPL for:
+ guest_enter() and guest_exit()
+ vtime_guest_enter() and vtime_guest_exit()
Also add a missing include:
+ Add <linux/export.h> to kernel/context_tracking.c
This issue was introduced with commit 8eebafe9be58 ("kvm: Prepare to
add generic guest entry/exit callbacks").
With some help of funny "i™"X86 hackerz!
Tested on a Ubuntu/precise AMD64 with 'CONFIG_KVM=m'.
[ vUNKNOWN: Without the magic "i" hack. -dileks ]
[ vUNKNOWN+1: Remove vtime.h from kvm_host.h. -dileks ]
[ vUNKNOWN+2: Re-add some removed empty lines. -dileks ]
Signed-off-by: Sedat Dilek <sedat.dilek@gmail.com>
---
kernel/context_tracking.c | 5 +++--
kernel/sched/cputime.c | 4 ++--
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/kernel/context_tracking.c b/kernel/context_tracking.c
index bbb2c2c..dd38fde 100644
--- a/kernel/context_tracking.c
+++ b/kernel/context_tracking.c
@@ -19,6 +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) = {
@@ -103,7 +104,6 @@ void user_exit(void)
local_irq_restore(flags);
}
-#ifdef CONFIG_KVM
void guest_enter(void)
{
if (vtime_accounting_enabled())
@@ -111,6 +111,7 @@ void guest_enter(void)
else
__guest_enter();
}
+EXPORT_SYMBOL_GPL(guest_enter);
void guest_exit(void)
{
@@ -119,7 +120,7 @@ void guest_exit(void)
else
__guest_exit();
}
-#endif
+EXPORT_SYMBOL_GPL(guest_exit);
/**
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)
{
--
1.8.1.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 3.8-rc4-nohz3] kvm: Add missing include and EXPORT_SYMBOL_GPL
2013-01-23 16:14 ` Frederic Weisbecker
@ 2013-01-23 16:17 ` Sedat Dilek
0 siblings, 0 replies; 5+ messages in thread
From: Sedat Dilek @ 2013-01-23 16:17 UTC (permalink / raw)
To: Frederic Weisbecker; +Cc: Steven Rostedt, Paul E. McKenney, linux-kernel
On Wed, Jan 23, 2013 at 5:14 PM, Frederic Weisbecker <fweisbec@gmail.com> wrote:
> 2013/1/23 Sedat Dilek <sedat.dilek@gmail.com>:
>> When 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 removing the CONFIG_KVM ifdefs and adding missing
>> EXPORT_SYMBOL_GPL for:
>> + guest_enter() and guest_exit()
>> + vtime_guest_enter() and vtime_guest_exit()
>>
>> Also add a missing include:
>> + Add <linux/export.h> to kernel/context_tracking.c
>>
>> This issue was introduced with commit 8eebafe9be58 ("kvm: Prepare to
>> add generic guest entry/exit callbacks").
>>
>> With some help of funny "i™"X86 hackerz!
>>
>> Tested on a Ubuntu/precise AMD64 with 'CONFIG_KVM=m'.
>>
>> [ vUNKNOWN: Without the magic "i" hack. -dileks ]
>> [ vUNKNOWN+1: Remove vtime.h from kvm_host.h. -dileks ]
>>
>> Signed-off-by: Sedat Dilek <sedat.dilek@gmail.com>
>
> Thanks you!
>
> I hope you don't mind if I fold this patch into 8eebafe9be58. If I
> apply your patch separately, my patch would break the bisection.
> But I'll add your signed-off and the appropriate co-authorship credits.
That sounds reasonable! Thanks for the vital help... Enjoyed it :-).
- Sedat -
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 3.8-rc4-nohz3] kvm: Add missing include and EXPORT_SYMBOL_GPL
2013-01-23 16:06 Sedat Dilek
@ 2013-01-23 16:14 ` Frederic Weisbecker
2013-01-23 16:17 ` Sedat Dilek
0 siblings, 1 reply; 5+ messages in thread
From: Frederic Weisbecker @ 2013-01-23 16:14 UTC (permalink / raw)
To: Sedat Dilek; +Cc: Steven Rostedt, Paul E. McKenney, linux-kernel
2013/1/23 Sedat Dilek <sedat.dilek@gmail.com>:
> When 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 removing the CONFIG_KVM ifdefs and adding missing
> EXPORT_SYMBOL_GPL for:
> + guest_enter() and guest_exit()
> + vtime_guest_enter() and vtime_guest_exit()
>
> Also add a missing include:
> + Add <linux/export.h> to kernel/context_tracking.c
>
> This issue was introduced with commit 8eebafe9be58 ("kvm: Prepare to
> add generic guest entry/exit callbacks").
>
> With some help of funny "i™"X86 hackerz!
>
> Tested on a Ubuntu/precise AMD64 with 'CONFIG_KVM=m'.
>
> [ vUNKNOWN: Without the magic "i" hack. -dileks ]
> [ vUNKNOWN+1: Remove vtime.h from kvm_host.h. -dileks ]
>
> Signed-off-by: Sedat Dilek <sedat.dilek@gmail.com>
Thanks you!
I hope you don't mind if I fold this patch into 8eebafe9be58. If I
apply your patch separately, my patch would break the bisection.
But I'll add your signed-off and the appropriate co-authorship credits.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 3.8-rc4-nohz3] kvm: Add missing include and EXPORT_SYMBOL_GPL
@ 2013-01-23 16:06 Sedat Dilek
2013-01-23 16:14 ` Frederic Weisbecker
0 siblings, 1 reply; 5+ messages in thread
From: Sedat Dilek @ 2013-01-23 16:06 UTC (permalink / raw)
To: Frederic Weisbecker, Steven Rostedt, Paul E. McKenney, linux-kernel
Cc: Sedat Dilek
When 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 removing the CONFIG_KVM ifdefs and adding missing
EXPORT_SYMBOL_GPL for:
+ guest_enter() and guest_exit()
+ vtime_guest_enter() and vtime_guest_exit()
Also add a missing include:
+ Add <linux/export.h> to kernel/context_tracking.c
This issue was introduced with commit 8eebafe9be58 ("kvm: Prepare to
add generic guest entry/exit callbacks").
With some help of funny "i™"X86 hackerz!
Tested on a Ubuntu/precise AMD64 with 'CONFIG_KVM=m'.
[ vUNKNOWN: Without the magic "i" hack. -dileks ]
[ vUNKNOWN+1: Remove vtime.h from kvm_host.h. -dileks ]
Signed-off-by: Sedat Dilek <sedat.dilek@gmail.com>
---
kernel/context_tracking.c | 7 +++----
kernel/sched/cputime.c | 4 ++--
2 files changed, 5 insertions(+), 6 deletions(-)
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)
{
--
1.8.1.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-01-23 16:35 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-23 16:00 [PATCH 3.8-rc4-nohz3] kvm: Add missing include and EXPORT_SYMBOL_GPL Sedat Dilek
2013-01-23 16:06 Sedat Dilek
2013-01-23 16:14 ` Frederic Weisbecker
2013-01-23 16:17 ` Sedat Dilek
2013-01-23 16:35 Sedat Dilek
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.