* [PATCH] Use CONFIG_PREEMPT_NOTIFIERS around struct preempt_notifier
@ 2008-01-28 23:42 Hollis Blanchard
2008-01-29 8:54 ` Avi Kivity
2008-01-29 23:22 ` Chris Lalancette
0 siblings, 2 replies; 7+ messages in thread
From: Hollis Blanchard @ 2008-01-28 23:42 UTC (permalink / raw)
To: Avi Kivity
Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
kvm-ppc-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
# HG changeset patch
# User Hollis Blanchard <hollisb-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
# Date 1201563731 21600
# Node ID 6a2f4869cf5da00fa0ccacc9188ea493459ce4cb
# Parent a6dd6b5a597903a069cb9711f73ea1b5c4f0b764
This allows kvm_host.h to be #included even when struct preempt_notifier is
undefined. This is needed to build asm-offsets.h.
Signed-off-by: Hollis Blanchard <hollisb-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
---
1 file changed, 2 insertions(+)
include/linux/kvm_host.h | 2 ++
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
--- a/include/linux/kvm_host.h
+++ b/include/linux/kvm_host.h
@@ -67,7 +67,9 @@ void kvm_io_bus_register_dev(struct kvm_
struct kvm_vcpu {
struct kvm *kvm;
+#ifdef CONFIG_PREEMPT_NOTIFIERS
struct preempt_notifier preempt_notifier;
+#endif
int vcpu_id;
struct mutex mutex;
int cpu;
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Use CONFIG_PREEMPT_NOTIFIERS around struct preempt_notifier
2008-01-28 23:42 [PATCH] Use CONFIG_PREEMPT_NOTIFIERS around struct preempt_notifier Hollis Blanchard
@ 2008-01-29 8:54 ` Avi Kivity
2008-01-29 23:22 ` Chris Lalancette
1 sibling, 0 replies; 7+ messages in thread
From: Avi Kivity @ 2008-01-29 8:54 UTC (permalink / raw)
To: Hollis Blanchard
Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
kvm-ppc-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
Hollis Blanchard wrote:
> This allows kvm_host.h to be #included even when struct preempt_notifier is
> undefined. This is needed to build asm-offsets.h.
>
>
Applied, thanks.
--
error compiling committee.c: too many arguments to function
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Use CONFIG_PREEMPT_NOTIFIERS around struct preempt_notifier
2008-01-28 23:42 [PATCH] Use CONFIG_PREEMPT_NOTIFIERS around struct preempt_notifier Hollis Blanchard
2008-01-29 8:54 ` Avi Kivity
@ 2008-01-29 23:22 ` Chris Lalancette
[not found] ` <479FB535.5080302-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
1 sibling, 1 reply; 7+ messages in thread
From: Chris Lalancette @ 2008-01-29 23:22 UTC (permalink / raw)
To: Hollis Blanchard
Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
kvm-ppc-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f, Avi Kivity
Hollis Blanchard wrote:
> diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
> --- a/include/linux/kvm_host.h
> +++ b/include/linux/kvm_host.h
> @@ -67,7 +67,9 @@ void kvm_io_bus_register_dev(struct kvm_
>
> struct kvm_vcpu {
> struct kvm *kvm;
> +#ifdef CONFIG_PREEMPT_NOTIFIERS
> struct preempt_notifier preempt_notifier;
> +#endif
> int vcpu_id;
> struct mutex mutex;
> int cpu;
Hm, this causes my build to fail on x86_64:
make -C /lib/modules/2.6.23.8-63.fc8/build M=`pwd` "$@"
make[2]: Entering directory `/usr/src/kernels/2.6.23.8-63.fc8-x86_64'
LD /tmp/kvm-userspace/kernel/built-in.o
CC [M] /tmp/kvm-userspace/kernel/svm.o
CC [M] /tmp/kvm-userspace/kernel/vmx.o
CC [M] /tmp/kvm-userspace/kernel/vmx-debug.o
CC [M] /tmp/kvm-userspace/kernel/kvm_main.o
/tmp/kvm-userspace/kernel/kvm_main.c: In function ‘vcpu_load’:
/tmp/kvm-userspace/kernel/kvm_main.c:82: error: ‘struct kvm_vcpu’ has no member
named ‘preempt_notifier’
/tmp/kvm-userspace/kernel/kvm_main.c: In function ‘vcpu_put’:
/tmp/kvm-userspace/kernel/kvm_main.c:91: error: ‘struct kvm_vcpu’ has no member
named ‘preempt_notifier’
/tmp/kvm-userspace/kernel/kvm_main.c: In function ‘kvm_vm_ioctl_create_vcpu’:
/tmp/kvm-userspace/kernel/kvm_main.c:749: error: ‘struct kvm_vcpu’ has no member
named ‘preempt_notifier’
/tmp/kvm-userspace/kernel/kvm_main.c: In function ‘preempt_notifier_to_vcpu’:
/tmp/kvm-userspace/kernel/kvm_main.c:1284: error: ‘struct kvm_vcpu’ has no
member named ‘preempt_notifier’
/tmp/kvm-userspace/kernel/kvm_main.c:1284: warning: type defaults to ‘int’ in
declaration of ‘__mptr’
/tmp/kvm-userspace/kernel/kvm_main.c:1284: warning: initialization from
incompatible pointer type
/tmp/kvm-userspace/kernel/kvm_main.c:1284: error: ‘struct kvm_vcpu’ has no
member named ‘preempt_notifier’
make[3]: *** [/tmp/kvm-userspace/kernel/kvm_main.o] Error 1
make[2]: *** [_module_/tmp/kvm-userspace/kernel] Error 2
make[2]: Leaving directory `/usr/src/kernels/2.6.23.8-63.fc8-x86_64'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/tmp/kvm-userspace/kernel'
make: *** [kernel] Error 2
Reverting this patch makes the build succeed again.
Chris Lalancette
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [kvm-ppc-devel] [PATCH] Use CONFIG_PREEMPT_NOTIFIERS around struct preempt_notifier
[not found] ` <479FB535.5080302-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
@ 2008-01-29 23:41 ` Hollis Blanchard
2008-01-30 1:04 ` Hollis Blanchard
2008-01-30 9:55 ` Avi Kivity
2 siblings, 0 replies; 7+ messages in thread
From: Hollis Blanchard @ 2008-01-29 23:41 UTC (permalink / raw)
To: Chris Lalancette
Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
kvm-ppc-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
On Tue, 2008-01-29 at 18:22 -0500, Chris Lalancette wrote:
> Hollis Blanchard wrote:
> > diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
> > --- a/include/linux/kvm_host.h
> > +++ b/include/linux/kvm_host.h
> > @@ -67,7 +67,9 @@ void kvm_io_bus_register_dev(struct kvm_
> >
> > struct kvm_vcpu {
> > struct kvm *kvm;
> > +#ifdef CONFIG_PREEMPT_NOTIFIERS
> > struct preempt_notifier preempt_notifier;
> > +#endif
> > int vcpu_id;
> > struct mutex mutex;
> > int cpu;
>
> Hm, this causes my build to fail on x86_64:
>
> make -C /lib/modules/2.6.23.8-63.fc8/build M=`pwd` "$@"
> make[2]: Entering directory `/usr/src/kernels/2.6.23.8-63.fc8-x86_64'
> LD /tmp/kvm-userspace/kernel/built-in.o
> CC [M] /tmp/kvm-userspace/kernel/svm.o
> CC [M] /tmp/kvm-userspace/kernel/vmx.o
> CC [M] /tmp/kvm-userspace/kernel/vmx-debug.o
> CC [M] /tmp/kvm-userspace/kernel/kvm_main.o
> /tmp/kvm-userspace/kernel/kvm_main.c: In function ‘vcpu_load’:
> /tmp/kvm-userspace/kernel/kvm_main.c:82: error: ‘struct kvm_vcpu’ has no member
> named ‘preempt_notifier’
> /tmp/kvm-userspace/kernel/kvm_main.c: In function ‘vcpu_put’:
> /tmp/kvm-userspace/kernel/kvm_main.c:91: error: ‘struct kvm_vcpu’ has no member
> named ‘preempt_notifier’
> /tmp/kvm-userspace/kernel/kvm_main.c: In function ‘kvm_vm_ioctl_create_vcpu’:
> /tmp/kvm-userspace/kernel/kvm_main.c:749: error: ‘struct kvm_vcpu’ has no member
> named ‘preempt_notifier’
> /tmp/kvm-userspace/kernel/kvm_main.c: In function ‘preempt_notifier_to_vcpu’:
> /tmp/kvm-userspace/kernel/kvm_main.c:1284: error: ‘struct kvm_vcpu’ has no
> member named ‘preempt_notifier’
> /tmp/kvm-userspace/kernel/kvm_main.c:1284: warning: type defaults to ‘int’ in
> declaration of ‘__mptr’
> /tmp/kvm-userspace/kernel/kvm_main.c:1284: warning: initialization from
> incompatible pointer type
> /tmp/kvm-userspace/kernel/kvm_main.c:1284: error: ‘struct kvm_vcpu’ has no
> member named ‘preempt_notifier’
> make[3]: *** [/tmp/kvm-userspace/kernel/kvm_main.o] Error 1
> make[2]: *** [_module_/tmp/kvm-userspace/kernel] Error 2
> make[2]: Leaving directory `/usr/src/kernels/2.6.23.8-63.fc8-x86_64'
> make[1]: *** [all] Error 2
> make[1]: Leaving directory `/tmp/kvm-userspace/kernel'
> make: *** [kernel] Error 2
This seems to be an artifact of the hackage in external-module-compat.h,
since you're building with a pre-PREEMPT_NOTIFIERS kernel.
Maybe adding
#define CONFIG_PREEMPT_NOTIFIERS
after
#ifndef CONFIG_PREEMPT_NOTIFIERS
in external-module-compat.h would "fix" it, since kvm_host.h would pick
up the define when it's included later.
The other hackful alternative would be this in kvm_host.h:
#ifdef CONFIG_PREEMPT_NOTIFIERS
struct preempt_notifier preempt_notifier;
#else
long preempt_notifier;
#endif
--
Hollis Blanchard
IBM Linux Technology Center
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Use CONFIG_PREEMPT_NOTIFIERS around struct preempt_notifier
[not found] ` <479FB535.5080302-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2008-01-29 23:41 ` [kvm-ppc-devel] " Hollis Blanchard
@ 2008-01-30 1:04 ` Hollis Blanchard
2008-01-30 9:55 ` Avi Kivity
2 siblings, 0 replies; 7+ messages in thread
From: Hollis Blanchard @ 2008-01-30 1:04 UTC (permalink / raw)
To: Chris Lalancette
Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
kvm-ppc-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f, Avi Kivity
On Tue, 2008-01-29 at 18:22 -0500, Chris Lalancette wrote:
> Hollis Blanchard wrote:
> > diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
> > --- a/include/linux/kvm_host.h
> > +++ b/include/linux/kvm_host.h
> > @@ -67,7 +67,9 @@ void kvm_io_bus_register_dev(struct kvm_
> >
> > struct kvm_vcpu {
> > struct kvm *kvm;
> > +#ifdef CONFIG_PREEMPT_NOTIFIERS
> > struct preempt_notifier preempt_notifier;
> > +#endif
> > int vcpu_id;
> > struct mutex mutex;
> > int cpu;
>
> Hm, this causes my build to fail on x86_64:
>
> make -C /lib/modules/2.6.23.8-63.fc8/build M=`pwd` "$@"
> make[2]: Entering directory `/usr/src/kernels/2.6.23.8-63.fc8-x86_64'
> LD /tmp/kvm-userspace/kernel/built-in.o
> CC [M] /tmp/kvm-userspace/kernel/svm.o
> CC [M] /tmp/kvm-userspace/kernel/vmx.o
> CC [M] /tmp/kvm-userspace/kernel/vmx-debug.o
> CC [M] /tmp/kvm-userspace/kernel/kvm_main.o
> /tmp/kvm-userspace/kernel/kvm_main.c: In function ‘vcpu_load’:
> /tmp/kvm-userspace/kernel/kvm_main.c:82: error: ‘struct kvm_vcpu’ has no member
> named ‘preempt_notifier’
> /tmp/kvm-userspace/kernel/kvm_main.c: In function ‘vcpu_put’:
> /tmp/kvm-userspace/kernel/kvm_main.c:91: error: ‘struct kvm_vcpu’ has no member
> named ‘preempt_notifier’
> /tmp/kvm-userspace/kernel/kvm_main.c: In function ‘kvm_vm_ioctl_create_vcpu’:
> /tmp/kvm-userspace/kernel/kvm_main.c:749: error: ‘struct kvm_vcpu’ has no member
> named ‘preempt_notifier’
> /tmp/kvm-userspace/kernel/kvm_main.c: In function ‘preempt_notifier_to_vcpu’:
> /tmp/kvm-userspace/kernel/kvm_main.c:1284: error: ‘struct kvm_vcpu’ has no
> member named ‘preempt_notifier’
> /tmp/kvm-userspace/kernel/kvm_main.c:1284: warning: type defaults to ‘int’ in
> declaration of ‘__mptr’
> /tmp/kvm-userspace/kernel/kvm_main.c:1284: warning: initialization from
> incompatible pointer type
> /tmp/kvm-userspace/kernel/kvm_main.c:1284: error: ‘struct kvm_vcpu’ has no
> member named ‘preempt_notifier’
> make[3]: *** [/tmp/kvm-userspace/kernel/kvm_main.o] Error 1
> make[2]: *** [_module_/tmp/kvm-userspace/kernel] Error 2
> make[2]: Leaving directory `/usr/src/kernels/2.6.23.8-63.fc8-x86_64'
> make[1]: *** [all] Error 2
> make[1]: Leaving directory `/tmp/kvm-userspace/kernel'
> make: *** [kernel] Error 2
>
> Reverting this patch makes the build succeed again.
>
> Chris Lalancette
Actually, I think this should do the trick:
Always use CONFIG_PREEMPT_NOTIFIERS in the external module hack.
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
diff --git a/kernel/hack-module.awk b/kernel/hack-module.awk
--- a/kernel/hack-module.awk
+++ b/kernel/hack-module.awk
@@ -42,6 +42,8 @@
{ sub(/linux\/mm_types\.h/, "linux/mm.h") }
+/#ifdef CONFIG_PREEMPT_NOTIFIERS/ { $0 = "#if 1" }
+
{ print }
/kvm_x86_ops->run/ {
--
Hollis Blanchard
IBM Linux Technology Center
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Use CONFIG_PREEMPT_NOTIFIERS around struct preempt_notifier
[not found] ` <479FB535.5080302-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2008-01-29 23:41 ` [kvm-ppc-devel] " Hollis Blanchard
2008-01-30 1:04 ` Hollis Blanchard
@ 2008-01-30 9:55 ` Avi Kivity
[not found] ` <47A049A6.6070007-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2 siblings, 1 reply; 7+ messages in thread
From: Avi Kivity @ 2008-01-30 9:55 UTC (permalink / raw)
To: Chris Lalancette
Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
kvm-ppc-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f, Hollis Blanchard
Chris Lalancette wrote:
> Hollis Blanchard wrote:
>
>> diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
>> --- a/include/linux/kvm_host.h
>> +++ b/include/linux/kvm_host.h
>> @@ -67,7 +67,9 @@ void kvm_io_bus_register_dev(struct kvm_
>>
>> struct kvm_vcpu {
>> struct kvm *kvm;
>> +#ifdef CONFIG_PREEMPT_NOTIFIERS
>> struct preempt_notifier preempt_notifier;
>> +#endif
>> int vcpu_id;
>> struct mutex mutex;
>> int cpu;
>>
>
> Hm, this causes my build to fail on x86_64:
>
>
I pushed a fix for this.
--
error compiling committee.c: too many arguments to function
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Use CONFIG_PREEMPT_NOTIFIERS around struct preempt_notifier
[not found] ` <47A049A6.6070007-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
@ 2008-01-30 13:44 ` Chris Lalancette
0 siblings, 0 replies; 7+ messages in thread
From: Chris Lalancette @ 2008-01-30 13:44 UTC (permalink / raw)
To: Avi Kivity
Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
kvm-ppc-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f, Hollis Blanchard
Avi Kivity wrote:
>> Hm, this causes my build to fail on x86_64:
>>
>>
>
> I pushed a fix for this.
>
Yep, that does it. Thanks!
Chris Lalancette
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2008-01-30 13:44 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-28 23:42 [PATCH] Use CONFIG_PREEMPT_NOTIFIERS around struct preempt_notifier Hollis Blanchard
2008-01-29 8:54 ` Avi Kivity
2008-01-29 23:22 ` Chris Lalancette
[not found] ` <479FB535.5080302-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2008-01-29 23:41 ` [kvm-ppc-devel] " Hollis Blanchard
2008-01-30 1:04 ` Hollis Blanchard
2008-01-30 9:55 ` Avi Kivity
[not found] ` <47A049A6.6070007-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2008-01-30 13:44 ` Chris Lalancette
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox