linux-next: kvm tree build failure
Subsystems (4)
Hi Avi,
Today's linux-next build (powerpc ppc44x_defconfig) failed like this:
arch/powerpc/kvm/built-in.o: In function `kvm_destroy_vm':
kvm_main.c:(.text+0x2cfc): undefined reference to kvm_irqfd_release' arch/powerpc/kvm/built-in.o: In function kvm_vm_ioctl':
kvm_main.c:(.text+0x3230): undefined reference to `kvm_irqfd'
Caused by commit 302471ec2b5b6f74eba06973fb85e4584d20ef1e ("KVM: irqfd") which I have reverted for today.
Signature · 3 lines
Cheers, Stephen Rothwell [email protected] http://www.canb.auug.org.au/~sfr/
Quoted 4 lines · Stephen Rothwell
Hi Avi,
Today's linux-next build (powerpc
ppc44x_defconfig) failed like this:
Quoted 8 lines
arch/powerpc/kvm/built-in.o: In function `kvm_destroy_vm':
kvm_main.c:(.text+0x2cfc): undefined reference tokvm_irqfd_release' arch/powerpc/kvm/built-in.o: In functionkvm_vm_ioctl':
kvm_main.c:(.text+0x3230): undefined reference to `kvm_irqfd'Caused by commit
302471ec2b5b6f74eba06973fb85e4584d20ef1e("KVM: irqfd") which I have reverted for today.
Sorry about that. I now have build testing for s390 and ia64, so of course it triggered on ppc.
I'll look for a ppc machine for build testing.
Signature · 1 line
error compiling committee.c: too many arguments to function
Quoted 10 lines · Avi Kivity
Quoted 9 lines · Stephen Rothwell
Hi Avi,
Today's linux-next build (powerpc
ppc44x_defconfig) failed like this:
arch/powerpc/kvm/built-in.o: In function `kvm_destroy_vm':
kvm_main.c:(.text+0x2cfc): undefined reference tokvm_irqfd_release' arch/powerpc/kvm/built-in.o: In functionkvm_vm_ioctl':
kvm_main.c:(.text+0x3230): undefined reference to `kvm_irqfd'
Quoted 9 lines
Quoted 3 lines
Caused by commit
302471ec2b5b6f74eba06973fb85e4584d20ef1e("KVM: irqfd") which I have reverted for today.Sorry about that. I now have build testing for s390 and ia64, so of course it triggered on ppc.
I'll look for a ppc machine for build testing.
Can't you cross compile for ppc? I can't remember someone posted a link with binary cross-compiler packages a while back.
Boaz
Quoted 8 lines · Boaz Harrosh
Quoted 3 lines
I'll look for a ppc machine for build testing.
Can't you cross compile for ppc? I can't remember someone posted a link with binary cross-compiler packages a while back.
I have userspace to test as well, which needs a ton of cross-compiled libraries.
Signature · 1 line
error compiling committee.c: too many arguments to function
Quoted 4 lines · Avi Kivity
Quoted 3 lines · Boaz Harrosh
Quoted 3 lines
I'll look for a ppc machine for build testing.
Quoted 8 lines
Quoted 4 lines
Can't you cross compile for ppc? I can't remember someone posted a link with binary cross-compiler packages a while back.
I have userspace to test as well, which needs a ton of cross-compiled libraries.
A cross compiler produces native foreign code. A Native distribution with binary libraries will work just as well.
Do you mean to set up all the build environment and dependencies? Perhaps get a ready made ppc linux image, mount and chroot into it and build that way.
If only you had an emulator for ppc?
Boaz
Quoted 4 lines · Boaz Harrosh
Quoted 3 lines
I have userspace to test as well, which needs a ton of cross-compiled libraries.
Quoted 9 lines
A cross compiler produces native foreign code. A Native distribution with binary libraries will work just as well.
Do you mean to set up all the build environment and dependencies? Perhaps get a ready made ppc linux image, mount and chroot into it and build that way.
If only you had an emulator for ppc?
Life's too short for emulators.
Signature · 1 line
error compiling committee.c: too many arguments to function
PATCH 1/1 kvm: fix irqfd build failure discovered in linux-next
In reply to Stephen RothwellStephen Rothwell noted a build failure in arch != x86 in last nights linux-next tree, as noted here:
http://lkml.org/lkml/2009/5/21/32
This patch corrects the build issue by requiring explicit support for IRQFD to be defined, and only defining it on x86 (the only arch fully supported). The code itself isnt architecture dependent, but we need to add a new file to each makefile, advertise the capability, and of course, test that it works for each supported arch. We will submit patches against each relevant arch at a later time to enable support there as well.
---
arch/x86/kvm/Makefile | 1 + include/linux/kvm_host.h | 17 +++++++++++++++++ virt/kvm/eventfd.c | 6 ++++++ virt/kvm/kvm_main.c | 2 +- 4 files changed, 25 insertions(+), 1 deletions(-)
arch/x86/kvm/Makefile +1 -0
@@ -1,5 +1,6 @@ EXTRA_CFLAGS += -Ivirt/kvm -Iarch/x86/kvm +EXTRA_CFLAGS += -DKVM_HAVE_EVENTFD kvm-y += $(addprefix ../../../virt/kvm/, kvm_main.o ioapic.o \ coalesced_mmio.o irq_comm.o eventfd.o)
include/linux/kvm_host.h +17 -0
@@ -134,7 +134,9 @@ struct kvm {struct list_head vm_list;struct kvm_io_bus mmio_bus;struct kvm_io_bus pio_bus; +#ifdef KVM_HAVE_EVENTFD struct list_head irqfds; +#endif struct kvm_vm_stat stat;struct kvm_arch arch;atomic_t users_count;
@@ -529,7 +531,22 @@ static inline void kvm_free_irq_routing(struct kvm *kvm) {}#endif +#ifdef KVM_HAVE_EVENTFD + +void kvm_irqfd_init (struct kvm *kvm);int kvm_irqfd (struct kvm *kvm,int fd,int gsi,int flags);void kvm_irqfd_release (struct kvm *kvm); +#else + +static inline void kvm_irqfd_init (struct kvm *kvm) {} +static inline int kvm_irqfd (struct kvm *kvm,int fd,int gsi,int flags) +{ +return -EINVAL ; +} + +static inline void kvm_irqfd_release (struct kvm *kvm) {} + +#endif /* KVM_HAVE_EVENTFD */ +#endif
virt/kvm/eventfd.c +6 -0
@@ -206,6 +206,12 @@ kvm_deassign_irqfd(struct kvm *kvm, int fd, int gsi)return count ? count : -ENOENT ; } +void +kvm_irqfd_init (struct kvm *kvm) +{ +INIT_LIST_HEAD (&kvm->irqfds); +} +int kvm_irqfd (struct kvm *kvm,int fd,int gsi,int flags) {
virt/kvm/kvm_main.c +1 -1
@@ -983,7 +983,7 @@ static struct kvm *kvm_create_vm(void)atomic_inc (&kvm->mm->mm_count);spin_lock_init (&kvm->mmu_lock);kvm_io_bus_init (&kvm->pio_bus); -INIT_LIST_HEAD (&kvm->irqfds); +kvm_irqfd_init (kvm);mutex_init (&kvm->lock);kvm_io_bus_init (&kvm->mmio_bus);init_rwsem (&kvm->slots_lock);
Re: [PATCH] kvm: fix irqfd build failure discovered in linux-next
Quoted 27 lines · Gregory Haskins
Stephen Rothwell noted a build failure in arch != x86 in last nights linux-next tree, as noted here:
http://lkml.org/lkml/2009/5/21/32
This patch corrects the build issue by requiring explicit support for IRQFD to be defined, and only defining it on x86 (the only arch fully supported). The code itself isnt architecture dependent, but we need to add a new file to each makefile, advertise the capability, and of course, test that it works for each supported arch. We will submit patches against each relevant arch at a later time to enable support there as well.
Signed-off-by Gregory Haskins <[email protected]>---
arch/x86/kvm/Makefile | 1 + include/linux/kvm_host.h | 17 +++++++++++++++++ virt/kvm/eventfd.c | 6 ++++++ virt/kvm/kvm_main.c | 2 +- 4 files changed, 25 insertions(+), 1 deletions(-)arch/x86/kvm/Makefile +0
-0
arch/x86/kvm/Makefile line 5
Quoted 5 lines
arch/x86/kvm/Makefile +1
-0@@ -1,5 +1,6 @@ EXTRA_CFLAGS += -Ivirt/kvm -Iarch/x86/kvm +EXTRA_CFLAGS += -DKVM_HAVE_EVENTFD
The standard idiom for this is to use a Kconfig symbol; see for example HAVE_KVM_IRQCHIP in arch/*/kvm/Kconfig.
Signature · 1 line
error compiling committee.c: too many arguments to function
Re: [PATCH] kvm: fix irqfd build failure discovered in linux-next
Quoted 29 lines · Avi Kivity
Quoted 28 lines · Gregory Haskins
Stephen Rothwell noted a build failure in arch != x86 in last nights linux-next tree, as noted here:
http://lkml.org/lkml/2009/5/21/32
This patch corrects the build issue by requiring explicit support for IRQFD to be defined, and only defining it on x86 (the only arch fully supported). The code itself isnt architecture dependent, but we need to add a new file to each makefile, advertise the capability, and of course, test that it works for each supported arch. We will submit patches against each relevant arch at a later time to enable support there as well.
Signed-off-by Gregory Haskins <[email protected]>---
arch/x86/kvm/Makefile | 1 + include/linux/kvm_host.h | 17 +++++++++++++++++ virt/kvm/eventfd.c | 6 ++++++ virt/kvm/kvm_main.c | 2 +- 4 files changed, 25 insertions(+), 1 deletions(-)arch/x86/kvm/Makefile +0
-0@@ -1,5 +1,6 @@
Quoted 7 lines
arch/x86/kvm/Makefile
Quoted 4 lines
arch/x86/kvm/Makefile +1
-0EXTRA_CFLAGS += -Ivirt/kvm -Iarch/x86/kvm +EXTRA_CFLAGS += -DKVM_HAVE_EVENTFDThe standard idiom for this is to use a
Kconfigsymbol; see for exampleHAVE_KVM_IRQCHIPinarch/*/kvm/Kconfig.
Ah, I didn't realize I could do this in such a contained manner. I was afraid of polluting the top level arch/Kconfig, which is why I went this
other route. But I see from your example that this is not the case. I
will make a v2 with this change.
-Greg
Quoted 2 lines
Re: [PATCH] kvm: fix irqfd build failure discovered in linux-next
Quoted 5 lines · Gregory Haskins
Quoted 5 lines
Quoted 5 lines
EXTRA_CFLAGS+= -Ivirt/kvm -Iarch/x86/kvm
+EXTRA_CFLAGS += -DKVM_HAVE_EVENTFD
Quoted 9 lines
Quoted 3 lines
The standard idiom for this is to use a
Kconfigsymbol; see for exampleHAVE_KVM_IRQCHIPinarch/*/kvm/Kconfig.Ah, I didn't realize I could do this in such a contained manner. I was afraid of polluting the top level
arch/Kconfig, which is why I went this
other route. But I see from your example that this is not the case. I
will make a v2 with this change.
Note the situation is not as good as it could be, as you have to replicate the Kconfig for each arch. One day I'll set up virt/kvm/Kconfig which will set up defaults, so archs can override them.
Signature · 1 line
error compiling committee.c: too many arguments to function
PATCH v2 1/1 kvm: fix irqfd build failure discovered in linux-next
In reply to Stephen RothwellStephen Rothwell noted a build failure in arch != x86 in last nights linux-next tree, as noted here:
http://lkml.org/lkml/2009/5/21/32
This patch corrects the build issue by requiring explicit support for IRQFD to be defined, and only defining it on x86 (the only arch fully supported). The code itself isnt architecture dependent, but we need to add a new file to each makefile, advertise the capability, and of course, test that it works for each supported arch. We will submit patches against each relevant arch at a later time to enable support there as well.
---
arch/x86/kvm/Kconfig | 4 ++++ include/linux/kvm_host.h | 17 +++++++++++++++++ virt/kvm/eventfd.c | 6 ++++++ virt/kvm/kvm_main.c | 2 +- 4 files changed, 28 insertions(+), 1 deletions(-)
arch/x86/kvm/Kconfig +4 -0
@@ -8,6 +8,10 @@ config HAVE_KVM_IRQCHIP bool default y +config HAVE_KVM_EVENTFD + bool + default y + menuconfig VIRTUALIZATION bool "Virtualization" depends on HAVE_KVM || X86
include/linux/kvm_host.h +17 -0
@@ -134,7 +134,9 @@ struct kvm {struct list_head vm_list;struct kvm_io_bus mmio_bus;struct kvm_io_bus pio_bus; +#ifdef CONFIG_HAVE_KVM_EVENTFD struct list_head irqfds; +#endif struct kvm_vm_stat stat;struct kvm_arch arch;atomic_t users_count;
@@ -529,7 +531,22 @@ static inline void kvm_free_irq_routing(struct kvm *kvm) {}#endif +#ifdef CONFIG_HAVE_KVM_EVENTFD + +void kvm_irqfd_init (struct kvm *kvm);int kvm_irqfd (struct kvm *kvm,int fd,int gsi,int flags);void kvm_irqfd_release (struct kvm *kvm); +#else + +static inline void kvm_irqfd_init (struct kvm *kvm) {} +static inline int kvm_irqfd (struct kvm *kvm,int fd,int gsi,int flags) +{ +return -EINVAL ; +} + +static inline void kvm_irqfd_release (struct kvm *kvm) {} + +#endif /* CONFIG_HAVE_KVM_EVENTFD */ +#endif
virt/kvm/eventfd.c +6 -0
@@ -206,6 +206,12 @@ kvm_deassign_irqfd(struct kvm *kvm, int fd, int gsi)return count ? count : -ENOENT ; } +void +kvm_irqfd_init (struct kvm *kvm) +{ +INIT_LIST_HEAD (&kvm->irqfds); +} +int kvm_irqfd (struct kvm *kvm,int fd,int gsi,int flags) {
virt/kvm/kvm_main.c +1 -1
@@ -983,7 +983,7 @@ static struct kvm *kvm_create_vm(void)atomic_inc (&kvm->mm->mm_count);spin_lock_init (&kvm->mmu_lock);kvm_io_bus_init (&kvm->pio_bus); -INIT_LIST_HEAD (&kvm->irqfds); +kvm_irqfd_init (kvm);mutex_init (&kvm->lock);kvm_io_bus_init (&kvm->mmio_bus);init_rwsem (&kvm->slots_lock);
Re: [PATCH v2] kvm: fix irqfd build failure discovered in linux-next
Quoted 15 lines · Gregory Haskins
Stephen Rothwell noted a build failure in arch != x86 in last nights linux-next tree, as noted here:
http://lkml.org/lkml/2009/5/21/32
This patch corrects the build issue by requiring explicit support for IRQFD to be defined, and only defining it on x86 (the only arch fully supported). The code itself isnt architecture dependent, but we need to add a new file to each makefile, advertise the capability, and of course, test that it works for each supported arch. We will submit patches against each relevant arch at a later time to enable support there as well.
arch/x86/kvm/Kconfig config HAVE_KVM_IRQCHIP · line 14
Quoted 4 lines
arch/x86/kvm/Kconfig +4
-0+config HAVE_KVM_EVENTFD + bool + default y +
The build system will complain if it sees a symbol used but not defined; so you have to define it for all four archs. So I went ahead and did virt/kvm/Kconfig and adapted your patch to use it.
Signature · 1 line
error compiling committee.c: too many arguments to function
Re: [PATCH v2] kvm: fix irqfd build failure discovered in linux-next
Quoted 15 lines · Avi Kivity
Quoted 14 lines · Gregory Haskins
Stephen Rothwell noted a build failure in arch != x86 in last nights linux-next tree, as noted here:
http://lkml.org/lkml/2009/5/21/32
This patch corrects the build issue by requiring explicit support for IRQFD to be defined, and only defining it on x86 (the only arch fully supported). The code itself isnt architecture dependent, but we need to add a new file to each makefile, advertise the capability, and of course, test that it works for each supported arch. We will submit patches against each relevant arch at a later time to enable support there as well.
Quoted 11 lines
arch/x86/kvm/Kconfig config HAVE_KVM_IRQCHIP · line 14
Quoted 5 lines
arch/x86/kvm/Kconfig +4
-0+config HAVE_KVM_EVENTFD + bool + default y +The build system will complain if it sees a symbol used but not defined; so you have to define it for all four archs. So I went ahead and did
virt/kvm/Kconfigand adapted your patch to use it.
Cool, thanks!
-Greg