Re: RFC/patch portability: split kvm_vcpu_ioctl v1

Avi Kivity
2007-10-11T17:47:38Z

> This patch splits kvm_vcpu_ioctl into archtecture independent parts, and
> x86 specific parts which go to kvm_arch_vcpu_ioctl in x86.c.
>
>
> static inline int kvm_mmu_page_fault(struct kvm_vcpu *vcpu, gva_t gva,
> Index: kvm/drivers/kvm/kvm_main.c
> ===================================================================
> --- kvm.orig/drivers/kvm/kvm_main.c 2007-10-11 15:41:33.000000000 +0200
> +++ kvm/drivers/kvm/kvm_main.c 2007-10-11 19:03:18.000000000 +0200
> @@ -28,7 +28,6 @@
> #include <linux/gfp.h>
> #include <linux/mm.h>
> #include <linux/miscdevice.h>
> -#include <linux/vmalloc.h>
> #include <linux/reboot.h>
> #include <linux/debugfs.h>
> #include <linux/highmem.h>
>

This is wrong -- kvm_main.c calls vmalloc() so this is needed. The fact
that it is included by something else doesn't mean we can remove it; we
don't want to depend on random #includes within header files.

Only remove a #include if nothing within the including file depends on it.

--
error compiling committee.c: too many arguments to function